Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
March 11, 2PM EST: Do More with Qlik - Getting Started wtih Qlik Sense SaaS - Redux. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
JacobJones
Creator
Creator

getting the min date in an average of networkdays

So this is what I want to work:

 

AVG( NetWorkDays([AxUDV_CaseTriage.Date Case Received], min([Date of Appointment]), Holiday)))

 

but I am getting the error, Nested aggregation is not allowed. In the table one Patient ID has multiple appointments and I want to calculate the time between the Date Case Received and the first appointment. I've tried set analysis and aggr(), but so far no luck.

 

How can I do this?

1 Solution

Accepted Solutions
sunny_talwar

How about this

Avg(Aggr(
  NetWorkDays([AxUDV_CaseTriage.Date Case Received], Min([Date of Appointment]), Holiday)
, [Patient ID]))

 

View solution in original post

4 Replies
Vegar
Partner
Partner

Do you bet a correct value if you remove the avg() and select a single patient?

 

If patient ID is a dimension in your table then you should probably  try to aggregate on that dimension.

AVG( NetWorkDays([AxUDV_CaseTriage.Date Case Received], min([Date of Appointment]), Holiday), [Patient ID])

 

Plees ekskuse my Swenglish and or Norweglish spelling misstakes
JacobJones
Creator
Creator

The error is with the nested aggregation. 

 

sunny_talwar

How about this

Avg(Aggr(
  NetWorkDays([AxUDV_CaseTriage.Date Case Received], Min([Date of Appointment]), Holiday)
, [Patient ID]))

 

View solution in original post

JacobJones
Creator
Creator

Thank you so much 🙂