How PTD , QTD , YTD are Calculated

Could any body focus light on how to create below objects .
How is quarter-to-date(qtd), year-to-date(ytd) and period-to-date(ptd) calculated?

I have the dimentions - Fiscal year , Fiscal quarter, Fiscal period in year.

Any ideas are really appreciated.

Thank you


sureshone43 (BOB member since 2007-07-22)

Hi,

Did you do a Search here on BOB? Keywords: MTD or YTD.

Example: I just searched for MTD and got the following link:

Good luck,
Judy


JMulders :us: (BOB member since 2002-06-20)

I searched for the topics but i am not clear. could anybody give me the code little bit similar to my Question.
As right now i am using DB2 database and I have objects commig from table are Fiscal year, Fiscal Quarter,Fiscal period in year. and Netsales$

With use of this objects I need to build the report which requires me to caluclate netsales$ for week,ptd.qtd,ytd

Thank you


sureshone43 (BOB member since 2007-07-22)

Hi sureshone,

It sounds like you will need a calendar table, if you have to use Fiscal YTD, QTD, MTD, etc.

Search in the Designer forum for “calendar table.” It’s a pretty standard approach in Data Warehousing to the type of problem you are facing.

Judy


JMulders :us: (BOB member since 2002-06-20)

I agree with you , I have seen a code in Forums
This a sample for calculated YTD for Revenue

SUM( case when trunc(table.Date,‘YYYY’) = trunc(sysdate,‘YYYY’) then table.revenue else 0 end)

but I want to make sure does it work for me in BO in Universe designer to built that measure as my database is DB2?

Thank you.


sureshone43 (BOB member since 2007-07-22)

The DB2 equivalent to the above statement would be:

SUM( case when year(Date Object) = year(curdate()) then table.revenue else 0 end)

This would give you the actual YTD but I thought your requirement is the FISCAL YTD .


rimpa :india: (BOB member since 2008-04-14)

Yes My requirement is Fiscal YTD and I have the calender with me, but Infact I am not aware exactly what I have to change in the Code given by you to make it as a fiscal YTD

Thank you for your help


sureshone43 (BOB member since 2007-07-22)

Check out this posting. It’s old (from 2003) but it still applies:

Hope that helps
Judy


JMulders :us: (BOB member since 2002-06-20)

I have worked on this things :yesnod: can you elobrate more on this what is your exact requirement so that i can help you.


zulfikar (BOB member since 2008-05-20)

I need a little direction in creating a prompt/filter, which allows the user to select a time period from the options “MTD/YTD/QTD”, based the other inputs will be “Year” & “Month”.
So if a user selects QTD & March 2008…the report should show throw values associated with Jan,Feb & March 2008(which is basically Q1)

I already have dimensions for Full Year,Qtr & Month & they have case stmts built to perform their individual functionality.

Any help is appreciated.
Thanks


fixmyspcbar (BOB member since 2007-03-02)