Hi all,
I'm working on a report that uses a prompt page with a date selection. The user chooses a period (YYYY-MM) and based on that period, the revenue has to be shown from a year ago until the selected date. I use right(), left() and cast() functions to extract the years/months, but how can I create the YTD'ish function to get the correct revenue.
I hope my problem is stated clear enough.
Here's my solution: I used a case expression to show the revenue when the date is between the selected date minus 12 months and the selected date. Expressions looks like this.
case
when [Date] between _add_months (_make_timestamp ([SelectedYear],[SelectedMonth],01), -12) and _make_timestamp ([SelectedYear],[SelectedMonth],01)
then [Gross Revenue]