I need to do the forecast from the last non null values. I have attached my code. My problem is that i get with this code correct results but with the filtering it is not working. It is correct because i did it for months and years, but when someone selects ID then the data will stay the same.