Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Grouping List Box

Hi Everyone,

I'm a beginner to Qlikview. Currently, I have a list box that shows ages 1-80 individually. I'd like to group them such that it's ages <10, 10-20, 20-30, and so on. This way, users can select on the age group as oppose to the specific age and will have data for all ages within that group displayed.

Thank you for you help!

2 Replies
Gysbert_Wassenaar

Create a new field in the script that creates the groups:

LOAD

     Age,

     Class(Age, 10) as AgeGroup,

     ...other fields,

FROM

     ...

     ;

Then use that new AgeGroup field in the listbox


talk is cheap, supply exceeds demand
sandeep_sarawgi
Partner - Contributor III
Partner - Contributor III

Try using Interval Match

GroupTable:

Load * Inline [

Start, Stop, Grouping

0, 9, 0 to <10

10, 19, 10 to <20

20, 29, 20 to <30

30, 39, 30 to <40

40, 49, 40 to <50

50, 59, 50 to <60

60, 69, 60 to <70

70, 79, 70 to <80

80,  , 80 or more

];

IntervalMatchTable:

IntervalMatch(age)

load Start, Stop

Resident GroupTable;

Left Join (IntervalMatchTable)

Load Start, Stop, Grouping

Resident GroupTable;

Drop Table GroupTable;

left join(Facts)

Load age, Grouping

Resident IntervalMatchTable;

Drop Table IntervalMatchTable;

Then plot Grouping on a list box which will automatically associate with age in Facts.

Sandeep Sarawgi