Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a sample table below where columns left and right are connected through joins eg-A is joined to B through Many to One join.
I want to build something in Qlikview where if I click on A it should give me B (1 level) and also E (because A->B and B->E) and should tell (2 levels).
I think Hierarchy function will be used but I'm not able produce the desired result.
Join Id | Left | Right | Join |
1 | A | B | Many To One |
2 | A | C | Many To One |
3 | A | D | Many To One |
4 | B | A | One To Many |
5 | G | D | One to One |
6 | B | E | Many To One |
Any help would be really appreciated.
can you draw the hierarchy described by your sample data?
Hi,
I'm not sure if it is a hierarchy or not but I want 3 listboxes - Left, Right and Number of levels. If I click on A in left, it should give me B and show number of levels as 1 and E with number of levels as 2. Something like transitive dependency, because in this case B-E relation is not direct.
Hi Beck,
Can you please give me an example with my data?
Harshit
Like this??
LOAD SCRIPT:
Hierarchy:
LOAD * INLINE
[
Main,Level1
A,B
A,C
A,D
B,A
G,D
B,E
];
LEFT JOIN
LOAD
Main as Level1,
Level1 as Level2
RESIDENT Hierarchy;
List boxExpression:
=Main & '-'&Level1&'-'&Level2
Select: Show as Tree view , With Seperator: - (Hyphen)
Thanks for the answer. Really appreciate this. But this solution will limit me to 3 levels only. I have a huge data collection. Is there any alternative solution
Okay, how many hierarchies do you have?
We can loop the code if this is the output you are looking for?
Meanwhile I'll look for an alternate solution too
There is no method to determine the number of hierarchies. It may change with the data.
Can you provide a sample that replicates your data? You've only provided 2 columns to work with..
We'll need to determine what you are working with to help you better