I read the following message before:
Â
We have the AVG time cycle for a set of case and we want to obtain the % of cases with TC below de average and above average.
I tried to do it in this way:
Â
CASE WHEN
CALC_THROUGHPUT(ALL_OCCURRENCEC'Process Start'] TO ALL_OCCURRENCEN'Cla. Closed'],REMAP_TIMESTAMPS( "AT_CLAIM_L1"."_TIMESTAMP" , days))
>
AVG(CALC_THROUGHPUT(ALL_OCCURRENCEE'Process Start'] TO ALL_OCCURRENCER'Cla. Closed'],REMAP_TIMESTAMPS( "AT_CLAIM_L1"."_TIMESTAMP" , days)))
then 'TC > AVG'
else 'TC <= AVG'
END
Â
but I get the following message:
The aggregation function AVG cannot be used together with a dimension function input. Please check that there are no aggregations and dimensions used together as function inputs.
Â
Which would be the correct way to have the information we need?
Â
Â
AND this was the answer:
Â
Â
Save AVG(CALC_THROUGHPUT(ALL_OCCURRENCEL'Process Start'] TO
ALL_OCCURRENCEA'Cla. Closed'],REMAP_TIMESTAMPS( "AT_CLAIM_L1"."_TIMESTAMP" , days))) as a variable with the format static value.
Â
Then use the same PQL query:
Â
CASE WHEN
CALC_THROUGHPUT(ALL_OCCURRENCEP'Process Start'] TO ALL_OCCURRENCEÂ'Cla. Closed'],REMAP_TIMESTAMPS( "AT_CLAIM_L1"."_TIMESTAMP" , days))
>
<%=your_variable%>
then 'TC > AVG'
else 'TC <= AVG'
END
Â
Â
I tried it, but didnt find where to make a variable static. I just copied the code into a variable but it didnt work.
Â
Thanks in advance!!!