Forum Discussion
Cumulative total more than current value using current filters
- 5 months ago
I am not exactly sure what you ask but I far as I understand this could help:
Cumulative Total = COUNTROWS ( FILTER ( ALLSELECTED ( 'ASSET' ), 'ASSET'[Calc_Age] <= MAX ( 'ASSET'[Calc_Age] ) ) )
Hi jankooy
As I understand it, you want to accumulate the asset quantity while keeping the other slicers effective.
To achieve this requirement, you only need to accumulate based on Asset Age. You can try the following measure:
Cumulative Total =
VAR tempTbl = ADDCOLUMNS(ALL(ASSET[Asset Age]),"Asset Count",[Count at age])
VAR CurRowAge = MAX(ASSET[Asset Age])
RETURN
SUMX(
FILTER(tempTbl,ASSET[Asset Age]<=CurRowAge),
[Asset Count]
)
Since I’m not sure about your table structure, the table names and column names are based on the example table you provided. You can change them to your actual column names.
In addition, if [Count at age] is not a measure, but is obtained by directly dragging a field into the table, then you can replace it with the following expression:
Count at age = CALCULATE(COUNT(ASSET))
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~