Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Dorfi
Regular Visitor

Expression.Error: We cannot apply field access to the type Function.

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)

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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.

 

 

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

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.

 

 

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.