Forum Discussion
Anonymous
5 years agoNot applicable
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 Trea...
v-angzheng-msft
5 years agoCommunity Support
Hi, Anonymous
Getting the data for the same period last year is not difficult to implement, but if additional judgments are needed for working days, more complex logic may be required.
You can try using the LASTNONBLANKVALUE function to get help.
https://community.powerbi.com/t5/Desktop/LASTNONBLANKVALUE-challenging-problem/m-p/1749034
Or consider using other similar time functions, such as Dateadd, EDATE and other functions
https://databear.com/power-bi-dax-sameperiodlastyear-paralellperiod-and-dateadd/
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.