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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
AhmadBakr
Advocate II
Advocate II

Error while using Table.TransformColumns

Any one can help why I am getting this error message:

Expression.Error: We cannot apply field access to the type Number.
Details:
Value=1.387
Key=FY2023-CIF

When I use this transformation:

= Table.TransformColumns( #"Replaced Value", { { "FY2023-Jan", each [#"FY2023-CIF"] } } )

 

I want to replace the values in "FY-2023-Jan" column with those in "FY2023-CIF" column

 

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hi @AhmadBakr 

Table.TransformColumns only passes the value in the column being transformed as an argument to the function provided in the 2nd argument. This means that it cannot reference values in columns other than the one being transformed.

 

However, you can use Table.ReplaceValue like this:

= Table.ReplaceValue(#"Replaced Value", each [#"FY2023-Jan"], (_) as number => [#"FY2023-CIF"], Replacer.ReplaceValue, {"FY2023-Jan"})

 

See here.

 

Does this work for you?

 

Regards


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

View solution in original post

2 REPLIES 2
AhmadBakr
Advocate II
Advocate II

@OwenAuger thank you very much for the info and the workaround.

 

Pardon my late response, I have been extremly overloaded and working late nights. This is the first time I log into the forum since I posted the question.

OwenAuger
Super User
Super User

Hi @AhmadBakr 

Table.TransformColumns only passes the value in the column being transformed as an argument to the function provided in the 2nd argument. This means that it cannot reference values in columns other than the one being transformed.

 

However, you can use Table.ReplaceValue like this:

= Table.ReplaceValue(#"Replaced Value", each [#"FY2023-Jan"], (_) as number => [#"FY2023-CIF"], Replacer.ReplaceValue, {"FY2023-Jan"})

 

See here.

 

Does this work for you?

 

Regards


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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