Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Newbie: avg count distinct on Dates

Hi,

I'm a newbie to Qlkiview and would like to know if it is possible to build the average (months as base) over dates?
I'm looking for something like avg(count(distinct dates)).
I know this won't work, but is there a chance to solve this somehow?


dates:

05/03/2009
05/03/2009
05/04/2009


06/05/2009
06/06/2009
06/07/2009

I use a calendar script. Selecting 2009 the outcome should be 5/12 = 0,41 "dates" per month.
Selection may: 2
Selection june: 3
Selection may-june 5/2 = 2,5


Thanks.

3 Replies
Not applicable
Author

Hi,

you can use the aggr-function. See attached file.

Greets

Not applicable
Author

Thanks, ph.

Is it also possible to add a second dimension e.g. users?

johnw
Champion III
Champion III

I can't look at the example right now, but I assume it is this:

avg(aggr(count(distinct dates),month)

You can use as many dimensions as you want in an aggr():

aggr(expression,dimension1,dimension2,dimension3,...)