Hi
I need to update Sales-field in the Table below.
For example Matt has two rows in month 8, so calculation should be Sales/2 (row count) = 50. And Matt has three rows in month 9, calculation is Sales/3 (row count) = 33,33, and so on...
What is the best way to solve this? Merge or just simply Update with group by customer, month, year?
Table
customer month year Sales
Matt 8 2018 100
Matt 8 2018 100
Matt 9 2018 100
Matt 9 2018 100
Matt 9 2018 100
Simon 8 2018 100
Simon 8 2018 100
Simon 9 2018 100
Simon 9 2018 100
End result should look like this after update or merge:
Table
customer month year sales
Matt 8 2018 50
Matt 8 2018 50
Matt 9 2018 33,33
Matt 9 2018 33,33
Matt 9 2018 33,33
Simon 8 2018 50
Simon 8 2018 50
Simon 9 2018 50
Simon 9 2018 50