Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
whould be very nice if someone can help me with what I think is point in time(?)
I want to show the Id:s that have been active for a minimum of 10 months from latest event date. I have the following tables
Id
Eventdate
Master calendar with the usal stuff, month, year, date,fiscal etc counters for thoose and some rolling 3 and 12(?)
If a Id has only one eventdate 10 months back and one this month I want to count it as a "hit"
if it has a eventdate 15 months back and regular hits up today its also counts
How can this be done, any suggestion?
Do you want this is a chart or in the script?
I am assuming that you have ID also in the eventdate table to link data.
in the script you can do a group by resident table:
SummaryEvent:
MIN(Eventdate) as 'First Event',
MAX(Eventdate) as 'Last Event',
ID,
if(MIN(Eventdate)<=ADDMONTHS(MAX(Eventdate),-10),'Over 10 Months Active','Under 10 Months Active')
Resident Eventdate Group by ID;
Do you want this is a chart or in the script?
I am assuming that you have ID also in the eventdate table to link data.
in the script you can do a group by resident table:
SummaryEvent:
MIN(Eventdate) as 'First Event',
MAX(Eventdate) as 'Last Event',
ID,
if(MIN(Eventdate)<=ADDMONTHS(MAX(Eventdate),-10),'Over 10 Months Active','Under 10 Months Active')
Resident Eventdate Group by ID;
yes I do
Great, was just thinking of some kind of interval but min /maxlooks like a nice solution. Thanks! Cant wait until I get to work and can try it.