Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm fairly new to QlikView and I'm trying to get to grips with using the Aggr() function to do some calculations with my data.
I've ran in to a problem that I'll try to describe with a simple example...
My data model tracks installs of an app and subsequent spends, with 3 dimensions
install_date
date
days_after_install (=date - install_date)
I then have totals of installs and revenue for each date for cohorts of users, defined by their install_date.
By definition installs happened on day_after_install=0 and so are 0 for all other days.
I want to aggregate to find the total number of installs that have "had their day 2" for instance.
I've attached an example of what I'm trying to acheive, there are 62 installs all occuring on a day 0 for a given install_date.
I start by using aggr(NODISTINCT sum(installs), dt), this gives the number of installs for an install date on each row (e.g. cohort size)
Then I have tried to use
aggr(sum(DISTINCT aggr(NODISTINCT sum(installs), dt)), days_after_install)
to aggregate these cohort sizes by days_after_install. I'm expecting this to give me the sum of cohort sizes having had day x.
but, for instance, the total size on day 0 is 44 (not 62 as in the basic sum)
I hope the example is clear, any help on this is appreciated!
Hi to Learn more about aggr Function check this out..
http://community.qlik.com/blogs/qlikviewdesignblog/2013/03/07/aggr