Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
Need to convert table from this
| Key | Value |
| Rank | 17.5309867 |
| DocId | 701135570498039 |
| Title | Appointment |
| Author | Dylan |
| Rank | 17.5309867 |
| DocId | 7011355705149 |
| Title | Meet |
| Author | Steph |
to this
| Rank | DocId | Title | Author |
| 17.5309867 | 701135570498039 | Appointment | Dylan |
| 17.5309867 | 7011355705149 | Meet | Steph |
Any help would be much appreciated.
Regards,
Solved! Go to Solution.
As long as each bracket of rows starts with "Rank", you might want to try this solution,
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCkrMy1bSUTI01zM1NrC0MDNXitWJVnLJT/ZMAQqbGxgaGpuamhuYWFoYGFuC5UIyS3JSgXKOBQX5mXklual5JYcWgGUcS0sy8ouAUi6VOYl5YCEijTc1NEE13Dc1tQTVzOCS1IIMpdhYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Key = _t, Value = _t]),
Grouped = Table.RemoveColumns(Table.Group(Source, "Key", {"ar", each Table.PromoteHeaders(Table.Transpose(_))}, 0, (x,y) => Number.From(y="Rank")), {"Key"}),
#"Expanded ar" = Table.ExpandTableColumn(Grouped, "ar", {"Rank", "DocId", "Title", "Author"}, {"Rank", "DocId", "Title", "Author"})
in
#"Expanded ar"
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
As long as each bracket of rows starts with "Rank", you might want to try this solution,
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCkrMy1bSUTI01zM1NrC0MDNXitWJVnLJT/ZMAQqbGxgaGpuamhuYWFoYGFuC5UIyS3JSgXKOBQX5mXklual5JYcWgGUcS0sy8ouAUi6VOYl5YCEijTc1NEE13Dc1tQTVzOCS1IIMpdhYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Key = _t, Value = _t]),
Grouped = Table.RemoveColumns(Table.Group(Source, "Key", {"ar", each Table.PromoteHeaders(Table.Transpose(_))}, 0, (x,y) => Number.From(y="Rank")), {"Key"}),
#"Expanded ar" = Table.ExpandTableColumn(Grouped, "ar", {"Rank", "DocId", "Title", "Author"}, {"Rank", "DocId", "Title", "Author"})
in
#"Expanded ar"
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 7 | |
| 7 | |
| 5 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 14 | |
| 14 | |
| 10 | |
| 8 | |
| 8 |