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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.