Forum Discussion
Jeffery24
7 years agoHelper I
Using variables in custom column with power query
Hi, Am new to power query and struggling to find an answer to my issue of a variable lookup column. In my dataset I have lot's of freight shipment data containing date fields, there are subseque...
- 7 years ago
Not exactly sure about your requirement, but could it be this?:
Table.AddColumn(#"Changed Type1", " Setup - Arrival EventA ", each Record.Field(_, #"Arrival EventA")
ImkeF
7 years agoCommunity Champion
Not exactly sure about your requirement, but could it be this?:
Table.AddColumn(#"Changed Type1", " Setup - Arrival EventA ", each Record.Field(_, #"Arrival EventA")
- Jeffery247 years agoHelper I
Hi Imke,
Thanks for quick response. Apologies if I haven't explained the issue.
I get the following error "Token Comma expected" when using the code. Is there something I've missed. Thanks
#"Expanded Container Type" = Table.ExpandTableColumn(#"Merged Queries", "Container Type", {"Referance", "Max Fill", "Max Weight", "TEU", "Target Fill"}, {"Referance", "Max Fill", "Max Weight", "TEU", "Target Fill"}), #"Renamed Columns1" = Table.RenameColumns(#"Expanded Container Type",{{"Referance", "Container Type"}, {"TEU", "TEU Set"}, {"Target Fill", "Cont Analysis Target Fill"}}), #"Changed Type1" = Table.TransformColumnTypes(#"Renamed Columns1",{{"Cont Analysis Target Fill", Percentage.Type}}), #"Added Custom" = Table.AddColumn(#"Changed Type1", " Setup - Arrival EventA ", each Record.Field(_, #"Arrival EventA") in #"Added Custom" - Jeffery247 years agoHelper I
Hi Imke,
You saved my week! It was just missing a bracket off end :smileyhappy:
Table.AddColumn(#"Changed Type1", " Setup - Arrival EventA ", each Record.Field(_, #"Arrival EventA"))
Thanks so much, really appreciate it.