You can add two calender one Is From Date and another is To Date.
Then define 2 variable for the both.U can Define 1.vFDate and 2.vTDate
Then put the variable in the expression u want to calculate.
An Example is --
I think it will work for you.
Thank & Regards,
Check this app in regards to use a master calendar linked to your fact table, variables and set analysis. If you want some of those ranges fixed (say last month, last 30 days or so), I'd create additional fields in the master calendar table, so you will always have this value and it will be changed dynamically, without need of changing the code every day.
Hope that helps.
I would suggest creating a field in your calendar table to hold the "Time Range Options"
Then concatenating duplicate entries in your calendar that correspond to the various time range options you want to use, Like this...
Time Range Date Current Day 8/24/2011 Current Week 8/24/2011 Current Week 8/23/2011 Current Week 8/22/2011 Current Week 8/21/2011 Current Month 8/24/2011 Current Month 8/23/2011 Current Month 8/22/2011 Current Month 8/21/2011 Current Month 8/20/2011 Current Month ... Range Selection All possible dates...
Then once you have all your Ranges defined you could put your Time Range Field in a list box with the setting to "require selection"
Then use the "Show" condition property on a list box or slider to hide it when the selected value for "Time range" is equal to "Range Selection"
Finally use a Field event trigger on Time Range to clear selections on your date field when the user selects Timer Range values other than "Range Selection"
I wish I had a working example to show but I've not actally done this one but it sounds reasonable, the biggest trouble spot is going to be managing the selections on the Date field so that it is cleared when it needs to be. You'll have to experiment a bit to make it all work.