Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
idodel
Contributor III
Contributor III

Qlikview Loop Iteration function- ProjectID

Hello Qliks! 

I have a Projects table that contain ProjectID field & might have a another project who leads the same Project above the first.

exists: -left joins the DOC for checking, not in infinite way. 

left Join
LOAD
DOC as Leader1doc ,
If(BRI_SUBPROJM<>0,BRI_SUBPROJM,DOC) as Leader2doc
FROM [Data\DOCPROJ.qvd] (qvd);

demand: Building a loop iteration that pulls out the very first ProjectID that doesn't contain any leader.

BRI_SUBPROJM<>0 - checking if the ProjectID has any leader.

 

hope it will make sense, Table after some left joins:

1- ProjectID2 - BRI_SUBPROJM (the Leader Project - if exists)

3- BRI_SUBPROJM

(the Leader Project of 2 -if exists)

4- BRI_SUBPROJM

(the Leader Project of 3- if exists)

 

Leader2doc (the very first leader - EXPECTED)
PROJ1PROJ2  PROJ2
PROJ3PROJ4PROJ5 PROJ5
PROJ6   PROJ6

Currently:  doing the search but not in a loop, and only brings the PROJ5 example.

We will have even more projects connected like 5 in row.

Thanks,

3 Replies
Kushal_Chawda

would you be able to share sample data?

idodel
Contributor III
Contributor III
Author

CustomerIDProjectIDCtypeCtypeLeader2docLeader1docLeader2doc
1290119V00072Type1Type219V0105919P01100
1988219J00035Type1Type219V0105419P01103
1988219N00008Type1Type219V0105419P01103
1988219J00043Type1Type219V0105919P01100

The main purpose is to pull out the ctype value of the very first ProjectID - that contain null value on the BRI_SUBPROJM  field (in a Projects table)

Currently the search happens but not in a loop, and only brings the second leading project = Leader2doc.

Brett_Bleess
Former Employee
Former Employee

There are duplicate posts on this thread:

https://community.qlik.com/t5/QlikView-App-Development/Qlikview-Loop-Iteration-function-ProjectID-ke...

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.