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

YTD Calculation

Started by anirudh, 11 Jun 2014 03:08:58 PM

Previous topic - Next topic

anirudh

Hello Cognos Gurus!

I have an Amount column in my report that displays the amount for an executive based on the Month and Year input parameter value. So I have two input parameters ?P_Month? and ?P_Year?. I need another column that calculates this amount on a Year to Date basis. This Year to Date calculation should not be on the current sysdate. It should be based on the input parameter value i.e, if I run the report for March 2014, the YTD column should be calculated only until March 2014 and not the sysdate.

So this is how the report is supposed to look like.

Exec                Amt for June2014                   Amt (YTD)
A                               232                                 3343
B                               987                                 5466
C                               124                                 1246

Thanks a lot for the help in advance!

Satheesh

Hi,


So you have already one query having Year month filters right.


Just Copy paste the same Query make the name as YTD Query


As you know every month is starting from one only....


in YTD query make the Month filter like below


[month] between 1 and ?P_Month?


year filter is same as your query..


now join the two queries on Executive data item.




Thanks & Regards
Sateesh Chapparapu
Mumbai

anirudh

Thanks a lot Sateesh! Worked like a charm!