Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
stuwannop
Partner - Creator III
Partner - Creator III

Flagging all dates next month

H All

I currently have a master calendar where I can calculate various flags on the dates based Financial Year to date, dates to month end etc etc. For example this formula gives me all dates in this month:

IF(InMonthtoDate(Date,MonthEnd(today()),0),1,0)

What I am trying to do now is flag all the dates NEXT month, so at the time of this post (July) all dates in August 2013 will be flagged.

Can anyone help?

Thanks in advance

Stu

1 Solution

Accepted Solutions
tresesco
MVP
MVP

So try :

If( Month(Addmonths(Today(),1)) =Month(Date)   AND Year(Today())= Year(Date), 1, 0) as Flag

View solution in original post

4 Replies
tresesco
MVP
MVP

Something like this?

If( Month(Addmonths(Today(),1)) =Month(Date), 1, 0) as Flag

stuwannop
Partner - Creator III
Partner - Creator III
Author

Thanks Tresesco it's almost there but it's returning all August dates regardless of the year and I only need 2013. I've tried a few other things but I can't get it to work at the mo.

Stu

tresesco
MVP
MVP

So try :

If( Month(Addmonths(Today(),1)) =Month(Date)   AND Year(Today())= Year(Date), 1, 0) as Flag

stuwannop
Partner - Creator III
Partner - Creator III
Author

Marvellous - I was almost there but that works perfectly - thanks very much for your help.

Stu