Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Group by range of age

Maybe, somebody can help me, I need group the customers of the Sales Department by range of ages, like 15-25 years, 25-35 years, 35-45 years, etc. from the birthday of the customer.

Please, if someone can help me I will appreciate..

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

See http://community.qlik.com/forums/t/22415.aspx for some suggestions. If the intervals are regular, you may also consider using the class() function.

-Rob

johnw
Champion III
Champion III

And if you don't know about it already, age(timestamp,birthdate) will tell you how old someone is. I wasn't clear if that was part of your question. I agree with Rob's suggestion of the class function if you have regular intervals and don't mind QlikView's resulting format. Putting it all together, you might have something like this (untested):

class(age(now(0),"Customer Birthdate"),10,'age',5) as "Age Range"

Which would give you a range formatted like this (if I recall correctly):

15 <= Age < 25