Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Group variable

Hello!

I have some thoughts on how to do if you have a variable "age" which ages in different people in the file, then I would like to group these into exepel 18-25, 26-35 and so what do I do?

1 Solution

Accepted Solutions
Alexander_Thor
Employee
Employee

Not that I am aware of. QV9, QV10, QV11 works for me atleast.

Anyhow I extracted the loadscript for you, either view it in a text editor or import into QV by Open script editor -> File menu -> Open external script file and point to the qvs file.

View solution in original post

5 Replies
Not applicable
Author

Hi,

If you have field name Age which has all the ages, if you want to field with age group. Please use class function in qlikview.

Example: If your age field has values from 0,1,2.....60

               Function: Class(Age, 10), it will separate the field as 0<=x<=10, 11<=x<=20....50<=x<=60.

Hope this helps...

Alexander_Thor
Employee
Employee

Rob has put together a wonderful QV Cookbook that contains good examples on how to achive this amongst other things. You will find it here: http://robwunderlich.com/downloads/

In the cookbook check out the mapping ranges example.

A rough outline would something like:

ÅldersGrupp:

MAPPING LOAD

Low+(iterNo()-1) as Key,

Group

WHILE iterNo() <= (High - Low) + 1

;

LOAD * INLINE [

Low, High, Group

0,15,Under 16

16,35,16-35

36,55,36-55

56,65,56-65

]

;

Not applicable
Author

Hello again!I

I can not get up that file, is there a particular version of QlickView I must have?

Alexander_Thor
Employee
Employee

Not that I am aware of. QV9, QV10, QV11 works for me atleast.

Anyhow I extracted the loadscript for you, either view it in a text editor or import into QV by Open script editor -> File menu -> Open external script file and point to the qvs file.

Not applicable
Author

Thanx