Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
joooffice
Helper I
Helper I

Use column values as column headings to sort data

Hi 

I have a data table like the following:

submission id service name person type
1 service a bob adult
2 service b joe adult
3 service c sam child
4 service c ella child
5 service a rob adult
6 service b tim child
7 service c william adult
8 service c harry adult
9 service a bella adult
10 service b paul child

 

I want to transpose the data so the the data in the service column become the column headings and show the data from the other fields below... so service a would look like 

 

service A
submission id name person type
1 bob adult
5 rob adult
9 bella adult

Ideally the services would appear in the same row with duplicated sets of columns for the other data 

 

service A service b service c
submission id name person type submission id name person type submission id name person type
1 bob adult 2 joe adult 3 sam child
5 rob adult 6 tim child 4 ella child
9 bella adult 10 paul child 7 william adult
8 harry adult

 

How can I do this in power query M not Dax? I think it should be relatively simple but I can't work it out. 

1 ACCEPTED SOLUTION

Thanks i ended up doing separate queries for each service so i could load independently into my spreadshset and make it lay out like I needed.

View solution in original post

10 REPLIES 10

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors