Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
FVerg
New Contributor

Compute median / percentile of grouped data

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:

WeekCustomer Age# Purchases
118-202
121-235
124-2615
127-305
131-337
134-366
218-203
221-235
224-265
227-3010
231-337
234-366
318-205
321-2310
324-2610
327-305
331-336
334-368

 

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:

Capture.PNG

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

https://mba-lectures.com/statistics/descriptive-statistics/603/relationship-between-quartiles-decile...

Thanks a lot in advance.

 

1 Reply
Support
Support

Re: Compute median / percentile of grouped data

I can see you already have the chart created, you want that value in a KPI?

To help users find verified answers, please don't forget to mark a correct resolution or answer to your problem or question as correct.