Skip to main content

All, I have a report where we are reporting on a four year range. So something like this:

 

Date A from: → Date A to:

Date B from: → Date B to:

Date C from: → Date C to:

Date D from: → Date D to:

 

I need to have the 3 previous years/parameters setup like “@Today-1Y” “@Today-2Y” etc.

In Report Designer, I’m unsure how to modify the expression to display the previous 3 years in the dropdown menus. Here are the screenshots from Build Schema:

 

 

I should add, the lines (I think) I need to modify are:

 

=DateAdd(Report.GetDefExt('RowAccessInfo.BusinessDate'), 'd', -(Day(Report.GetDefExt('RowAccessInfo.BusinessDate')) - 1))


=Report.GetDefExt('RowAccessInfo.BusinessDate')


Anybody?


@swartzfeger If you are using the DateAdd you can add a date which is Today(), ‘y’, -1 to get last year from today.

Otherwise you’ll need to just use a formula to get the exact date you’re looking for or try something like @YearStart -1 , -2, -3, see if that can work.


@swartzfeger If you are using the DateAdd you can add a date which is Today(), ‘y’, -1 to get last year from today.

Otherwise you’ll need to just use a formula to get the exact date you’re looking for or try something like @YearStart -1 , -2, -3, see if that can work.

Thank you Benjamin I will try that!


Reply