Forum Discussion
Running Total on a non-date column
- 10 years ago
Please try with following Calculated Measure for the cumulative sales. It should be able to reduce the calculation.
Cumulative_Sales_Measure = CALCULATE ( SUM ( Table1[Sales] ), FILTER ( ALL(Table1), Table1[Sales] >= MAX ( Table1[Sales] ) ), VALUES ( Table1[Brand] ) )
Regards,
Thanks for the reply..
I got stuck on
RANKX (
FILTER ( Table1, EARLIER ( Table1[Brand] ) = Table1[Brand] ),
Table1[Sales]
)EARLIER/EARLIEST refers to an earlier row context which doesn't exist.
Looking for a workaround...
Please make sure you’re creating a Calculated Column instead of a Measure with above formulas.
Regards,
- RafalK10 years ago
Advocate IV
Thanks Simon,
This solution might work in theory, but the calculation eats all of my RAM (13 GB) and drops due to lack of space.
Perhaps Power BI just can't handle those calculations. I would probably have to push that to a Calculated Measure and this may be impossible.
Such a simple task, yet so hard to implement.
Thanks for the help.
- v-sihou-msft10 years ago
Microsoft Employee
Please try with following Calculated Measure for the cumulative sales. It should be able to reduce the calculation.
Cumulative_Sales_Measure = CALCULATE ( SUM ( Table1[Sales] ), FILTER ( ALL(Table1), Table1[Sales] >= MAX ( Table1[Sales] ) ), VALUES ( Table1[Brand] ) )
Regards,
- metxtli9 years agoRegular Visitor
Hi!
Did you found a solution to the memory problem? I have the same problem, we are trying to do the same exercise you put on the table.
Regards
JCarlos
- jyothiK3 years agoRegular Visitor
S.no Job Name Fail_count Running_fail_count_Sum 1 sapbw 110 110 2 Sslog 90 200 3 tdnxt 63 263 4 rtxls 22 285 How do i get the S.No generated based on Fail_count ? and running_count as shown in the sample. .. Job_name and Fail_count is available.