CALCDATE() Question

Hello, I trying to create a report that calculates the average sales of an item based on X months. I can hard code the months ie 4, but how do I substitute the 4 for a variable, grabbed from the option page? This works the way I want, but how do I format this line to accept a variable in the place of ‘-4M’? DateRange := CALCDATE(’-4M’,WORKDATE); I’m not a programmer, so be nice. Thanks

Try defining the variable as DateFormula and then DateRange := CALCDATE(,WORKDATE); Hope this helps.