Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
QlikWorld Online 2021, May 10-12: Our Free, Virtual, Global Event REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
krmvacar
Contributor II
Contributor II

if statement

Hi, 

I'm trying to rank hierarchies and I'm trying to write dimension.

Level=1 Manager,Level=2 Manager Helper ,Level=3 Employee

if selected level 1 show me level 2 names. 

=if (LEVEL=2,if(LEVEL=1 and PRED=WORKNUM,NAME))

 its not work:(

please help

Ekran Alıntısı_TEST.PNG

 

1 Solution

Accepted Solutions
saran7de
Master
Master

10 Replies
joaopaulo_delco
Partner
Partner

Hi @krmvacar 

 

    Try this:

If(LEVEL = 1,'Manager',
if(LEVEL = 2,'Manager Helper',
if(LEVEL = 3, 'Employee')))

krmvacar
Contributor II
Contributor II
Author

@joaopaulo_delco 

sorry I  could not explain.I want to create a dimension in the pivot table here. 

when i create dimension if level=2 only show under john angelina and oleg.

 

 

joaopaulo_delco
Partner
Partner

@krmvacar I don't know if it's possible do it directly at pivot table.

Maybe you have to consider do it in the script.

 

The way of your table is structured, you can use the "Org chart" like below:

joaopaulo_delco_0-1614893382859.png

 

 

 

krmvacar
Contributor II
Contributor II
Author

Thank you so much @joaopaulo_delco  ı need dimension or script.

joaopaulo_delco
Partner
Partner

@krmvacar, if it solve your problem, can you accept my post as solution?

PrashantSangle

check hierarchy() and hierarachybelongsto() in qlik help menu

Regards,

 

Great dreamer's dreams never fulfilled, they are always transcended.
krmvacar
Contributor II
Contributor II
Author

İts not solve sorry:(

saran7de
Master
Master

Try this,

tab1:
Hierarchy(Work#, Pred, Name,,Name)
LOAD * INLINE [
    Work#, Name, Level, Pred
    11246, John, 1, 
    19835, Angel, 2, 11246
    12939, Vick, 3, 19835
    34565, Oleg, 2, 11246
];
saran7de
Master
Master