Forum Discussion
Expression.Error: We cannot apply field access to the type Function.
- Anonymous3 years ago
Hi Dorfi ,
To create the custom column you're looking for, you can use the following formula:
=[Amount in Company currency] / List.Sum([Amount in Company currency]) * 100This formula divides the "Amount in Company currency" column by the sum of the column, and then multiplies the result by 100 to get the percentage value. The List.Sum function is used to calculate the sum of the column. Make sure that the "Amount in Company currency" column is a numeric data type, otherwise the formula won't work. Also, make sure that you're creating the custom column in the correct table in the query editor.
Please refer to the document.
Dealing with errors - Power Query | Microsoft Learn
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 Dorfi ,
To create the custom column you're looking for, you can use the following formula:
=[Amount in Company currency] / List.Sum([Amount in Company currency]) * 100
This formula divides the "Amount in Company currency" column by the sum of the column, and then multiplies the result by 100 to get the percentage value. The List.Sum function is used to calculate the sum of the column. Make sure that the "Amount in Company currency" column is a numeric data type, otherwise the formula won't work. Also, make sure that you're creating the custom column in the correct table in the query editor.
Please refer to the document.
Dealing with errors - Power Query | Microsoft Learn
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.