Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

vikasmahajan
Honored Contributor III

section access - hierarchy level

Hi all,

I have used following user structure  to implement the section access  into qlik sense here I am using role base

hierarchy based on user role. for eg 

User NameAccessUser IdREGION_NAMEState_Office
JohnrUSERDomainid/JohnrNRUTTAR PRADESH

which is working perfectly fine for me. Now issue is that  i am using following formula to Identify when  user is drilling down the hierarchy  on which user has based on getselectedcount() function.

=IF(getselectedCOUNT(REGION_NAME)<1,'REGION_NAME',

IF(getselectedCOUNT(REGION_NAME)>=1 AND getselectedCOUNT([State_Office])<1,'State_Office',

IF(getselectedCOUNT(REGION_NAME)>=1 AND getselectedCOUNT([State_Office])>=1 and GetSelectedCount(Territory)<1,'Territory',

IF(getselectedCOUNT(REGION_NAME)>=1 AND getselectedCOUNT([State_Office])>=1 and GetSelectedCount(Territory)>=1  and GetSelectedCount(DistName)< 1 ,'DistName',

'DistName'))))

Issue:

1. If  user has given state office  level  is there any way or method to identify that which level of Parent - child  hierarchy I am currently

    in other than getselectedcount() function ?.

2. When I pass user with State_Office level , then getselectedcount() won't change can we pass dynamic variables with section access      so that we can get the current level of user on which he has ?

Regards

Vikas

2 Replies
shubham_singh
Contributor II

Re: section access - hierarchy level

Try this

=

IF(COUNT(REGION_NAME)>1,'REGION_NAME',

IF(COUNT([State_Office])>1,'State_Office',

IF(Count(Territory)>1,'Territory',

IF(Count(DistName)>1 ,'DistName',

'DistName'))))

zebhashmi
Valued Contributor

Re: section access - hierarchy level

We can have a field of a hierarchy level in Data model would that be helpful for you?

Community Browser