Forum Discussion
Calculate total column value in power query
- Anonymous3 years ago
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 _ RongtieIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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.