[英]Count based on two sub groups in Power Bi
I have Data as in following table, I want to show the % of work order count over the year for each group in stacked area chart but I am struggling to get the correct %.我有下表中的数据,我想在堆积面积图中显示每个组在一年中的工单计数百分比,但我正在努力获得正确的百分比。 From the below data the % of each Days Delayed group should come as 50%
根据以下数据,每个延迟天数组的百分比应为 50%
Appreciate any helps.感谢任何帮助。
First, create this below Measure -首先,在下面创建这个Measure -
group_wsie_percentage =
VAR total_count =
CALCULATE(
COUNT(your_table_name[days delayed group]),
ALLEXCEPT(
your_table_name,
your_table_name[year]
)
)
VAR total_group_count =
CALCULATE(
COUNT(your_table_name[days delayed group]),
ALLEXCEPT(
your_table_name,
your_table_name[year],
your_table_name[days delayed group]
)
)
RETURN total_group_count/total_count
Now change the type of measure as % and configure your Stacked (I used Stacked Bar chart) chart as below-现在将度量类型更改为%并配置您的堆积(我使用堆积条形图)图表如下-
Here is the output-这是输出 -
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.