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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
YanivZi
Contributor III
Contributor III

How to find 20%-80% of data value

I want to take the values and exclude the 10%(0-10) an 90%(90-100) from the results, by adding new calculated dimension.


data for example:

sm,gh,pr

1,2,1

9,7,55

8,5,20

3,4,95

2,5,459

8,7,2

new data i want :
sm,gh,pr,res

1,2,1,'no10'

9,7,55,'ok'

8,5,20,'ok'

3,4,95,'ok'

2,5,459,'no90'

8,7,2,'no10'

i've added a new  dimension and used this code: 

if(Fractile(pr, 0.1),'no10',

if (Fractile(pr, 0.9),'no90',   

    'ok'

))

 

Labels (1)
1 Solution

Accepted Solutions
francisco_orte
Partner - Contributor II
Partner - Contributor II

It seems like you're trying to create a new calculated dimension in Qlik that categorizes rows based on the values in the 'pr' field. You want to label rows as 'no10' if their 'pr' value is within the lowest 10%, 'no90' if their 'pr' value is within the highest 10%, and 'ok' otherwise. However, the code you provided is not entirely correct.

 
Try this
if(pr <= Fractile(TOTAL pr, 0.1), 'no10',
if(pr >= Fractile(TOTAL pr, 0.9), 'no90',
'ok'
))
Best Regards

View solution in original post

1 Reply
francisco_orte
Partner - Contributor II
Partner - Contributor II

It seems like you're trying to create a new calculated dimension in Qlik that categorizes rows based on the values in the 'pr' field. You want to label rows as 'no10' if their 'pr' value is within the lowest 10%, 'no90' if their 'pr' value is within the highest 10%, and 'ok' otherwise. However, the code you provided is not entirely correct.

 
Try this
if(pr <= Fractile(TOTAL pr, 0.1), 'no10',
if(pr >= Fractile(TOTAL pr, 0.9), 'no90',
'ok'
))
Best Regards