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
Tom_Y
Helper III
Helper III

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
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.