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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Comparison using loop

Guys,

Assume I have 8 customers. I need the fields of each customer to be compared with the fields of other customers. For this, I need to do looping in script right?

Could you guys please share some sample code to achieve this comparison using loop functions(for, for each or while), so I can get an idea on achieving this.

Thanks,

Siva.

11 Replies
antoniotiman
Master III
Master III

Table:
LOAD FieldName,
[Data type],
[Min Occurs],
[Max Occurs],
[M/C/O],
Length,
Customer,
CustomerID
FROM
"https://community.qlik.com/servlet/JiveServlet/download/1318479-290153/sum.xlsx"
(ooxml, embedded labels, table is Sheet1);
Join LOAD FieldName as FieldName ,CustomerID  as C1
Resident Table ;
Left Join LOAD CustomerID,C1,Count(If(CustomerID <> C1,1)) as Counter
Resident Table Group By CustomerID,C1;
NoConcatenate
LOAD * Resident Table Where Counter <> 0;
Drop Table
Table; 

Owever change the original number of Records.

Anonymous
Not applicable
Author

Thank you so much Antonio. It's great. But I have another requirement like this. Could you please clear me that one too?