Forum Discussion
Anonymous
4 years agoNot applicable
Forward rolling total demand
The values are spread over different attributes such as Production, Demand, ETA etc. I need to find out a 3 month total demand calculated from any selected date. Following are the DAX i tried. But th...
- 4 years ago
Hi, Anonymous ;
Try it.
3 months total values = VAR LastDate_ = LASTDATE(Append1[Week Start date]) RETURN IF(MAX('Append1'[Attributes])= "Demand",CALCULATE( SUM(Append1[Value]), DATESINPERIOD(Append1[Week Start date], LastDate_,- 3, MONTH),Append1[Attributes]="Demand"))the final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yalanwu-msft
Community Support
4 years agoHi, Anonymous ;
Try it.
3 months total values =
VAR LastDate_ = LASTDATE(Append1[Week Start date])
RETURN
IF(MAX('Append1'[Attributes])= "Demand",CALCULATE(
SUM(Append1[Value]),
DATESINPERIOD(Append1[Week Start date], LastDate_,- 3, MONTH),Append1[Attributes]="Demand"))
the final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.