I've done an intervalmatch so that I get each status for each person every day. What I want to do now is calculate who is a New customer.
The definition of a new customer is one that have moved from either LEAD,INACTIVE, TEMPORARYINACTIVE to status ACTIVE.
I've tried using peek(,-1) to get the previous status but the problem is that I get all the persons that have changed from any prior status to ACTIVE at any date historically, I just need to count the ones that had a change from LEAD,INACTIVE, TEMPORARYINACTIVE to status ACTIVE at the date or date range of my choice.
Uploaded an example and some testdata if anyone has any ideas.