Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
hemanthaanichet
Creator III
Creator 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
Specialist
Specialist

Hi,

1 Option:

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

hieroct.png

hemanthaanichet
Creator III
Creator III
Author

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

sharpjoki
Contributor II
Contributor II

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
Creator III
Creator III

What is your original data looks like ?

techvarun
Specialist II
Specialist II

Check the attached

hemanthaanichet
Creator III
Creator III
Author

The data has to be look like below:

->Mario

    ->Sara

         ->Peiris

                 ->Dumi

                 ->Rashm

                 ->Randa

   ->Saura

          ->Chaim

                 ->Nira

                 ->Ovitiga

                  ->Sani

woshua5550
Creator III
Creator III

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

hemanthaanichet
Creator III
Creator III
Author

Dave sample file for you