Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi all,
My dashboard contains a dropdown slicer with a month value from the calender table to filter the visuals on the dashboard. I would like this dropdown slicer to automatically show the last month that is available in the calendar by default, but previous months must also stay available for the user to select.
At this moment, when a new month is added to the calendar table, it becomes available in the dropdown, but it keeps showing the original month as default.
I tried a few solutions that are mentioned within different forums, but they are all just a bit different then my case.
Can someone point me in the right direction to get this default date value dynamic?
Thanks a lot in advance!
With kind regards,
Danny
Solved! Go to Solution.
Ok, found a solution; add a column to the calendar table. In there put a formula "if month column value is previous month, then "previous month" else give month value. Then put this column in the slicer and set default value to "previous month". Seems a long way around, but does the trick.
@Danny_Stultiens , A new column in date table
Month Type =
var _max = maxx(allselected(Fact), Fact[Date])
Switch( True(),
eomonth([Date],0) = eomonth(_max,-1),"Last Month" ,
Format([Date],"MMM-YYYY")
)
or
Month Type = Switch( True(),
eomonth([Date],0) = eomonth(Today(),-1),"Last Month" ,
eomonth([Date],0)= eomonth(Today(),0),"This Month" ,
Format([Date],"MMM-YYYY")
)
save on last month in slicer
Default Date Today/ This Month / This Year: https://www.youtube.com/watch?v=hfn05preQYA
Hi Amitchandak,
Thank you for your quick reply. I have no issue to find the last date/month (just with the max function). But my issue is to set the default value on the slicer to the max value in de calendar table.
I expect that the answer is in your last reply "save on last month in slicer", but I do not exactly understand what you mean. I would like to prevent me from opening and saving the dashboard to the last month every time there is new data.
Ok, found a solution; add a column to the calendar table. In there put a formula "if month column value is previous month, then "previous month" else give month value. Then put this column in the slicer and set default value to "previous month". Seems a long way around, but does the trick.
User | Count |
---|---|
128 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |