Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

rcandeo
Contributor II

Minimum with Ranking

In this example, I neeed to find the minimum value considering ony the 10 bigger values.

So where it shows 990, I need to be 1100 as this is the 10th bigger value

My actual expression is:

=Min(ALL Aggr(Sum({<Name=>} Value),Name))

Thank You

1 Solution

Accepted Solutions
MVP
MVP

Re: Minimum with Ranking

Try this:

=Min(ALL Aggr(Sum({<Name = {"=Rank(Sum({$<Category=>}Value)) < 11"}, Category>} Value),Name))


Capture.PNG

7 Replies
MVP
MVP

Re: Minimum with Ranking

May be this:

=Min(ALL Aggr(Sum({<Name = {"=Rank(Sum(Value)) < 11"}>} Value),Name))

MVP
MVP

Re: Minimum with Ranking

Why are you using ALL? This is something which will be discontinued in future version. If this is something you use in a text box, you might just need this

=Min({1} Aggr(Sum({<Name = {"=Rank(Sum(Value)) < 11"}>} Value),Name))

or this in chart

=Min({1} TOTAL Aggr(Sum({<Name = {"=Rank(Sum(Value)) < 11"}>} Value),Name))

rcandeo
Contributor II

Re: Minimum with Ranking

Unfortunatelly none of these options worked as expected.

I need to have the option to select one of this names and the results cannot change, but they are being changed.

See qvw attached please?

MVP
MVP

Re: Minimum with Ranking

This?

=Min(ALL Aggr(Sum({<Name = {"=Rank(Sum({1}Value)) < 11"}>} Value),Name))


Capture.PNG

rcandeo
Contributor II

Re: Minimum with Ranking

almost there. I am sending qvw again with another field - Category. My intention is that min value continue being the same, no matter if I select category A or B. Can you help me with this?

maxmin.jpg

MVP
MVP

Re: Minimum with Ranking

Try this:

=Min(ALL Aggr(Sum({<Name = {"=Rank(Sum({$<Category=>}Value)) < 11"}, Category>} Value),Name))


Capture.PNG

rcandeo
Contributor II

Re: Minimum with Ranking

Perfect. Just to complete the sentence to be independent from selections os Name and Category:

=Min(ALL Aggr(Sum({<Name = {"=Rank(Sum({$<Name,Category=>}Value)) < 11"},Category>} Value),Name))