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

prior date to YTD

Started by ShadowOfTheRiver, 26 Jul 2013 02:48:06 AM

Previous topic - Next topic

ShadowOfTheRiver

Hi,

I' m trying to calculate ytd and the prior date to it using a selceted month as start month.

- start month:
prevmember([COPA_CD_article].[year_quarter_month].[year_quarter_month].[month] -> ?Start Month?)

- Previous month :
periodsToDate ([COPA_CD_article].[year_quarter_month].[year_quarter_month].[year (all)];[Start Month])

To show later months then start month:
except  ([ Months_of_the_prompts_year];[Previous Month])

Due to the complexed time structure we have :year_quarter_month I have to create tow further prompts:
- Selection_Year:  parent (parent ([Start Month]))
- Months_of_the_prompts_year:  descendants ([Selection_Year];2)

This works fine for the selected year but how to do to get the prior period?

Thanks in advance!

CognosPaul

You're trying to get the prior year to date?

To find the YTD for the previous year, you just need to use parallelPeriod on the start month to go back a year:

periodsToDate([COPA_CD_article].[year_quarter_month].[year_quarter_month].[year (all)]; parallelPeriod([Selection_Year];-1;[start month]))


ShadowOfTheRiver

thanks for the feedback,

It still doesnt work. It comes up with "LEVEL" error!!??

CognosPaul

Whoops. Try:

periodsToDate([COPA_CD_article].[year_quarter_month].[year_quarter_month].[year (all)]; parallelPeriod([COPA_CD_article].[year_quarter_month].[year_quarter_month].[year (all)];-1;[start month]))