The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I have the following slicer:
all measures work based on the selected start period and selected end period. I got a requirement, that when client opens the report, by default always the last available month should be selected. I saw solutions that adds "Latest" to the selection. What I need is that when Aug data will be added the selection should show Aug-22 , no text like "Latest" etc...
And at the same time, my measures should not break.
Is that possible?
Thank you!
Hi @bsz412 ,
I'm afraid you can't do that. In a slicer, we can only filter the latest value, but the value cannot be selected automatically, select a value in slicer is something have to be done manually.
Even with the Relative date in the visual filter, you can see, the correct date be filtered in the slicer, but not be selected. The slicer cannot filter other visuals and if you use SELECTEDVALUE([Column1]) in a measure, it will also return nothing.
As a workaroud, you can choose Timeline chart, there is an option-latest available period, which can always select the latest date in the slicer.
Best Regards,
Kaly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@bsz412 , As of now in power bi you have work with a workaround like the latest month of the current month
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")
)
or
Month Type =
var _today = max(Table[Date])
return
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),"Latest Month" ,
Format([Date],"MMM-YYYY")
)
Please log an idea for what you need or vote for the existing one