Add Days in Cognos

222 views Asked by At

I built this report in Cognos where I am using the _add_days( current_date, -1) as a query calculation as opposed to a filter. (When I had it as a filter, the report output would bring in previous dates, that are not part of the specified date under analysis.

For example, if I needed to see transactions that processed on 7/25/23 I was doing _add_days(current_date, -1).

When conducting analysis, the records also included transactions that weren't processed on 7/25/23. Dates from previous months and years are being included.

Figured by doing a query calculation, it would provide results for the exact date, but instead is only showing "False" instead of 7/25/23. Did I miss something or is my setup incorrect for the query calculation setup?

Query Calculation ex

Filter ex

(Companies old data warehouse was Teradata and now we are on Oracle until we move to Azure)

1

There are 1 answers

0
E R M On

I was having the same issue and then changed my approach to filter my report with this expression instead:

_days_between(current_date,[DATE Data Item]) = # DAYS