Search code examples
filterdata-visualizationdashboardlooker

Force looker to filter between the 1st of the year and today dynamically?


In looker I can set exact date filters or I can set rough filters. I want to be able to define a range dynamically. For example the start of the year up to today would be the goal.

If I select this year I get a bunch of zeros for the months that have not happened yet.

enter image description here

If I set it to the past 7 months (during July) I can see the data I want but as soon as it is the next month then we will be missing the 1st month of the year.

enter image description here

How do I display all months of current year without display months that have not happened yet?


Solution

  • One quick work around to displaying Year to Date is to combine advanced filter, especially with time dimension_group.

    You can filter on different granularity levels in order to add an AND clause as the example below:

    enter image description here

    The double filters would result as below:

    enter image description here

    Obviously, you can hide the columns that are not needed in the visualization afterwards.

    Hope it helps!