Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data Transformation-Scripting Question

1. I've a Data Table containing some survey results. Attached a sample. (this is actually a huge data file containing close to 500 columns & 35k records).

2. I also have a look up table that contains the description for multiple values of each column for the values in data table (from point # 1)

How would I create a function using applymap or some other scripting function where I could look up the values on the look up table and then populate the data file with the actual Description rather than numbers.

Appreciate your insights & responses.

Thanks

5 Replies
JonnyPoole
Employee
Employee

My office is auto-protecting your lookup file . Can you strip out any macro code etc... so its not flagged as suspicious ?  

Mapping loads work well to replace a value with another  (1:1 relationship)

If its not 1:1 then you are looking at joining in the load script in lieu

stigchel
Partner - Master
Partner - Master

Hi,

You can use a crosstable load for the data with the fields Question and Value corossed over the SURVID. Then load the lookup table, it will link to the the question and Value fields of the crosstable. If you want you can also join load the the lookup table.

See attached worked out example, hope it helps.

Not applicable
Author

Thanks Piet. Will try this with the actual file, though Syn Keys have to be taken care of.

Not applicable
Author

Look_up.JPG.jpgJonathan,

stigchel
Partner - Master
Partner - Master

It has been long said that Syn keys should be avoided, but now there is a consensus that Syn Keys are only a problem if they result in unintended keys. In this case you would create the exact same composite key as qv did for you and in that case it is no problem (search for synthetic keys on the community to see the discussions). Like said, you can also join load the tables and the syn key is also gone.