Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Talk to Experts, a LIVE Q&A Webinar. Bring your Qlik Sense Business questions on Aug. 4th. Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

6 Month forward from the Selected Date

Hello,

I need help in solving the following issue I am having.

I have a table with the following fields.

ID -  User ID  

StartDate (The date of the first visit)

StartMonthYear (The month and year of the first visit)

VisitDate (Date of any visits that have occurred)

VisitMonthYear (Month and Year if the visit)

I need to create a flag, that will flag all the visits that have occurred in the 6 month post StartDate

For example if a client first visit was on Jan 1st 2016, and he comes on the 1st of the month every month.  The flag will have the all the fields that are associated with his visits for the next 6 month which includes Jan 1st through June 1st 2016.

Please help.

Thank you,

1 Solution

Accepted Solutions
Highlighted
Creator II
Creator II

This really depends on how your data model looks.  But in general you can do something like:

IF(VisitDate <= AddMonths(StartDate,6),1,0)

If you dates are stored vertical (in rows) it will be more complicated because you will need to find the start date for each individual ID and then compare that to the visit dates.

View solution in original post

1 Reply
Highlighted
Creator II
Creator II

This really depends on how your data model looks.  But in general you can do something like:

IF(VisitDate <= AddMonths(StartDate,6),1,0)

If you dates are stored vertical (in rows) it will be more complicated because you will need to find the start date for each individual ID and then compare that to the visit dates.

View solution in original post