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
Anonymous
Not applicable

DAX measure - Last Year measure that only shows values until today's date

Hi all,

 

I want to be able to compare Revenue TY (this year) with Revenue LY (last year). I want to be able to compare these measures both on a day, month and a year level. Thus, I do not want to show any future values for last year, even though these actually exist. As shown below I do want to get ride of the red numbers, and I want to ensure the the sum is correct in the yellow marked fields.

In the below picture todays date is 27-11-2017 (and we did not have any sales 27-11-2016, thus no values is shown for LY)

Capture.PNG

 

Can somebody help?

 

I have tried with some complex dax, but I figured out it dont work as intended. Thus I have started again with the simple calculation;

CALCULATE ( [Revenue Before Bonus], SAMEPERIODLASTYEAR ( '01 Calendar'[Calendar Date] ) )

 

20 REPLIES 20

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.