How to transpose a table in Power BI from Row to Column

Viewed 1910

I am having trouble structuring my PowerBI data in the required format. I am attaching the data structure below.

My Data Structure:

enter image description here

Required Output Structure:

enter image description here

1 Answers

Step-1: Go to Power Query Editor and right click on your ID column and select GROUP BY option and select other options as below-

enter image description here

Now you will get table per ID as shown below-

enter image description here

Step-2: Add a custom column as below-

enter image description here

Step-3: Extract values from the list column using comma separation as shown below-

enter image description here

Now you have records as below-

enter image description here

Step-4: Finally split the new column using Comma again and you will find the output as below-

enter image description here

Step-5: Remove the column AllRecords and rename new columns as per your requirement.

Related