Forum Discussion
Anonymous
5 years agoNot applicable
Running Total not correct when adding extra field
Hi! I have been using this running total measure for several years now and never had any problem with the result, until now. CALCULATE(SUM(fact[Quantity]),FILTER(ALLSELECTED(calendar[datetim...
amitchandak
Super User
5 years agoTanushree_Kapse , Anonymous , Based on what I got so far. So if take order number from fact and running total logic from the calendar then it running total within the order number. Value for *19 and *20 repeated for null value rows .
Try
RunningTotal =
CALCULATE (
SUM ( fact[Quantity] ),
FILTER ( ALL ( fact), fact[Datetime] <= MAX ( fact[Datetime] ) );
)
or
RunningTotal =
CALCULATE (
SUM ( fact[Quantity] ),
FILTER ( ALLSELECTED ( fact), fact[Datetime] <= MAX ( fact[Datetime] ) );
)
Anonymous
5 years agoNot applicable
Hi amitchandak
The second measure is almost correct, but as you can see the cumulative is not working correctly in some cases. See the yellow amounts where only the last of the three is correct.
- Anonymous5 years agoNot applicable
amitchandak @Tanushree_Kapse Any update on this problem?