Skip to main content

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!!!

Hi @1461038387 ,

 

when creating a new variable you have a dropdown menu (see screenshot):Screenshotin which you can pick the variable type, in your case pick 'Static Value'.

 

You should then input the formula and then use it in your query.

 

Let me know if this works!

 

 

 

 


 

Hi @1460067637 oimageI somehow don`t have the option of a dropdown menu. What am I doing wrong?

Thanks in advance!!


As an alternative to using a static variable - try using a PU function with CONSTANT()

 

Let me know if that works:

 

CASE WHEN

CALC_THROUGHPUT(ALL_OCCURRENCEC'Process Start'] TO ALL_OCCURRENCEN'Cla. Closed'],REMAP_TIMESTAMPS( "AT_CLAIM_L1"."_TIMESTAMP" , days))

>

PU_AVG(

CONSTANT()

,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


Reply