Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
krmvacar
Creator II
Creator 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
10 Replies
joaopaulo_delco
Partner - Creator III
Partner - Creator III

Hi @krmvacar 

 

    Try this:

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

Help users find answers! Don't forget to mark a solution that worked for you!
krmvacar
Creator II
Creator 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 - Creator III
Partner - Creator III

@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

 

 

 

Help users find answers! Don't forget to mark a solution that worked for you!
krmvacar
Creator II
Creator II
Author

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

joaopaulo_delco
Partner - Creator III
Partner - Creator III

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

Help users find answers! Don't forget to mark a solution that worked for you!
PrashantSangle

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

Regards,

 

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
krmvacar
Creator II
Creator II
Author

İts not solve sorry:(

Saravanan_Desingh

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
];