[英]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.我在使用 power bi measure 时遇到了问题。
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.我正在查看通过 Cisco UCCX 打入公司的电话列表,它有一个记录每个打入电话的表格,如果代理未接听,[节点 ID - Session ID - 序列号] 可以多次列出第一次。
I can easily create a measure which distinct counts [Node ID - Session ID - Sequence No] to give me an entry once per call我可以轻松地创建一个不同计数的度量 [Node ID - Session ID - Sequence No] 每次调用给我一个条目
measure =calculate(CALCULATE(DISTINCTCOUNT('contactcalldetail'[Node ID - Session ID - Sequence No]) measure =calculate(CALCULATE(DISTINCTCOUNT('contactcalldetail'[节点 ID - Session ID - 序列号])
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 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].然后我得到所有放弃呼叫的计数,而不仅仅是每个 [节点 ID - Session ID - 序列号] 中的一个。
Is anyone able to help me as to where I'm going wrong?有谁能帮我解决我哪里出错了?
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我自己设法解决了这个问题,我使用了以下方法来计算子表中的 distictvlaues,每个电话都打了 CSQ
Abandonded Calls = CALCULATE(
DISTINCTCOUNT('contactqueuedetail'[Node ID - Session ID - Sequence No])+0,
FILTER('contactcalldetail',[CallOutcome]=1 || [CallOutcome]=4)
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.