Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Prevent Samepriodlastyear from propagating?

I have the below measures:

 

 

 

Revenue YTD := CALCULATE([Revenue] , DATESYTD('Date'[Date] ,"31/05" ))



Revenue LYTD:=CALCULATE( [Revenue YTD],  SAMEPERIODLASTYEAR('Date'[Date]))

 

 

 

The first one works fine, I would like to modify the second... I would like the SAMEPERIODLASTYEAR('Date'[Date])) to work as it is (that is, bringing the dates for last year), but I want that only to affect Revenue and nothing else.

 

 

(I have another dimension that is connected to date, and the SAMEPERIODLASTYEAR('Date'[Date)) brings the values from last year in that dimension which I don't want...)

1 Reply

  • aj1973's avatar
    aj1973
    Community Champion

    Hi Anonymous 

    Just replace Revenu YTD by Revenu