Forum Discussion

Amymai's avatar
Amymai
Frequent Visitor
7 years ago

Sum + DatesInPeriod didn't work.

Hi guys,

 

I tried to show 3 previous months from the selected month using DatesInPeriod function but it didn't work well. 

 

My measure is: 

Total Stock Value last 3 month =
CALCULATE(
Sum('KPI[$ Value SOH])
,
DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-3, MONTH))
 
I guess the issue comes from the data but I can't figure out what's wrong with it. Please help!!
 
Here is pbix file
 
Thank you!
 
 

3 Replies