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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
seniorps
Contributor III
Contributor III

OSUser - Set Analysis

I'm trying to use Set Analysis to show sales for the user who is logged in, using the following code:

sum({$<PAIDREPUser="{=SubField(OSUser(),'UserId=',2)}">}Sales)

The SubField(OSUser(),'UserId=',2) returns the user correctly and the PAIDREPUser field also returns the right name in the right format. However, when I put them together in the Analysis set I can't seem to get any result.


Any ideas what I'm doing wrong?

3 Replies
marcohadiyanto
Partner - Specialist
Partner - Specialist

Hi Paul

Looks like your set analysis syntax is wrong

sum({$<PAIDREPUser={"=SubField(OSUser(),'UserId=',2)"}>}Sales)

your double quotes outside brackets.


Regards

Marco

maxgro
MVP
MVP

sum({$<PAIDREPUser={"$(=SubField(OSUser(), 'UserId=2', 2))"}>} Sales)

sunny_talwar
MVP
MVP

May be this:

Sum({$<PAIDREPUser = {"$(=SubField(OSUser(), 'UserId=', 2))"}>}Sales)