Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik Certification Exam Sale - 40% off. Register by June 30, 2020. GET DETAILS
Highlighted
New Contributor II

hierarchical data model

Hi,

I have a set of hierarchical data like this:

LOAD * Inline [
MEMBER, TEAM, BOSS, HIERARCHIAL
Donald Duck, Alpha, 2, Yes
Mickey Mouse, Alpha, 1, Yes
Trasan Apanson, Alpha, 1, Yes
Donald Duck, Beta, 1, Yes
Trasan Apanson, Beta, 2, Yes
Donald Duck, Gamma, 0, No
Mickey Mouse, Zeta, 0, No
Trasan Apanson, Zeta, 0, No
Mickey Mouse, Pi, 2, Yes
Trasan Apanson, Pi, 2, Yes
Donald Duck, Pi, 1, Yes
];

Now I would like to display the hierarchy of the different Teams, i.e. the name of the Boss (if there is a boss on the team, may also be more than one boss on a single team) and the related servants (one or more, present on every team).

I want to fill the table at the bottom... Smiley Happy

2019-04-03 11_02_38-Qlik Sense Desktop.png

(Sample data & tables attached as a qvf )

3 Replies
Highlighted
Partner
Partner

Re: hierarchical data model

Please explain your data? How can I read the data to understand who is the boss for Zeta or Beta team?
Plees ekskuse my Swenglish and or Norweglish spelling misstakes
Highlighted
New Contributor II

Re: hierarchical data model

Hi Vegar,

2 is boss. If the team have one or more bosses the servant(s) ranks as 1. For teams without a boss the servant(s) ranks as 0.

/BR

Highlighted
Partner
Partner

Re: hierarchical data model

What if you did something like this?

[TEAMS]:
LOAD * Inline [ 
    MEMBER, TEAM, BOSS, HIERARCHIAL
    Donald Duck, Alpha, 2, Yes
    Mickey Mouse, Alpha, 1, Yes
    Trasan Apanson, Alpha, 1, Yes
    Donald Duck, Beta, 1, Yes
    Trasan Apanson, Beta, 2, Yes
    Donald Duck, Gamma, 0, No
    Mickey Mouse, Zeta, 0, No
    Trasan Apanson, Zeta, 0, No
    Mickey Mouse, Pi, 2, Yes
    Trasan Apanson, Pi, 2, Yes
    Donald Duck, Pi, 1, Yes
];

Bosses:
LOAD 
TEAM,
MEMBER as [Boss (name)]
Resident TEAMS
WHERE BOSS =2;

Servants:
LOAD 
TEAM,
MEMBER as [Servant (name)]
Resident TEAMS
WHERE BOSS =1;
Plees ekskuse my Swenglish and or Norweglish spelling misstakes