# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor II

## 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!

Tags (2)
16 Replies
MVP

## Re: Basic help with fractile function

Where exactly are you using the expression?

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

MVP

## Re: Basic help with fractile function

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...

New Contributor II

## Re: Basic help with fractile function

New Contributor II

## Re: Basic help with fractile function

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

MVP

## Re: Basic help with fractile function

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

New Contributor II

That is correct

MVP

## Re: Basic help with fractile function

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)

New Contributor II

## Re: Basic help with fractile function

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

MVP

## Re: Basic help with fractile function

In the chart, you might need to use TOTAL Qualifier

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