When it comes to building dashboards, a common request from our clients is to have different date filters affect different sections of the dashboard. While this might help meet some departmental data visualization requirements, this practice can be confusing from a usability standpoint. 

Sure, you could add static text boxes to divide the dashboard into sections providing better context on which filter is used to control which section. But a better approach would be to add a Dynamic Date Tile to your dashboard.

Why Dynamic Date Tiles?

Dynamic Date Tiles highlight the date range currently being used as a filter for the defined section. This makes it easier to understand the current date range applied to that section of the dashboard, reducing overall confusion for users. 

In this post, we will explore how to successfully create a Dynamic Date Tile within Looker.

Start with LookML Adjustments

Begin by adjusting the base lookml to display a range of values when the date filter is not set (date_range is null). In the example case shown below, we have adjusted the case statement to use the start and end dates of the current year.

Note: Using Google BigQuery Standard SQL

Dashboard Filter Set-up

The next thing you need to do is set up your dashboard filter. Create a single value tile based on the display_date_range dimension which will display the value the user selects in the next step.  

Once you have added the Dynamic Date Tile, add a new date filter to the dashboard. Then, edit the filter to apply to the specified tiles on the dashboard including the previously added single value tile. See screenshot below for an example of how to configure within Looker.

Need Help?

If you would like to have Data Clymer help you with your data and analytics strategy or with the development of your modern data stack, Contact Us anytime. Our Looker experts can also help you optimize Looker performance with a Looker Health Check. We’ll help you eliminate slow load times and errors, so you can get more value out of your tool. 

Naveed Lakhani

Naveed is a data engineer and analyst with a sharp eye on business outcomes. Combined with excellent communication, he will drive any organization to become more data-driven.

Naveed