Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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

Tags (1)
5 Replies
Employee
Employee

Re: Data Transformation-Scripting Question

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
Honored Contributor

Re: Data Transformation-Scripting Question

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

Re: Data Transformation-Scripting Question

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

Not applicable

Re: Data Transformation-Scripting Question

Look_up.JPG.jpgJonathan,

stigchel
Honored Contributor

Re: Data Transformation-Scripting Question

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.

Community Browser