Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hey all,
I have a date slicer that filters the last 14 months using a calculated column in the calendar table. When the "Last 14 Months" is selected on the slicer, it correctly displays only the last 14 months. However, when deselected, I’d like the slicer to show available years instead of months.
Is there a way to achieve this dynamic behavior?
Thanks!
Solved! Go to Solution.
Hi @llealsantos
If I understood your question correctly, one way to achieve this is by modifying or adding a calculated column in your calendar table.
The column should return "Last 14 Months" if the date falls within the last 14 months. Otherwise, it should return the year of the date.
Then, you can use this new column as the slicer instead of the date column. This way, when "Last 14 Months" is selected, it will filter accordingly, and when it's deselected, it will show years instead.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi @llealsantos,
As we haven’t heard back from you, we wanted to kindly follow up to check if the below solution provided for your issue worked? or let us know if you need any further assistance here?
Thanks,
Prashanth Are
MS Fabric community support
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and give Kudos if helped you resolve your query
hi @llealsantos,m
As we haven’t heard back from you, we wanted to kindly follow up to check if the below solution provided for your issue worked? or let us know if you need any further assistance here?
Thanks,
Prashanth Are
MS Fabric community support
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and give Kudos if helped you resolve your query
Hi @llealsantos,
As we haven’t heard back from you, we wanted to kindly follow up to check if the below solution provided for your issue worked? or let us know if you need any further assistance here?
Thanks,
Prashanth Are
MS Fabric community support
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and give Kudos if helped you resolve your query
Hi @llealsantos try creating dynamic bookmarks that allow users to toggle between
Hi @llealsantos
If I understood your question correctly, one way to achieve this is by modifying or adding a calculated column in your calendar table.
The column should return "Last 14 Months" if the date falls within the last 14 months. Otherwise, it should return the year of the date.
Then, you can use this new column as the slicer instead of the date column. This way, when "Last 14 Months" is selected, it will filter accordingly, and when it's deselected, it will show years instead.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
If I got your question correctly, try creating a calculated column like this:
SlicerOption = IF([Date] >= EDATE(TODAY(), -14), FORMAT([Date], "MMM YYYY"), FORMAT([Date], "YYYY"))
Use this in your slicer to dynamically switch between months and years based on selection.
@llealsantos maybe leverage field parameters to change the values dynamically.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
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!
| User | Count |
|---|---|
| 97 | |
| 73 | |
| 50 | |
| 46 | |
| 44 |