Forum Discussion
How do I create a cumulative sum over multiple columns?
- Anonymous9 years ago
After importing the SQL table to Power BI Desktop, add an index column to the table in Query Editor.Then create the Cumulative measure using the DAX below.
Cumulative = CALCULATE(SUM('sample'[Last_Mo_Collections]),FILTER(ALL('sample'),'sample'[Index]<=MAX('sample'[Index])))
Regards,
After importing the SQL table to Power BI Desktop, add an index column to the table in Query Editor.
Then create the Cumulative measure using the DAX below.
Cumulative = CALCULATE(SUM('sample'[Last_Mo_Collections]),FILTER(ALL('sample'),'sample'[Index]<=MAX('sample'[Index])))
Regards,