10 Replies Latest reply: Jul 26, 2015 9:54 AM by chaithu bo RSS

    How to make Hierarchy In Qlikview

    Abhishek Pandey

      Hi All,

       

      I have a data set as shown below.

       

      I want to make a tree structure by using Hierarchy  function in QV

       

      RegionNameStateNameCityName
      NORTHDelhiDelhi
      NORTHHaryanaGurgaon
      SOUTHPONDICHERRYPondicherry
      SOUTHTAMIL NADUChennai
      SOUTHTAMIL NADUVillupuram
      WESTGUJARATSurat
      WESTMaharashtraKalyan-Dombivli (M Corp.)
      WESTMaharashtraPune

       

      Please help me.

        • Re: How to make Hierarchy In Qlikview
          Gysbert Wassenaar

          On the dimension tab of the properties window click on Edit Groups. Then create a new group and add RegionName, StateName and CityName.

            • Re: How to make Hierarchy In Qlikview
              Abhishek Pandey

              Hi gwassenaar,

               

              Thanks for you respone.

               

              But my requirement is how to make a tree view structure by using load Hierarchy  function in QV.

               

               

              Hierarchy.jpg

               

              I can make this structure by righting an expression on a list box like this

               

              =RegionName &' /' & StateName & '/' & CityName  and then by checking the Tree View option

               

              Tree View.jpg

               

               

              But here the problem is that i can not select Parents like West,North etc i can only select City name.

               

              So i want to know if this tree view structure is possible by using Hierarchy load function in Qlikview and if it is possible then how to use it

               

              Thanks

               

                • Re: How to make Hierarchy In Qlikview
                  Krunoslav Pap

                  Hi,

                  it is necessary to create adjacent nodes table (here it is ITEM named table) and then  to construct hierarchy table using it.

                  Reload document with this script and set NAME_FOR_TREE as a field name in list box, with 'Show as TreeView' selected.

                   

                  Directory;

                  ORG_TABLE:

                  LOAD * INLINE [

                      RegionName, StateName, CityName

                      NORTH, Delhi, Delhi

                      NORTH, Haryana, Gurgaon

                      SOUTH, PONDICHERRY, Pondicherry

                      SOUTH, TAMIL NADU, Chennai

                      SOUTH, TAMIL NADU, Villupuram

                      WEST, GUJARAT, Surat

                      WEST, Maharashtra, Kalyan-Dombivli (M Corp.)

                      WEST, Maharashtra, Pune

                  ];

                   

                   

                  ITEM:

                  LOAD Distinct CityName as VALUE, CityName & '-City' as NODE_ID, StateName & '-State' as PARENT_NODE_ID resident ORG_TABLE;

                  LOAD Distinct StateName as VALUE,StateName & '-State' as NODE_ID, RegionName & '-Region' as PARENT_NODE_ID resident ORG_TABLE;

                  LOAD Distinct RegionName as VALUE,RegionName & '-Region' as NODE_ID,  RegionName & '-Region' as PARENT_NODE_ID resident ORG_TABLE;

                   

                   

                  HIERARCHY_TABLE:

                  Hierarchy(NODE_ID_H,PARENT_NODE_ID_H, ID, PARENT_NAME, NAME, NAME_FOR_TREE) load

                  NODE_ID,

                  NODE_ID as NODE_ID_H,

                  PARENT_NODE_ID as PARENT_NODE_ID_H,

                  VALUE as ID,

                  VALUE as NAME

                  resident ITEM;

                  • Re: How to make Hierarchy In Qlikview

                    Hi Abhishek,

                    When You said like below:

                     

                    I can make this structure by righting an expression on a list box like this

                     

                    =RegionName &' /' & StateName & '/' & CityName  and then by checking the Tree View option

                     

                    But i tried with the same expression as you mentioned it is showing some extra tree and default selection

                    Give me the possible way to remove the extra tree

                    List Box Tree Load.PNG

                     

                    Regards,

                    Chaithu

                  • Re: How to make Hierarchy In Qlikview
                    chandini G

                    Hi..

                    Can you please help me creation of org chart in Qlikview.When i am trying to create org chart it saparate data based on the dashes but i have to saparate data based on the | in org chart..

                    please help me..

                    Thanks & regards,

                    Chandini

                    • Re: How to make Hierarchy In Qlikview
                      Anand Kumar

                      Any help on this issue

                       

                      Hierarchy issue

                       

                      Thanks  ahead

                       

                      ANand