I am working on Stock Calculations
There is stock scanning done by the salesperson i.e how much stock is left to the dealer.
Now I need to check how much product is being sale out every month. Since how long a product is not being sold from a particular dealer.
My data set is like this
// account_id2_c as Account_id,
SerialNo, // different everytime, can be same if this is scanned again at the same dealer
Can we flag serial number as yes(if scanned last month) no(if not scanned earlier) on the basis of this month and last month
that is, If at dealer 1 serial abc is scanned on 12-07-2017 and //No
abc is scanned on 08-08-2017 // old stock //yes
at Dealer1 serial cde is scanned on 07-07-2017 stock sold if not available on next dates
serial efg is scanned on 09-07-2017 New stock.
Can someone suggest anything! Ihope i have written my requisite well.