Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

How to add two new calculated columns?

Hello

 

I have a dataset like this

IdNamevalue
1Data Requestb1
1Impacted ProjectPrj123
2DataRequestb1
3DataRequestb1
4Data Requestb1

 

I want to create two calculated columns, based on the name

IdDataRequestImpacted Project
1b1Prj123
2b1null
3b1null
4b1null

 

Any help? 

 

 

 

3 Replies

  • When you pivot the name column base the values on the values column and set it to Don't Aggregate.

  • Anonymous  You will need to make sure the names are the sames.  PowerQuery will see 'DataRequest' and 'Data Request' as 2 different values.  Once you fix that you can pivot the name column and use the value collumn with no aggregation.

    I have attached my sample file for you to look at.

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      jdbuchanan71 thanks and it looks like it is something that will work but when apply the changes the values turned into 0s and 1s for the new columns instead of the right text values. Any issues? I have multiple columns than I showed in the question.