Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis Range Question

hey,

I'm working on a governance project. I'm trying to select only users who have used the server in the current month, have not used the server in the last month. Here are some of the dimensions I am using:

UserID

SessionStartDate

And I keep using the only() statement with some set analysis but I can't seem to find one that will include all of the current month users that had not been on the previous month. Any help would be appreciated

-Kevin

2 Replies
Anonymous
Not applicable
Author

Kevin,

Something like this should work:

=concat({<User=P({<Month={'Oct-13'}>})> - <User=P({<Month={'Sep-13'}>})>} distinct User, '; ')

I hardcoded here Oct-13 and Sep-13 for quick testing (as it is formatted in my app), you'll have to make it suitable for you case.

Regards,

Michael

Not applicable
Author

Hi

It seems, you don't have the Month field for your SessionStartDate field. So, Try the below:

=Concat({<UserID =  P({<SessionStartDate = {'>=$(=(MonthStart(now()))) <=$(=(MonthEnd(now())))'}> })> -

  <UserID =  p({<SessionStartDate = {'>=$(=(MonthStart(AddMonths(now(),-1)))) <=$(=(MonthEnd(AddMonths(now(),-1))))'}>}) >}  DISTINCT UserID, '|')