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

Flag rows with 3 visits in the last 30 days

Hi all.

I have a problem to  difficult to solve for me so i post my question here and hope that someone here can help me.


I have the three first columns in the table below.

I want to flag a visit with 1 if the person have had two more visits in the last 30 days.

The column Flag3VisitsLast30days is my desired output.


   

PersonIDVisitIDVisitdateFlag3VisitsLast30days
112018-10-300
122018-10-011
132018-09-200
142018-09-150
152017-18-200
162016-05-100
172016-04-060
182015-01-200
292018-10-100
2102017-09-080
2112017-08-300
2122016-05-050
2132016-04-030
3142018-09-010
3152018-07-071
3162018-06-200
3172018-06-100
3182017-11-150
3192017-09-050
3202017-08-010

Can anybody help me with this?

Thanks in advance.

1 Reply
sunny_talwar