Forum Discussion
Lypabl
8 years agoRegular Visitor
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, ...
- 8 years ago
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 )
Zubair_Muhammad
8 years agoCommunity Champion
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 )NickPBI
3 years agoNew Member
Muhammad,
I have a question regarding this topic if would like to do this but filter in a period of time i.e. last 30 days. So it shows me each day the distinct count of the last 30, is it possible? doing this with time as well?
Thanks