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

Range of age

Hi Experts,

I have a problem with the following situation. I got a data view called AGERANGES with the following structure and data:

AGEFROM AGETILL AGEGROUP

4                 16               4-16

17               33              17-33

34               77              34-77

78               119             78-119

Next to this table I have a person table named PERSON with a field birthdate.

Now i have the following coding in my script:

Leeftijden:

LOAD AGEFROM+(iterNo()-1) as Age,

          GROUPNAME

          WHILE IterNo() <= (AGEFROM - AGETILL)

          ;

SQL SELECT

          AGEFROM,

          AGETILL,

          GROUPNAME

FROM AGERANGES ;

personen:

LOAD

          BIRTHDATE,

          Age (today(), BIRTHDATE) as Age,

etc......

When my source is a Excel file with the script above and I looked in QW in the leeftijden table the result is as attached in attachment.

If the result is as I descibed in the attachment I can join it easily with the person table.

If I use the dataview AGERANGES the table is empty

Can anybody help me?

2 Replies
swuehl
MVP
MVP

I would suggest using a mapping table instead, please have a look at this thread:

http://community.qlik.com/message/47282#47282

edit:

Ah sorry, missed your points, you don't see the data from your view, right?

Your user has all necessary rights in the DBMS?

Not applicable
Author

It finaly works.

I do not exactly know what was causing troubles. It works without using a map, with the solution I mentioned in the original post.