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: 
alexpanjhc
Specialist
Specialist

rank bands questions

Hi

I am creating a few Ranks bands and i created a few dimensions for this purpose. to make it simple, it looks like this

load

ID, ranks

resident table;

 

if (rank<=10, 'Top 10',

if (rank<=20, 'Top 20',

if (rank<=50, 'Top 50',

....))) as RankBand

so i created a selection box for RankBand. however, Top 20 is 11-20, top 50 is 21-50

is there a way for this dimension, when selecting top 20 it will show from 1-20 and so on?

 

thanks!

Labels (2)
1 Reply
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

A flexible way to do this is to generate a Range table that can map rank values to many RankBands like this:

// Generate some test data
Ranks:
LOAD RecNo() as rank
AutoGenerate 75;


Ranges:
LOAD * INLINE [
RankBand, RangeStart, RangeEnd
Top 10, 1, 10
Top 20, 1, 20
Top 50, 1, 50
];

Join (Ranges)
IntervalMatch (rank) LOAD RangeStart, RangeEnd RESIDENT Ranges;
DROP FIELDS RangeStart, RangeEnd;

For more see the downloadable examples at https://qlikviewcookbook.com/recipes/download-info/date-grouping/

and https://qlikviewcookbook.com/2023/08/creating-time-groups-in-your-data-model/

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com