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.
I have an excel and the data inside are desgined to be printed in excel so I want to rework on power query. As you can see in the photo there are 3 headers and also 2 "header" in the sidebar. I have tried so many step to use unpivot, transpose, merge etc without getting to work. Could someone please help what would be the step to get this done?
Refer
https://radacad.com/pivot-and-unpivot-with-power-bi
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
Thanks.
My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
You want to transpose, fill down, add a column for pivoting and put it at the front.
Remove COlumn1 and 2, transpose back, promote header and unpivot other column.
you can now split your pivoted column back to their original values
Sample code is below as a demo
Not the simplest transform, but it gets the job done.
let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content], #"Transposed Table" = Table.Transpose(Source), #"Filled Down" = Table.FillDown(#"Transposed Table",{"Column1"}), AddPivotHeader = Table.AddColumn(#"Filled Down", "PivotHeader", each [Column1] & "-" & [Column2]), #"Removed Columns" = Table.SelectColumns(AddPivotHeader, {"PivotHeader"} & List.Select( Table.ColumnNames(AddPivotHeader), each not List.Contains({"Column1","Column2","PivotHeader"}, _))), #"Transposed Table1" = Table.Transpose(#"Removed Columns"), #"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table1", [PromoteAllScalars=true]), #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Promoted Headers", {"Column1"}, "Attribute", "Value"), #"Split Column by Delimiter" = Table.SplitColumn(#"Unpivoted Other Columns", "Attribute", Splitter.SplitTextByDelimiter("-", QuoteStyle.Csv), {"FirstRow", "SecondRow"}) in #"Split Column by Delimiter"
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 |
---|---|
10 | |
8 | |
6 | |
6 | |
6 |