Hello everybody.
I am trying to work out how to count returning customers from the previous year for a report i'm currently writing and i'm really struggling. The data is part of a BEX and I have 2 objects, first is the account reference number and the second is the year. Account reference number lists all of the unique accounts that we have dealt with against the year, so if account number 000001 purchased stuff in 2013 and 2015, but not 2014, then the account number will only show up in Year 13 and 15.
Account ref | Year |
---|---|
000001 | 13 |
000001 | 15 |
000002 | 14 |
000003 | 13 |
000003 | 14 |
000004 | 13 |
000004 | 14 |
000004 | 15 |
000005 | 13 |
000005 | 14 |
000005 | 15 |
000006 | 15 |
The idea is to create a small summary table, whereby it provides a count of the number of customers that have purchased stuff from us in Year 13 and Year 14 or a count of the customers that have purchased items from us in Year 14 and 15.
So based off the sample table above, the report would look like -
Year | Retained Customers |
---|---|
13 | 0 |
14 | 3 |
15 | 2 |