YTD Function

Dear All,
I have used YTD function but it is not working properly.
I have data from 2008 till 2010. When I should give prompt as 01-Jun-2010, it should show all the data from the day when the Business starts till 01-Jun-2010. Suppose My business starts on 01-Sept-2008, it should show the data from 01-Sept-2008 till 01-Jun-2010. For this I have used a YTD Function as
TODATE(VIVA.LOYALTY_POINT_FACT."Total Point Earn(Sum All)", VIVA."Time"."Year")
But when I used to give date prompt as 01-Jun-2010, it shows the data from 01-Jan-2010 till 01-Jun-2010. But I need it should show me data from 01-Sept-2008 ( when the business starts) till 01-Jun-2010.
I have even data in my table and when I used to fire the query, i used to get desired result.
Could anyone help me out?
Regards,
Jan

TODATE(VIVA.LOYALTY_POINT_FACT."Total Point Earn(Sum All)", VIVA."Time"."Year")
But when I used to give date prompt as 01-Jun-2010, it shows the data from 01-Jan-2010 till 01-Jun-2010. But I need it should show me data from 01-Sept-2008 ( when the business starts) till 01-Jun-2010.That's the meaning of YTD ...
It'll give data from year starting of selected period, i.e. 01-jan of the selected date's year.
if you want o retrieve all data from your history..
you better apply filter on date using between operator..
Time.Date between BusinessStartDate and SelectedDate if you want you can keep BusinessStartDate value in one variable and can refer that in above filter

