Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
@Heny try below
count(distinct aggr(if( Sum(norm*total_pages_count)/sum(total_time)>1,user),user,Month))
@Heny Your expression looks fine. Above 100% means >1
count({<user={"=Sum(norm*total_pages_count)/sum(total_time)>1"}>} distinct user)
I tried with 1, not getting any results
@Heny share sample data with expected output
thanks for your help, but my data is a little complicated
I'll try to work around it
@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))
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:
sorry, I meant result of 6 not 9
@Heny try below
count(distinct aggr(if( Sum(norm*total_pages_count)/sum(total_time)>1,user),user,Month))
great! This works