Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data model

Dear community,

I am Qlikview newbie and have some trouble with the data model of our CRM-database which is the source for my Qlikview analysis:

In the first table I have 2 columns: ID and text. The other table contains data with a link to the ID. For better understanding I enclosed two pictures:

Text.jpg     Data.jpg

So, from my perspective data model looks like this:

table structure.jpg

The columns "Birth Year" and "Birth Place" have links to the same column in table 1. How do I set up this in the script (or elsewhere) so that I do not see anymore "1" but "1981"?

Unfortunately data cannot be changed

Thank you very much


1 Solution

Accepted Solutions
Not applicable
Author

Sebastian,

Swuelh's answer is very OK.

However, I would create 2 dimensions: Birth Year and Birth Place.

Birth_Year:

LOAD ID as ID_Year,

   Field2 as [Birth Year]

FROM xxx

WHERE isnum(Field2);

Birth_Place:

LOAD ID as ID_Place,

   Field2 as [Birth Place]

FROM xxx

WHERE istext(Field2);

Fabrice

View solution in original post

5 Replies
swuehl
MVP
MVP

Try a mapping approach:

MAP:

Mapping LOAD ID, Text From Table1;

Table2:

LOAD

     Name,

     Surname,

     applymap('MAP', BirthYear) as BirthYear,

     applymap('MAP', BirthPlace) as BirthPlace

FROM Table2;

Not applicable
Author

Sebastian,

Swuelh's answer is very OK.

However, I would create 2 dimensions: Birth Year and Birth Place.

Birth_Year:

LOAD ID as ID_Year,

   Field2 as [Birth Year]

FROM xxx

WHERE isnum(Field2);

Birth_Place:

LOAD ID as ID_Place,

   Field2 as [Birth Place]

FROM xxx

WHERE istext(Field2);

Fabrice

Not applicable
Author

Thank you both for your quick response. I will check out tomorrow and provide feedback.

Not applicable
Author

Both hints worked. Thank you very much.

Not applicable
Author

Tag the answer as correct/usefull to close the discussion then

Fabrice