Forum Discussion
measure
- 9 years ago
Hope this helps! :smileyhappy:
New Table = SUMMARIZE ( 'Table', 'Table'[Type], "Count of Type", COUNTROWS ( 'Table' ), "Type Rank by Count", RANKX ( ALL ( 'Table'[Type] ), CALCULATE ( COUNTROWS ( 'Table' ) ) ) ) Cumulative Sum Column = CALCULATE ( SUM ( 'New Table'[Count of Type] ), FILTER ( 'New Table', 'New Table'[Type Rank by Count] <= EARLIER ( 'New Table'[Type Rank by Count] ) ) )Continued here...
http://community.powerbi.com/t5/Desktop/cumulative-sum/m-p/136762/highlight/false#M58688
Sean and Phil_Seamark
thanks, i tried but i have different result from what is expected. the rank is 1 for all, see below:
in addition, i realized the result will be fixed bu i need something that could change at a later stage. i have another column for the product code, then new ones will be added later. i will then need the cumulative sum based on the new column (product code) and not the type. thank you so much for providing time to help.
i think i found an issue. the products column is actually text, i have then created another column where i put 1 in every row and the rank fomula was corrected.
tahnks for all hte help.
- Phil_Seamark9 years agoMicrosoft Employee
Nice work theo