Forum Discussion
Prior Corresponding Period
- 5 years ago
You can use the function SAMEPERIODLASTYEAR. Example:
Measure 1 LY = CALCULATE ( [Measure 1], SAMEPERIODLASTYEAR ( DimDate[Date] ) ) - 5 years ago
Hi gbii1970
You can try measure like:
= DATEADD(DateTime[DateKey],-1,year)= CALCULATE(SUM(ResellerSales_USD[SalesAmount_USD]), SAMEPERIODLASTYEAR(DateTime[DateKey]))For more information, you can refer:
SAMEPERIODLASTYEAR function (DAX) - DAX | Microsoft Docs
DATEADD function (DAX) - DAX | Microsoft Docs
If you still have some question, please don't hesitate to let me known.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!
Hi gbii1970
You can try measure like:
= DATEADD(DateTime[DateKey],-1,year) = CALCULATE(SUM(ResellerSales_USD[SalesAmount_USD]), SAMEPERIODLASTYEAR(DateTime[DateKey]))
For more information, you can refer:
SAMEPERIODLASTYEAR function (DAX) - DAX | Microsoft Docs
DATEADD function (DAX) - DAX | Microsoft Docs
If you still have some question, please don't hesitate to let me known.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!