Forum Discussion
Anonymous
4 years agoNot applicable
How to add two new calculated columns?
Hello
I have a dataset like this
| Id | Name | value |
| 1 | Data Request | b1 |
| 1 | Impacted Project | Prj123 |
| 2 | DataRequest | b1 |
| 3 | DataRequest | b1 |
| 4 | Data Request | b1 |
I want to create two calculated columns, based on the name
| Id | DataRequest | Impacted Project |
| 1 | b1 | Prj123 |
| 2 | b1 | null |
| 3 | b1 | null |
| 4 | b1 | null |
Any help?
3 Replies
- jdbuchanan71
Super User
When you pivot the name column base the values on the values column and set it to Don't Aggregate.
- jdbuchanan71
Super User
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.
- AnonymousNot 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.