cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

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
Super User IV
Super User IV

@GeorgeGiannakis , 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())



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

2 REPLIES 2
Super User IV
Super User IV

@GeorgeGiannakis , 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())



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Hello Amit,

 

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

 

Kind regards,

 

George

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors