cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Column name as variable?

= (Source as table, optional Product as text) =>
let
   #"Replaced Value" = Table.ReplaceValue(Source, each Table.Column(Source, Product), each "xx", 
   Replacer.ReplaceText, {Product})
in
   #"Replaced Value"

Results in an error. How to do this?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Column name as variable?

Nvm, found out that you have to use Record.Field(_, Product) instead of Table.Column(Source, Product)

View solution in original post

1 REPLY 1
Highlighted

Re: Column name as variable?

Nvm, found out that you have to use Record.Field(_, Product) instead of Table.Column(Source, Product)

View solution in original post

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)