Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello Experts,
I need to perform following pivot operation in Power Query.
I need to Group the data by Sales Rep and Date/Date and then the rest of the fields should be pivoted as in the following example.
Would you advise me how to it in Power Query?
Thanks a lot,
Martin
Solved! Go to Solution.
#"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Added Prefix", {"Rep", "Day", "Place"}, "Attribute", "Value"),
#"Merged Columns" = Table.CombineColumns(#"Unpivoted Columns",{"Place", "Attribute"},Combiner.CombineTextByDelimiter("-", QuoteStyle.None),"Merged"),
#"Pivoted Column" = Table.Pivot(#"Merged Columns", List.Distinct(#"Merged Columns"[Merged]), "Merged", "Value")
in
#"Pivoted Column"These three steps will generate the output.
#"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Added Prefix", {"Rep", "Day", "Place"}, "Attribute", "Value"),
#"Merged Columns" = Table.CombineColumns(#"Unpivoted Columns",{"Place", "Attribute"},Combiner.CombineTextByDelimiter("-", QuoteStyle.None),"Merged"),
#"Pivoted Column" = Table.Pivot(#"Merged Columns", List.Distinct(#"Merged Columns"[Merged]), "Merged", "Value")
in
#"Pivoted Column"These three steps will generate the output.
Amazing!
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 |
|---|---|
| 56 | |
| 33 | |
| 33 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 68 | |
| 67 | |
| 45 | |
| 29 | |
| 25 |