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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live 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
Most Valuable Professional
Most Valuable Professional

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
Most Valuable Professional
Most Valuable Professional

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
December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Top Solution Authors