Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Nikhil2725
Creator II
Creator II

transform of datas

Hi Team,

I have a table as below:

Lender_offer_idinteractivity_data_type_iddescriptionsubject_idValue
144Job situation3Uncertain
145Debt3Light
146Estimated living expenses per month3***
147Emeg-message3abc
148Projected Emergency Fund3def
149Do or Dont Exercise - # Incorrect3ghi
150Do or Dont Exercise - Incorrect Answers3jkl
244Job situation3Permanent
245Debt3High
246Estimated living expenses per month3***
247Emeg-message3111
248Projected Emergency Fund3222
249Do or Dont Exercise - # Incorrect3333
250Do or Dont Exercise - Incorrect Answers3444


However, I want to display the data as below. Kindly help in displaying the data.

Lender_offer_idJob situationDebtEstimated living expenses per monthEmeg-messageProjected Emergency FundDo or Dont Exercise - # IncorrectDo or Dont Exercise - Incorrect Answers
1UncertainLight***abcdefghijkl
2PermanentHigh***111222333444
5 Replies
Gysbert_Wassenaar

Create a pivot table object with Lender_offer_id as Row dimension, description as Column dimension and Only(Value) as measure.


talk is cheap, supply exceeds demand
Nikhil2725
Creator II
Creator II
Author

Thanks for the reply,
However I have others data as well in order to display..
So Can I able to do in Scripting.
That would be helpful for me.
Gysbert_Wassenaar

Please post an accurate description of the source data you have and the result output you need.
You can very likely do whatever you want in Scripting and you probably shouldn't. But until I know what you really want all I can do is waste my time guessing.

talk is cheap, supply exceeds demand
Nikhil2725
Creator II
Creator II
Author

Hi Gysbert_Wassenaar ,
I mean to say like I have lot more data already displaying in the report and if i use pivot table that wont help me I guess.
So I'm asking the scripting method in order to display the records as I mentioned in the earlier
vvira1316
Specialist II
Specialist II

may be this 

NoConcatenate
ArrangeDataTmp:
LOAD * Inline
[Lender_offer_id, interactivity_data_type_id, description, subject_id, Value
1, 44, Job situation, 3, Uncertain
1, 45, Debt, 3, Light
1, 46, Estimated living expenses per month, 3, ***
1, 47, Emeg-message, 3, abc
1, 48, Projected Emergency Fund, 3, def
1, 49, Do or Dont Exercise - # Incorrect, 3, ghi
1, 50, Do or Dont Exercise - Incorrect Answers, 3, jkl
2, 44, Job situation, 3, Permanent
2, 45, Debt, 3, High
2, 46, Estimated living expenses per month, 3, ***
2, 47, Emeg-message, 3, 111
2, 48, Projected Emergency Fund, 3, 222
2, 49, Do or Dont Exercise - # Incorrect, 3, 333
2, 50, Do or Dont Exercise - Incorrect Answers, 3, 444];

NoConcatenate
ArrangeData:
LOAD
Lender_offer_id,
Value as [Job situation]
Resident ArrangeDataTmp
Where interactivity_data_type_id = '44';
Join
LOAD
Lender_offer_id,
Value as [Debt]
Resident ArrangeDataTmp
Where interactivity_data_type_id = '45';
Join
LOAD
Lender_offer_id,
Value as [Estimated living expenses per month]
Resident ArrangeDataTmp
Where interactivity_data_type_id = '46';
Join
LOAD
Lender_offer_id,
Value as [Emeg-message]
Resident ArrangeDataTmp
Where interactivity_data_type_id = '47';
Join
LOAD
Lender_offer_id,
Value as [Projected Emergency Fund]
Resident ArrangeDataTmp
Where interactivity_data_type_id = '48';
Join
LOAD
Lender_offer_id,
Value as [Do or Dont Exercise - # Incorrect]
Resident ArrangeDataTmp
Where interactivity_data_type_id = '49';
Join
LOAD
Lender_offer_id,
Value as [Do or Dont Exercise - Incorrect Answers]
Resident ArrangeDataTmp
Where interactivity_data_type_id = '50';

DROP Table ArrangeDataTmp;

EXIT SCRIPT;

 

ts.PNG