Forum Discussion
Need Help on a table
- 1 year ago
Hi Theeshk93
In the query editor, you can unpivot all columns and then remove blank rows from the resulting value column and then add an index or order column for each unique department per manager either with DAX or M. You can use this order column to create a kind of invisible key so provide a row context for each department per manager so all
Please refer to the attached pbix for the details.
Hi Theeshk93, here's another solution. Thanks
M Code used:
( The Table used here that is the Source is the above table mentioned above by you )
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WckrNU9JR8srPAFE++aWZxUqxOtFKniFArgIYg7humXmJecmpKGIgVnh+bmpeMYpQQFF+cilQtARFFISDE3NSi1FEYMbGxgIA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type text}, {"Column3", type text}}),
List = List.Transform ( Table.ToColumns ( #"Changed Type" ) , each List.Select ( _ , each not ( _ = " " ) ) ),
Table = Table.PromoteHeaders ( Table.FromColumns ( List ) )
in
Table