Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
cbaqir
Specialist II
Specialist II

Aggr Avg Calc

My Avg days assigned calc isn't working if there is more than 1 DEFECT_ID. Any suggestions?

Dimension: 

=if(match(CUR_STATUS,'Closed', 'Deferred', 'Denied', 'Closed - Maintenance', 'Dismissed', 'Nursing Research & Analytics')>0,null(),dual( Month(ERC_ASSIGNED_DATE) & '-' & Year(date(ERC_ASSIGNED_DATE,'DD.MM.YY')), num(Year(ERC_ASSIGNED_DATE)) & num(Month(ERC_ASSIGNED_DATE), '00' )))

Expression:

aggr(avg(today()-ERC_ASSIGNED_DATE),BUILD_RESOURCES_SUB,ERC_ASSIGNED_DATE)

 

 

2 Replies
Brett_Bleess
Former Employee
Former Employee

Cassandra, odd nobody took a stab at things here given you did attach your QVW, this will kick things back up to the top, maybe someone will see it now and leave you something.  About all I have is the following, not sure if it will actually help or not...

https://community.qlik.com/t5/Qlik-Design-Blog/Don-t-get-aggr-avated-using-aggr/ba-p/1464136

https://community.qlik.com/t5/Qlik-Design-Blog/Pitfalls-of-the-Aggr-function/ba-p/1463275

There are some other posts in the Design Blog area as well, so here is the main link you can use to search yourself, but maybe the above might help you get things sorted on your own.

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
Frank_Hartmann
Master II
Master II

 

avg(aggr(avg(today()-ERC_ASSIGNED_DATE),DEFECT_ID,CUR_STATUS))

or 

avg(aggr((today()-ERC_ASSIGNED_DATE),DEFECT_ID,CUR_STATUS))

 

 

See attached qvw

hope this helps