Forum Discussion

Lypabl's avatar
Lypabl
Regular Visitor
8 years ago
Solved

Count distinct user with same status

Hi Experts,   I have a table which contains the below data. I want to count the # of distinct users with only "2" as their status. For User with ID # 10 and 13 highlighted on the screenshot below, ...
  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    8 years ago

    erikajain02Lypabl

     

    How about this one

     

    Measure =
    VAR users =
        FILTER (
            VALUES ( Table1[Users] ),
            CALCULATE ( DISTINCTCOUNT ( Table1[Users] ), Table1[sk_status] = 2 )
                = 1
                && CALCULATE ( DISTINCTCOUNT ( Table1[Users] ), Table1[sk_status] <> 2 )
                    = 0
        )
    RETURN
        COUNTROWS ( users )