cancel
Showing results for 
Search instead for 
Did you mean: 

How do i filter my report data to only get results for current date - 1

Former Member
0 Kudos

Hey All,

I was wondering if there is a formula that can be written at the BO report level where i can only filter the results for Date > = Current Date - 1

Basically, I have a Date field on my report that has historical data and goes back a few years.

I do not wish to see all of this data on my report and wanted to know how can i filter this Date to see anything that is greater than yesterday's date only?

Any help is highly appreciated.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

amitrathi239
Active Contributor
0 Kudos

Hi

create a variable like this..

Var=if((date)>=relativedate(curdate();-1)) then "A"

apply filter in the table where Var variable is equal to A

Amit

Answers (3)

Answers (3)

Former Member
0 Kudos

@Amit: Thanks! your formula worked like a champ.

@Swapnil: I did not try your formula but I am sure it will work as well.

@Neil: Thanks for the tip Neil, I am still learning IDT and universe design concepts so will make a note of this to be implemented in the future when I have good universe design skills as well.

former_member201488
Contributor
0 Kudos

Consider doing this at the Universe level if you can; your report will perform better if you limit the data at the query level, rather than returning a few years worth of superfluous data and filtering it at the report level.

NMG

Former Member
0 Kudos

First you have to create formula for identifying the records having date > current date

For that you have to apply formula like

Data =If ([Date] > RelativeDate(CurrentDate();-1)) then "Show" Else "Hide"

Now on report apply report/block level formula like

Data inList (Show)

Which will give you all the having data from inception to yesterday.

I hope this will help you.

Thanks,

Swapnil