Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Basic help with fractile function

Hi Friends,

Need some help with the fractile function in Qlik sense. I am trying to explore this function to implement the decile functionality that I am looking for. I have customer with Product Quantity. I want to create 10 equal distributions based on this Product quantity.

I say "Fractile(TOTAL Quantity, 0.10)". It gives me back 0.

Any help would be appreciated?

Thanks!

16 Replies
swuehl
MVP
MVP

Where exactly are you using the expression?

And how do your data look like? Could you post some sample records?

Anonymous
Not applicable
Author

Guessing a bit as to your precise needs, but maybe the Class() function could be more useful, here is the Help url for it.

https://help.qlik.com/en-US/sense/June2017/Subsystems/Hub/Content/Scripting/ConditionalFunctions/cla...

Anonymous
Not applicable
Author

8-8-2017 12-24-27 PM.jpg

Anonymous
Not applicable
Author

I need something like - the list of customer names falling under 90 - 100 % decile, 80 - 90 % etc.

Cust A - 90 - 100% or  1st decile

Cust B - 90 - 100% or 1st decile

Cust C - 80 - 90% or 2nd decile

swuehl
MVP
MVP

Your Quantity column is an expression like Sum(FIELD), right?

Anonymous
Not applicable
Author

That is correct

swuehl
MVP
MVP

You would need to create a synthetic table with dimension Customer and your Quantity expression and then apply the fractile function on top of it, assuming Sum(FIELD) as your Quantity expression and Customer field as your grouping entity:

=Fractile( Aggr( Sum(Quantity), Customer), 0.1)

Anonymous
Not applicable
Author

Not sure if I did the calculation right, but this is my output.. Not really working the way I wanted

8-8-2017 2-10-41 PM.jpg

sunny_talwar

In the chart, you might need to use TOTAL Qualifier

Fractile(TOTAL Aggr(Sum(Count), SHIPTO_CUSTOMER_GROUP_NAME), 0.1)