Forum Discussion
Anonymous
7 years agoNot applicable
Calculate performance
Dear all, I've been trying to calculate performances of my time without success.. please help! I have a data series like this: Case created date Performance of closed case 2-Jan-18 On ...
- 7 years ago
Measure 13 = VAR __onTime = COUNTX(FILTER('Table13',[Performance of closed case]="On time"),[Performance of closed case]) VAR __all = COUNTX(ALL('Table13'),[Performance of closed case]) RETURN DIVIDE(__onTime,__all,0)See Page 6 of the attached file.
v-juanli-msft
7 years agoCommunity Support
Hi Anonymous
I test with Greg_Deckler's file, it runs correctly on my site, for your scenario shown in the pictures above, i suggest you go to "Modeling"->"Data type", change whole number to decimal number
"Format", change whole number to percentage
Base on your example data, i make a test as below
1. create a calendar date table with columns [Date],[year],[month], then manage relationships with the data table ([Case created date] <->[Date])
2.create columns and measures in "Sheet3"
calculated column
month no = MONTH([Case created date])
Measures
% of cases closed on time =
CALCULATE (
COUNT ( Sheet3[Performance of closed case] ),
FILTER ( ALL ( Sheet3 ), [Performance of closed case] = "On time" )
)
/ CALCULATE ( COUNT ( Sheet3[Performance of closed case] ), ALL ( Sheet3 ) )
% per month =
CALCULATE (
COUNT ( Sheet3[Performance of closed case] ),
FILTER (
ALL ( Sheet3 ),
[month no] = MAX ( [month no] )
&& [Performance of closed case] = "On time"
)
)
/ CALCULATE (
COUNT ( Sheet3[Performance of closed case] ),
FILTER ( ALL ( Sheet3 ), [month no] = MAX ( [month no] ) )
)
add [% of cases closed on time] in the gauge visual
add [% per month] in the Value field of a line chart, calendar date[month no] in the X-axis field.
Best Regards
Maggie