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

Announcements
April 13–15 - Dare to Unleash a New Professional You at Qlik Connect 2026: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

reg-var

1. can u say one thing if i have 100 records and i want to display top 5 records and low 5 records

3 Replies
tresB
Champion III
Champion III

You might have to use rank() alongwith aggr(). Sample qvw could help me help you.

preminqlik
Specialist II
Specialist II

sum({<Dimension={'=sum(aggr(rank(sum([BASIC AMOUNT]))<6,Dimension))'}>}[BASIC AMOUNT])      top 5

sum({<Dimension={'=sum(aggr(rank(-sum([BASIC AMOUNT]))<6,Dimension))'}>}[BASIC AMOUNT])      bottom 5

anbu1984
Master III
Master III

Check this