Forum Discussion
Problems creating variable in advanced editor
- 6 years ago
Hello Anonymous
There is a smart technique to solve this issue without adding new column. Just combine List.PositionOf and Tabl.RemoveFirstN. Here an example. By the way.. it would be also possible if you wouldn't know the exact column.
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WyirNy1aK1YlWyi/JSC1SgHNBDGM4ywzMSspJBCIw0zknMzWvRCEoMS87My8dLBSZX1rkkliSGJRfboguYIQuADQ6FgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t]), DeleteUntilClientRanking = Table.RemoveFirstN(Source,List.PositionOf(Source[Column1],"Client Ranking")), PromoteHeader = Table.PromoteHeaders(DeleteUntilClientRanking, [PromoteAllScalars=true]) in PromoteHeaderCopy paste this code to the advanced editor to see how the solution works
If this post helps or solves your problem, please mark it as solution.
Kudos are nice to - thanks
Have fun
Jimmy
Hello Anonymous
There is a smart technique to solve this issue without adding new column. Just combine List.PositionOf and Tabl.RemoveFirstN. Here an example. By the way.. it would be also possible if you wouldn't know the exact column.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WyirNy1aK1YlWyi/JSC1SgHNBDGM4ywzMSspJBCIw0zknMzWvRCEoMS87My8dLBSZX1rkkliSGJRfboguYIQuADQ6FgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
DeleteUntilClientRanking = Table.RemoveFirstN(Source,List.PositionOf(Source[Column1],"Client Ranking")),
PromoteHeader = Table.PromoteHeaders(DeleteUntilClientRanking, [PromoteAllScalars=true])
in
PromoteHeader
Copy paste this code to the advanced editor to see how the solution works
If this post helps or solves your problem, please mark it as solution.
Kudos are nice to - thanks
Have fun
Jimmy