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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
ganeshreddy
Creator III
Creator III

Creating a Model

Hi All,

I have data as shown below

.BT.PNG

and i need to show like below,

BT1.PNG

 

Please suggest a way to create separate data set in the model or suggest a way to represent as required. PFA example data

Thanks,

Ganesh 

2 Replies
its_anandrjs
Champion III
Champion III

Hi,

Try to load your table this ways

Hope this helps.

Data:
LOAD Skey,
            PSkey, 
            Proft
FROM
[E:\C\Source\Test.xlsx]
(ooxml, embedded labels, table is Sheet1);

Inner Join(Data)
New:
LOAD Skey as PSkey,
            Proft as PProft
Resident Data
Where Len(PSkey) = 0;

1.JPG

 

Regards,

Anand

 

 

pasi_lehtinen
Partner - Contributor III
Partner - Contributor III

Initial:
Load * Inline [
Skey, PSkey, Proft
222,111,1000
555,444,300
111,,600
777,666,300
444,,200
999,888,1000
666,,500
888,,500
333,,800
];

Final:
NoConcatenate Load 
	Skey, 
    PSkey, 
    Proft as Profit
Resident Initial where len(PSkey)>0; 

left join(Final)
Load 
	Skey as PSkey,
    Proft as PProfit
Resident Initial
where len(PSkey)=0;

vKeys_tmp:
Load chr(39)&Concat(PSkey,chr(39)&','&chr(39))&chr(39) as vPSkey Resident Initial
where len(PSkey)>0;
Let vPSkeys = peek('vPSkey',0,'vKeys_tmp');

Concatenate(Final)
Load
	Skey,
    null() as PSkey,
    Proft as Profit,
    null() as PProfit
Resident Initial
where len(PSkey)=0 and not match(Skey,$(vPSkeys));

drop table vKeys_tmp;
drop table Initial;