Can you show / hide filters on embedded content?

Knowledge Drop

Last tested: Jun 8, 2020

Yes you can! The way to do this is different depending on the type of content.

  • For User defined dashboards, you can use the embed settings option in the cog menu. (click the cog menu on the dashboard > Edit Embed Settings.)
  • For LookML dashboards, you can use the show_filters_bar parameter in the Dashboard LookML file code for your dashboard. For example:

embed_style:

background_color: "#f6f8fa"

show_title: true

title_color: "#3a4245"

show_filters_bar: true

tile_text_color: "#3a4245

text_tile_text_color: ''

show_filters_bar: false

For a Look, the filters are hidden by default but can be shown using the Show Filters on Embedded Looks toggle (available as of Looker 7.4).

This content is subject to limited support.                

Comments
Jiro
Staff

If you are using our new dashboards (released in beta late 2020), these settings are managed by Themes that are accessed in the admin panel under the Platform section.

More info here 

 

bwellsbury-1634
Explorer

@Jiro  our instance is brand new but doesn’t have the Themes option. Does it cost extra to have this enabled?

Jiro
Staff

@bwellsbury-1634  depending on which platform level (standard,advanced,elite) you have, it may be included. The best way to find out is to get in touch with your account manager who can see the specifics of your contract. 

fabio1
Staff

As of the 23.0 release, individual filters can now be hidden via URL parameter: https://cloud.google.com/looker/docs/admin-panel-general-labs#hide_dashboard_filters

ryan_orderly
Community Visitor

I’m using this feature with an embedded dashboard. My auth function has no trouble getting the signed URL from Looker, but when I actually try to view the dashboard the iframe fails to load with 

Refused to display 'https://orderlyhealth.cloud.looker.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Does anyone have any idea what’s happening here? The exact same dashboard works just fine if I don’t add a `hide_filter` param. I kind of wonder if I’m just putting it in the wrong order, since I know Looker is a bit touchy about ordering. But the documentation for the embed doesn’t specify where `hide_filter` should appear in the order, even though it does for every other param

Abner_Suniga
New Member

I wasn't able to hide the filters using this hide_filter. Does anyone have a working example?

mcastello-16392
New Member

Using the hide_filter doesn’t work for me either. I used the Embed URI Validator, and it gave me this error message:
 

Embed URI is not valid:

  • This request includes invalid params: ["hide_filter"]

I checked and the Beta feature is enabled on my Looker instance : 

3bcf22fb-0695-42dc-b656-eb9ef506dff1.png

@fabio1 any idea what the problem could be here? 
Thanks!

fabio1
Staff

Embed URI is not valid:

  • This request includes invalid params: ["hide_filter"]

There are two URLs in play when you are embedding - the URL of the target content/dashboard, and the URL that does the authentication (which itself contains the former URL as an encoded variable). The problem you are running into is that you’re applying a query parameter that is intended for the former URL to the latter URL.

You should instead first determine your “Embed Content URL” with this new parameter. It will look something like `/embed/dashboards/123?hide_filter=ABC`

This will then be encoded and used as part of the path in your signed SSO Embed URL. Since it has been encoded, it will not be considered a separate parameter in this new URL

Version history
Last update:
‎05-07-2021 09:48 AM
Updated by: