Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
Partner
Partner

Calculated fraction in Fractile() function

Hello, I am currently working on a complex expression using the Fractile() function. I am trying to create percentile groups of test scores, and then calculate the fractile for the upper bound of that group. Right now I have 5 percentile groups (1-20, 21-39, 40-59, 60-79, 80-100). If I wanted to get the fractile for the 1-20 percentile group I would use Fractile(expr, .2).

I'm trying to show the fractile for every test-taker based on which percentile group they belong in. So if a test-taker was in the 35th percentile, then the function should be Fractile(expr, .4). I currently have an expression that is calculating the fraction value, but it appears that Fractile() will not accept anything other than a decimal number as a parameter. I've tried the following:

=Fractile(expr, "Percentile Group")                    //.2, .4, .6, etc.
=Fractile(expr, $(="Percentile Group"))
=Fractile(expr, (Div("Percentile", 20) + 1) / 5        //0-99
=Fractile(expr, $(=(Div("Percentile", 20) + 1) / 5)

 The first parameter is fine which I have determined by passing an explicit fraction for the second parameter.

I'm wondering if it is at all possible to accomplish what I am trying above. If it isn't I can create an expression using five if statements and passing the explicit decimal values to each, but I would rather avoid that if possible.

2 Replies

Re: Calculated fraction in Fractile() function

Where is this getting used, are you able to share a sample to show how exactly you are trying to do this?

Partner
Partner

Re: Calculated fraction in Fractile() function

Sure thing Sunny. Here is a sample QVF.

The only expression where I am having issues is the Fractile.