Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create leaf structure in Qlikview

Hi All,

I am facing this issue

Eg:

My table has following data

Name   Login   RoleName

Abc      abcd    test

Abc      abc      test1

Abc      ab      test2

Lmn     lmn      testlmn

Lmn     xyz      testlmn1

I am creating chart in that chart i want below mentioned the output:-

Name       RoleName

Abc          test\test1\test2

Lmn          testlmn\testlmn1

Please help me in this.

1 Solution

Accepted Solutions
er_mohit
Master II
Master II

Try this script

Table1:

LOAD * INLINE [

    Nam, Login, RoleName

    Abc, abcd, test

    Abc, abc, test1

    Abc, ab, test2

    Lmn, lmn, testlmn

    Lmn, xyz, testlmn1

];

join

load Nam, concat(RoleName,'/') as [Leaf Config]

resident Table1

group by Nam;

Take a table box with below Field

output like this

NamLeaf Config
Abctest/test1/test2
Lmntestlmn/testlmn1

View solution in original post

3 Replies
er_mohit
Master II
Master II

Try this script

Table1:

LOAD * INLINE [

    Nam, Login, RoleName

    Abc, abcd, test

    Abc, abc, test1

    Abc, ab, test2

    Lmn, lmn, testlmn

    Lmn, xyz, testlmn1

];

join

load Nam, concat(RoleName,'/') as [Leaf Config]

resident Table1

group by Nam;

Take a table box with below Field

output like this

NamLeaf Config
Abctest/test1/test2
Lmntestlmn/testlmn1
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Try this.

Data:
Load * inline [
Name,   Login,   RoleName
Abc,      abcd,    test
Abc,      abc,      test1
Abc,      ab,      test2
Lmn,     lmn,      testlmn
Lmn,     xyz,      testlmn1
];

Left join
Load Name ,Concat(RoleName,'/') as TreeView
Resident Data group by Name;

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

data:

LOAD * INLINE [

    Name, Login, RoleName

    Abc, abcd, test

    Abc, abc, test1

    Abc, ab, test2

    Lmn, lmn, testlmn

    Lmn, xyz, testlmn1

];


outer join


load Name, concat(RoleName,'/') as new_field

resident data

group by Name;