Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
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
Partner Ambassador/MVP
Partner Ambassador/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