Thank you very much for taking time to respond. I get an error saying "Cannot mix aggregate and non aggregated values". My sales value is a calc field. How do I go about it?
If you create your calc exactly as I have stated above you should not get that. Did you inadvertently put sum([sales])? It should just be [sales], the entire calc will aggregate to sum.
Here are my calcs:
1. if datepart( 'year', [Date New] ) = 2016 then [Dynamic Sales - 1.] end
2. Formula for [Dynamic Sales - 1.] :
[Forecast model 1]*(1-[Loss Business ])*(1+[New business growth])
(*Loss business and New business are 2 parameters)
3. Formula for Forecast model 1:
time <- ts(u,deltat=1/12,start=c(2015,1));
fcast <- forecast(time, h=.arg2);
append(u,fcast$mean, after = n)",
SUM([Sales]),[No. of Months to Forecast])
4. Formula for Date new:
IF [First of Month] = [Max_Date]
DATEADD('month',[No. of Months to Forecast],[First of Month])
[First of Month]
(*No of months to forecast is a parameter too. First of month is the date field).
I apologize. I'm unable to attach my actual data.
OK it appears your measure is an aggregate already, Then try wrapping attr ( datepart ( 'year', [date] ) ) around your datepart calc to make it an aggregate.
Thank you so much. That works. But, its still missing couple months.
How do I calc it if I want to start the label from Jan, 2016? Again, I appreciate your help with this.