Hi Team,
Let's say there is a dataset for sales of cars for a year (Monthwise) as shown below. The idea is to generate Average column dynamically. The Average column needs to be found in such a way that if there are 2 or more than 2 months have no sale, then that month needs to considered as inactive. Therefore while counting the delimiter on taking average, we need to discard the inactive months. Ex: In row 1 the denominator is 10. Can someone help me with this logic?
| Car | 2018-1 | 2018-2 | 2018-3 | 2018-4 | 2018-5 | 2018-6 | 2018-7 | 2018-8 | 2018-9 | 2018-10 | 2018-11 | 2018-12 | Average |
| X | 0 | 0 | 10 | 20 | 30 | 10 | 30 | 40 | 20 | 50 | 5 | 0 | 21.5 |
| Y | 10 | 0 | 0 | 0 | 10 | 5 | 6 | 0 | 0 | 5 | 0 | 0 | 7.2 |
| Z | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 10 | 15 |
| A | 0 | 0 | 0 | 130 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 130 |
| B | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 0 | 7.5 |