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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
alt325
New Member

Create calculated column based off values of two different columns

Hi Everyone,

 

I have some data that looks like the image below (the first two columns), and I am trying to create the rightmost column highlighed in green so that I can graph it out:

 

I've tried: 

NEW COLUMN = if(values(Table[Y/N?] = "N", "N", values(Table[If Y, Type?]))

 

example.PNG

1 ACCEPTED SOLUTION
KHorseman
Community Champion
Community Champion

If you're getting that error message, it means you're creating a measure not a column. Either that or you're referencing a column from a different table. from the one where you're entering the new column.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

5 REPLIES 5
parry2k
Super User
Super User

try this

NEW COLUMN = if(Table[Y/N?] = "N", "N", Table[If Y, Type?])

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi,

 

Thanks for the quick reply. Unfortunately, it does not let me do that. After the IF(, I can only enter other calculated measures and do not have the option of entering the Table[ColumnName], and when I do it manually, I get an error that says:

 

A single value for column 'Y/N?' in table 'Table' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.

 

 

 

 

 

 

 

Are you adding this new field column or measure? From the name of your new field name, I thought you are adding new column.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

KHorseman
Community Champion
Community Champion

If you're getting that error message, it means you're creating a measure not a column. Either that or you're referencing a column from a different table. from the one where you're entering the new column.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Turns out I was creating a Calculated Column in a different table than where I wanted to put the column - Thanks so much!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.