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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Loop in Reports

How to make a loop in the report? For example, I select a year and a type of product and that would generate a report for each market that has this product.

4 Replies
its_anandrjs
Champion III
Champion III

Loops are working in the load script if you want to load from your requirement then use loop do you have any samples and what is the condition.

Not applicable
Author

Thank you (:

its_anandrjs
Champion III
Champion III

Understand with a very simple example

Eg:-

Source:

LOAD * Inline

[

Year,Product Type,Market

2013,P1,M1

2013,p2,M1

2013,p3,M2

2013,p4,M3

2014,p1,M3

2014,p2,M2

2014,p3,M2

2014,p4,M1

];

NoConcatenate

Data:

LOAD

Year,[Product Type],Market

Resident Source

Where Year = 2014 and Match([Product Type],'p2','p3');

DROP Table Source;

From source data i load only for Year = 2014 and for product type p2 and p3 for reporting creation

similar way may be you create a report

Not applicable
Author

Igor,

there are not typical loops in expressions (charts).

But you have there aggr() functions, which lets you calculate some formulas over dimension values. So, in some cases you may have something like "loop"

regards

Darek