Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to calculate @Median in the script.
I used the following expression in a chart:
Median(TOTAL <LVQ> aggr( sum(HT),IRF_START_TS))
IRF_START_TS = Calls
LVQ= Clasification
HT=Time in Sec
but i need the median for each LVQ
Do you have any idea?
Regards,
Try this script:
Table:
LOAD AgentName,
HT,
IRF_START_TS,
VIP_Bucket
FROM
(biff, embedded labels, table is [Sheet1$]);
Left Join (Table)
LOAD VIP_Bucket,
Median(Sum_HT) as Median
Group By VIP_Bucket;
LOAD VIP_Bucket,
IRF_START_TS,
Sum(HT) as Sum_HT
Resident [Sheet1$]
Group By VIP_Bucket, IRF_START_TS;
Would you be able to provide some sample data with what you are expecting to see as output?
Hi Sunny,
Sorry for the delay.
Please find attached.
What is the expected output that you are looking to see from the sample provided?
Hi Sunny!
I need calculate the Median in the script, because the agent could be in different buckets.
The median for Bucket 1 is 672, for Bucket 2 is 233, but if I select agent 1174 the calculate of median change.
I need to know if the agent is close the median or not by bucket... It is the reason why I need the calculation the median in the script...
Thanks for your help!
Although I can give you a script based solution, but in the mean time here is a front end based solution:
Median({1}TOTAL <VIP_Bucket> Aggr(Sum({1}HT), IRF_START_TS)) * Avg(1)
Any selection made in your application won't impact or change your median number. This is done because of the use of 1 which tells the expression not to change based on any selection made
Median({1}TOTAL <VIP_Bucket> Aggr(Sum({1}HT), IRF_START_TS)) * Avg(1)
Next, I will post a script based solution as well
HTH
Best,
Sunny
Thanks is a possible solution but i have some variables that i did not include in the example, i will waiting the post!
Thanks a lot!
Try this script:
Table:
LOAD AgentName,
HT,
IRF_START_TS,
VIP_Bucket
FROM
(biff, embedded labels, table is [Sheet1$]);
Left Join (Table)
LOAD VIP_Bucket,
Median(Sum_HT) as Median
Group By VIP_Bucket;
LOAD VIP_Bucket,
IRF_START_TS,
Sum(HT) as Sum_HT
Resident [Sheet1$]
Group By VIP_Bucket, IRF_START_TS;
Thanks a lot!