Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
hemanthaanichet
Contributor III

How to create Hierarchy ?

Hi All,

I would like to create a hierarchy for the below scenario 

Top level is Country Head like below

Country Head

       ->State Head

                  ->City Head

                            ->Area Head

Country HeadState HeadCity HeadArea Head
MarioMarioMarioMario
MarioSaraSaraSara
MarioSaraPeirisPeiris
MarioSaraPeirisDumi
MarioSaraPeirisRashm
MarioSaraPeirisRanda
MarioSauraSauraSaura
MarioSauraChaimChaim
MarioSauraChaimNira
MarioSauraChaimOvitiga
MarioSauraChaimSani
Regards
Hemanth
10 Replies
el_aprendiz111
Valued Contributor

Re: How to create Hierarchy ?

Hi,

1 Option:

=[Country Head] & '/' & [State Head] & '/' &  [City Head] & '/' &  [Area Head]

hieroct.png

hemanthaanichet
Contributor III

Re: How to create Hierarchy ?

I need this in edit script... Using hierarchy function kind off....

sharpjoki
New Contributor II

Re: How to create Hierarchy ?

Hi.

Change the table in the script to this:

TreeElements:

LOAD * INLINE[

Element     Parent

Mario          -

Sara           Mario

Peiris          Sara 

Dumi          Peiris

Rashm        Peiris    

Randa         Peiris

Saura          Mario

Chaim        Saura

Nira           Chaim

Otiviga       Chaim

Sani          Chaim

Then apply the function Hierachy:

Hierarchy(Element, Parent, , , 'TreeElement')

LOAD

     Element,

     Parent

Resident TreeElements;

Then display the TreeElement field as listbox, selecting the "Show as Tree view", as in example above.

woshua5550
Contributor III

Re: How to create Hierarchy ?

What is your original data looks like ?

techvarun
Valued Contributor II

Re: How to create Hierarchy ?

techvarun
Valued Contributor II

Re: How to create Hierarchy ?

Check the attached

hemanthaanichet
Contributor III

Re: How to create Hierarchy ?

The data has to be look like below:

->Mario

    ->Sara

         ->Peiris

                 ->Dumi

                 ->Rashm

                 ->Randa

   ->Saura

          ->Chaim

                 ->Nira

                 ->Ovitiga

                  ->Sani

woshua5550
Contributor III

Re: How to create Hierarchy ?

can you attach a Excel file which contains your sample data ? just want to make sure the data format you have

hemanthaanichet
Contributor III

Re: How to create Hierarchy ?

Dave sample file for you