Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Visit same client within 30 days

AlexGavri
7 - Meteor

Hello everyone,

 

I'm trying to find when we have revisited a client within 30 (considered a guarantee visit).

I managed to find all the jobs that have been revisited more than once but how do I compare the dates and compare it to a 30 day difference?

 

To make it more understandable, in the screenshot, i:base number would be the clients code.

As you can see where I highlighted the fields the same client code would have 2 visits  within a 30 day difference and would have to be classed separate as that would bring a cost to the company.

 

Any ideas are welcomed :)

Thank you all in advance.

 

 

1 REPLY 1
DanielG
12 - Quasar

@AlexGavri  -- if you sort the data by 'i:base number' as well as date (ascending) then do a multi-row formula (grouping on 'i:base number' so it doesnt compare across groups.  Then create a calculation in the multi-row along the lines of this:  if DateTimeDiff([Date],Row-1[Date],"days")<30 then 'Flag' else 'No Flag' endif

My syntax might be off as I am writing it off the top of my head...  doublecheck the order of the dates in the formula. Might have to flip those, but basically it should be pretty straight forward

 

I dont have time to mock it up in a YXMD file, but hopefully this is helpful...  :)

Labels
Top Solution Authors