Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
new2qlik2
Contributor II
Contributor II

dataset contains priority and category - how to display a table with top 5

I have a dataset where i have items with an "Assigned priority" 1 - 100; and a category "a, b, c, d". So there's a row with priority 1 -100 in category a; a row with priority 1-100 in category b; etc. How can i display top 5, in a particular category in a table?

Labels (1)
3 Replies
MendyS
Partner - Creator III
Partner - Creator III

Hi @new2qlik2  

first - you need to use with group by and order by functions to make order in your data set,
after that load to TempTable and used with peek or preview functions to filter to just 5

new2qlik2
Contributor II
Contributor II
Author

Thanks MendyS! Can I ask two follow ups: 

1) Why can't i sort/group in the same table while loading?

2) I tried using "rank" and aggr but that didn't work - any thoughts on why that didn't work?

MendyS
Partner - Creator III
Partner - Creator III

Hi @new2qlik2 

1. you can use group by and order at the same time, if you send me the error I will try to help.
2. about rank - Solved: Re: Ranking in Script - Qlik Community - 43866