Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I am importing data via a Web Query from Morningstar.
One of the columns is "Total Return % (02/25/2018)" for example. I need to change this column name to "Mutual Fund", but as soon as I refresh the data the next day, the source column name changes to "Total Return % (02/26/2018)" and then my rename step breaks because it's looking for "Total Return % (02/25/2018)" when it's now the next day's date.
Can anyone recommend a solution here? I need that column to always be named "Mutual Fund".
Solved! Go to Solution.
You may refer to code below.
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTI0UIqNBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [id = _t, #"Total Return % (02/25/2018)" = _t]), tmp = List.Combine({List.FindText(Table.ColumnNames(Source), "Total Return %") , {"Mutual Fund"}}), result = Table.RenameColumns(Source, tmp) in result
You may refer to code below.
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTI0UIqNBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [id = _t, #"Total Return % (02/25/2018)" = _t]), tmp = List.Combine({List.FindText(Table.ColumnNames(Source), "Total Return %") , {"Mutual Fund"}}), result = Table.RenameColumns(Source, tmp) in result
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |