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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
1up
Helper III
Helper III

Custom Column in Query Editor throwing "We Cannot apply field access to the type Function"

In trying to add a custom column in the query editor, an error is displayed.

 

"Expression.Error: We cannot apply field access to the type Function.
Details:
Value=[Function]
Key=Repairing Dealer - Country Description"

 

It would be nice to get a suggestion solution, and if possible a short explanation why the error happens. Have read another thread and creating a variable seemed to resolve the error.

 

My formula is looking for two specific customer names, and replaces them with other names, and for all other rows, the column value is to be adjusted into all-lower case.

 

if[#"CustomerName"] = "Charles" then "Charles Germany"
else if[#"CustomerName"] = "Nick" then "Nick UK"
else
Text.Lower[#"CustomerName"]

 

Thanks,

 

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

You need brackets

Text.Lower([#"CustomerName"])

View solution in original post

3 REPLIES 3
HotChilli
Super User
Super User

You need brackets

Text.Lower([#"CustomerName"])

I had the same error message when I forgot an "&" between two text fields I was appending. 

E.g., [Company] & " (" [Address]

Which needs to be [Company] & " " & [Address]

So it was that simple after all, thanks a lot, all of a sudden this day seems much better. 🙂

 

Any one knows why paranthesis are needed for the text.lower-statement, while it is not needed for the if-statement?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors