Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Any suggestions?
BRI_SUBPROJM<>0 - checking if the ProjectID has any leader.
Thanks,
can you share a sample data and the expected output ?
Ok, hope it will make sense, Table after some left joins:
1- ProjectID | 2 - 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) |
PROJ1 | PROJ2 | PROJ2 | ||
PROJ3 | PROJ4 | PROJ5 | 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,
I'm sorry, but I didn't completely understand the objective.
you get the table
1- ProjectID | 2 - 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) |
and you want to add :
Leader2doc (the very first leader - EXPECTED)
if so what's the rule?
Hey,
The rule is some kind of loop for every ProjectID:
(BRI_SUBPROJM is the leader of the ProjectID)
while (BRI_SUBPROJM contain value (ProjectID), iterate it.
once the BRI_SUBPROJM contain 0, pull out the very first ProjectID - the leader.
Thanks,
Check out the following Design Blog post, should get you on the right track as far as the finding the row with the empty value part...
https://community.qlik.com/t5/Qlik-Design-Blog/Peek-vs-Previous-When-to-Use-Each/ba-p/1475913
If you want to further search the Design Blog area yourself, use the following URL:
https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog
Regards,
Brett
There are duplicate posts on this thread as well:
Regards,
Brett
Hey, checked it out, and not quiet understand how am I able doing that in a loop as well.
please try to describe how is that going.
Thank you
This post is dealing with something that reminding my issue, but not including a loop search.
Can someone share how I is that going in the script ?
Best Regards,
Ido
Any suggestions for the issue?
Thanks