Dynamic Timeframe option

I need to create a custom option in the timeframes drop down menu that will vary depending on the user. For example, lets say that I want to filter by "year to date" but instead of using Jan 1 as the start date, each user's year starts on their hire date instead of Jan 1.

So I would want the user to be able to filter by: day, week, month, hire date to now
where the start date to filter by would be each user's hire_date (column) in our user sql table

ie: If my hire date is 9/3/23, my "hire date to now" filter would be 9/3/23-2/16/24 (if i were to select it in the calendar), but i want to be able to just click "hire date to now" from the drop down menu, just like i would select "year to date" and it filters using those dates.

How can I do this?

hiredate-01.png

0 1 557
1 REPLY 1

Hey @dananananan !
I'm afraid that currently the Presets inside of the date filters cannot be edited. You will need to create a custom filter parameter where you specify those options and you create a dynamic dimension that gathers the conditions to filter using Liquid.
If you are not familiar with this I recommend you to check those articles as they explain this as a Period over Period analysis:
Methods for Period Over Period (PoP) Analysis in L... - Google Cloud Community
parameter  |  Looker  |  Google Cloud
You will need to get a little bit creative to build it as you may need to include some specific date for each user using user attributes.
Let me know if you are not aware of the steps or if you have any other questions.

Hope I helped 🙂

Top Labels in this Space
Top Solution Authors