Hi Samuele,
I tried your script but got a validation error on the *XDIM_FILTER statement, so I commented it out to start with (I can't see it's needed), and the allocation of advertsing costs based on sales worked as expected. Which version are you on?
/Cecilia
![Capture4.PNG]()
![Capture5.PNG]()