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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

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 3
jdbuchanan71
Super User
Super User

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

2022-05-08_21-18-34.jpg

2022-05-08_21-19-09.jpg

2022-05-08_21-21-03.jpg

jdbuchanan71
Super User
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.

jdbuchanan71_0-1652057928032.png

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

 

 

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.

Yon_0-1652066609591.png

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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