Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Login user role and count

Hi Group members . I am new to this group and Qlik  Sense  .


I have a requirement , to display users based count on the summary page and in the detailed page it should display everything.

I am trying to create a measure based on OSUser() and checking against my data and trying to retrieve but it's not working

I am using the below in set analysis  it's returning count 1 from my master table .


Count({$<EmpID={"$(=Trim(subfield(OSUser(),'UserId=',2)))"},Role ={"2"}>} EmpID)


But the same thing I am using with If statement ,then it has to return employee role; whether he is a user then (1) or manager (2).

The below statement is always returning 5 though my role is 2.


if(Trim(EmpTID)=Trim(subfield(OSUser(),'UserId=',2)) and Role=2, Role,'5')

0 Replies