cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Bbrown44 Helper III
Helper III

create a custom column with multiple or condition statement DAX

I am trying create a custom column with the follow DAX systax which is now working create a column with select if statement with multiple AND statements: Compliant Variable = IF([sesis_valid_subject] = "YES" & [subject_course_linked] = "YES" & [language_linked] = "YES" & [teacher_count_linked] = "YES" & [sped_properties_linked] = "YES" & [swd_certified_tchr_linked] = "YES" & [lang_certified_tchr_linked] = "YES", "Compliant") It's not working, can anyone help me? Regards, ~Bryon
1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft
Microsoft

Re: create a custom column with multiple or condition statement DAX

Hi @Bbrown44,

Could you have tried with AND function?

See below picture and code, it could filter the right row:

Column 2 = IF(AND('Table1'[Value]=2,AND(Table1[Running total]=37,AND([Column]=37,[Date]<>BLANK()))),"True")

1.PNG

 

Regards,

Daniel He

 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Super User III
Super User III

Re: create a custom column with multiple or condition statement DAX

Hi @Bbrown44

 

You'd have to use &&, which is the AND operator, instead of &, which is the text concatenation operator.

Bbrown44 Helper III
Helper III

Re: create a custom column with multiple or condition statement DAX

I am not getting a syntax error here is what I am getting: Syntax: Program service Compliant = IF([sesis_valid_subject] = 1 & [subject_course_linked] = 1 & [language_linked] = 1 & [teacher_count_linked] = 1 & [sped_properties_linked] = 1 & [swd_certified_tchr_linked] = 4 & [lang_certified_tchr_linked] = 1, 1,0) Error statement "DAX comparison operations do not support comparing values of type Integer with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values."
Super User III
Super User III

Re: create a custom column with multiple or condition statement DAX

@Bbrown44

 

So check that you are comparing numbers with numbers and not mixing types. In any case you will have to use the &&, since I assume you want a  logic AND instead of concatenation. The engine won't necessarily complain about that.

Microsoft
Microsoft

Re: create a custom column with multiple or condition statement DAX

Hi @Bbrown44,

Could you have tried with AND function?

See below picture and code, it could filter the right row:

Column 2 = IF(AND('Table1'[Value]=2,AND(Table1[Running total]=37,AND([Column]=37,[Date]<>BLANK()))),"True")

1.PNG

 

Regards,

Daniel He

 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ Integration Forum Launch

‘Better Together’ Integration Forum Launch

We've launched a how-to forum where you can learn about how Power BI integrates with other Power Platform products.

Top Solution Authors
Top Kudoed Authors