Hi All
I got a dataset with several accounts which are assigned an exposure ID, the exposure ID is share by multiple accounts, my end goal is to determine how many accounts were already open by the time the account in questioned opened
My available fields are
Exposure Group ID
Account Number
Opened
closeddate
I used a multi row formula and input the following expression
If [Exposure Group ID] = [Row-1:Exposure Group IdD]
Then
(If [Opened date] > [Row-1:Opened Date] and [Opened Date] < [Row-1:Closeddate] Then [Row-1]:Accounts opened] + 1 Else 0 endif)
Else 0 endif
This identifying the accounts opened at the time based on the column right above but is not taking in consideration previous closed accounts I.e.
(All of these accounts are on exposure group 0001)
85001 opened on 01/01/2020 and closed on 01/05/2020
85002 Opened on 01/06/2020 and closed on 01/06/2022
85003 opened on 01/02/2021 and closed on 01/05/2022
85004 opened on 01/07/2021 and closed on 01/06/2023
85005 opened on 01/09/2022 and no close date
My current output shows
85001: 0 this is correct as there were no previous opened accounts
85002: 0 this is correct as by the time this opened 85001 was a;ready closed
85003: 1 correct as 85002 was open when this one opened
85004: 2 CORRECT as when this opened 85003 85002 were open
85005: 3 INCORRECT as by the time this opened 85003 and 85002 we already closed but 85004 was opened so the correct output should be 1
Is there away for Alteryx to check all previous account within the same exposure group?
Many thanks in advance for your help