Hi everyone,
I am building a dashboard with visuals that show sales at an event selected by a control filter. Currently the event list in the filter is sorted by date, but I have the default set to blank because I couldn’t figure out how to set the default to be the event on the most recent date. Is there a way to do this?
event_date is a separate field from event_name, but I have the list sorted already so if there is a way to select the top item in the list for the filter by default then that would be ideal.
If anyone can help, I would greatly appreciate it!
Hi @speyerb,
Welcome to the Quick Community! A workaround you can try is to create a calculated field like this…
ifelse(
Date = maxOver(Date, [], PRE_AGG),
1,
0
)
…and you can put a filter control on it and you can reset your visual view to the “True” case.
Please let me know if this workaround is applicable to your use case. If not, please let us know and we can try a different approach.
Thank you!
Hi Luis. Thanks for your suggestion. I’m afraid this is not applicable to my approach because I am trying to modify the default value selected in a parameter/control, not a visual. Is there anyway to make the parameter default dynamic in this way I am describing?
Hi @speyerb
You may need to use a prefix to your field that you want in the filter (add as an additional field in your dataset) to make it show in the order you want.
The sort order is not part of the options in the parameter. So you need to handle it in your field name itself.