Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
varunreddy
Contributor III

Bottom five values using rank function

Hi Guys,

I have found top 5 values using rank in the expression

Only({<MonthYear>} aggr(sum({<MonthYear,

Name = {"=rank(sum({<MonthYear= {'$(vCurMonthYear)'}>}1-([Total Number of Failing Records]/[Total Number of Records])))<=5"}

>}1-(
[Total Number of Failing Records]/[Total Number of Records])),MonthYear,Name))

Now I am trying to find bottom 5 values using the rank.

Can anyone help me with this?

Thanks in advance!

Regards,

Varun.

Tags (2)
1 Solution

Accepted Solutions
Highlighted

Re: Bottom five values using rank function

Try the rank of the value multiplied by -1:

Only({<MonthYear>} aggr(sum({<MonthYear,

Name = {"=rank(-sum({<MonthYear= {'$(vCurMonthYear)'}>}1-([Total Number of Failing Records]/[Total Number of Records])))<=5"}

>}1-(
[Total Number of Failing Records]/[Total Number of Records])),MonthYear,Name))


talk is cheap, supply exceeds demand
2 Replies
Highlighted

Re: Bottom five values using rank function

Try the rank of the value multiplied by -1:

Only({<MonthYear>} aggr(sum({<MonthYear,

Name = {"=rank(-sum({<MonthYear= {'$(vCurMonthYear)'}>}1-([Total Number of Failing Records]/[Total Number of Records])))<=5"}

>}1-(
[Total Number of Failing Records]/[Total Number of Records])),MonthYear,Name))


talk is cheap, supply exceeds demand
varunreddy
Contributor III

Re: Bottom five values using rank function

Gysbert,

Thanks for your quick response.

Cheers!

Varun

Community Browser