Forum Discussion
gvlado
2 years agoAdvocate III
Running totals backwards
Dear community friends I am curious about how to make measure for running totals backwards - from today back into the past. I have Today inventory, at the end of the day (900), Also have income e...
- Anonymous2 years ago
Hi gvlado ,
As Nithinr said, it is possible to do what you need to do based on this DAX code, here are my thoughts and additions.
First create a table.
A slight change to Nithinr's DAX code will give you the results you need.
MEASURE = VAR _A = CALCULATE ( SUM ( 'Table'[IN-OUT] ), FILTER ( ALL ( 'Table' ), 'Table'[Date] >= MIN ( 'Table'[Date] ) ) ) VAR _AA = _A + 900 RETURN _AABest Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- 2 years agoSmall correction 900 -> 1000
And types of columns must be defined
---- BOMeasure----------
Measure =VAR _A = CALCULATE(SUM('Table'[IN-OUT]),FILTER(ALL('Table'),'Table'[Date] >= MIN('Table'[Date])))VAR _AA = _A + 1000RETURN_AA--- EOMEasure---
Anonymous
2 years agoNot applicable
Hi gvlado ,
As Nithinr said, it is possible to do what you need to do based on this DAX code, here are my thoughts and additions.
First create a table.
A slight change to Nithinr's DAX code will give you the results you need.
MEASURE =
VAR _A =
CALCULATE (
SUM ( 'Table'[IN-OUT] ),
FILTER ( ALL ( 'Table' ), 'Table'[Date] >= MIN ( 'Table'[Date] ) )
)
VAR _AA = _A + 900
RETURN
_AA
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
gvlado
2 years agoAdvocate III
Small correction 900 -> 1000
And types of columns must be defined
---- BOMeasure----------
Measure =
And types of columns must be defined
---- BOMeasure----------
Measure =
VAR _A = CALCULATE(
SUM('Table'[IN-OUT]),
FILTER(
ALL('Table'),
'Table'[Date] >= MIN('Table'[Date])
)
)
VAR _AA = _A + 1000
RETURN
_AA
--- EOMEasure---