Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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

May be this:

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