Forum Discussion
Dynamic Date Slicer
- 9 months ago
Hi BarnyQuack
Using Tabular Editor, you need to levareage the Group by Columns property to "store a filter by using an alternate value, which represents the key of the entity." Power BI uses this key to store the filter, allowing the corresponding filter value in the visual to change dynamically. For instance, if May-24 is selected in the visual and currently has a key of 0, when June arrives, May will shift to a key of 1, and June will take the key of 0. Please note that if you're using a dropdown, although the filters have actually changed, the slicer selection doesn't.
Further reading in the video description: https://youtu.be/MrEAZREQuXM
BarnyQuack , we usually use a current month text in a new column and use that as default
Need to be adjusted as per need
Month Type = Switch( True(),
eomonth([Date],0) = eomonth(Today(),-1*month(Today())),"Last year Last Month" ,
eomonth([Date],0) = eomonth(Today(),-1),"Last Month" ,
eomonth([Date],0)= eomonth(Today(),0),"This Month" ,
Format([Date],"MMM-YYYY")
)
Default Date Today/ This Month / This Year: https://www.youtube.com/watch?v=hfn05preQYA
Many thanks for the advice! That is much appreciated.
That is a great idea, My user wants to keep their date hierarchy i.e. year/quarter/month.
Is there a way to incorporate that?
- kushanNa9 months agoSuper User
if amitchandak 's suggested solution works for you, you can create three separate columns: one for the Year, one for the Quarter, and one for the Month(suggested) in MMM format. Then, add all three columns to the slicer. It will display a hierarchy like Year → Quarter → Month(suggested)
oh and also you will need to create another column month in MM format to sort the suggested column