Forum Discussion
SHILL
4 years agoFrequent Visitor
Count above average
I have the below table in place and need to count how many open cases are above the average time usually taken to close. I have a measure that is giving me the Average days taken to close (By aver...
- 4 years ago
DEFINE MEASURE 'Cases'[Avg Days to Close] = CALCULATE( AVERAGE( 'Cases'[Diff Received Worked On] ), 'Cases'[Status] = "closed", REMOVEFILTERS( ) ) MEASURE 'Cases'[# Open Cases Above Avg] = var AvgDaysToClose = [Avg Days to Close] var CountOfCasesOfInterest = if( NOT ISBLANK( AvgDaysToClose ), COUNTROWS( FILTER( 'Cases', 'Cases'[Diff Received Worked On] > AvgDaysToClose && 'Cases'[Status] = "open" ) ) ) return CountOfCasesOfInterest
daXtreme
Solution Sage
4 years ago
DEFINE
MEASURE 'Cases'[Avg Days to Close] =
CALCULATE(
AVERAGE( 'Cases'[Diff Received Worked On] ),
'Cases'[Status] = "closed",
REMOVEFILTERS( )
)
MEASURE 'Cases'[# Open Cases Above Avg] =
var AvgDaysToClose = [Avg Days to Close]
var CountOfCasesOfInterest =
if( NOT ISBLANK( AvgDaysToClose ),
COUNTROWS(
FILTER(
'Cases',
'Cases'[Diff Received Worked On] > AvgDaysToClose
&& 'Cases'[Status] = "open"
)
)
)
return
CountOfCasesOfInterest
- SHILL4 years agoFrequent Visitor
Thanks,Thats worked!