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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.