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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
user2jenny
Frequent Visitor

Clause IF equals to multiple values

Hello,

 

I'am wondering how can i do this:

 

= Table.AddColumn( if [A] = "1" then List.Contains({"B" , "C","D" })
else null)

 

it doesn't work with my formula

1 ACCEPTED SOLUTION

I think i've solved this, i've just created a table for that

View solution in original post

6 REPLIES 6
JorgePinho
Solution Sage
Solution Sage

Hello @user2jenny ! I'm sorry but it wasn't clear to me what was your desired output. Can you explain in a different way and possibly provide an example?

Hello @JorgePinho ,

 

I want to add a custom column in Power query with one same condition but equals to multiple values, for example(IF you="boy", then "Jimmy" or "Alex" or "John")

Hope my explication is better.

I can't understand what you want to write in the custom column. You want to write a list of those names?

I want the function returns these values in the custom column, like below:

 

column 1 | Custom column 2

boy          |   Jimmy    

boy          |   Jimmy

boy           |   Alex

boy           |   John

boy           |   John

 

How do you choose which of the three names "Jimmy" "Alex" "John" to write in each case? 

I think i've solved this, i've just created a table for that

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors
Users online (2,802)