Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

SAMEPERIODLASTYEAR

Hi there,
 
I'm using the formula below to get last year's value:
 

 

Yield-1Y = CALCULATE(SUM('US Treasury'[Yield]),DATEADD('US Treasury'[Date],-1,YEAR))
or
Yield-1Y = CALCULATE(SUM('US Treasury'[Yield]),SAMEPERIODLASTYEAR('US Treasury'[Date]))

 

How can I ask it to get the latest available data before last year if last year appears to have blank data eg its a holiday or weekend?

 

3 Replies