
Not applicable
2016-09-22
05:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Display data of current and previous 2 months
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.
457 Views
2 Replies

MVP
2016-09-22
05:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)


Partner - Specialist III
2016-09-22
05:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Check this two articles:
Calculating rolling n-period totals, averages or other aggregations
Best regards,
Data Architect MB
