Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
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
Valued Contributor

Re: Survey Data Analysis-Gouping Age

Hi,

You can use the Class function, making groups

     class ‒ QlikView

Regards

Not applicable

Re: Survey Data Analysis-Gouping Age

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
Valued Contributor

Re: Survey Data Analysis-Gouping Age

Yes, you can do it in the object

Write in the dimension:

Class(Age, 15)

It makes groups of 15

Not applicable

Re: Survey Data Analysis-Gouping Age

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

Re: Survey Data Analysis-Gouping Age

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
Valued Contributor

Re: Survey Data Analysis-Gouping Age

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

Re: Survey Data Analysis-Gouping Age

Using if jmvilaplanap

jmvilaplanap
Valued Contributor

Re: Survey Data Analysis-Gouping Age

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

Community Browser