'How to create a power bi measure which looks at distinct rows and then filters

I'm having trouble getting my power bi measure to work.

I will say the report has a number of filters set for the page and [Call Direction](Same table) and [Region](another table)

I'm looking at list of calls coming into company via Cisco UCCX it has a table which logs every call that comes in, the [Node ID - Session ID - Sequence No] can be listed more than once if it not answered by an agent first time.

I can easily create a measure which distinct counts [Node ID - Session ID - Sequence No] to give me an entry once per call

measure =calculate(CALCULATE(DISTINCTCOUNT('contactcalldetail'[Node ID - Session ID - Sequence No])

That works fine and gives the expected number however I wish to only see those that have abandoned. If I try and break those out either as below or using the filter option.

abandoned calls = CALCULATE(DISTINCTCOUNT('contactcalldetail'[Node ID - Session ID - Sequence No]), 'contactcalldetail'[CallOutcome]=1 || 'contactcalldetail'[CallOutcome]=4)+0

I then get a count of all abandoned calls and not just one of each [node ID - Session ID - Sequence No].

Is anyone able to help me as to where I'm going wrong?



Solution 1:[1]

I managed to fix this myself i used follow by counting the distictvlaues in sub table that has each phone call that hit a CSQ

Abandonded Calls = CALCULATE(
DISTINCTCOUNT('contactqueuedetail'[Node ID - Session ID - Sequence No])+0,
FILTER('contactcalldetail',[CallOutcome]=1 || [CallOutcome]=4)
)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Adrian lock