- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Calculate total column value in power query
Hello everyone, I have a situation, I want to assemble a column of cumulative total of the value of the column "Rs" to be able to take an average of it.
This is the way I want to visualize it but it is calculated automatically because it comes from a database that they constantly update.
Thank you very much, I hope
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi ,
Please have a try.
Click on the 'Add Column' tab in the ribbon, and then select 'Custom Column'.In the 'Custom Column' dialog box, enter a name for the new column (e.g. 'Cumulative Total').In the 'Custom Column' dialog box, enter the following formula:
= List.Sum(List.FirstN([Rs], CurrentRowIndex + 1))
This formula calculates the cumulative total of the 'Rs' column up to the current row.
Once you have created the cumulative total column, you can take an average of it by selecting the column and clicking on the 'Average' button in the 'Transform' tab of the ribbon.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi ,
Please have a try.
Click on the 'Add Column' tab in the ribbon, and then select 'Custom Column'.In the 'Custom Column' dialog box, enter a name for the new column (e.g. 'Cumulative Total').In the 'Custom Column' dialog box, enter the following formula:
= List.Sum(List.FirstN([Rs], CurrentRowIndex + 1))
This formula calculates the cumulative total of the 'Rs' column up to the current row.
Once you have created the cumulative total column, you can take an average of it by selecting the column and clicking on the 'Average' button in the 'Transform' tab of the ribbon.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources
User | Count |
---|---|
123 | |
104 | |
84 | |
49 | |
46 |