Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Make an avg on 2 dates with a distinct variable

Hi

I'm new to qlikview and have a problem with a chart. I want to show the average time between 2 dates and use this expression:

round(Avg((end_date+end_time)-(start_date+start_time)),0.01)

It works fine, but my problem is that I want to add: distinct(case_id)

How to do that?

4 Replies
pauljohansson
Creator III
Creator III

Hi,

Have you looked at the AGGR function?

My thinking goes something like:

aggr( sum(round(Avg((end_date+end_time)-(start_date+start_time)),0.01)), case_id)

br

Paul

Not applicable
Author

Hi,

Thanks for your help, but your suggestion doesn’t help. Do you have another proposal?

I haven’t used aggr before – I will look into that

Heine

Not applicable
Author

Hi,

Thanks for your help, but your suggestion doesn’t help. Do you have another proposal?

I haven’t used aggr before – I will look into that

Heine

Not applicable
Author

Hi,

Thanks for your help, but your suggestion doesn’t help. Do you have another proposal?

I haven’t used aggr before – I will look into that

Heine