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 )
romovaro
4 years agoResponsive Resident
Thanks Samarth_18.
It works :). Now I have a problem and is that I just realized that the total number is showing "double amount of clients"
The Same client (CID) goes to different processes...Pre Engagment team, Partner Assignment...and IPM Handoff
With this formula it counts all the times we have the 2 requirements....ANy way to count only Once?
I can use the filter and Ask POwer Bi to show only total = 2 (meaning 2 requirements are good)...but If I can remove duplicates?
thanks again
- Samarth_184 years agoCommunity Champion
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 )