Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I am trying to figure out how many users have been active in a certain period of time. I can use this to find out the amount of days since their last login:
ceil(Interval(Today()-date([users.last_login], 'DD.MM.YYYY'), 'D'), 1)
But comparing it to a constant (in this case 30, for 30 days) does not yield any results:
count({< {30} = {'>=$(=ceil(Interval(Today()-date([users.last_login], 'DD.MM.YYYY'), 'D'), 1))'}>} DISTINCT users.id)
Any suggestions on what I'm doing wrong?
Thanks
Try this
Count({< users.id = {"=Ceil(Today() - [users.last_login], 1) <= 30"}>} DISTINCT users.id)
Try this
Count({< users.id = {"=Ceil(Today() - [users.last_login], 1) <= 30"}>} DISTINCT users.id)
Hi Sunny,
thanks for your answer, it worked.
Could you just explain to me what the statement " users.id = ..." does?
When and how do you have to use such terms?
Regards
user.id = is a boolean search where the expression only show rows where the expression results as TRUE. To see which rows are included create a straight table and add user.id as dimension and add =Ceil(Today() - [users.last_login], 1) <= 30 as expression.... next, make sure that you have unchecked 'Suppress Zero Values' on the presentation tab and you will see bunch of -1s and 0s against user.id.... All those places where you see -1 are the rows that are included in your expression.... 0 rows are excluded.
Does that make sense?
It does, thanks for the explanation and the help in general!