Hi,
Please see the following example events
Event ID |
CustomerID |
Purchase Date |
Purschase Dept |
100 |
ABC123 |
10/6/11 11:00 AM |
Electronics |
101 |
ABC124 |
10/7/11 10:00 AM |
Groceries |
102 |
ABC125 |
10/7/11 11:00 AM |
Restuarants |
103 |
ABC126 |
10/7/11 1:00 PM |
Financial |
Event ID |
CustomerID |
Purchase Date |
Purschase Dept |
200 |
DEF456 |
10/6/11 7:00 AM |
Electronics |
201 |
DEF456 |
10/7/11 8:00 AM |
Financial |
202 |
DEF456 |
10/7/11 10:00 AM |
Restuarants |
203 |
DEF456 |
10/7/11 3:00 PM |
Groceries |
I needed the latest event for each customer grouped by purchase department i,e I should get the event id 103 for ABC126 & 203 for DEF 456 first grouped by department.
I used a formula at group level eventid = maximum(eventid,customerid) this works fine if I first grouped by customer ID but it fails when I grouped it by Department wise.
Any kind of help will be appreciated greatly.