Forum Discussion
Alias Static Column
- Anonymous3 years ago
Hi Anonymous ,
Yes, you just need to make sure that your column name does not change, even if the data is refreshed, it will not affect another column, he is static and fixed.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2)Click "transform data" to enter the power query editor, click "Advanced Editor" to copy and paste the following code, please check the steps in the right step bar.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlSK1YlWSgKTyWAyBUymgsk0MJkOJjPAZCaYzFKKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [clients = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"clients", type text}}),
#"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 1, 1, Int64.Type),
#"Added Custom" = Table.AddColumn(#"Added Index", "Custom", each "client"),
#"Inserted Merged Column" = Table.AddColumn(#"Added Custom", "Merged", each Text.Combine({[Custom], Text.From([Index], "en-US")}, " "), type text),
#"Removed Columns" = Table.RemoveColumns(#"Inserted Merged Column",{"Index", "Custom"}),
#"Reordered Columns" = Table.ReorderColumns(#"Removed Columns",{"Merged", "clients"})
in
#"Reordered Columns"
(3) Then the result is as follows.
(4)Or we can create a calculated column.
Column = "client" & COUNTROWS(FILTER(ALLSELECTED('Table'[clients]),[clients]<=EARLIER('Table'[clients])))
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous3 years agoNot applicable
Hi Anonymous , thank you for your message.
Does this work with the idea that the top 10 may change. For example if my top 10 become d, j, g ,f ..... will it still show client 1, client 2 etc in order ?
No matter what the top 10 is, I need the first column of my table to show client 1 etc in order
Regards,
Jake
- Anonymous3 years agoNot applicable
Hi Anonymous ,
Yes, you just need to make sure that your column name does not change, even if the data is refreshed, it will not affect another column, he is static and fixed.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.