Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
cancel
Showing results for 
Search instead for 
Did you mean: 
awadah25
Creator II
Creator II

Generate Date to age groups

I have [dateOfBirth] for patinets and i want to make group for them per ages

for example:

Age Group

00-15

16-31

32-47

47+

Regards,

1 Solution

Accepted Solutions
sunny_talwar

May be this expression in list box:

=Aggr(If(Age(today(), Only({1}dateOfBirth)) < 16, Dual('0-15', 1),

   If(Age(today(), Only({1}dateOfBirth)) < 32, Dual('16-31', 2),

   If(Age(today(), Only({1}dateOfBirth)) < 48, Dual('32-47', 3), Dual('47+', 4)))), dateOfBirth)

Capture.PNG

View solution in original post

6 Replies
Not applicable

Using Today ( function) you can calculate the years of patinets . Through nested if we can establish groups . Regards.

sunny_talwar

Do you have a sample you can share?

Not applicable

!Good evening, .qvw Attach a file. It can be seen as the deudaV2 , deudaV3 eyelashes ... I falsify dates . Regards.

awadah25
Creator II
Creator II

Check the attachment please for clear example

Regards,

awadah25
Creator II
Creator II

Check the last comment please.

Regards,

sunny_talwar

May be this expression in list box:

=Aggr(If(Age(today(), Only({1}dateOfBirth)) < 16, Dual('0-15', 1),

   If(Age(today(), Only({1}dateOfBirth)) < 32, Dual('16-31', 2),

   If(Age(today(), Only({1}dateOfBirth)) < 48, Dual('32-47', 3), Dual('47+', 4)))), dateOfBirth)

Capture.PNG

View solution in original post