Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

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.

  • Anonymous,

     

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

     

     

     

3 Replies