Hi, in one of my report I have startdate and enddate prompts.
my requirement is: based on selected months, use the counts from the last month selected
for ex: if I run the report for Jan2013, feb2013 and mar2013, my report has to show the counts for Mar 2013 only. how to get that out of selecting 3 months, get only last selected month data.
Thanks,
use _add_months(?enddate?,-1) and for going back to one month.
i.e, [Date] between _add_months(?enddate?,-1) and ?enddate?
or
use write a case statement in the count column as below
count(case then [Date] between _add_months(?enddate?,-1) and ?enddate? then [dataitem you want to count] end)
Hi Raj, thanks for your advise and help.
I have updated my current year filter with following expression:
[Date] between _add_months(?enddate?,-1) and ?enddate?
current year for example 2013 march count worked perfectly.
what should I change in the expresion for prior year march (2012 March) counts.
my current expression for prior year is
[date] between _add_years (?startyear?,-1) and _last_of_month (_add_years (?endyear?,-1))
for prior year march (2012 March) counts you could use the following expression
count(case then [Date] between _add_years(_add_months(?enddate?,-1),-1) and _add_years(?enddate?,-1) then [dataitem you want to count] end)