Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Datum", type date}, {"Benutzer", type text}, {"Menge", type text}, {"ME", type text}}),
#"Pivoted Column" = Table.Pivot(#"Changed Type", List.Distinct(#"Changed Type"[Benutzer]), "Benutzer", "Menge", each Text.Combine(_, ","))
in
#"Pivoted Column"
That is pivoting, not unpivoting. And it will result in variable number of columns which is something neither Power Query nor Power BI will be happy about.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjbQMzTUMzIwMlHSUQoKDweSpgZAwttdKVZn5EobWSJJe4cHAUlDc9NReazykOCjn3wsAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Datum = _t, Benutzer = _t, Menge = _t, ME = _t]),
#"Grouped Rows" = Table.Group(Source, {"Datum", "ME", "Benutzer"}, {{"Values", each Text.Combine(_[Menge],",")}}),
#"Pivoted Column" = Table.Pivot(#"Grouped Rows", List.Distinct(#"Grouped Rows"[Benutzer]), "Benutzer", "Values")
in
#"Pivoted Column"
How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done". Once you examined the code, replace the entire Source step with your own source.
Vielen Dank für die Lösung
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Datum", type date}, {"Benutzer", type text}, {"Menge", type text}, {"ME", type text}}),
#"Pivoted Column" = Table.Pivot(#"Changed Type", List.Distinct(#"Changed Type"[Benutzer]), "Benutzer", "Menge", each Text.Combine(_, ","))
in
#"Pivoted Column"
Vielen Dank für die Lösung
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |