1

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%

enter image description here

Appreciate any helps.

Zeeshan shaikh
  • 341
  • 1
  • 5
  • 24

1 Answers1

1

First, create this below 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-

enter image description here

Here is the output-

enter image description here

mkRabbani
  • 16,295
  • 2
  • 15
  • 24