Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Specialist
Specialist

Hi,

1 Option:

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

hieroct.png

Highlighted
Creator III
Creator III

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

Highlighted
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.

Highlighted
Creator III
Creator III

What is your original data looks like ?

Highlighted
Specialist II
Specialist II

Highlighted
Specialist II
Specialist II

Check the attached

Highlighted
Creator III
Creator III

The data has to be look like below:

->Mario

    ->Sara

         ->Peiris

                 ->Dumi

                 ->Rashm

                 ->Randa

   ->Saura

          ->Chaim

                 ->Nira

                 ->Ovitiga

                  ->Sani

Highlighted
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

Highlighted
Creator III
Creator III

Dave sample file for you