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

counting from max(logindate) (Set Analysis question)

We want to examine customers who've left our online program. We collect data each time they log in; thus, I know the last day they logged in, which was

simple to find in a table using "max(logindate)".

Now we want to know how many times they logged in during the year PREVIOUS to their last log in. I tried the following using Set Analysis:

=count({$<logindate={">=(max(logindate)-365)"}>} logindate)

To my mind, this instructed the program to count each occurrence of "logindate" greater than or equal to the max(logindate)-365. I checked in a separate table, and "logindate-365" does indeed yield the same day, one day earlier. However, my total is uniformly "0", which I know is incorrect.

Is this a syntax error, or a logic error?

11 Replies
Not applicable
Author

send only 1 row of the table:)

you can do it by :

first (10) load....

MayilVahanan

Hi,

     Try like this,

       =Count({<logindate = {'>=$(=TimeStamp(Max(logindate)-365))<=$(=TimeStamp(Max(logindate)))'}>}logindate)  

     Check both fields are in same format

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.