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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
anirvanmukherje
New Member

Conditional Values

For the below situation, I need output "Lunch" in Column A, if the value is not equal to "Burger" in Column B but is equal to "Burger" in Column C, and output in Column A should be "Dinner" if the value is not equal to "Spaghetti"in Column B but is equal to "Spaghetti" in Column C, else Column A should remain Blank. How can I do this in Power Query. Please help. 

Power query_help.jpg

1 ACCEPTED SOLUTION
Vijay_A_Verma
Super User
Super User

Insert a custom column and put following formula

if [Serving 1]<>"Burger" and [Serving 2]="Burger" then "Lunch" else
if [Serving 1]<>"Spaghetti" and [Serving 2]="Spaghetti" then "Dinner" else null

View solution in original post

1 REPLY 1
Vijay_A_Verma
Super User
Super User

Insert a custom column and put following formula

if [Serving 1]<>"Burger" and [Serving 2]="Burger" then "Lunch" else
if [Serving 1]<>"Spaghetti" and [Serving 2]="Spaghetti" then "Dinner" else null

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.