Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
Hello Power BI Gurus,
I'm looking for a simple solution to have a 12 month slicer that dynamically defaults to the latest complete month. For example, while we are in Apr 2023, I wanted to have a slicer with the last 12 complete months: Mar 2023, Feb 2023, ..., Apr 2022 and it defaults to the latest complete month - Mar 2023 in this example. I've come across a few posts that suggest how to make the latest month/current month/today as default but can't figure out how to have a list of months on top of it.
Note: I have a calendar table in my report.
See a screenshot of a similar slicer that I built in another BI platform.
Thank heaps in advance for any suggestsions.
Regards
Hi @Sambath ,
Your second requirement is currently not supported. I've read somewhere in the internet that this may be a thing soon but I can't find that in the current Power BI roadmap. Alternatively, you can add a calculated column that indicates whether period is the latest one.
For your first requirement, you have to create a calculted column to filter the available periods to show only the last 12 ones. Here's a sample formula
Number of Months from Current =
VAR __months =
DATEDIFF ( Dates[Date], MAX ( Dates[Date] ), MONTH ) + 1
RETURN
__months <= 12
Please see attached pbix for your reference.
Proud to be a Super User!
Hi Sambath,
You probably want to apply a relative date filter to your slicer using the date field from your calendar. This wil show al list of the last twelve completed months. Is far as I'm aware you cannot set a dynamic default, but with sort you can set the latest month to show up on top.
Hope this helps!
Thank for the prompt response but I wanted these two features: default to the latest complete month and a list of the last 12 months for users to select.
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.