Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi everyone,
Currently my data looks like this:
I need it to look like this:
How would I accomplish this?
Solved! Go to Solution.
Hi @annag815
Download PBIX file with solution
In the Power Query Editor (click on Transform data in the PBI Ribbon) , select the Question and Answer columns then select Pivot Column from the Transform tab
In the Pivot Column dialog box choose Answer as the Value column and in Advanced options set the aggregate type to Don't Aggregate
Which gives this result
Here's the code which is in the PBIX file I linked to above
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUQrUg5IKjnnF5alFSrE6MAkjCIkpYQwhkSWMcBllhMsoI6xGxQIA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Inspection = _t, Question = _t, Answer = _t]),
#"Pivoted Column" = Table.Pivot(Source, List.Distinct(Source[Question]), "Question", "Answer")
in
#"Pivoted Column"
Regards
Phil
Proud to be a Super User!
Hi there,
I have a similar problem except my dataset is incomplete.
As you can see in the picture below, each row in the third column (Registration Group) should be its own column against each row in the first column (Registered Provider Name) - except where a registered provider (colmn 1) has multiple registration groups (colmn 3), colmn 1 is empty / vacant.
So I think to be able to use the pivot function I need to somehow populate each row in colmn 1 with the correct registered provider name, but is there an easy way to do this?
Many thanks in advance.
Hi @annag815
Download PBIX file with solution
In the Power Query Editor (click on Transform data in the PBI Ribbon) , select the Question and Answer columns then select Pivot Column from the Transform tab
In the Pivot Column dialog box choose Answer as the Value column and in Advanced options set the aggregate type to Don't Aggregate
Which gives this result
Here's the code which is in the PBIX file I linked to above
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUQrUg5IKjnnF5alFSrE6MAkjCIkpYQwhkSWMcBllhMsoI6xGxQIA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Inspection = _t, Question = _t, Answer = _t]),
#"Pivoted Column" = Table.Pivot(Source, List.Distinct(Source[Question]), "Question", "Answer")
in
#"Pivoted Column"
Regards
Phil
Proud to be a Super User!
Thank you!
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 53 | |
| 42 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 121 | |
| 106 | |
| 47 | |
| 30 | |
| 24 |