Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Bottom 5 values

Hi,

I have two charts that shows (or are supposed to show) top 5 and bottom 5. The top 5 is no problem, here's my expression in the dimension:

=aggr(if(rank(sum({$<AccountName={'3010'}>} Value))

  <=5) ,Product),Product)


And for the bottom 5, i thought that this would work:


=aggr(if(rank(-sum({$<AccountName={'3010'}>} Value))

  <=5) ,Product),Product)


My problem seem to be the "-" sign in front of sum. Aggr doesn't seem to like it.

Any ideas of how i can achive this? Dimension limit is not an option here since the dimension i want to rank by is the secound dimension after a cyclic group.

//A.

26 Replies
Anonymous
Not applicable
Author

For some reson the expression now works with the negative sign in front of it.

But. I hav another problem conencted to this. When listing the bottom 5 values it only show 3 of them. And what I've discovered is that it only shows the ones that have a negative value.

This is the list of the bottom products:

Product1-0,50%
Product3-0,04%
Product5-0,01%
Product20,00%
Product70,00%
Product60,00%
Product100,00%
Product90,01%
Product80,01%

How do i get it to list the other values?

//A.

MK_QSL
MVP
MVP

Have you tried my solution?

Anonymous
Not applicable
Author

That is the solution i have used also but it doesn't fix my problem with the percentage values that are negative and positive. If that is the problem but that's my conclusion.

MK_QSL
MVP
MVP

If possible, please stick with your sample data provided earlier...

Now you are coming with Product1, Product2.... it's difficult to work...

Kindly provide correct sample data along with your required result... Would love to help you.

Anonymous
Not applicable
Author

Sorry about that, here's an extended version of sample data. I couldn't re-create the problem i had with the percentage values not showing all five. But instead the regulare value is not showing all bottom five but three of them only (the negatvie ones) so i'm thinking a solution to that might solve the real case i have aswell.

MK_QSL
MVP
MVP

If you check MRK349 file enclose on 15/04, you can see that my solution is working for Bottom 5 also.

Now, please let us know what is the percentage formula you are using?

Anonymous
Not applicable
Author

Yes i can see that but the difference is the data i have in the new file. Where i have negative values so i think THAT is the problem.

MK_QSL
MVP
MVP

Can you provide -ve value data also?

Also, let us know how you are getting %

Anonymous
Not applicable
Author

Attached you'll find the source data.

How i get the procentage you can see in the expression.

MK_QSL
MVP
MVP

Sorry but where is the expression?