Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I am trying to use Power-Query to Pivot Data of multiple columns, but only able to get 1 column pivoitzed.
I have a table, where each 'Proj#' has 3 milestones, and each milestone has 2 columns with properties I want to flat - 'Value' and 'Date'.
This is the format of the original table:
And this is the desired result, where each 'Proj#' has 1 row, and 6 columns:
Any help would be great.
Thanks,
Shai
Solved! Go to Solution.
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"Proj#", "Milestones"}, "Attribute", "Value.1"),
#"Merged Columns" = Table.CombineColumns(#"Unpivoted Other Columns",{"Milestones", "Attribute"},Combiner.CombineTextByDelimiter(" - ", QuoteStyle.None),"Merged"),
#"Pivoted Column" = Table.Pivot(#"Merged Columns", List.Distinct(#"Merged Columns"[Merged]), "Merged", "Value.1")
in
#"Pivoted Column"
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"Proj#", "Milestones"}, "Attribute", "Value.1"),
#"Merged Columns" = Table.CombineColumns(#"Unpivoted Other Columns",{"Milestones", "Attribute"},Combiner.CombineTextByDelimiter(" - ", QuoteStyle.None),"Merged"),
#"Pivoted Column" = Table.Pivot(#"Merged Columns", List.Distinct(#"Merged Columns"[Merged]), "Merged", "Value.1")
in
#"Pivoted Column"
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
8 | |
6 | |
5 | |
5 | |
5 |
User | Count |
---|---|
10 | |
8 | |
6 | |
6 | |
6 |