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: 
Anonymous
Not applicable

Load only on certain condition

In the attached Excel sample, I have 2 rows for each transaction based on EMPID.  I only want to load the 2 rows if the "Matched" column has equal values for the 2 rows.  So in my example, I don't want the first 2 or last 2 rows to load because the values are "I" and "O" for EMPID 1,  and "A" and "B" for EMPID 4.  Is there a way to do this on a load statement, and if not, how can it be done in the dashboard?  I don't want to see those rows at all in the dashboard if the "Matched" values are not equal.  I've tried different things with a Where clause, but I can't figure out how to compare the rows to find out if they match or not.

1 Reply
Anonymous
Not applicable
Author

Below script may help you

tbl1:

LOAD

  EmpID

Where RecCnt=1;

LOAD EmpID,

     Count(DISTINCT [I/O]) as RecCnt

FROM

Matched.xlsx

(ooxml, embedded labels, table is Sheet1)

Group by EmpID;

tbl2:

LOAD EmpID,

     EmpName,

     CustName,

     Item,

     Desc,

     Qty,

     Price,

     [I/O]

FROM

Matched.xlsx

(ooxml, embedded labels, table is Sheet1)

Where Exists(EmpID);

DROP Table tbl1;