Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have built a dashboard that uses a variable as time dimension in visualizations. The variable $(day_date_var) is defined as date(day_date). The user can select if he wants to see data aggregated on a daily, weekly or monthly basis by selecting either option from a dropdown (via variable input extension).
The variable values within the dropdown are defined as the following:
Daily: date(day_date)
Weekly: WeekEnd(day_date)
Monthly: Month(day_date)
Now, when the dashboard is opened, the default option in the dropdown is always "Daily". How can I change this to "Weekly" being the default option?
Hello,
Create a variable and pass WeekEnd(day_date) as a value for that variable and set that variable in your drop down extension.
Instead of defining the day_date_var as date(day_date), define the variable with weekend (today()) or likewise.
Thanks for your feedback. Defining the variable as WeekEnd(day_date) works in that sense that the visualizations get rendered aggregated on a weekly basis, so that's cool 🙂 But the dropdown menu that I use to give the user the chance to change the aggregation level still shows "Daily" instead of "Weekly", thus misleading the user 😞
Sadly, I wasn't able to find a solution yet. Does someone have another idea?
Hello,
Create a variable and pass WeekEnd(day_date) as a value for that variable and set that variable in your drop down extension.
Can you explain for the dropdown is created and why the selection is pointing to the Daily.
What is the default value for the variable which you have pulled for drop-down in variable input button
After some testing the way that you suggested works! I initialize the variable now as WeekEnd(day_date) and that did the trick. I don't know why I saw the weird behavior before but now the dropdown shows the correct value 'Weekly' as well.
Thank you!