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

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

secondImage

Power BI Women

Join our monthly meetings and learning sessions.

secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors