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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.