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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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