在折线图上显示整个部门的平均百分比和个人的平均百分比 [英] Showing average percentage for whole department and average percentage for individual on line chart

查看:45
本文介绍了在折线图上显示整个部门的平均百分比和个人的平均百分比的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在折线图上显示所有同事在12个月内所有优秀"案例结果的平均百分比.我希望此行不受视觉上同事名称过滤器的影响.

I want to display the average percentage for all 'excellent' case outcomes over the 12 month period for all colleagues on a line chart. I want this line to be unaffected by the colleague name filter on the visual.

这是案例"表中的一些示例数据:

This is some sample data from the 'case' table:

这是我到目前为止采取的措施:

This is the measure I have so far:

Excellent Fixed = 
   CALCULATE(
     COUNTROWS('Case'), 
      FILTER('Case', 'Case'[Case Outcome]="Excellent"),
       ALLEXCEPT('Case', 'Case'[Date].[Month])) / 
   CALCULATE(
     COUNTROWS('Case'),
       ALLEXCEPT('Case', 'Case'[Date].[Month]))

在可视折线图中,轴"设置为日期-月",值"具有优秀固定"度​​量,如上所示.这样可以正确显示12个月内的平均优秀案例,但是视觉影响(例如,从同事名称视觉过滤器中选择John Smith时,视觉变化仅显示平均值)对于那个同事.此外,我注意到那个那个同事当时显示的平均值是不正确的.

On the line chart visual, the 'Axis' is set to Date - Month and the 'Values' has the 'Excellent Fixed' measure as shown above. This correctly displays the average Excellent cases over the 12 month period but the visual is affected by the colleague name filter (i.e when selecting John Smith from the colleague name visual filter, the visual changes to just show the average for that colleague. Also, I have noticed that the average then being displayed for that colleague is incorrect).

预期结果应该是该措施不受同事姓名"视觉过滤器的影响.

The expected result should be that the measure is unaffected by the 'colleague name' visual filter.

推荐答案

我认为问题出在表'Case'

由于当前过滤器上下文中的'Case'是按 Collegue Name 进行切片的,因此它将重新插入由 ALLEXCEPT

Since the 'Case' in the current filter context is sliced per Collegue Name and therefore it re-inserts the filter removed by the ALLEXCEPT

一种可能的解决方案是在单列 Case Outcome

A possible solution is to change the FILTER with a filter argument on the single column Case Outcome

Excellent Fixed =
DIVIDE(
    CALCULATE(
        COUNTROWS( 'Case' ),
        'Case'[Case Outcome] = "Excellent",
        ALLEXCEPT( 'Case', 'Case'[Date].[Month] )
    ),
    CALCULATE( COUNTROWS( 'Case' ), ALLEXCEPT( 'Case', 'Case'[Date].[Month] ) )
)

这篇关于在折线图上显示整个部门的平均百分比和个人的平均百分比的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