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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Chapin4u
Employee
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

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.

View solution in original post

2 REPLIES 2

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.

Wow! Thanks Matt, what great idea.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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