Similar Messages

  • YTD function problem

    Hi,
    I got error when I try to calculate YTD sales by using "TODATE" function.
    TODATE("Facts - Contract Value"."Total Value USD","Dim - Contract Date"."Fiscal Year")
    [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 27037] Unresolved level: "Dim - Contract Date"."Fiscal Year".
    How can fix it? Is there another way to get YTD?
    Thanks in advance!

    Oh ;) those are rpd columns
    in Answers pull
    metric 'Total Value USD'->fx->Filter button->select 'Fiscal Year'
    Add button>SQL Expression then use YEAR(CURRENT_DATE)
    just in case if you get any datatype issues then
    you have to do something like below
    FILTER("Total Value USD" USING cast("Fiscal Year" as int) =YEAR(CURRENT_DATE))

  • OBIEE 11g Time Hierarchy with YTD function problem

    Hi all,
    Platform: OBIEE 11.1.1.5.0.
    We have a Calendar dimension (*time dimension*), that includes the usual time hierarchy (Year > Semester > Quarter> Month > Day).
    Creating a Pivot Table with a YTD measure, using also the Calendar Table hierarchy, everything works fine, and we can drill up & down always getting the right YTD values.
    But, if we add to this analysis, a year and month prompts (filters), we only receive true YTD values, at the day and month levels of the hierarchy. Above this, values will sum up instead of getting the right YTD aggregated value.
    YTD logical column definition = TODATE(Table A.Measure B , Hieararchy.Year)
    Example of pivot values returned:
    *2011*=1192812 (Sum of the 3 Semester not the YTD value)
    Semester 1 = 377305 (Sum of the 4 Quarter not the YTD value)
    Quarter 1= 107460 (Sum of the 3 months not the YTD value)
    Jan = 18507 (YTD value)
    Feb = 35223 (YTD value)
    Mar = 53730 (YTD value)
    Is there anything that we might be doing wrong?
    Thanks in advance,
    Ricardo

    Ricardo,
    You might be aggregatign values twice either at RPD level or at reprot level. Please check on that.

  • Y-T-D and Range Functions not working in upgrade to v 11.1.2.507 FR

    Has anyone else had this problem. We are upgrading to v11.1.2 from 9.3.1 and when I create a new report with a range function in v 11, it just hangs there. When I use the YTD function, sometimes it works, sometimes it just hangs. Does anyone have any ideas on this. Thanks, Donna

    To be honest the best place to start is to read through the Upgrade section of the install/config documentation, if you still don't understand after reading through then ask or specific question or maybe discuss with a consultant.
    Documentation is available at http://docs.oracle.com/cd/E17236_01/epm.1112/epm_install_11121/frameset.htm?launch.html
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to restrict prevmember function to calculate for a particular year

    Hi,
    I have a MDX query that calculates the cumulative sum, using current & previous member. Now when year is January, i want the query to ignore prevmember value. Can somebody please help how this can be achieved?
    My query:
    CASE WHEN
       [Date].[CALENDAR].PrevMember
         ,[Measures].[TOTAL KM]
        )  + [Measures].[TOTAL KM] )=0 THEN 0 
    ELSE
       [Date].[CALENDAR].PrevMember
         ,[Measures].[Number of Events]
        )  + [Measures].[Number of Events]) * 200000/
       [Date].[CALENDAR].PrevMember
         ,[Measures].[TOTAL KM]
        )  + [Measures].[TOTAL KM] ) END

    Hi Mayank,
    According to your description, you need to calculate the cumulative sum, and reset it on January of each year, right?
    In this case, you can use YTD function to achieve your requirement. I have tested it on AdventureWorks, the query below is for you refernece.
    WITH MEMBER MEASURES.YTDDEMO AS
    AGGREGATE(YTD(), [Measures].[Internet Sales Amount])
    SELECT {[Measures].[Internet Sales Amount], MEASURES.YTDDEMO} ON 0,
    [Date].[Calendar].[Month].MEMBERS ON 1
    FROM
    [Adventure Works]
    Regards,
    Charlie Liao
    TechNet Community Support

  • How to use Dynamic Time Series YTD on a calc script / member formula?

    Hi,
    I activated Dynamic Time Series on Essbase and would like to use the YTD function of a measure for a certain month.
    I tried to use
    MeasureName->YTD(Dec)
    MeasureName->Y-T-D(Dec)
    But couldn't use it to syntax problems. How can I call this function instead of using @Accum or @SumRange?
    Thank you
    Edited by: Icebergue on 10/Ago/2011 11:07

    I could be wrong, but I don't think you can use DTS members in calc scripts or member formulas. As you probably know, they can be used in Financial Reports, SmartView and Excel Add-in.
    You can create an alternate hierarchy in your Time dimension though:
    Jan (YTD): Jan ->Jan is being a shared member
    Feb (YTD): Feb+Jan (YTD) ->Both Feb and Jan (YTD) are being a shared members
    Dec (YTD): Dec+Nov (YTD) ->Both Dec and Nov (YTD) are being a shared members
    Cheers,
    Mehmet

  • Pl/sql Year to Date Function

    Dear All!
    Its very urgent task for me. i'm working on Oracle discoverer. i'm creating Project Year to Date report. i need one year to date function. i've only period name. The scnerio is this, in our company financial year is starting from (April to March i.e 01-April-2011 to 31-mar-2012). i need to apply YTD function on Period name. when any user select any period it will show from 01-apr-2011 to select mont. for example if user select Feb-12 then it must be from 01-apr-2011 to 29-feb-2012.
    Please this is urgent.. give Query for function. please
    Regards
    Ahmed....

    Hello,
    Can you put an example on apex.oracle.com and provide a link, it will be much easier to help you out?
    Regards,
    Carl
    blog : http://carlback.blogspot.com/
    apex examples : http://apex.oracle.com/pls/otn/f?p=11933:5

  • Generalizing YTD & QTD calculations

    Hi,
    I am having month as leaf level in the time table. There are 14 months each month is having 26 days in the time table.
    Time table format:
    TIME_KEY     PERIOD_NAME        START_DATE     END_DATE     YEAR_START_DATE     QUARTER_START_DATE PERIOD_YEAR      PERIOD_NUM     QUARTER_NUM
    200701     JAN-07     12/30/2006     1/26/2007     12/30/2006     12/30/2006     2007     1     1
    200702     FEB-07     1/27/2007     2/23/2007     12/30/2006     12/30/2006     2007     2     1
    200703     MAR-07     2/24/2007     3/30/2007     12/30/2006     12/30/2006     2007     3     1
    200704     APR-07     3/31/2007     4/27/2007     12/30/2006     3/31/2007     2007     4     2
    200705     MAY-07     4/28/2007     5/25/2007     12/30/2006     3/31/2007     2007     5     2
    200706     JUN-07     5/26/2007     6/29/2007     12/30/2006     3/31/2007     2007     6     2
    200707     JUL-07     6/30/2007     7/27/2007     12/30/2006     6/30/2007     2007     7     3
    200708     AUG-07     7/28/2007     8/24/2007     12/30/2006     6/30/2007     2007     8     3
    200709     SEP-07     8/25/2007     9/28/2007     12/30/2006     6/30/2007     2007     9     3
    200710     OCT-07     9/29/2007     10/26/2007     12/30/2006     9/29/2007     2007     10     4
    200711     NOV-07     10/27/2007     11/23/2007     12/30/2006     9/29/2007     2007     11     4
    200712     DEC-07     11/24/2007     12/28/2007     12/30/2006     9/29/2007     2007     12     4
    200713     P13-07     12/28/2007     12/28/2007     12/30/2006     9/29/2007     2007     13     4
    200714     P14-07     12/28/2007     12/28/2007     12/30/2006     9/29/2007     2007     14     4
    200801     JAN-08     12/29/2007     1/25/2008     12/29/2007     12/29/2007     2008     1     1
    200802     FEB-08     1/26/2008     2/22/2008     12/29/2007     12/29/2007     2008     2     1
    200803     MAR-08     2/23/2008     3/28/2008     12/29/2007     12/29/2007     2008     3     1
    200804     APR-08     3/29/2008     4/25/2008     12/29/2007     3/29/2008     2008     4     2
    200805     MAY-08     4/26/2008     5/23/2008     12/29/2007     3/29/2008     2008     5     2
    200806     JUN-08     5/24/2008     6/27/2008     12/29/2007     3/29/2008     2008     6     2
    200807     JUL-08     6/28/2008     7/25/2008     12/29/2007     6/28/2008     2008     7     3
    200808     AUG-08     7/26/2008     8/22/2008     12/29/2007     6/28/2008     2008     8     3
    200809     SEP-08     8/23/2008     9/26/2008     12/29/2007     6/28/2008     2008     9     3
    200810     OCT-08     9/27/2008     10/24/2008     12/29/2007     9/27/2008     2008     10     4
    200811     NOV-08     10/25/2008     11/21/2008     12/29/2007     9/27/2008     2008     11     4
    200812     DEC-08     11/22/2008     12/26/2008     12/29/2007     9/27/2008     2008     12     4
    200813     P13-08     12/26/2008     12/26/2008     12/29/2007     9/27/2008     2008     13     4
    200814     P14-08     12/26/2008     12/26/2008     12/29/2007     9/27/2008     2008     14     4
    I am using TIME_KEY column (which is integer) in the calculations. The YTD & QTD calculations are as follows,
    YTD calculation in Universe:
    Select section:
    Sum (Actual)
    Where section:
    (D_TIME.TIME_KEY
    Between     
    to_number(Concat(Substr(to_char(@Prompt('Enter End Period: ', 'A', 'Dim Time\YearPeriod', Mono, Constrained), '999999'),1,5),'01'), '999999')
    And
    @Prompt ('Enter End Period: ', 'A', 'Dim Time\YearPeriod', Mono, Constrained))
    QTD calculation in Universe:
    Select section:
    Sum (Actual)
    Where section:
    (D_TIME.TIME_KEY
    Between
    to_number(Concat(Substr(to_char(@Prompt('Enter End Period: ', 'A', 'Dim Time\YearPeriod', Mono, Constrained), '999999'), 1, 5),
    (Case Substr(to_char(@Prompt('Enter End Period: ', 'A', 'Dim Time\YearPeriod' ,Mono, Constrained), '999999'), 6, 7)     
               When '01' Then '01'
               When '02' Then '01'
               When '03' Then '01'
               When '04' Then '04'
               When '05' Then '04'
               When '06' Then '04'
               When '07' Then '07'
               When '08' Then '07'
               When '09' Then '07'
               When '10' Then '10'
               When '11' Then '10'
               When '12' Then '10' 
    When '13' Then '10' 
    When '14' Then '10'
          End)), '999999')
    And
    @Prompt ('Enter End Period: ', 'A',' Dim Time\YearPeriod', Mono, Constrained))
    Using the above YTD & QTD calculations, I can restrict the periods but the values are not rolling up for each month. For example,
    Period level data:
    ________Jan-10____Feb-10____Mar-10
    Product 1___2________4_________6
    YTD: (the output has to come like the below one, but I am getting the same period value)
    ________Jan-10____Feb-10____Mar-10
    Product 1___2________6_________12
    Please guide me to write a generalized YTD and QTD calculation in Universe level?
    Regards, Sujeev

    Hi Mark,
    Thanks for your reply.
    I made the changes as per your suggestion. I am not getting the values for the YTD, instead i am getting zero values for all the periods. How to solve this issue. But my previous YTD calculation is giving me the value like as follows,
    *Period level data:*
    ________Jan-10____Feb-10____Mar-10
    Product 1___2________4_________6
    But i want the YTD function to perform like,
    *YTD:*
    ________Jan-10____Feb-10____Mar-10
    Product 1___2________6_________12
    YTD calculation for individual months has to be like as follow,
    Jan = Jan
    Feb = Jan + Feb
    Mar = Jan + Feb + Mar...
    How to do it?
    Regards, Sujeev

  • YearToDate MDX function with settings on date dimension in the design time

    hi folks:
      I understand that in order to run YTD() function correctly, I need to set dimDate to Time type  in the designer . Here is the situation:
    I have a user hierarchy, Fiscal Year - Fiscal Period - Fiscal week
    for fiscal year and fiscal week attributes, I can find the related types in the dimensionAttribute property...however , for the fiscal period which is every four weeks, I can not find the proper type in the fiscal period dimensionAttribute property.
     What should I do in this case?
    thanks
    Hui
    --Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 2008, SVN --

    Hi Hans,
    Thank you for your question.  
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.  
    Thank you for your understanding and support. 
    Regards,
    Simon Hou
    TechNet Community Support

  • Finance Report PTD and YTD calculations

    Hello All,
    I have a Report using the SSAS as Data-source.
    It is a finance report and I need to calculate PTD and YTD amounts.
    PTD:
    sum the amount for all of the years till a selected Fiscal Period(Parameter)
    Example: If The Cube have data for 2012, 2013 ,2014 and I have selected NOV-14 as my Fiscal Period , It should sum up the data for all the years including 2014 till Nov-14.
    YTD: should calculate the data for a Year till selected report period. Fiscal Period is not date data type.
    Please suggest.
    Best Regards,
    Pragati

    Hi Pragati,
    According to your description, you created a SQL Server Reporting Services report using SQL Server Analysis Services cube as data source, now what you want is calculate PTD and YTD amounts, right?
    In SSAS, we can use Ytd function to your requirement. It returns a set of sibling members from the same level as a given member, starting with the first sibling and ending with the given member, as constrained by the Year level in the Time dimension. Here is
    the sample query.
    WITH MEMBER [Date].[Calendar].[First8MonthsCY2003] AS
    Aggregate(
    YTD([Date].[Calendar].[Month].[August 2003])
    SELECT
    [Date].[Calendar].[First8MonthsCY2003] ON COLUMNS,
    [Product].[Category].Children ON ROWS
    FROM
    [Adventure Works]
    WHERE
    [Measures].[Order Quantity]
    Regards,
    Charlie Liao
    TechNet Community Support

  • MDX Filter Expression

    Hi,
    I am trying to get a filter expression to work.  I am trying to create a filter that will choose the current year.  This will be part of a filter condition that will be a YTD filter.  I am trying to get the year part working first.  Here is what I have so far.  I get this database error:
    A database error occured. The database error text is: Failed to execute MDX query. Reason: Invalid MDX command with ). (WIS 10901)
    Here is the MDS statement:
    <FILTER EXPRESSION="FormatNumber(Year(CurrentDate());'####')">
    <CONDITION OPERATORCONDITION="Equal">
    <CONSTANT CAPTION="1"></CONSTANT>
    </CONDITION></FILTER>
    Thank you for your help,
    Aaron

    I figured out the issue.  I cannot use formatnumber() Year() and getdate() in MDX.  I am using BO over SAP BW.  
    What I was trying to do is create a filter to automatically calculate the current month and year for a YTD filter.  I found out that the MDX YTD() function can be used but the function does not know the current date, so you have to use a prompt to have the user enter the current date.  If there is another way I am up for suggestions.
    Thank you
    Aaron

  • FRS - Prompt / Y-T-D.

    Hi,
    I have a report with numerous columns, one of which gets the current period via a prompt - to use in a column that has that periods data, several of which reference this prompt, so I do not ask the user for the same info numerous times.
    My problem is that I want to use YTD functionality in conjunction with the prompt from another column - I can find a way to use either one, but not both together - I know this should be simple, can someone help me out please - I know the what just not the how, so a step by step would be helpful...
    i.e. I want the equivalent of; -
    Y-T-D Same As Column A
    Is this possible?
    thanks,
    Robert.
    Edited by: Robert Angel on 03-May-2012 06:09

    With the layout I mention you don't need to select DTS members. See below steps to get YTD assuming that users will enter current month in the prompt.
    Insert a data column
    Click on 'functions' tab in member selection area
    Select range function
    When prompt window pop-up select start member as Jan and end member as 'current POV for period'
    *Insert a formula column and use formula with syntax [column] : ex [D] and hide the data column with range function*repeat the same steps or insert an other formula column with [D]/Column[D].countA to get average YTD value.
    Sorry if I am totally missing anything here.

  • Dynamic Time Series with Planning connection?

    Hi guys,
    I have built some reports in HFR, with a connection to a Planning application (the architect requested so). But the only way to get the YTD function properly working is using an Essbase connection (I got an error with the Planning connection).
    My question is: can reports with DTS function be built with a Planning connection? Version is 11.1.2.2.
    Could you please help me?
    Thanks!
    Lu

    Is the report showing any Planning specific content? supporting detail/ cell comments?
    If not you can use an Essbase connection. However if you do so then the way metadata is presented is going to be different (if you use planning connection then the member level security will mimic what is in Planning).
    You cannot use attributes with a planning connection too.
    Regards
    Celvin Kattookaran

  • Set-up Dynamic time series

    Hi,
    I have just tried to activate dynamic time series members in the outline.
    In the outline I can now see "Active time series members: Y-T-D behind the dimension name "Periode".
    I was in the assumption that new Y-T-D members would be created. But this is not the case.
    I want to use the YTD functionality in financial reporting. But am unable to select DTS members.
    What is the proper way to set up DTS?

    Hi,
    Proper way of setting-up Dynamic time Series is: -
    1- Define one dimension as 'Time' in outline.
    2- Select any eight predefined Dynamic Time Series members like Q-T-D, Y-T-D and associated it with any generation. For example, if you want to calculate quarter-to-date values, you enable the Q-T-D member and associate it with the generation to which you want to apply the Dynamic Time Series member.
    3- Dynamic Time Series members are not displayed as members in the database outline. Instead, Essbase lists the currently active Dynamic Time Series members in a comment on the time dimension. For Ex. Y-T-D is showing after dimension 'Period' in yourcase.
    4- When you retrieve a Dynamic Time Series member, you need to tell Essbase the time period up to which you want to calculate the period-to-date value. This time period is known as the latest time period and must be a level 0 member on the time dimension. For. Ex - For example, Q-T-D(May) returns the quarter-to-date value by adding values for April and May.
    Hope it answers you.
    Atul K,

  • Problem in discoverer  with analytic function created non-additive YTD

    I have problem with discoverer desktop which show me wrong ytdact, ytdbgt figure after i rollup/pivoting
    on custom folder i did in discoverer admin:
    SELECT a.year, a.month, c.deptno, b.glaccount, bgt.mthbgt, bgt.ytdbgt, bgt.fullbgt, bgt.lastyr_fullbgt,
    act.mthact, act.ytdact
    FROM (
    SELECT
    a.amount mthbgt,
    SUM(a.amount) OVER (PARTITION BY ...) fullbgt,
    SUM(a.amount) OVER (PARTITION BY ...) ytdbgt,
    LAG(SUM(a.amount),1) OVER (PARTITION BY...) lstyr_fullbgt
    FROM gltrans_bgt a, gl_master b, dept c
    WHERE a.glaccount=b.glaccount AND a.deptno=c.deptno GROUP BY a.year, a.month, c.deptno, b.glaccount
    ) bgt
    FULL OUTER JOIN
    SELECT a.year, a.month, c.deptno, b.glaccount,
    a.amount mthact,
    SUM(a.amount) OVER (PARTITION BY...) ytdact,
    LAG(SUM(a.amount),1) OVER (PARTITION BY...) lstyr_ytdact
    FROM gltrans_act a, gl_master b, dept c
    WHERE a.glaccount=b.glaccount AND a.deptno=c.deptno
    GROUP BY a.year, a.month, c.deptno, b.glaccount
    ) act
    ON
    bgt.year=act.year AND
    bgt.month=bgt.month AND
    bgt.deptno=act.deptno AND
    bgt.glaccount=act.glaccount
    In discoverer desktop, sometime i would like to remove deptno or month to see the rollup figure. But it seems discoverer tried to sum the ytd to give me wrong figure.
    I know that to ask oracle rewrite the query in order to roll up the figure, one may need to create dimension and specify the hierarchy for the related .
    Anyway to do on this MV so that oracle can rewrite the query for me automatically?

    I suspect if your FY runs not from Jan - Dec, then someone has had to come to grips with this before and has created some kind of custom FUNCTION to determine the fiscal year from the date entered. Or maybe a table that populated with the same info.
    Nevertheless, if there isn't one, then you'd just change the TRUNC(SYSDATE,'YYYY') logic to your fiscal year with a direct calculation.
    ie:
    calculation: what_fiscal_year
    CASE WHEN to_char(sysdate,'MMM') IN ('JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP') THEN to_char(sysdate,'YY')
    WHEN to_char(sysdate,'MMM') IN ('OCT','NOV','DEC') then to_char(sysdate,'YY')-1
    ELSE '99' END
    Something like that - I haven't tested it so treat as pseudo-code first (ie: the last to_char may need to have a to_char(to_number(to_char instead to substract the 1 but might work - Oracle's good with powerful date functions). It should give you an idea of what I'm referring to.
    So once each record has an associated FY either by a calculation such as shown or by a calculation calling your corporate FY function, you just do the same thing as described early (ie: range between FY and FY-1).
    Russ

