Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count distinct in Set Analysis


Hiya,

I'm trying to count a total number of users and a total number of users accessing. I'm using data from Google analytics.

I'd like this to be a KPI so I created two text objects:

Total number of users: Sum(DISTINCT(User))

Total number of users accessing:  Sum(DISTINCT{$<visits = {">0"}>} [User])

Any thoughts?

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Add {1} to an expression to ignore all selections: Count( {1} distinct User)


I'm also guessing that there is only data for users for the dates they actually visited. So if you select a date you cannot select users with a visit value of 0 since there is no data for the users you're looking for. If that's correct then you should be able to calculate the number of non-visiting users with count({1-<visits={'*'}>} User).


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
Gysbert_Wassenaar

Try using the count function:

  • Count(distinct User)
  • Count({$<visits= {">0"}>} distinct User)

talk is cheap, supply exceeds demand
Not applicable
Author

Thanks Gysbert Wassenaar that did seem to do something good!

I have added a third box that would display number of users NOT accessing the site using:

Count(DISTINCT{$<visits = {"0"} >} DISTINCT User)

It displays 0 every time I make a selection.

The two boxes (Total no of users and Total no of users accessing) are displaying the same value every time I make a date selection. The first box should give me total number of users for the entire dataset but it doesn't, it only counts users that accessed the site on the date I selected. Any idea how to get that fixed?

Gysbert_Wassenaar

Add {1} to an expression to ignore all selections: Count( {1} distinct User)


I'm also guessing that there is only data for users for the dates they actually visited. So if you select a date you cannot select users with a visit value of 0 since there is no data for the users you're looking for. If that's correct then you should be able to calculate the number of non-visiting users with count({1-<visits={'*'}>} User).


talk is cheap, supply exceeds demand
pshverma847
Contributor
Contributor

Hello,

Count(DISTINCT {<OCN = {"=Sum(ARRPLUSAUEUR)<=100000"}>} OCN)

My above condition is working absolutely fine, I'm counting the OCNs here where the "ARRPLUSAUEUR"<=100K. Now the problem I'm facing is to give one filter on one of the field in my data and want to restrict the data, but not able to use IF in this condition. Can you please help.

Condition: D_LIFECYCLESTATUSCODE="In Process", This I want to put somewhere in this condition.