Qlik Community

Ask a Question

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Creator III
Creator III

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

Try this:

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


Capture.PNG

View solution in original post

7 Replies

May be this:

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

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))

Creator III
Creator III

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?

This?

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


Capture.PNG

Creator III
Creator III

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

Try this:

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


Capture.PNG

View solution in original post

Creator III
Creator III

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))