Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Survey Data Analysis-Gouping Age

Hi All,

I have data with a column of age with different ages. I want to convert them in age groups. and want to show these groups as dimension and there % as measure. E.g

Dimension:   Age(5-15), Ag(16-30), Age(30+)

Measure:      20%, 30%, 50%

Any solution?

Thanks

8 Replies
jmvilaplanap
Specialist
Specialist

Hi,

You can use the Class function, making groups

     class ‒ QlikView

Regards

Not applicable
Author

Thanks. How can I use this in formula? . I do not want to do anything in load script and to change my table definition. if I could do any thing on the fly in formula expression in dimension/measure?

jmvilaplanap
Specialist
Specialist

Yes, you can do it in the object

Write in the dimension:

Class(Age, 15)

It makes groups of 15

Not applicable
Author

Thanks. it worked. Can I use range in match function like 2-10, or 20 - 25 , rather than using hard coding each value? thanks

sunny_talwar

You can use If statement


If(Age >= 2 and Age <= 10, Dual('2-10', 1),

     If(Age >= 20 and Age <= 25, Dual('20-25', 2)))

jmvilaplanap
Specialist
Specialist

Hi, I think is not possible, the ranges are always equal.

sunny_talwar

Using if jmvilaplanap

jmvilaplanap
Specialist
Specialist

Hi stalwar1

Of course you can do it with "if" but is necesary to define the groups before. With "Class" you can have all the groups you need.

Regards