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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Power Query - how to use the values of a column as headers for new columns

Hello Community,

 

Hope you are well.

 

I need your help with the below problem that I face.

 

The below example table shows, for each project, the monetary value it will generate and the benefit category it belongs to. Finally, each benefit category is further allocated to a specific type. Unfortunately, based on the way the table is extracted, the values of the "hard" benefits are grouped under one column. 

 

I would appreciated if you could help me with sugegsting a way to edit the extracted table in such a way, that it would eventuallly result in the second table (the valuye each hard category to be under the corresponding hard benefit column).

 

Capture.PNG

Kind regards,

 

George

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , one way is unpivoting, in that you will lose the second column. may you keep a copy of that?

https://radacad.com/pivot-and-unpivot-with-power-bi
Transpose : https://yodalearning.com/tutorials/power-query-helps-transposing-data/

 

Another way is you create calculated columns.  In Dax

new column = if([col] ="Finance",[Value],blank())

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , one way is unpivoting, in that you will lose the second column. may you keep a copy of that?

https://radacad.com/pivot-and-unpivot-with-power-bi
Transpose : https://yodalearning.com/tutorials/power-query-helps-transposing-data/

 

Another way is you create calculated columns.  In Dax

new column = if([col] ="Finance",[Value],blank())

Anonymous
Not applicable

Hello Amit,

 

Thank you very much for your reply, it worked just fine.

 

Kind regards,

 

George

Helpful resources

Announcements
September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.