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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Load variable

Hi community,

I have many different files with the same questions, but different wording.

They are started from qID_2_blabla or qID_3_blabla.

I want, if any question started from qID_2_ save as AAA, if any question started from qID_3_ save as BBB.

Do you have any ideas how it easy to do?

Regards,

15 Replies
Anonymous
Not applicable
Author

Now I see what the question is about.  The " qID_2_blabla or qID_3_blabla" are not the values - they are filed names.  So, all suggestions above are not applicable.  Simple renaming is not acceptable for the simple reason that you cannot have multiple fields with the same name.

Here comes the question - what do you want to do with it?  Possible options:

1. use only one field of similar named

2. use all of them and use the data of all these fields

3. anything else (?)

Regards,

Michael

Anonymous
Not applicable
Author

Hi Michael,

I have many different files with the same name, but different wording.

I want to create universal load, where I select which file I want to load and all questions name change their name on for example AAA, BBB, and so on.

In charts and tables I  can use variables AAA, BBB, and so on.

All questions names started from qID_NUMBER_TEXT. I want to recode the question, if it started from qID_2_ to AAA, if it started from qID_3_ to BBB, ...

Thanks,

Anonymous
Not applicable
Author

Hi Vladimir,

If you load only one file at a time, and if there are no "duplicates" within one file (your example has 227 twice, and it is a problem), there is a solution.  In the attched example, I rename column names to Qnnn.  So, when you load the excel file, you get Q150 instead of qID_150_<whatever>.  If you load another file with qID_150_<something different>, you'll get the same Q150 instead.

The file to load is defined by a variable - see input box on top.

Hope it helps...

Regards,

Michael

Anonymous
Not applicable
Author

For me more important wording than Q23 or O24.

I think it's difficult way.

I'll load by questions from SQL.

Anonymous
Not applicable
Author

Hi Vladimir,

I added mapping table and applymap in the script so it can convert Qnnn to the specific wording per map.  As for hte load form SQL - it doesn't matter much.  If you load from different tables that have same Q numbers with different wordings, you'll have to repeat this script for each table (except the map of course).

Regards,

Michael

Anonymous
Not applicable
Author

Thanks,

It's close to my question.

Thanks,