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: 
ColossustheFish
Contributor
Contributor

Count a number of distinct Session Ids in a Column but exclude certain users

Hi there. I'm a new user of Qlik Sense and I'm creating a chart and I want to do a distinct count of sessions in one column but I want to exclude certain user IDs from the count. So far I have the following formula.

Count({<Agent_ID-={'UserID1@company.com','UserID27@company.com','UserID33@company.com'}>} Distinct Session_ID)

 

Unfortunately this seems to return the same number of values as

 

Count(Distinct Session_ID)

 

Where am I going wrong please?

 

Labels (2)
7 Replies
menta
Partner - Creator II
Partner - Creator II

try = -

Count({<Agent_ID = - {'UserID1@company.com','UserID27@company.com','UserID33@company.com'}>} Distinct Session_ID)

ColossustheFish
Contributor
Contributor
Author

Unfortunately that just makes the count negative instead of positive (bottom line on chart). 

ColossustheFish_0-1691683321596.png

 

BrunPierre
Partner - Master II
Partner - Master II

Hi, The syntax seems correct, try with double quotes.

{"UserID1@company.com", ...}

ColossustheFish
Contributor
Contributor
Author

Same result...

= - Count({<Agent_ID = - {"UserID1@company.com","UserID27@company.com",'"UserID33@company.com"}>} Distinct Session_ID)

menta
Partner - Creator II
Partner - Creator II

the expression is 

 

Count({<Agent_ID = - {'UserID1@company.com','UserID27@company.com','UserID33@company.com'}>} Distinct Session_ID)

what is the dimension for the x axes?

 

ColossustheFish
Contributor
Contributor
Author

But that just takes me back to returning the same value...

ColossustheFish_0-1691749574573.png

 

ColossustheFish
Contributor
Contributor
Author

I still haven't managed to sort this. Does anybody else have any suggestions?