Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone
I'm facing an issue in QlikSense, trying to compute some statistical indicators (Percentiles, Quartiles, StdDev, Median etc.) on a dataset which is already grouped by the source.
I mean that my dataset is something similar to the following, in which I have for each combination of Week and Customer Age the total number of purchases:
Week | Customer Age | # Purchases |
1 | 18-20 | 2 |
1 | 21-23 | 5 |
1 | 24-26 | 15 |
1 | 27-30 | 5 |
1 | 31-33 | 7 |
1 | 34-36 | 6 |
2 | 18-20 | 3 |
2 | 21-23 | 5 |
2 | 24-26 | 5 |
2 | 27-30 | 10 |
2 | 31-33 | 7 |
2 | 34-36 | 6 |
3 | 18-20 | 5 |
3 | 21-23 | 10 |
3 | 24-26 | 10 |
3 | 27-30 | 5 |
3 | 31-33 | 6 |
3 | 34-36 | 8 |
II want to show the median of Customer Age, and due to the structure of the dataset I can't use fractile or median built-in functions, since they would come out with something different.
Let's suppose I want to calculate the median age of people for all the 3 weeks, so that I want to know what's the age of people who have done the 50% of my purchases.
To let you better understand the question, I show you the histogram:
In this case, the median I want to get is 24-26 years, since the 50% of the total population falls under that range.
I found a useful reference here, but I am having troubles in writing this formula in QlikSense
Thanks a lot in advance.