Forum Discussion
Show repeat customers within a week
I need to flag tickets that are for the same customer if that customer had a previous ticket within a week.
In Table A I have Account Number and in Table B I have the Ticket Number as well as the Ticket Date.
My issue is that when I try to use something like EARLIER I can only reference one table. So I can say acct = earlier acct but I than can't say ticket date <= earlier ticket date and vise versa.
In my head the solution would look something like this where I get a true statement if the same customer had a repeat ticket within 7 days.
Calculate
count(Ticket_ID),
Account_Num = Earlier(Account_Num),
DateDiff(Ticket_Date, Earlier(Ticket_date), Day) <=7
) > 0Any help or suggestions are appreciated.
Hi GunnerJ
Please refer to the linked discussion:
(the part of repeat in the suggested solution)
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly