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

View all the Fabric Data Days sessions on demand. View schedule

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 Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors