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: 
Not applicable

Setting a Rank Value in Expression


All,

I am trying to set a rank value as a column in a straigt table but I am unsure the exact expression.  My data set is as follows:

LocationExceptionsRank
A5
B8
C3
D6
E9
F5
G2
H4

I want the expression in "Rank" column to return a value A(<.25), B(.25 to .50), C(.50 to .75), D(>.75) based on quartile value of exception against total exceptions.

There are multiple dimensions so i would need this to aggregate.

Thanks

1 Reply
sunny_talwar

Try this as your expression.

=If(Exception < Fractile(TOTAL Exception, 0.25), 'A', If(Exception < Fractile(TOTAL Exception, 0.5), 'B', If(Exception < Fractile(TOTAL Exception, 0.75), 'C', 'D')))


Also please find atttached a qvw file.

Best,

S