Forum Discussion
Mutli Select Dropdown - Timestamp - How to check the latest timestamp
How to have the latest timestamp selected on load in the multi select dropdown ? Can I simply sort the data, bind it and select the value at 0 index?
Hi. You can preselect the last date in a dropdown or regular slicer. The only thing you can do by default is converting a slicer with date column in relative date or relative time to create a filtering rule like "Last Calendar Day". That would for example filter the last day.
If you keep the idea of having a list and see the last X timestamp preselected changing, then power bi doesn't have it by default. You could use a custom visual I have seen many times used for this. It's this one: https://appsource.microsoft.com/en-us/product/power-bi-visuals/insiderscoop1611244107840.powerbi_customviz_preselected-slicer?tab=overview
I hope that helps
Here is the general approach. Adjust as needed
- create a string representation of your date column, replace the latest date with a string "Latest"
- sort that new column by the original date column
- add a slicer or visual/page/report level filter
- set the filter to "Latest"
- publish the pbix to the workspace/app
2 Replies
- ibarrauSuper User
Hi. You can preselect the last date in a dropdown or regular slicer. The only thing you can do by default is converting a slicer with date column in relative date or relative time to create a filtering rule like "Last Calendar Day". That would for example filter the last day.
If you keep the idea of having a list and see the last X timestamp preselected changing, then power bi doesn't have it by default. You could use a custom visual I have seen many times used for this. It's this one: https://appsource.microsoft.com/en-us/product/power-bi-visuals/insiderscoop1611244107840.powerbi_customviz_preselected-slicer?tab=overview
I hope that helps
- lbendlinSuper User
Here is the general approach. Adjust as needed
- create a string representation of your date column, replace the latest date with a string "Latest"
- sort that new column by the original date column
- add a slicer or visual/page/report level filter
- set the filter to "Latest"
- publish the pbix to the workspace/app