Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am new to Qlikview, and would like to obtain the median of a count distribution.
I have the following IDs.
| ID | 
| 1 | 
| 2 | 
| 3 | 
| 1 | 
| 2 | 
| 3 | 
| 4 | 
| 5 | 
| 6 | 
| 7 | 
| 8 | 
| 9 | 
| 10 | 
| 3 | 
| 1 | 
| 2 | 
| 8 | 
| 9 | 
| 10 | 
I would like to find the median, in this case, after sorting and adding, would be:
| ID | count(ID) | 
| 4 | 1 | 
| 5 | 1 | 
| 6 | 1 | 
| 7 | 1 | 
| 8 | 2 | 
| 9 | 2 | 
| 10 | 2 | 
| 1 | 3 | 
| 2 | 3 | 
| 3 | 3 | 
the median of ID is 10 (10th position of the total 19 IDs).
How should the expression be?
thanks!
I've answered to you, please check previous answer
Use ID as dimension,
your expression is simply Count(ID)
and in sort promote Count(ID) and sort by numerivìcal values ascending
hope it helps
Please see attached your solution.
Added in other percentiles for you to check out
To add, a median is a middle set of all values. the 10th position is not ID 10 since there are values that appear more than once. If you want a median for a set of distinct values then that is a different story.