Forum Discussion

TechR21's avatar
TechR21
Icon for Helper V rankHelper V
3 years ago
Solved

"AND" statement DAX

Hi ,   Im trying to have a column containing either 1 or 0 depending on following condition in DAX:   "OpenIncident", IF ( AND(         CALCULATE (             COUNTROWS ( 'tableA' ),         ...
  • Shubham_Tekade's avatar
    3 years ago

    Hello,

     

    "OpenIncident", IF ( AND(
            CALCULATE (
                COUNTROWS ( 'tableA' ),
                ALLEXCEPT (
                    'tableA',
                    'tableA'[SubGroup],
                    'tableA'[incidentNumber]
                ),
                'tableA'[Change Status] in {"Logged", "Waiting", "Updated"})
               ,
     
            CALCULATE (
                COUNTROWS ( 'tableA' ),
                ALLEXCEPT (
                    'tableA',
                    'tableA'[SubGroup],
                    'tableA'[incidentNumber]
                ),
                
                'tableA'[Status Name] in {"Logged", "Updated","In progress"})
     
            ) ,-- This will giving you true/ flase in output and here you are trying to compare with like (True/false)>0. this will not work.
            1,
            0
            )
     
    try this it will work for you I think so.
     
    thanks.