Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register 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
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 55 | |
| 45 | |
| 38 | |
| 16 | |
| 14 |
| User | Count |
|---|---|
| 87 | |
| 68 | |
| 38 | |
| 29 | |
| 26 |