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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
zagzebski
Creator
Creator

Set Analysis NTNAME=OSUser()

I am trying to write a set analysis expression that analyzes whether the NTNAME given is = to the OSUser(). It doesn't work - just keeps giving the total amount for every line whether the NTNAME = OSUser() or not.

sum ({$<NTNAME=OSUser()>} AMT)

Steve

1 Solution

Accepted Solutions
its_anandrjs
Champion III
Champion III

Try to write like

=Sum ({<NTNAME={ '$(=OSUser())' }>} AMT)

Or

=Sum ({$<NTNAME={ '$(=OSUser())' }>} AMT)


Or


=Sum ({$<NTNAME={ "$(=OSUser())" }>} AMT)

Or

=Sum ({$<NTNAME={ "$(=OSUser())" }>} AMT)

View solution in original post

6 Replies
Not applicable

Steve,

try:

sum ({$<NTNAME={"=OSUser()"}>} AMT)


or


sum ({$<NTNAME={'$(=OSUser())'}>} AMT)

its_anandrjs
Champion III
Champion III

Try to write like

=Sum ({<NTNAME={ '$(=OSUser())' }>} AMT)

Or

=Sum ({$<NTNAME={ '$(=OSUser())' }>} AMT)


Or


=Sum ({$<NTNAME={ "$(=OSUser())" }>} AMT)

Or

=Sum ({$<NTNAME={ "$(=OSUser())" }>} AMT)

trey_bayne
Partner - Creator
Partner - Creator

What happens if you put =OSuser() in a text box?

SunilChauhan
Champion II
Champion II

may be

youcan use below

sum ({$<NTNAME={$(=Upper(OSUser()))>} AMT)


hope this helps

Sunil Chauhan
maxgro
MVP
MVP

=sum({$ <NT_NAME={"$(=OSUser())"}>} AMT)

check the domain is present in NT_NAME and OSUser()

or

not present in NT_NAME and not present in OSUser()

Miguel_Angel_Baeyens

Hey,

Take into account that NTNAME is a reserved field name for section access and not visible from the model. If you want to compare current user returned by OSUser() with any other field that stores the user, make sure you are loading them in a field named different to NTNAME, otherwise, it will not work.

Miguel