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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.