Thank you for your solution! This is most of what i need. The problem is when i select a quarter or a couple of months or 1 year (when i have data from more years) the expression isn't working anymore. How can i still have the rolling avarage over three months in a selection?
Ofcourse the dimensions of the table (or chart) should react to the selection and only show the values of the months, quarters or years i selected. But the calculation within the expression shouldn't react to the selection.