Calculated date from prompt

To generate a report, I need to select data between two dates. I have a
prompt with the Date2 but the Date1 always will be the first day of
month. So, I need to calculate this first date using the Date2, removing
the day and changing by the "01". After this, I will put both variables
(Date1 and Date2) into a filter to use in the report/metric.

Popular White Paper On This Topic

Hi
Create a date prompt say date2.
Now create a date filter with some attribute say xx between
At first place type applysimple("'01'+'/'+MonthFunction(#0)+'/'+YearFu nction((#0)",?date2)
And in second field drag and drop date2 prompt.

MonthFunction and YearFunction are function to get month and year from a date. I don’t Know what database u r using so change accordingly. This will solve ur problem.

That was a good piece of learning. Although, I was trying it with SQL Server running as the database. And I have been searching for SQL Server equivalent of the MonthFunction and have not found it yet.