Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I have a report, to display data of current and previous 2 months. There is a selection of Month above the report, user can select the month and the data of that month and previous 2 months to be displayed.
I have a field Date_Skey as '20150101'
Please help.
Is Date_Skey read as date? If it is then you can try this (assuming your are doing Sum(Measure))
Sum({<Date_Skey = {"$(='>=' & Date(AddMonths(Max(Date_Skey), -2), 'YYYYMMDD') & '<=' & Date(Max(Date_Skey), 'YYYYMMDD'))"}>} Measure)
Check this two articles:
Calculating rolling n-period totals, averages or other aggregations
Best regards,
Data Architect MB