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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
yaoyuzhang
Partner - Contributor
Partner - Contributor

Qlik Fractile Function calculation logic

Hi, 


I am a newbie in Qlik.

I am trying to calculate the 20th and 80th percentile, but I don't quite understand the calculation logic of Qlik for my data set.

 

ID        Values

1          84,17564052

2  

3  

4  

5  

6  

7  

8           28,83317613

 

Because there are null values in my data, When I created the calculation, the following value was returned :

Fractile(Values, 0.2) = 39,901669008

Fractile(Values, 0.8) = 73,107147642

Fractile(Values, 0.5) = 56.504408325 = Median  ( test with Median , it's  correct ) 

 

I am confused about the other two calculation results. Is it my fault or is this function wrong?

Can you help me understand? 

Thank you.

 

 

1 Solution

Accepted Solutions
marcus_sommer

The calculation is (a bit manually done) for 0.2:

28,83317613 + ((84,17564052 - 28,83317613) * 0.2)

If it's not what you want you may replace the NULL with ZERO in the data-set (per mapping and/or NULL variables and/or if-queries ...). Helpful may also to play a bit with the numbers and the logic in Excel because the quantil.inkl() worked in the same way.

View solution in original post

4 Replies
igoralcantara
Partner Ambassador/MVP
Partner Ambassador/MVP

This is new to me, I have been using this function, and it works fine. Would you mind sharing the data or a sample? I would love to perform a couple tests on my end.

Check out my latest posts at datavoyagers.net
igoralcantara
Partner Ambassador/MVP
Partner Ambassador/MVP

In the mean time, here is the official documentation:

Fractile - chart function | Qlik Cloud Help

Check out my latest posts at datavoyagers.net
marcus_sommer

The calculation is (a bit manually done) for 0.2:

28,83317613 + ((84,17564052 - 28,83317613) * 0.2)

If it's not what you want you may replace the NULL with ZERO in the data-set (per mapping and/or NULL variables and/or if-queries ...). Helpful may also to play a bit with the numbers and the logic in Excel because the quantil.inkl() worked in the same way.

yaoyuzhang
Partner - Contributor
Partner - Contributor
Author

Tnanks a lot,
I understand now, it's the difference in algorithms, thank you