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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
willpioli
Frequent Visitor

Problem with DAX IF IN()

a simple sintaxe like this used to work.... i dont know its not working anymore after the few lastest updates 

 

 

Teste= IF (BaseFat2[Cod custumer] IN (4433;1740;5808;5685) ; "shopping";"market" )

 

the IN statment is not working anymore, i cant even use OR... and i dont want to use multiple if conditionals

 

 

Can someone help me to solve this or build a new formula??

 

2 ACCEPTED SOLUTIONS
Vvelarde
Community Champion
Community Champion

@willpioli

 

hi, try using this DAX

 

Test =
IF (
    Table1[Codcustomer] = 4433
        || Table1[Codcustomer] = 1740
        || Table1[Codcustomer] = 5808
        || Table1[Codcustomer] = 5685,
    "shopping",
    "market"
)



Lima - Peru

View solution in original post

@willpioli

 

Try this:

 

IF xxx IN {z,y,a,b}, "A","B"




Lima - Peru

View solution in original post

3 REPLIES 3
Vvelarde
Community Champion
Community Champion

@willpioli

 

hi, try using this DAX

 

Test =
IF (
    Table1[Codcustomer] = 4433
        || Table1[Codcustomer] = 1740
        || Table1[Codcustomer] = 5808
        || Table1[Codcustomer] = 5685,
    "shopping",
    "market"
)



Lima - Peru

it worked -.-

 

do you know why " IF xxx IN (z,y,a,b)" stoped working?

@willpioli

 

Try this:

 

IF xxx IN {z,y,a,b}, "A","B"




Lima - Peru

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.