Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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 all, I have a sharepoint list with multiple columns in that I am tryting to pivot into a usable format. So far I have tried lots of steps which have all failed with the result of me creating duplcate queries and then appending to 1 table which is inefficient. I have tried following steps from other suggestions but cant seem to get it right
The data looks like this although there would be 22 Areas not just the 2 in my example below, each area has 4 columns attributed to them - Owner, Agreed, Date Agreed and commentary.
Programme | Business Case Name | Business Case Owner | Area 1 Owner | Area 1 Agreed | Area 1 Date Agreed | Area 1 Commentary | Area 2 Owner | Area 2 Agreed | Area 2 Date | Area 2 Commentary |
Test Programme | Lee Test | Lee Morgan | Lee Morgan | Yes | 30/06/2023 | text in here | Lee Morgan | null | null | Random text |
Test Programme 2 | Lee Test 2 | Lee Morgan | Lee Morgan | null | null | Different text | Lee Morgan | null | null | null |
What I am trying to achieve is something like the following format.
Programme | Business Case Name | Business Case Owner | Area | Area Owner | Agreed | Date Agreed | Commentary |
Test Programme | Lee Test | Lee Morgan | Area 1 | Lee Morgan | Yes | 30/06/2023 | text in here |
Test Programme | Lee Test | Lee Morgan | Area 2 | Lee Morgan | null | null | Random text |
Test Programme 2 | Lee Test 2 | Lee Morgan | Area 1 | Lee Morgan | null | null | Different text |
Test Programme 2 | Lee Test 2 | Lee Morgan | Area 2 | Lee Morgan | null | null | null |
Any help guidance is greatly appreciated.
Many thanks
Lee
Solved! Go to Solution.
Hi
Unpivot columns, Split Attribute, Pivot
let
Source = YourSource,
Unpivot = Table.UnpivotOtherColumns(Source, {"Programme ", "Business Case Name", "Business Case Owner"}, "Attribute", "Value"),
#"Split Column" = Table.SplitColumn(Unpivot, "Attribute", Splitter.SplitTextByCharacterTransition({"0".."9"}, {" "}), {"Attribute.1", "Attribute.2"}),
Trim = Table.TransformColumns(#"Split Column",{{"Attribute.2", Text.Trim, type text}}),
Pivot = Table.Pivot(Trim, List.Distinct(Trim[Attribute.2]), "Attribute.2", "Value")
in
Pivot
Stéphane
Thank you so much for this, has worked like a charm for the multiple columns.
Hi
Unpivot columns, Split Attribute, Pivot
let
Source = YourSource,
Unpivot = Table.UnpivotOtherColumns(Source, {"Programme ", "Business Case Name", "Business Case Owner"}, "Attribute", "Value"),
#"Split Column" = Table.SplitColumn(Unpivot, "Attribute", Splitter.SplitTextByCharacterTransition({"0".."9"}, {" "}), {"Attribute.1", "Attribute.2"}),
Trim = Table.TransformColumns(#"Split Column",{{"Attribute.2", Text.Trim, type text}}),
Pivot = Table.Pivot(Trim, List.Distinct(Trim[Attribute.2]), "Attribute.2", "Value")
in
Pivot
Stéphane
Hello ,
I have a scenario maybe it can help you :
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
13 | |
8 | |
8 | |
7 |
User | Count |
---|---|
17 | |
13 | |
7 | |
6 | |
6 |