While It should work as is shown in attached application in previous answer.
You can also try doing it in by sum(ventas)/sum(total <año> ventas)
the differrence between all and total is that total respects the selections but does not respect the dimensions of the chart but all ignores selecttion as well as dimensions.
If, You want to ignore selections then you can use all.
So, the same way it can be
sum(ventas)/sum(all <año> ventas)