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

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
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
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,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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