Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I am trying to display the date for the last closed month in my Power Bi report as a slicer.
For example, If I am in the month of May 2022, I want to select April 2022 as a default value in my slicer
If I am looking at my report in the month of June 2022, then May 2022 should be selected as a default value in my slicer.
Note: This selection should be dynamic.
Data for that slicer is coming from a Calendar[MonthYear] which has dates from Jan 2022 till Dec 2022
Not sure, but we might need to write a dax that can compare the date is closed or not, If not closed then show Today()-1 in the
format of MMM YYYY
@amikm , you have use workaround, Create a column like this and use that in slicer and save with last month
Month Type = Switch( True(),
eomonth([Date],0) = eomonth(Today(),-1),"Last Month" ,
eomonth([Date],0)= eomonth(Today(),0),"This Month" ,
Format([Date],"MMM-YYYY")
)
@amitchandak , thanks for your reply, After implementing the same, I am getting like this
If user wants to see for other months then how he can do this , as Slicer is only showing one value, and I don't want the user to clear the values from filter section
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!