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: 
thierrytt1102
Partner - Creator II
Partner - Creator II

Recursive table

Hi,

I've got a question concerning a straight table:

I have a table like:

Name          ParentName    NameStatus.

John            Charles            Alive

Charles          Andrew            Dead

And I'd like to have a straight table like this:

Name        NameStatut      ParentName      ParentStatus.

John              Alive                Charles            Dead

I've tried set analysis like P(ParentName), lookup/peek doesn't exist in charts and only(TOTAL Status) but No Way!

Due to the amount of data, I need to keep one this information into one table in my datamodel.

Thank you!

1 Solution

Accepted Solutions
anbu1984
Master III
Master III

=TextBetween(Concat(TOTAL Name &'|' & NameStatus,','),ParentName & '|',',')

View solution in original post

6 Replies
anbu1984
Master III
Master III

Temp:

Load * Inline [

Name,ParentName,NameStatus

John,  Charles,Alive

Charles,Andrew,Dead ];

Left Join(Temp)

Load Name as ParentName,NameStatus As ParentStatus Resident Temp;

thierrytt1102
Partner - Creator II
Partner - Creator II
Author

Thanks

That's way my first attempt. It's working but It's like to avoid a resident load as this table is huge.

Is there a way to do it within the chart?

Thx

anbu1984
Master III
Master III

=TextBetween(Concat(TOTAL Name &'|' & NameStatus,','),ParentName & '|',',')

thierrytt1102
Partner - Creator II
Partner - Creator II
Author

I don't know if this is the best practice but it works perfectly in my case.

Thank you very much

Not applicable

I found this a very easy way to deal with this problem (still using resident):

Load Name as ParentName, NameStatus as ParentStatus resident Table;

This will load again your table, but now associating ParentStatus with ParentName. The association with the other table is automatically stablished.

thierrytt1102
Partner - Creator II
Partner - Creator II
Author

Yes I see.

I asked it to remain as a single table because this is actually a linktable.

Cheers