Forum Discussion

jdubs's avatar
jdubs
Helper V
5 years ago
Solved

How to write an expression using ISBLANK with 3 possible outcomes?

I want to compare two fields to see if they have data or not and return 3 possible outcomes:   e.g.   Field 1 CONTAINS DATA but Field 2 DOES NOT CONTAIN DATA = True Field 1 DOES NOT CONTAIN DATA...
  • jaideepnema's avatar
    5 years ago

    Hi jdubs ,

    Create a calculated column like this:

     

    IS Blank Flag = SWITCH(TRUE(),

    AND(ISBLANK('Table'[Field 1]),NOT(ISBLANK('Table'[Field 2]))),"Field 2 Available",

    AND(NOT(ISBLANK('Table'[Field 1])),ISBLANK('Table'[Field 2])),"Field 1 Available",

    AND(ISBLANK('Table'[Field 1]),ISBLANK('Table'[Field 2])),"Both Field Not Available",

    AND(NOT(ISBLANK('Table'[Field 1])),NOT(ISBLANK('Table'[Field 2]))),"Both Field Available",BLANK())

    This will give you the desired result

     

     

    Please accept this as a solution if your question has been answered !!

    Appeciate a Kudos ğŸ˜€