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

Preceding Load not working properly

Hello my QlikView friends.  Will someone please explain to me what is wrong with this statement?  Thank you 

class_sub:

LOAD COUNT(DISTINCT AX_PO_NUM)>1;

LOAD 1 AS ROWCOUNT,

  AX_PO_NUM,

  AX_CLASS,

  'MULTIPLE CLASSES' AS CLASS_DUP

RESIDENT sourcingclass_1;

Labels (1)
11 Replies
Anonymous
Not applicable
Author

Can't tell...  Maybe there is something outside this part.  I hope you'll find out and tell us.

Anonymous
Not applicable
Author

Well through a lot of different trials and errors, I finally got the result that I was looking for.  This is the code that worked for me.  (Oddly enough, now Order By doesn't work like I would like for it to, but this is a minor inconvenience)...

sourcingclass_1:

LOAD DISTINCT tbl_sourcing.AX_PO_NUM AS AX_PO_NUM,

  tbl_sourcing.AX_CLASS AS AX_CLASS

RESIDENT tbl_sourcing;

NoConcatenate

tmp_a:

LOAD AX_PO_NUM,

  COUNT(AX_PO_NUM) AS TempKey

RESIDENT sourcingclass_1

GROUP BY AX_PO_NUM;

NoConcatenate

tmp_b:

LOAD   AX_PO_NUM AS DUP_AX_PO_NUM

RESIDENT tmp_a

where TempKey > 1;

DROP TABLES tmp_a;

NoConcatenate

tmp_c:

LOAD DUP_AX_PO_NUM AS PO_NUMBER

RESIDENT tmp_b

ORDER BY DUP_AX_PO_NUM;

LEFT JOIN(tmp_c)

LOAD    AX_PO_NUM AS PO_NUMBER,

  AX_CLASS AS CLASS,

  'MULTIPLE CLASS' AS CLASS_DUP

RESIDENT sourcingclass_1;

DROP TABLE tmp_b, sourcingclass_1;