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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Heny
Contributor III
Contributor III

count distinct user with above 100% efficiency

I have this expression  Sum(norm*total_pages_count)/sum(total_time) that give me efficiency percentage

now I would like to count users on a monthly scale that are above 100%

I've tried 

count({<user={"=Sum(norm*total_pages_count)/sum(total_time)>0.1"}>} distinct user)

but I guess I'm totally off with my expression

any help?

Labels (2)
1 Solution

Accepted Solutions
Kushal_Chawda
MVP
MVP

@Heny  try below

count(distinct aggr(if( Sum(norm*total_pages_count)/sum(total_time)>1,user),user,Month))

View solution in original post

11 Replies
Kushal_Chawda
MVP
MVP

@Heny  Your expression looks fine. Above 100% means >1

count({<user={"=Sum(norm*total_pages_count)/sum(total_time)>1"}>} distinct user)

Heny
Contributor III
Contributor III
Author

I tried with 1, not getting any results

Kushal_Chawda
MVP
MVP

@Heny  share sample data with expected output

Heny
Contributor III
Contributor III
Author

thanks for your help, but my data is a little complicated

I'll try to work around it

 

 

Kushal_Chawda
MVP
MVP

@Heny  Meanwhile you can try below as well as output of set analysis may differ depending on the context of different dimensions and charts

count(distinct aggr(if( Sum(norm*total_pages_count)/sum(total_time)>1,user),user))

Heny
Contributor III
Contributor III
Author

ok, so I tried the above.

It is better than what I wrote but I still am not getting complete results

this is the data for November: (I added my efficiency expression to a variable)

user $(vEfficiancy) if(SUM(NORM*TOTAL_COUNT)/SUM(TOTAL_TIME*24*3600)>1,1,0)
A 108.1% 1
B 106.2% 1
C 105.4% 1
D 105.4% 1
E 102.7% 1
F 102.3% 1
G 99.7% 0
H 97.2% 0
I 97.0% 0

 

now, I should get a result of 9 but I'm getting only a count of 2 for November,

this is how my line chart looks:

Heny_0-1731411474260.png

 

Heny
Contributor III
Contributor III
Author

sorry, I meant result of 6 not 9

Kushal_Chawda
MVP
MVP

@Heny  try below

count(distinct aggr(if( Sum(norm*total_pages_count)/sum(total_time)>1,user),user,Month))

Heny
Contributor III
Contributor III
Author

great! This works