In Excel 2016 Get & Transform ("Power Query") it appears to be totally valid to have a field (column) name containing a slash character. However, when I try to reference this column, I can't find any way to escape the slash to make the reference work. How can I do this?
Specifically, the following code is accepted:
Table.AddColumn(#"Capitalize", "ABC Table", each Table.FromColumns({Text.Split([ABC], ",")}))
...but the following is not:
Table.AddColumn(#"Capitalize", "ABC Table", each Table.FromColumns({Text.Split([ABC / DEF], ",")}))
...presumably because of the slash in [ABC / DEF]
.
How can I escape this slash?
It turns out, the way to query a query is to create a Blank Query and then reference your query as a source. Press the Get Data button found in the Get & Transform Data section of the Data tab. Select From Other Sources in the menu. Select Blank Query in the menu.
In this case, the escape sequence #(lf) is telling power query to insert a linefeed. This is one of three control escape codes supported by Power Query, the others are: #(cr) carriage return. #(tab) tab.
Try using [#"ABC / DEF"]
instead of [ABC / DEF]
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With