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

Calculating YTD, CTD and RYTD

Started by rajeurokz, 01 Sep 2015 07:23:00 AM

Previous topic - Next topic

rajeurokz

Hi Team,

I want to implement the below logics in a prompt.
This will be cascaded using conditional block, but please help me in acheving the below requirements.

1.Year to Date (YTD)
2. Calender Year to Date (CTD): Current Date - 365 days
3. Rolling Year to Date: this would be prior month end date - prior month end date (less one year)

MFGF

Quote from: rajeurokz on 01 Sep 2015 07:23:00 AM
Hi Team,

I want to implement the below logics in a prompt.
This will be cascaded using conditional block, but please help me in acheving the below requirements.

1.Year to Date (YTD)
2. Calender Year to Date (CTD): Current Date - 365 days
3. Rolling Year to Date: this would be prior month end date - prior month end date (less one year)

Are you using a dimensional package or a relational package? The solution is different for each.

MF.
Meep!

rajeurokz

Thanks for the reply, I'm using a relational package.

rajeurokz


MFGF

Quote from: rajeurokz on 01 Sep 2015 07:23:00 AM
Hi Team,

I want to implement the below logics in a prompt.
This will be cascaded using conditional block, but please help me in acheving the below requirements.

1.Year to Date (YTD)
2. Calender Year to Date (CTD): Current Date - 365 days
3. Rolling Year to Date: this would be prior month end date - prior month end date (less one year)

Seems to me that YTD would be

[your date item] between _make_timestamp(extract(year, current_date),1,1) and current_date

CTD would be

[your date item] between _add_years (current_date,-1) and current_date

RYTD would be

[your date item] between _add_years(_last_of_month(_add_months(current_date,-1)),-1) and _last_of_month(_add_months(current_date,-1))

Cheers!

MF.
Meep!

rajeurokz

This should fit my requirement, i'll try and enhance this further.


Thanks !!