Hi,
I try to get information when customers is made first and last order.
I have field orderdate in date format.
I run data thought Aggregate node, using operations first and last.
Output is "orderdate_first" and "orderdate_last".
Then I calculate diffrence between these two dates.
DiffDates = (orderdate_Last - orderdate_First).days
But some values in Diffdates files are negative or posivite digits and that don't make sense.
Root cause must be in Aggregate node.
Can you tell how I get right way first and last date information for data.
| CUSTOMER_ID |
DiffDates |
orderdate_First |
orderdate_Last |
| 1 |
-287 |
4.4.2019 |
21.6.2018 |
| 2 |
126 |
25.5.2018 |
28.9.2018 |
| 3 |
-10 |
29.3.2018 |
19.3.2018 |
| 4 |
0 |
9.1.2019 |
9.1.2019 |
| 5 |
-11 |
10.5.2019 |
29.4.2019 |
| 6 |
257 |
5.12.2018 |
19.8.2019 |