Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Chapin4u
Microsoft Employee
Microsoft Employee

Special date parameters

Hi, don't know if it's possible to do with parameters, but need 2 parameters 1 for the current year and the other for the previous month of the actual month. So when the report opens it automatically filters the visuals in the report that depends on the 2 slicers now, year and month. Any other ideas on how to do it are welcome. Thanks.

1 ACCEPTED SOLUTION
MattAllington
Community Champion
Community Champion

I recommend you do this as a calculated column in your calendar table. I normally have a regular year column and a regular month column. Then create a second set of columns and create a test that swaps the current year and current month to the word "current" or similar. Then add these new columns as slicers on your report. As the report refreshes, the new 2x columns will change the reference as needed. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

View solution in original post

2 REPLIES 2
MattAllington
Community Champion
Community Champion

I recommend you do this as a calculated column in your calendar table. I normally have a regular year column and a regular month column. Then create a second set of columns and create a test that swaps the current year and current month to the word "current" or similar. Then add these new columns as slicers on your report. As the report refreshes, the new 2x columns will change the reference as needed. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Wow! Thanks Matt, what great idea.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.