Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

juan_patrick
Not applicable

Hierarchy with one field

Hi, I have a table that contains a field with this information:

h_wbs (field)

15

15.1

15.1.1

15.2

15.3

16

16.1

16.1.1

16.1.1.1

17

17.1

18

18.1

18.2

18.2.1

18.2.1.1

I want to use hierarchy to show eacho "node" inside his parent, egg: the parent of 16.1.1.1 is 16.1.1 and the parent of this is 16.1, etc

I use the function but cant resolve to show as I want!

¡Thank you very much!

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Not applicable

Re: Hierarchy with one field

Add the Path field in a listbox and enable the Show as Treeview option.


talk is cheap, supply exceeds demand
4 Replies
Gysbert_Wassenaar
Not applicable

Re: Hierarchy with one field

Something like this:

Data:

Hierarchy(Node,ParentNode,NodeName,ParentName,NodeName,Path,'/',Depth)

LOAD

  text(Node) as Node,

  text(Node) as NodeName,

  text(left(Node,index(Node,'.',-1)-1)) as ParentNode

INLINE [

    Node

    15

    15.1

    15.1.1

    15.2

    15.3

    16

    16.1

    16.1.1

    16.1.1.1

    17

    17.1

    18

    18.1

    18.2

    18.2.1

    18.2.1.1

];


talk is cheap, supply exceeds demand
juan_patrick
Not applicable

Re: Hierarchy with one field

Not exactly, I want to do a tree view with expand nodes

Gysbert_Wassenaar
Not applicable

Re: Hierarchy with one field

Add the Path field in a listbox and enable the Show as Treeview option.


talk is cheap, supply exceeds demand
juan_patrick
Not applicable

Re: Hierarchy with one field

¡Thank you very much!