Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
joeybird
Creator III
Creator III

expression based on filter and osuser


Hi

I only wish to sum on person logged in

I have a text box that shows show's who's logged in via a windows login using

domain = OpenWorld

Username =jo111111

on text box expression is

osuser()

this gives me UserDirectory=OpenWorld;UserId=jo111111

I have a filterpane called UserId that contains jo111111

there is a chart showing sales, my expression is like this, but it does not work I only wish to sum on person logged in

sum ({$<OSUser= {UserID}>}SALES)

how can I get this to work please

1 Solution

Accepted Solutions
sunny_talwar

How about this:

Sum({$<UserID = {'$(=SubField(OSUser(), '=', -1))'}>}SALES)

View solution in original post

11 Replies
sunny_talwar

How about this:

Sum({$<UserID = {'$(=SubField(OSUser(), '=', -1))'}>}SALES)

joeybird
Creator III
Creator III
Author

fab , thank you x

sunny_talwar

No problem at all

joeybird
Creator III
Creator III
Author

Hi

sorry I am having issues using this expression with {$<UserID = {'$(=SubField(OSUser(), '=', -1))'}>}, this does not seem to work within use of an IF statement, how can it please be amended?

count({$<UserID = {'$(=SubField(OSUser(), '=', -1))'}>}CustID)

also I have a table on a sheet...this gives me 0 or 1, how can I then limit the count to 1 on the table please?

Please help

sunny_talwar

Within the if statement? Can you share the expression you are trying to use?

joeybird
Creator III
Creator III
Author

Hi

here is the IF statement

if(DFlag = 'No', MODE({$<[Country] ={"France"}, Department_Number = {1}, UserID = {'$(=SubField(OSUser(), '=', -1))'}>}Sales), mode({$<[Country] ={"France"}, Department_Number = {2}, UserID = {'$(=SubField(OSUser(), '=', -1))'}>}Sales))

please help

joeybird
Creator III
Creator III
Author

Hi

please see below

please help

sunny_talwar

Can you try this:

If(DFlag = 'No',

Mode({$<[Country] = {'France'}, Department_Number = {1}, UserID = {"$(=SubField(OSUser(), '=', -1))"}>}Sales), Mode({$<[Country] = {'France'}, Department_Number = {2}, UserID = {"$(=SubField(OSUser(), '=', -1))"}>}Sales))

joeybird
Creator III
Creator III
Author

Hi

this worked, issue still with table chart on a sheet. any ideas please?  I have tried to use a flag, but no joy.