Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
imsushantjain
Partner - Creator
Partner - Creator

How to do this Complex Table & Data Transformation with script!

Hi All,

This is the Snapshot of the data I have:

Input:

Data 1.png

As per "criteria_name"  each Internal Business Unit is linked to each Internal Legal Entity, so here we have 6 Business Unit and 2 Legal Entity which should result in a set of 12 rows (Output).

We can consider "current_exposure" to take the vale from Internal Business Unit row.

Such condition exist for each "exp_line_id", for the sake for example i have only considered one "exp_line_id".

Output:

Data 2.png

How can i achieve this output?

This is like reverse CrossTable, but more complex:

Row values as fields (opposite of crosstable?)

Regards

Sushant

1 Solution

Accepted Solutions
PrashantSangle

Hi,

try like below

Load risk_expdef_name,

exp_line_id,

facility_name,

short_name as "Internal Business Unit",

current_exposure

From tableName

where criteria_name='Internal Business Unit';

Join

Load risk_expdef_name,

exp_line_id,

facility_name,

short_name as "Internal Legal Entity",

current_exposure

From tableName

where criteria_name='Internal Legal Entity';

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

2 Replies
PrashantSangle

Hi,

try like below

Load risk_expdef_name,

exp_line_id,

facility_name,

short_name as "Internal Business Unit",

current_exposure

From tableName

where criteria_name='Internal Business Unit';

Join

Load risk_expdef_name,

exp_line_id,

facility_name,

short_name as "Internal Legal Entity",

current_exposure

From tableName

where criteria_name='Internal Legal Entity';

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
imsushantjain
Partner - Creator
Partner - Creator
Author

Hi Prashant,

Thanks for the smart solution, no doubt you are an MVP

Regards

Sushant