Qlik Community

Qlik Healthcare User Group

This group is for healthcare organizations, partners, and Qlik Healthcare staff to collaborate and share insights.

Highlighted
Not applicable

indirection - use of for each?

I have a qvd file containing 999 records (customer number and name), i wish to create 999 unique files

containing a directional label (customer name), I am struggling ... any ideas?

Tags (1)
2 Replies
swuehl
Not applicable

Re: indirection - use of for each?

Maybe something like

List:

LOAD DISTINCT CustomerName as CustomerNameList

FROM QVDFile.qvd (qvd);

FOR EACH name IN FIELDVALUELIST('CustomerNameList')

SingleName:

LOAD '$(name)' as CustomerName

AUTOGENERATE 1;

Extract:

LOAD * FROM QVDFile.qvd (qvd)

WHERE EXISTS(CustomerName);

STORE Extract INTO [Customer_$(name).qvd] (qvd);

DROP TABLE Extract, SingleName;

NEXT name

DROP TABLE List;

Not applicable

Re: indirection - use of for each?