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: 
Razwan_S
Contributor
Contributor

Nested for loop in qlik view

Hi 

 

I want to ask the community for some help using qlik view with regards to nested for statements 

For example if I have a DB list I have passed into qlik view as :

 

123456,

54321,

123456,

66789,

1090,

54321

 

how can I use a nested for in qlik view to look at a if at a time and get the count, there are two ids of 123456 for example

 

thanks and I look forward to your replies 

 

kind regards

 

Labels (1)
1 Reply
rwunderlich
MVP
MVP

You would generally not use a loop to calculate this, but rather a Group By in script or a Dimension in a chart. 

In script:

LOAD Id, Count(Id) as IdCount
from...
Group By Id;

In a chart:

Dimension: ID
Measure: Count(ID)

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com