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;