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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Joy_23
Contributor
Contributor

Transforming data into particular view

How to transfer this data with below view on Qlik dashboard?

Joy_23_0-1694513284897.png

 

Joy_23_1-1694519695333.png

 

 

Labels (1)
1 Reply
brunobertels
Master
Master

Hi 

below the logic step by step  

1 : load data as it is 

2 : replicate field Region when missing

3 : croostable data 

4 create new fied for Globa et South named Type_Region and create subfield Type for A B C . 

 

LOAD * INLINE
[
Region,Country,A_Global,B_Global,C_Global,A_South,B_South,C_South
Asia,India,12,42,12,10,9,8
,Srilanka,12,32,12,23,3,5
,Japan,12,1,43,23,22,12
](delimiter is ',');

NoConcatenate
Table1:
load
if(len(Region)>0,Region,peek('Region')) as Region,
Country , A_Global,B_Global,C_Global,A_South,B_South,C_South
resident Table; drop table Table;

Table2:
crosstable ( Type,Amount,2)
load* resident Table1; drop table Table1;

noconcatenate
Table3:
load
Region,
Country,
subfield(Type,'_',1) as Type,
subfield(Type,'_',2) as Type_Region,
Amount
resident Table2 ; drop table Table2;

 

Resulting Table : 

brunobertels_0-1694595209896.png

 

hope it helps