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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Tom_Y
Advocate II
Advocate II

Filtering Matrix Visual - Showing Last Month of Previous Year

Hi all,

Is there any way to show "last month of previous year"? Currently I just use simple relative filter to show last "full calendar month", but i want to put last year same month together as a comparison.

so in next month (May 2024), the matrix will show April 2023 and April 2024 only.

I tried to make DAX measure to find "Last month of previous year" but I can't drag it into the filter pane.

Thanks in advance.

 

Tom_Y_0-1713431452148.png

Tom_Y_1-1713431487177.png

 

1 ACCEPTED SOLUTION
audreygerred
Super User
Super User

Hello! You can create a measure for that by doing Your Measure LY = CALCULATE([Your Measure], SAMEDATELASTYEAR ('YourDateTable'[Date])) then put your new measure in your visual next to your other measure.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

3 REPLIES 3
audreygerred
Super User
Super User

Hello! You can create a measure for that by doing Your Measure LY = CALCULATE([Your Measure], SAMEDATELASTYEAR ('YourDateTable'[Date])) then put your new measure in your visual next to your other measure.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Thanks! Just sorted it. I was using Countx but it doesn't work. Calculate(Count.... , Sameperiodlastyear.... then it works!

Awesome! Happy I could help!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





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