Table.TransformColumns - Expression.Error: We cannot apply field access to the type Text.

Radoslaw Poprawski

Active Member
Joined
Jun 19, 2021
Messages
398
Office Version
  1. 365
Platform
  1. Windows
Hello,
Ive been having this issue with Table.TransformColumns for a long time:

Power Query:
= Table.TransformColumns(Custom2, {"Invoice number/ Document reference number", each if Text.Middle(_, 0,3) = "ING" then _ & " " & [Invoice Currency]  else _  })

How then, do I access the text hidden in "Invoice Currency" column and merge it with existing text using this specific command

Currently, I'm getting an expression error as if the column name was not recognized.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
I don't believe you can refer to another column when using
Power Query:
Table.TransformColumns
.
 
Upvote 0
Thats why im afreid of.
but if not this code, then how should I change data from my column, without adding new column?
 
Upvote 0
Use Table.ReplaceValue
 
Upvote 0
For this example, the formula replaces the text in the column [Name] looking for the text in [Column1] and replacing it with "*":

= Table.ReplaceValue(PreviousStepTable, each _[Column1], "*", Replacer.ReplaceText, {"Name"}),
 
Upvote 0

Forum statistics

Threads
1,215,771
Messages
6,126,799
Members
449,337
Latest member
BBV123

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top