Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to identify the chain?

Hello

I have source with structure: SOMEONE1, SOMEONE2, family_identifier.

SOMEONE in one row can be associated with someone from a different row. Thus, in the family for 3 person. And so on ...

Help me identify the chain effective way?>

1 Solution

Accepted Solutions
Not applicable
Author

Prem,

i prepared example for you.

Do few "incremental" reloads and look how families are rebuild after them.

1.  save attached files in d:\

(or in other location, but then change pathes in script)

2. reload and look

3. put new data into sheet1 (Arkusz1) of xls

4.reload ....., reload ....

Let me know what do you think about it.

regards

Darek !

View solution in original post

21 Replies
Not applicable
Author

May you show sample data?

hic
Former Employee
Former Employee

This sounds like a hierarchy. If SOMEONE1 has a parent SOMEONE2, then you can resolve this hierarchy using a Hierarchy Load.

See more on http://community.qlik.com/blogs/qlikviewdesignblog/2013/11/11/unbalanced-n-level-hierarchies

HIC

Not applicable
Author

qv1.jpg

in fact I work with numbers:

qv2.jpg

Not applicable
Author

Gertye,

i thought that HierarchyBelongsTo() may be a key, but i understand, that this relation is not hierarchical in fact. I undestand, that someone1 konws someone2 and taht means, that someone2 knows someone1 ....

hmm.

1. How many rows do you have?

2 Are you interested to find "shortest way" (shortest ways) from SMB_X to SMB_Y or maybe all possible ways?

3.How many steps do you expect (i heard somewhere, that from any to any other person in the world you need no more than 7 steps ....)



regards

Darek

Not applicable
Author

I think we may need something like Dijkstra's algorithm...

reg

Not applicable
Author

Hello Dariusz

1. How many rows do you have?

It's 1 272 055 rows for the start (at the end it can be about 20 000 000 rows).

2 Are you interested to find "shortest way" (shortest ways) from SMB_X to SMB_Y or maybe all possible ways?

I'd like shortest way  (I know how I can make it, but I don't like my way).

3.How many steps do you expect (i heard somewhere, that from any to any other person in the world you need no more than 7 steps ....)

Yes, I don't know where the bottom ;(  Maximum number of people in the family ...mmm.. may be.. 20?

Not applicable
Author

thanks, I will try it and let you know then

Not applicable
Author

SOURCE

COMBINATIONS

RESULTS

1

2

1

2

1

2

3

1

3

2

2

4

1

4

2

2

5

1

5

2

4

7

1

7

3

2

3

1

2

4

1

2

5

1

2

7

2

3

4

2

3

5

2

3

7

3

4

5

2

4

7

1

5

7

3

Is it something like this?

Not applicable
Author

yes, it was "my way" ))