Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
cbaqir
Specialist II
Specialist II

Dual Class Syntax

I am getting an error in my class buckets. What is wrong here?

=Dual(If(avg(Aggr(Sum(GOV_PROCESS_QUEUE_TAT), DEFECT_ID) < 60), '<60',
If(avg(Aggr(Sum(GOV_PROCESS_QUEUE_TAT), DEFECT_ID) > 120), '>120',
Replace(Class(avg(Aggr(Sum(GOV_PROCESS_QUEUE_TAT),DEFECT_ID)), 60), '<= x <', '-'))),
If(avg(Aggr(Sum(GOV_PROCESS_QUEUE_TAT), DEFECT_ID) < 60), 0,
If(avg(Aggr(Sum(GOV_PROCESS_QUEUE_TAT), DEFECT_ID) > 120), 120,
Class(avg(Aggr(Sum(GOV_PROCESS_QUEUE_TAT),DEFECT_ID)), 60))))

11 Replies
sunny_talwar

Are you 100% confident that your 98 day number is correct? Can you check if it could be 80 days for Regional Clinical Informatics

Capture.PNG

cbaqir
Specialist II
Specialist II
Author

The logic I am trying to get to is:

Single defect = the total days in that GPQ across all occurrences;

Multiple defects = the avg of the of days in GPQ across all defects

avg(aggr(sum({$}GOV_PROCESS_QUEUE_TAT), DEFECT_ID, GOV_PROCESS_QUEUE))

For example, if you look at DEFECT_ID 3004 only, the TaT should be the sum of time in one step - so for Regional Clinical Informatics that is 129 + 169 = 298.

If you look at multiple defects, say 3004 and 2967, it should be 208 (298 +117/ 2 distinct DEFECT_ID).

That being said, I think that it is working now if I use avg(aggr(sum({$}GOV_PROCESS_QUEUE_TAT), DEFECT_ID, GOV_PROCESS_QUEUE)) as the expression except for the label in your attachment.