Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Set Analysis Range Question


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:



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


2 Replies
Esteemed Contributor III

Re: Set Analysis Range Question


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.



Not applicable

Re: Set Analysis Range Question


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, '|')

Community Browser