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

Similar Messages

  • PTD and YTD in GL

    Hi,
    I have to display accounting information on my report. I'm new to GL. Does anyone knows how to calculate PTD and YTD in GL. I need to know the technical details. I'm aware of the tables but don't know the formula to calulate PTD and YTD.
    Please help.
    Thanks and Regards,
    Ravindra

    Hi;
    Please review:
    YTD & PTD
    YTD & QTD Calculation through Calculation Script
    Regard
    Helios

  • Current Year and YTD Calculation

    Hi All,
    I have fiscal year and fiscalyear/period two time chars........in my report i want one column as current year and the other coulmn as current year YTD(year to date).........
    fiscalyear/period values are between 1 to 12
    fiscal year values 1999 to 20009.
    please help on this.......
    also how do i close a thread?
    Thanks

    Create two variables on fiscal year one with user entry and the other customer exit ....use below code
    CASE i_vnam.
      WHEN 'ZPFY'.
        DATA: Z_YEAR TYPE /BI0/OIFISCYEAR.
        IF I_STEP = '2'. "after the popup
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = '0P_FYEAR'.
            Z_YEAR = LOC_VAR_RANGE-LOW.
            Z_YEAR = Z_YEAR - 1 .
            CLEAR L_S_RANGE.
            L_S_RANGE-LOW = '1999'.
            L_S_RANGE-HIGH = Z_YEAR.  "high value = input - 1
            L_S_RANGE-SIGN = 'I'.
            L_S_RANGE-OPT = 'BT'.
            APPEND L_S_RANGE TO E_T_RANGE.
            EXIT.
          ENDLOOP.
        ENDIF.
      WHEN 'ZAPOPR'.
        DATA: Z_POSTING TYPE /BI0/OIFISCPER3.
        IF I_STEP = '2'. "after the popup
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'ZAPOPR'.
            Z_POSTING = LOC_VAR_RANGE-LOW.
           Z_POSTING = Z_POSTING .
            CLEAR L_S_RANGE.
            L_S_RANGE-LOW = Z_POSTING.
            cleaR: Z_POSTING.
            Z_POSTING = LOC_VAR_RANGE-high.
            L_S_RANGE-HIGH = Z_POSTING.  "high value = input
            L_S_RANGE-SIGN = 'I'.
            L_S_RANGE-OPT = 'BT'.
            APPEND L_S_RANGE TO E_T_RANGE.
            EXIT.
          ENDLOOP.
        ENDIF.

  • YTD calculation at product level

    Hi Friends,
    Am not sure if this is the right forum to post a BW question.
    I have a requirement to calculate YTD, however the way this has to be calculated is a different.
    We have multiple products, but for each product we have different periods(start and end period), Start period is August for all products, however the end period for each product varies.
    Product     Start period     End period
    ABC          AUG               APR
    BCD          AUG               MAR
    CDE          AUG               FEB
    The requirement is that when the user runs a report, in the selection screen if he/she selects for example a period(month) as 02.
    Then the report should show  YTD calculation from AUGUST to FEB as a total.
    Also if there are any additional values beyond the end period they should be displayed  in their respective month columns.
    Please see the example below how the report out put should be.
    Product
    Month
    No entries
    YTD
    ABC
    AUG
    100
    700
    SEP
    100
    OCT
    100
    NOV
    100
    DEC
    100
    JAN
    100
    FEB
    100
    MAR
    100
    APR
    100
    MAY
    100
    JUN
    100
    JUL
    100
    BCD
    AUG
    10
    80
    SEP
    10
    OCT
    10
    NOV
    10
    DEC
    10
    JAN
    10
    FEB
    10
    MAR
    10
    APR
    10
    MAY
    10
    JUN
    0
    JUL
    0
    Can someone please let me know how to do the above?.
    I have gone thru the forum and read threads reagrding YTD, looks like this requirement is different then the standard YTD calculations. Hence posting this.
    Regards
    BN

    Hi Kumar,
    Please tell me are the start and end periods are coming as transaction values(i.e in Target) and all the months data is available or not like continuity in the months,there should be any record with jan'14 data,no feb'14 data Mar'14 data like that.
    Regards,
    Rambabu

  • Original and current budget together with PTD,ITD,MTD and YTD labor...

    Hi experts:
    I need a Project Accounting Report that shows Original and Current budget together with PTD,ITD,MTD and YTD labor amount, labor cost, non-labor cost, and revenue on the same line for all the task_id for a project. I know these are coming from these ,PA_BUDGET_VERSIONS V, PA_RESOURCE_ASSIGNMENTS A,PA_BUDGET_LINES L, main tables. But I am unable to break down the amounts according to PA and GL periods. Can anyone help please?
    Thanks a million , in advance.

    Help you with what?
    No database version number.
    No application name or version number.
    No DDL.
    Do you, for some reason, think we have any idea what PTD and ITD are? If so why?
    Do you think we all have your version of a table named PA_RESOURCE_ASSIGNMENTS on our hard disks?
    Perhaps you have some version of e-Business Suite. Perhaps you have SAP. Perhaps you have something we've never even heard of.
    Your task is as follows:
    1. If this question relates to an Oracle product change the subject of the post to "Please Ignore" and post your question in the correct forum.
    or
    2. Provide us with sufficient information that we can duplicate those portions of your environment required to understand what you are asking.

  • Shared DateVar in Subreport and datediff calculation in Main Report?

    Hello experts,
    I am using CRXI sp2.  I have a report that contains two subreports for different dates in the same date field that are identified by a Service Code.  The subreports have been placed in the same group footer 1a to be displayed and the calculation resides in the main report group footer 1b.  The shared variables are as follows:
    whileprintingrecords;
    shared datevar Codedate5473;
    Codedate5473:={@Codedate5473};
    and
    whileprintingrecords;
    shared Datevar Codedate5623;
    Codedate5623:={@Codedate5623}
    The main report has the following calculation is in group footer 1a.
    Whileprintingrecords;
    Shared numbervar daysbetween;
    if (isnull({@Shared 5623})or isnull({@Shared 5473})) then 0
    else daysbetween:= datediff("d",{@Shared 5623},{@Shared 5473})
    This returns negative numbers as well as calculations where one of the shared variables is null.
    I reset the calculation in the report header as well.
    Thanks for your help in advance.
    Kevin

    Hi Kevin,
    I can reproduce your issue, As per my knowledge the crystal will make some issues in null value computation as well as  shared variable  computation
    In your report i can see , you tried to access values from subreport to main report through shared variable. that will make problem. we can access values from main report to subreport without any issue using shared..dont ask me the reason..i am not the right person to say that... lol.
    The another wrong thing  i was found in your formula is , you are not resetting the shared variable any where.. so once the date field is null, the shared variable returning the previous value.
    So this is the solution for you..
    1,You have to add one more subreport for displaying your result., Lets say 'Sub report3'
    and create a formula, like.(Same which you have write before for the result)
    shared datevar Codedate5473;
    shared Datevar Codedate5623;
    numbervar daysbetween;
    WhilePrintingRecords;
    daysbetween:= datediff("d",Codedate5473,Codedate5623);
    daysbetween;
    2, Re- write your first two formulas like this
    For Subreport1,
    WhilePrintingRecords;
    shared dateVar Codedate5473;
    if isnull({Codedate5473}) then
    Codedate5473:=date(0,0,0)
    else
    Codedate5473:=date({Codedate5473});
    For subreport2
    WhilePrintingRecords;
    shared dateVar Codedate5623;
    if isnull({Codedate5623}) then
    Codedate5623:=date(0,0,0)
    else
    Codedate5623:=date({Codedate5623});
    Hope this will works for you,
    Cheers,
    Salah.
    Edited by: salahudheen muhammed on Aug 7, 2009 1:05 PM

  • How is YTD calculated in bex ?

    we have a requirement to calculate YTD for revenue in a report. Just want to understand if YTD is always the current year restricted to KF or we need to consider the value from the user like 0fiscper and adjust YTD, as per the user input. I mean for example if user enter input 002.2013, then the YTD will have 2013 value or still 2014 value because YTD is current year to date.
    My reporting requirement is as below. red are colmns.
    customer           YTD revenue              Feb 2013 ( user input value- revnue will be fetch based on user input).
    But YTD will be always for current year right ? Does it depend on the user requirement ? Should I ask user or its generic, Please confirm.
    Thanks
    DR

    The reason I put this thread is to find out how is YTD calculated normally in a report. Will it be always the current year data to be displayed or it depends on the requirement. Hope you would have handled YTD in your reports, can you please clarify.
    Anyways' thanks a lot Anshu and Suman. You guys are experts and always provide prompt respone to me. and provide different approaches even on weekends. I appreciate it. Have awarded you guys full points. I will try your approach on monday will post you questions. I got the clear picture to display text for column heading and restrict 0fiscper for the data column. Will try YTD after you confirm or more inputs from the user.
    Thank You once again.
    DR

  • Exclude NULL values from SUM and AVG calculation

    Hi,
    I have column in report that contains some NULL values. When i perform SUM,MAX,MIN or AVG calculation on this column the NULL values are treated as '0' and included in calculation. Is there any way to exclude them while calculating aggregate functions? 
    As a result MIN calculation on values (NULL,0.7,0.5,0.9) gives me output as 0 when it should have been 0.5 
    Can someone please help ?
    Thanks and Regards,
    Oliver D'mello

    Hi Oliver,
    According to your description, you want to ignore the NULL values when you perform aggregation functions.
    In this scenario, aggregate functions always ignore the NULL values, because their operation objects are non-null values. So I would like to know if you have assigned “0” for NULL values. I would appreciate it if you could provide some screenshots about
    your expressions or reports.
    Besides, we have tested in our environment using  Min() function. The expression returns the minimum value among the non-null numeric values. Please refer to the screenshots below:
    Reference:
    Min Function (Report Builder and SSRS)
    Aggregate Functions Reference (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu

  • Finance report

    hi guys,
    i need to come out a finance Aging report, where the open item amount for a vendor yet to be pay.
    however, there are so many condition to retrieve the details, can any one please advice what i need to get on the condition? thanks

    Hi,
    reports for vendor open items yet to be pay
    S_ALR_87012078 - DUE DATE ANALYSIS FOR OPEN ITEMS
    S_ALR_87012084 - OPEN ITEMS - VENDOR DUE FORECAST
    S_ALR_87012085 - VENDOR PAYMENT HISTORYWITH OI SORTED LIST
    there u can give the vendor no., your company code and open items at key date( up to which date u want to take report)
    2 and 3 u can get the aging report as required by u by selecting the days of aging
    assign points if its useful
    regards
    sai krishna

  • All Inventories Value Report&Inventory Ageing Report& Current And as on Date Stock not matching

    Hello All,
    I am new to inventory. I need some help.
    After opening the periods of purchasing and inventory for the month of April'15. The below reports should match in costing.
    But they are not matching. Kindly help on this as its PROD.
    Inventory Ageing Report
    Current And as on Date Stock Statement With Value Report
    All Inventories Value Report - Average Costing
    Thanks
    RR

    MBEWH is the valuation history, this is only updated with the first movement after a period closure. And the period is a month.
    There is no table in SAP that holds the stock information on daily basis.
    You have to develope this yourself. Easiest method by copying a table like MBEW and MARD  daily to a Z-Table.
    A stock situation  at a certain date can be calculated with MB5B.
    Edited by: Jürgen L. on Aug 5, 2008 4:06 PM

  • SSAS Multidimensional Time Intelligence YTD calculation showing BLANK for Date level

    Hi there,
    I am working with SSAS Multidimensional Cube, basically I have defined a Time Intelligence calculations for just YTD in the Cube, the calculation was created in the Calculations tab of the cube as follows:
    /*Year to Date*/
        [Dimension Dim Time].[Calendar Dimension Dim Time Calculations].[Year to Date],
    [Dimension Dim Time].[Year].Members, 
        [Dimension Dim Time].[Date].Members   
      =
      Aggregate(
                 { [Dimension Dim Time].[Calendar Dimension Dim Time Calculations].[Current Dimension Dim Time] } 
                 PeriodsToDate(
                                [Dimension Dim Time].[Calendar].[Year],
                                [Dimension Dim Time].[Calendar].CurrentMember
    My Calendar hierarchy is as follows:
    Year -> Quarter -> Month -> Week -> Date
    The problem I have is that when I am at Date level I am not getting the cumulative YTD value, instead I am just getting blank cells:
    Could anyone help me defining a Time Intelligence YTD calculation that works for all levels including the Date (highlighted in yellow above)?
    Thanks and best regards,
    Joss

    The only strange thing is the MDX script, I would have used this one instead (sse below) - but if this is not the issue, I would suggest you to isolate the issue in a simpler MDX script removing any other calculation.
    Also take a look at the DateTool solution for these calculations - I really don't like the wizard provided by the development environment, it has other issues but not something that should affect your calculation:
    http://www.sqlbi.com/articles/datetool-dimension-an-alternative-time-intelligence-implementation
    /*Year to Date*/
        [Dimension Dim Time].[Calendar Dimension Dim Time Calculations].[Year to Date],
        [Dimension Dim Time].[Calendar].Members, 
        [Dimension Dim Time].[Date].Members   
      =
      Aggregate(
                 { [Dimension Dim Time].[Calendar Dimension Dim Time Calculations].[Current Dimension Dim Time] } 
                 PeriodsToDate(
                                [Dimension Dim Time].[Calendar].[Year],
                                [Dimension Dim Time].[Calendar].CurrentMember
    Marco Russo http://ssasworkshop.com http://www.sqlbi.com http://sqlblog.com/blogs/marco_russo

  • Embedded BI - Reporting Functionalities and Performances

    Hi,
    there are Reporting functionalities that are available only for Embedded BI/external BI or they are the same?
    IMPORTANT: there are differencies in Reporting on ERP Tables with Virtual Infocube use if BI is embedded/not embedded?  There are different types of access RFC, batch...?
    Points if useful.
    Thanx, Claudio

    Claudio,
    I dont know if I understood the other half of your question.
    1. Reporting on ERP tables with virtual cube.....: YES, there will be a huge performance difference if you try to access data remotely than getting the data to BI and then access.
    2. Type of Access RFC, batch: In BI you can use a feature called reporting agent / broadcasting where by the reports can be pre calculated, schedules to run in the background and even mail the result set to the users.
    I dont know if i understand your question properly.
    Ravi Thothadri

  • How to Handle Large Dumps and Complex Calculations in OBIEE

    Hi,
    We are working on some reports in OBIEE and we are unable to optimize performace. Please consider following scenerios:
    1) Detail Report
    In this particular report we have essentaily data dump. That is there are 5 Dimentions and a Fact table and we are just selecting
    fields from various Dimentions and facts. But the problem is there are over 5000 records. I guess that is making report very slow.
    Another issue is when we click on PAGE Contols, they simply dont work, that is if we click on (>>) to see all records its takes lots
    of time but show only first 25 records. Any idea what is the problem.
    2) Calculated Report
    We have one calculated report where there are 7 calculated columns. Because every column contains different Measures and we have to
    use lots of Filter expressions
    Eg: Filter (Measure1 USING {@VarDate} BETWEEN DIM1.FromDate and Dim1.Todate AND {@VarDate} BETWEEN DIM2.FromDate and Dim2.Todate AND <SOME OTHER FILTERS> )
    The Granuality of data is at employee level and there are around 1388726 records in Fact table.
    Is there is any way to optimize above except to create a summary table instead?
    kindly guide us on above scenerios

    Hi,
    Thanks for your reply, I was trying things suggested, I found that the actual physical SQL (which I can get from "Manage Session" link) run in like 4-5 seconds in Query analyzer but: when I studied SQL carefully it does not contain some fiters which we I have applied in report.
    From example i have a filter in report <Measure.Present = 1 > but in Physical SQL i cannot see that filter. However, the results it gives on dashboard are correct that is after it applies the fillter.
    Any idea why is this happening?
    My guess is because above filter is not being applied at physical sql level thats why query fetches like 20000 recors in server cache and then it applies <Measure.Present = 1 >. Thats why it might be taking time ?
    Please give me your suggestions.
    Thanks !

  • QTD and YTD Frequencies

    We will need to set up the QTD and YTD frequencies in the planning application. We have decided not to use DTS due to the reporting limitations.
    Aside from the obvious of setting up a period dimension member for each month frequency (e.g., Feb QTD, Mar QTD, etc...) with a member formula, is there a better way to set this up? We have a report that would display the MTD, QTD, and YTD data in the columns. It would be ideal if the user would only have to change the month point of view and it would update all of the columns instead of having the user update all three. I would appreciate to hear how others have set this up. Thanks!

    You can create a series of dynamic calc accounts in the period dimension. This is really not optimal because your are going to have a very large fully expanded block, but it may make the most sense due to your requirements
    and have the member formulas look like this:
    YTDFEB...Jan+Feb
    YTDMAR...Jan+Feb+Mar
    etc...
    You can also create a dynamic calc version dimension... and use more conditional logic, and try something like this (probably best from a performance standpoint as increasing your fully expanded block is going to drag down the calcs etc...). obviously this may not fit your requirements, but try it out
    IF(@ISMBR("Jan")
    IF(@ISMBR("ACTUAL")
    "Final"->"Jan";
    ELSE
    "Working"->"Jan";
    ENDIF
    ELSEIF(@ISMBR("Feb")
    IF(@ISMBR("ACTUAL")
    "Final"->"Jan"+"Final"->"Feb";
    ELSE
    "Working"->"Jan"+"Working"->"Feb";
    ENDIF
    ELSEIF(@ISMBR("Mar")
    IF(@ISMBR("ACTUAL")
    "Final"->"Jan"+"Final"->"Feb"+"Final"->"Mar";
    ELSE
    "Working"->"Jan"+"Working"->"Feb"+"Working"->"Mar";
    ENDIF
    ELSEIF .....

  • Retriving QTD,MTD and YTD

    I'm trying to write an sql script that retrive MTD,
    QTD and YTD for all children account in
    GL_Balances........How is this calculation done and
    fields to look at???
    Colums for MTD, OTD, and YTD each showing
    Actual,Budget, Prior Year Restated, Variance to
    Budget(number and %).
    I appreciate the fact the you must have spent a great
    deal of time creating SQL Statement(stopping me from
    re-inventing the wheels).
    I would be extremely grateful if you could email me a
    copy/copies of all your SQL statment.
    Regards
    Larry
    [email protected]

    Hi,
    For YTD use the following Code. Where FMYEAR is Customer Exit variable on 0CALMONTH, so restrict 0CALMONTH with Ranges []FMYEAR+3, 0CMONTH.
    0CMONTH = SAP Exit Variable on 0CALMONTH, so for MTD you just restrict 0CALMONTH with 0CMONTH Variable.
    * First Month Of Current Fiscal year comment*
        WHEN 'FMYEAR'.
    It works based on SY-DATUM.
          CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
                 EXPORTING
                   i_date               = sy-datum
    *         I_MONMIT             = 00
                   i_periv              = 'V3'
                IMPORTING
                  e_buper              =  zbuper
                  e_gjahr              =  zbdatj.
          CLEAR: l_s_range.
          l_s_range-low+4(2) = '04'.
          l_s_range-low+0(4) = zbdatj.
          l_s_range-sign = 'I'.
          l_s_range-opt = 'EQ'.
          APPEND l_s_range TO e_t_range.
    Thanks
    Reddy

Maybe you are looking for

  • 4.7EEx1.10 to ECC6.0 upgrade and Unicode conversion

    Hi Experts, We are going to initiate the upgrade from next month onwards. Subsequently i have started preparing the plan and strategy for the same. As our current setup is 4.7EEx110/Win 2003 R2-64 bit/Oracle 10.2.0.4.0 (Non unicode). And we have rece

  • JDBC TableModel problem with setValueAt

    Hello to everyone. I have problem when I change value at cell in Table. My model makes update in DB, but in GUI the change is not visible. The change gets visible only when I reopen the Table. public class CustomTableModel extends AbstractTableModel

  • What "size" is my harddrive?

    I have an old TI powerbook that kind of died last year (logic board issues). Bought a new iBook to use since then. BUT would like to take out the old TI harddrive and install it into an external enclosure to use but not sure what size enclosure I'd n

  • ORA-17085 bug jdbc update on where statement

    hi, i'm going crazy. i have this bug since 2009 and i don't know how to do. i'm sure it's a bug from jdbc oracle (because it's working with mysql) i guess it's not possible to do update on a row where this row is in the where query. 1) Resultset with

  • How to retrieve old statistics backed up in SYSAUX tablespace.

    Hi, Folks From 10g onward, Oracle stores statistics collected previously when new statistics is gathered. Old statistics can be queryed via dba_tab_stats_history. but dba_tab_stats_history view doesn't show values like histogram, rows, min, and max.