I need to do a projection of the sales for the rest of the month and the year based on the past sales.
I have a line for the actual sales , but if I am at the middle of the month I need a line with the projection sales for the rest of the month based on average of the sales i have till now.
Also I need as well a projection sales for the year based on the sales i have till now.
Since you are doing a linear forecast, to see the pattern in line chart you can enable trend lines and set forecast buckets in presentation.
If you need projection with any other chart compute the avgvalue per day using avg(TOTAL aggr(sum(Sales), Day)) and use this for forecasting. Like if(Day>today(),avg(TOTAL aggr(sum(Sales), Day)),sum(Sales)).
For doing forecasting using monthly/daily/annyally write a set analysis to restrict your period as year=max(year).