Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Rolling 12 months


I am confused!

I am trying to make a chart that shows the number of visits over the course of the last 12 months.  My expression works until I include the 12 month piece....

count({<[Appt Arrived Flag]={1}, [BHN Dept Name]={'Health Centers'},Month={'>=(Date(floor(max(Month))-365))'}>}CountAppt)

If I take the expression:

=Date(floor(max(Month))-365)

and put it into a text box, it works!  (I get 8/1/2012)

But when I add it as part of the set analysis I get NOTHING!

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

Nevermind... I answered my own question 2 minutes after I posted it!

count({<[Appt Arrived Flag]={1}, [BHN Dept Name]={'Health Centers'}, [Appt Datetime]={'>=$(=Addmonths(max([Appt Datetime]),-12))'}>}CountAppt)

View solution in original post

3 Replies
Not applicable
Author

Nevermind... I answered my own question 2 minutes after I posted it!

count({<[Appt Arrived Flag]={1}, [BHN Dept Name]={'Health Centers'}, [Appt Datetime]={'>=$(=Addmonths(max([Appt Datetime]),-12))'}>}CountAppt)

MayilVahanan

HI

=Date(floor(max(Month))-365) gives date.


So you map with date in set analysis , not with month

count({<[Appt Arrived Flag]={1}, [BHN Dept Name]={'Health Centers'},DateField={'>=$(=AddYears(Max(DateField),-1))'}>}CountAppt)


Hope it helps

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

Hi,

Try this :

<month={"<= $(=date(floor(max(month())-365)) "}>


Regards

DAAM