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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
mwmchugh215
Frequent Visitor

Conditional column in power query

Within power query, how am i able to transform my data to include new columns based on a filtered value of an existing column? I want to recreate the example below

 

Original output

IDTypeAmount
12345New100
12345Existing200
23456New200
23456Existing200
34567Existing500

 

Desired Output:

IDNew AmountExisting Amount
12345100200
23456200200
34567-500

 

This is a much simplified example of the data I'm working with, so simply creating measures on the type column won't achieve what I need to create. I need the new and existing amounts to be static data when i'm building as i'll also be creating columns and measures based off of those.

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@mwmchugh215,

 

In Power Query, select the Type column and click Pivot. Choose the settings below:

 

DataInsights_0-1728314611055.png

 

DataInsights_1-1728314620255.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
anmolmalviya05
Super User
Super User

Hi @mwmchugh215, You can achieve this using the pivot column feature.
Below is an example:

anmolmalviya05_0-1728537802118.png


Check Detailed documentation here: https://support.microsoft.com/en-us/office/pivot-columns-power-query-abc9c8da-3be9-44c4-886e-0be331a...

Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!

 

Let's Connect on LinkedIn: https://www.linkedin.com/in/anmol-malviya/?originalSubdomain=in



Anonymous
Not applicable

Hi @mwmchugh215 ,

 

May I ask if you have gotten this issue resolved?

If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster .

Thank you very much for your kind cooperation!

Best Regards,
Dengliang Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

DataInsights
Super User
Super User

@mwmchugh215,

 

In Power Query, select the Type column and click Pivot. Choose the settings below:

 

DataInsights_0-1728314611055.png

 

DataInsights_1-1728314620255.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors