Hi All,
I am trying create a query that will look at an employees past sales but I want to add a field that will show the employees last sale value / quantity of products and have tried using the DLast function but it only displays a random value which is the same for all employees. Not what I want.
If I use "John Smith" as my employee i want (may need to copy and paste to excel to view);
EmplyeeName OrderDateAndTime OrderNo OrderValue ItemQuantity LastOrderDateAndTime LastOrderValue LastItemQuantity
John Smith 15/12/2016 12:05 11585 £120.55 4 14/12/2016 16:45 260.47 6
John Smith 14/12/2016 16:45 11524 £260.47 6 12/12/2016 11:15 184.95 1
John Smith 12/12/2016 11:15 11421 £184.95 1 12/12/2016 10:30 126.44 2
John Smith 12/12/2016 10:30 11414 £126.44 2 11/12/2016 13:48 206.33 2
John Smith 11/12/2016 13:48 11385 £206.33 2 08/12/2016 09:36 154.36 1
John Smith 08/12/2016 09:36 11154 £154.36 1
What I am actually getting is the exact same LastOrderValue, LastOrderValue & LastItemQuantity
Even when i remove the John Smith filter every employee has the exact same value.
I have tried DLast function but with no success. Any help on what the correct function i should use will be great.
Cheers
I am trying create a query that will look at an employees past sales but I want to add a field that will show the employees last sale value / quantity of products and have tried using the DLast function but it only displays a random value which is the same for all employees. Not what I want.
If I use "John Smith" as my employee i want (may need to copy and paste to excel to view);
EmplyeeName OrderDateAndTime OrderNo OrderValue ItemQuantity LastOrderDateAndTime LastOrderValue LastItemQuantity
John Smith 15/12/2016 12:05 11585 £120.55 4 14/12/2016 16:45 260.47 6
John Smith 14/12/2016 16:45 11524 £260.47 6 12/12/2016 11:15 184.95 1
John Smith 12/12/2016 11:15 11421 £184.95 1 12/12/2016 10:30 126.44 2
John Smith 12/12/2016 10:30 11414 £126.44 2 11/12/2016 13:48 206.33 2
John Smith 11/12/2016 13:48 11385 £206.33 2 08/12/2016 09:36 154.36 1
John Smith 08/12/2016 09:36 11154 £154.36 1
What I am actually getting is the exact same LastOrderValue, LastOrderValue & LastItemQuantity
Even when i remove the John Smith filter every employee has the exact same value.
I have tried DLast function but with no success. Any help on what the correct function i should use will be great.
Cheers