Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello I want to find the cumulative production of one column, like this:
Year | Prouction | Cummulative |
1 | 5 | 5 |
2 | 80 | 85 |
3 | 14 | 94 |
4 | 56 | 70 |
5 | 78 | 134 |
How can I make the cummulative column?
Solved! Go to Solution.
Hi @OscarSuarez10 ,
Try this calculated Column:
Calculated Column = VAR PreviousRow = TOPN ( 1, FILTER ( RUnn, RUnn[Year] < EARLIER ( RUnn[Year] ) ), [Year], DESC ) VAR PreviousValue = MINX ( PreviousRow, [Production] ) RETURN RUnn[Production] + PreviousValue
*RUnn is my table name
Here is what I get:
Let me know if this works.
Thanks,
Tejaswi
hi, @OscarSuarez10
Try this formula to create a measure
Measure = var _prevalue=CALCULATE(SUM('Table'[Prouction]),FILTER(ALL('Table'),'Table'[Year]=MAX('Table'[Year])-1)) return SUM('Table'[Prouction])+_prevalue
Result:
Best Regards,
Lin
Hi @OscarSuarez10 ,
Try this calculated Column:
Calculated Column = VAR PreviousRow = TOPN ( 1, FILTER ( RUnn, RUnn[Year] < EARLIER ( RUnn[Year] ) ), [Year], DESC ) VAR PreviousValue = MINX ( PreviousRow, [Production] ) RETURN RUnn[Production] + PreviousValue
*RUnn is my table name
Here is what I get:
Let me know if this works.
Thanks,
Tejaswi
User | Count |
---|---|
124 | |
106 | |
99 | |
63 | |
59 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |