Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
alkesh_sharma
Creator III
Creator III

Restricting Rolling Months Value

Hello, I need help reg. restricting values in rolling month.

I have data for five years, but i need to display the values of Rolling months for last 2yrs (24 month) in a list box.

Thanx in advance.

5 Replies
Not applicable

If you are displaying only 24 months data throughout your application then filter remaining 3 yrs data from data model itself. It will help to show desired results, also it will reduce size of the application.

alexandros17
Partner - Champion III
Partner - Champion III

write this expression in your list box instead of input the field

=if(Year > year(today())-2, Year, null())

amit_saini
Master III
Master III

Hi Alkesh,

Try This:

if(makedate(Year,POPER)>=monthstart(addmonths(Today(), -23)) and makedate(Year,POPER)<=MonthEnd(Today()), 1, 0) as %isRollingMonth

Thanks,

AS

alexandros17
Partner - Champion III
Partner - Champion III

Excuse me I was wrong, try this

=If(myDate > AddMonths(Today(),-84), MonthYear, null())

alkesh_sharma
Creator III
Creator III
Author

This solved the problem....Thanx