5 Replies Latest reply: Jul 18, 2012 11:32 AM by Mayil Vahanan Ramasamy

# Annualized Expression

I have an expression that gives a 2012 YTD sum, but I want to create another expression to annualize that sum based on the current day that the user looks at the data (to avoid me having to go in and change the expression all the time). Is there an easy way to do this within the expression?

The 2012 YTD expression is as follows:

sum({\$<Year={2012},ContractStartDate={'>=1/1/2010
12:00:00 AM<=12/31/2012 12:00:00 AM'}>}
FeeOne)+sum({\$<Year={2012},ContractStartDate={'>=1/1/2010
12:00:00 AM<=12/31/2012 12:00:00 AM'}>}
FeeTwo

• ###### Re: Annualized Expression

you can use variables and expressions in set analyses

f.ex.

sum({\$<Year={'\$(=year(today()))'},ContractStartDate=......

• ###### Re: Annualized Expression

Is this what you mean?

sum({\$<Year={'=year(today())'},ContractStartDate={'>=1/1/2010
12:00:00 AM<=12/31/2012 12:00:00 AM'}>}
FeeOne)+sum({\$<Year={'=year(today())'},ContractStartDate={'>=1/1/2010
12:00:00 AM<=12/31/2012 12:00:00 AM'}>}
FeeTwo

• ###### Re: Annualized Expression

use \$ sign

Year={'\$(=year(today()))'}

i don't know what you want to get at the end:)

• ###### Re: Annualized Expression

When I use the \$ sign, I get the same values as the YTD column. What I want to do is take what we have done so far (until today's date)and annualize it so that I can compare it to previous years.

• ###### Re: Annualized Expression

Hi,

What your requirement, can you say clearly,from selected date to today date want to calculate the values ??

sum({\$<ContractStartDate={'>=\$(=Max(ContractStartDate)) <=\$(=today())'}>}FeeOne)+sum({\$ContractStartDate={'>=\$(=Max(ContractStartDate)) <=\$(=today())}'>}FeeTwo

Hope it helps