Hello,
i have a set of data with customer id, two different transaction types(a or b) and a date of transaction. i want to return the date of the next 'B' type transaction (including same day) i.e. the minimum date where customer id is the same - transaction type is 'B" and date is greater than or equal to current date, below is a sample table of data with my desired result.
ID | Transaction | Date | Desired Result |
---|---|---|---|
1 | A | 01/01/2015 | 07/01/2015 |
1 | B | 05/01/2015 | 07/01/2015 |
1 | B | 07/01/2015 | 07/01/2015 |
2 | A | 01/01/2015 | 02/01/2015 |
2 | B | 02/01/2015 | 02/01/2015 |
2 | A | 05/01/2015 | -- |
Hello,
i have a set of data with customer id, two different transaction types(a or b) and a date of transaction. i want to return the date of the next 'B' type transaction (including same day) i.e. the minimum date where customer id is the same - transaction type is 'B" and date is greater than or equal to current date, below is a sample table of data with my desired result.
I've tried creating a variable [bDates] that only returns dates when transaction type is 'B' and then creating another variable as per the below
=Min([bDates]) Where ([bDates]>=[Date]) In ([ID])
however this is returning blank for all transactions with type A
not sure what i need to get the desired result.