Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi, In trying to add a custom column in the query editor, an error is displayed.
The dispayed Error is: Expression.Error. We cannot apply field access to the type Function
Details:
Value = [Function]
Key = Amount in Company currency
I want to create a new column that shows the percentage Value of each rows currency Value. I am trying to create a formula like this one:
=[Amount in Company currency]/ List.Sum[Amount in Company currency]/1
When I insert the Total of "Amount in Company currency" Column (example 300.000$)
= [Amount in Company currency]/ 300.000$/1, the formula works.
Unfortunatly I need a working formula that works flexible (if new Values would be added to the Column).
Thanks for the help (if possible)
Solved! Go to Solution.
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.
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.
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
12 | |
11 | |
7 | |
6 |