If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

MTD Last Year

Started by dollipi, 21 Feb 2020 04:43:15 AM

Previous topic - Next topic

dollipi

Hello,

I need MTD but from last year.

This is my formula for current year:

[DATE] between _first_of_month (current_date) and current_date

Regards,
D.

BigChris

[DATE] between _first_of_month(_add_years(current_date,-1)) and _add_years(current_date,-1)

dollipi


dollipi

I have in my query MTD current year and now MTD last year

MTD last year:
[DATE] between _first_of_month(_add_years(current_date,-1)) and _add_years(current_date,-1)

Unfortunately our system calculates back one day. So when I query on February 27th, I get the following:

current year: 1 Feb - 26 Feb
last year: 1 Feb - 27 Feb

Therefore I need a solution for minus one day for MTD last year

Can someone help?

BR
D.

BigChris

Just take a day off current_date using the _add_days function before you take a year off.