Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
The name of my fields are all like "Brand1", "Model1", "Color1".
How do I remove that last 1 from ALL the fields, possibly with a single Power Query instruction?
Solved! Go to Solution.
Insert this statement
= Table.TransformColumnNames(Source,(x)=>Text.TrimEnd(x,"1"))
See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlTSUUoC4mQgTgHiVCBOU4qNBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Brand2 = _t, Brand1 = _t, Model1 = _t, Color1 = _t, Test2 = _t, Test1 = _t]),
Custom1 = Table.TransformColumnNames(Source,(x)=>Text.TrimEnd(x,"1"))
in
Custom1
Insert this statement
= Table.TransformColumnNames(Source,(x)=>Text.TrimEnd(x,"1"))
See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlTSUUoC4mQgTgHiVCBOU4qNBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Brand2 = _t, Brand1 = _t, Model1 = _t, Color1 = _t, Test2 = _t, Test1 = _t]),
Custom1 = Table.TransformColumnNames(Source,(x)=>Text.TrimEnd(x,"1"))
in
Custom1