Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
I would like to remove the column name text if it is found in each column as follows.
Any idea how this can be achieved in Power Query?
Many thanks.
Solved! Go to Solution.
You can try this in new blank query.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUQquLDaMj0wthjCNEExjMDNWJ1rJiDhlxkABiDCCBImbQNjxICMQTCME0xiszJQIW2IB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, Sys1 = _t, Sys2 = _t, Sys3 = _t]),
Custom1 = let l=Table.ToColumns(Source), cols=Table.ColumnNames(Source), i= List.Positions(cols), new= List.Transform (i, each List.ReplaceValue( l{_}, cols{_}&"_","", Replacer.ReplaceText) ) in Table.FromColumns(new, cols)
in
Custom1
Start:
End:
@jshwong
You can either right-click on the column, select Replace Value and Enter "Sys1_" with blank
Or, Under Transform Tab, Click Extract and select Text After Delimiter
@Anonymous
You can either right-click on the column, select Replace Value and Enter "Sys1_" with blank
Or, Under Transform Tab, Click Extract and select Text After Delimiter
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
You can try this in new blank query.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUQquLDaMj0wthjCNEExjMDNWJ1rJiDhlxkABiDCCBImbQNjxICMQTCME0xiszJQIW2IB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, Sys1 = _t, Sys2 = _t, Sys3 = _t]),
Custom1 = let l=Table.ToColumns(Source), cols=Table.ColumnNames(Source), i= List.Positions(cols), new= List.Transform (i, each List.ReplaceValue( l{_}, cols{_}&"_","", Replacer.ReplaceText) ) in Table.FromColumns(new, cols)
in
Custom1
Start:
End:
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!