Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Help with IF Statement Measure that uses AND and OR

FileID    Employee    Concerns     Reason 1     Reason 2    Reason 3 1                John         Yes             2            Emily            No 3              Henry         Yes               h...
  • V-lianl-msft's avatar
    6 years ago

    Hi Anonymous ,

     

    You can refer to the DAX below:

    Y =
    IF (
        MAX ( 'Table'[Concerns] ) = "Y"
            && (
                NOT ( MAX ( 'Table'[Reason 1] ) = "" )
                    || NOT ( MAX ( 'Table'[Reason 2] ) = "" )
                    || NOT ( MAX ( 'Table'[Reason 3] ) = "" )
            ),
        1,
        IF (
            MAX ( 'Table'[Concerns] ) = "N"
                && MAX ( 'Table'[Reason 1] ) = ""
                && MAX ( 'Table'[Reason 2] ) = ""
                && MAX ( 'Table'[Reason 3] ) = "",
            1
        )
    )

    If I misunderstood, please provide the result you expect.

     

    Best Regards,
    Liang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.