Forum Discussion

JedShields's avatar
JedShields
Regular Visitor
2 years ago
Solved

Looking for help with IF AND statement mixing dates and text

Hello all,

 

I'm fairly new to DAX and need some help with the following code:

MS7 FC Exception =
        IF(ISBLANK([Column A DATE])
        && [Column B DATE] >= 1
        && [Column C DATE]>= 1
        && [Column D TEXT]= "No",
        "Issue", "No Issue"
)

Columns A, B and C all have dates.  I need a blank in A and anything with a date in B and C.

Column D stores text.  I'm looking for a "No".

I'm getting an error that states DAX comparison operations do not support comparing values of type Text with values of type Integer.

How do I resolve this?

Cheers,
 
Jed
  • Hi JedShields ,
    MS7 FC Exception =
    IF(
    ISBLANK([Column A DATE]) &&
    NOT(ISBLANK([Column B DATE])) &&
    NOT(ISBLANK([Column C DATE])) &&
    [Column D TEXT] = "No",
    "Issue",
    "No Issue"
    )

2 Replies

  • manvishah17's avatar
    manvishah17
    Icon for Solution Supplier rankSolution Supplier

    Hi JedShields ,
    MS7 FC Exception =
    IF(
    ISBLANK([Column A DATE]) &&
    NOT(ISBLANK([Column B DATE])) &&
    NOT(ISBLANK([Column C DATE])) &&
    [Column D TEXT] = "No",
    "Issue",
    "No Issue"
    )

    • JedShields's avatar
      JedShields
      Regular Visitor

      Excellent, many thanks.  NOT ISBLANK is a much better way of writing it 🙂