Tricks

How to filter your Looker Studio report with an horizontal menu bar (thanks to a simple treemap chart)


How to filter Looker Studio report with an horizontal menu bar

Author edit – November 14, 2022

I wrote this article in July 2019, just after the release of treemap chart on Google Data Studio. Since then, our data viz has been rebranded to Looker Studio and a lot of changes on the user interface have been applied. The opportunity (and the necessity) to refresh this article ๐Ÿ™‚



The result

This article describes how to create an horizontal menu bar (like on a website) to use it as a dimension filter. First, let’s discover the result below.


Menu bar for your Looker Studio report: The result


Treemap chart configuration

Draw your treemap chart using the full width of your report page and a small height.

  • Setup tab
    • Select your dimension
      (Default channel grouping in the example)
    • Create a chart calculated metric, name it “One” and fill just 1 as formula
    • Turn on cross filtering in chart interactions section
  • Style tab
    • Define the wished background color for the menu items through mid color value selection
    • Turn off branch header and scale bar
    • Adapt the text size and other style options
    • “Do not show” the chart header

Explanations

Here some explanations about the configuration above

  • Inside Google Looker Studio and except for tables, treemap chart is the only way to get dynamic clickable areas displaying dimension values as label (and not metric value)
  • Using 1 static metric value for all dimension values is a way to get equal treemap areas for our menu
  • Sizing the treemap with a small height will draw all the equal areas on the same line
  • Because all dimension values get 1 as metric value, mid color value will be used for all equal areas
    (so no need to define max and min color value)

Configuration review

Let’s make a quick review of the simple configuration with a short video.




Alternative #1 – Vertical menu bar

You can do the same but vertically. You need to test if it is convenient for your reporting design and compatible with your data set. It is more complicated to fit and get one row by item. Here an example.


Looker Studio vertical menu bar to filter data

Alternative #2 – Treemap chart, combined with emojis

If you combine this trick with the usage of emojis instead of text for dimension values like described in another article of Looker Studio, you can build a graphical version of the bar menu with icons. It keeps it as simple as possible, without overlay trick or a dependency with a custom viz.


Menu bar with emojis inside Looker Studio

At last, if you filter options are static, parameter feature is a nice solution and allow a lot of way to design it, in combination with available controls.


Pas besoin d’arbre, un roseau suffit