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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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