
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Set Analysis \ addmonths
hi all
trying to calculate previous three months from user selection i.e
if the user selected 201804 the expression should retrieve calculation for : 201804,201803,201802
tried it with :
SUM({<YYYYMM={"$(='>=' & date(AddMonths(max(FULL_DATE),-3),'YYYYMM'))"},MM=,YYYY=>}AMOUNT)
but it retrieves 0 , (not the actual result)
any ideas?
advanced thanks
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ilan,
Please try below highlighted :
SUM({<YYYYMM={"$(='<=' & date(AddMonths(max(FULL_DATE)),'YYYYMM'))"},MM=,YYYY=>}AMOUNT)
YYYYMM={"<=$(=AddMonths(Max(YYYYMM)))>=$(=AddMonths(Max(YYYYMM),-3))"}
Thanks,
Arvind Patil


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ilan,
Please try below highlighted :
SUM({<YYYYMM={"$(='<=' & date(AddMonths(max(FULL_DATE)),'YYYYMM'))"},MM=,YYYY=>}AMOUNT)
YYYYMM={"<=$(=AddMonths(Max(YYYYMM)))>=$(=AddMonths(Max(YYYYMM),-3))"}
Thanks,
Arvind Patil

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you very much,
below my final expression :
YYYYMM={"<=$(=AddMonths(Max(YYYYMM),0))>=$(=AddMonths(Max(YYYYMM),-3))"}


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome
Thanks,
Arvind Patil
