BusinessObjects Board

YTD Calculation Variable

Hi - I am trying to create a variable to help adding months to use in formulas to calculate YTD numbers. Here’s what I want to do:

If (=“01”) Then “01” Else if(=“02” Then (“01”,“02”) Else if (=“03” Then (“01”,“02”,“03”) etc…

However it doesn’t seem to work. Is there a way to get this working or a different solution anyone else came up with?

Appreciate any help. Thanks and a great week for everyone!


BOaddictNYC (BOB member since 2003-07-11)

Will be good to have more details of your case.
Are you sure you need a variable for that purpose?
If you need to show YTD calculation, have you tried RunningSum function?
:slight_smile:

luis


lchavez :peru: (BOB member since 2005-07-21)

I could use a runningsum function but how would you have it added up to a specific month. for example I’d want it to add up January, February,March, April and May if we’re in May.


BOaddictNYC (BOB member since 2003-07-11)

If you need to show all the months in the report, with their correspondant YTD, you can use RunningSum. Otherwise, if you are showing information for a single month (with its correspondant YTD) you can use a Filter Object defined at universe level that brings you the acumulated data.
Which of these scenarios apply to you?

luis


lchavez :peru: (BOB member since 2005-07-21)

I don’t follow you.

I have two years of information in my recordset. 2006 goes from January to December. 2007 goes to October. I need to do a YTD comparison for 07 vs. 06. How would you get the report to add up to October? I can’t use filter as I need the full year information for 2006 elsewhere on the report. And adding a where clause to select months from January to October is not practical since there are tons of formulas I am using.


BOaddictNYC (BOB member since 2003-07-11)

I was able to find the solution at the following link.

Thanks


BOaddictNYC (BOB member since 2003-07-11)