Maybe you are looking for

  • SQL syntax for querying Active Directory group membership

    Post Author: cantrejj CA Forum: Data Connectivity and SQL I've established a connection to Active Directory through Crystal Reports XI. Now I need to write an SQL select statement to return all computer accounts and their group memberships. My statem

  • Webdynpro program name for SRM Portal

    Hi How do we know which webdynpro prog is called when i click PR item in SRM Sourcing cockpit. When i click Text/Attachment tab for the item which View or webdynpro is called? Pls guide me how to find the respective Webdynpro program for the Portal p

  • BW Portal Queries

    Good day, We are busy implementing BW queries for the SAP portal, we are trying to implement are the cockpit, 0COCKPIT_0_1, which consists of the following queries; Headcount, Headcount FTE, Entries, and Leavings. When executing the queries in the po

  • ACS v4.0 - Appliance vs. Server

    With the appliance coming into line with the server version of the ACS, what are the advantages of one over the other? I know the advantage to the engine is security hardened device. This doesn't matter to me. I want to know the advantages you have f

  • How to extract video from dvd for my website?

    Hi. i have a reel of my cinematography work that i edited on iMovie and burned to a dvd. now i want to extract that footage from the dvd and post it as a QuickTime file on my website via iWeb. how can i do this? i have toast titanium - is that any us