Forum Discussion
romovaro
4 years agoResponsive Resident
Count 2 requirements same column
Hi Power BI community I need your help. I need to count how many customers (using the CID Column) meet these 2 requirements that are in the same column (Task Column): TaskColumn: IPM HAndOFF ...
- 4 years ago
Try this:-
Tasks IPM HandOff & Closed = VAR result = CALCULATE ( DISTINCTCOUNT( CELERGO_12062021V1[CID] ), FILTER ( CELERGO_12062021V1, CELERGO_12062021V1[TASK] IN { "Pre Engagement Process", "IPM HandOff" } && CELERGO_12062021V1[TASK_STATUS] = "Closed" ) ) RETURN IF ( ISBLANK ( result ), 0, result )
Samarth_18
4 years agoCommunity Champion
Hi romovaro ,
You can use code as below:-
Tasks IPM HandOff & Closed =
VAR result =
CALCULATE (
COUNT ( CELERGO_12062021V1[CID] ),
FILTER (
CELERGO_12062021V1,
CELERGO_12062021V1[TASK]
IN { "Pre Engagement Process", "IPM HandOff" }
&& CELERGO_12062021V1[TASK_STATUS] = "Closed"
)
)
RETURN
IF ( ISBLANK ( result ), 0, result )
Output:-
Thanks,
Samarth