YTD on quarters?

 

Not sure about whats wrong in your code, you may wish to try the below code :
<b>Customer Exit - > YTD from Fiscal Period</b>
<b>Let ZVCCYTDX be the tech name of Customer Exit Variable & ZVCPAXRG be the user entered variable for Fiscal Year Period.</b>
User Exit: ZVCCYTDX
Input: ZVCPAXRG
Output: Jan of Accident Year Range
Logic Description:
WHEN 'ZVCCYTDX'.
if i_step = 2.
clear loc_var_range.
loop at i_t_var_range into loc_var_range WHERE vnam = 'ZVCPAXRG'.
if sy-subrc = 0.
curr_year = loc_var_range-low(4).
concatenate curr_year '001' into jan_accidentyear.
CLEAR L_S_RANGE.
L_S_RANGE-LOW = jan_accidentyear.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
append l_s_range to e_t_range.
exit.
**endif.
endloop.
endif.
Coding is not required if you can enhance the Datatarget with Fiscal Year and Posting Period.

Similar Messages

  • How to add members for existing outline

    Are there any ways to add year members(jan,feb,mar...)
    every year to an existing outlines other than manually adding.

    The choice to use 2 dimensions (Years,Months) or a single dimension with months rolling up to years really depends on the purpose of the App. For many accounting related apps, it's preferable to have the information in 1 dimension so that YTD and quarterly rollups are simpler - instead of being a combination of members across 2 dimensions.
    I would recommend making a simple Excel file with 2 columns - first column has your Year, second column has your month. Save it as a txt file, then use a dimension build load rule to build the children.

  • Best way to set up a custom table using dates ytd, quarters, months

    Hello-
    I did post this on the crystal forum however it really involves setting up a good structured table in order to get the data to report on which I think we need to change which is why I'm posting here.
    I am not a dba but I work with crystal reports and we are working together to get data in tables that we can report on.  We are in the process of creating a data warehouse, which will mainly be summarized data we are exporting out of our legacy system and importing into a mysql database.  Most of this data will be summarized by month, quarter and year.  We will have multiple years of data.  A lot of the reports we will be creating will be in a comparison manner such as 2009 vs 2008 or Jan this year compared to Jan last year or list out sales by month Jan-Dec 2009.  I would like this data to be easily displayed on a report in a side by side manner.  To get this result, what is the best way to structure the data in the tables on a monthly, quarterly and yearly basis?  Right now weu2019ve got one field in the table called date (which is a string) which is listed like:
    Date
    2008YTD
    2009YTD
    2009Jan
    2008Jan
    Is it best to break out the date information so that on the report side it will be easier to work with?  Also should this be set up in the table as a date instead of a string?  If so how do you account for a YTD date?  Are we going to need 2 dates, a start and end date to achieve ytd or qtd information?  Do you recommend creating just a date table and if so how would that be structured?
    So for reporting purposes, using crystal reports, I would like to display comparison data on a report side by side, for this example this year goals compared to last years goals by goal code A-Z (which is a credit code, goals are for the # of credits by code for the year).  The end result I would like is to look like this:
    code   2009 goal   2008 goal
    A        25              20
    B        50              60
    C        10              15
    However the data looks like this (displaying all of the 2009 data first then the 2008 data, not side by side which is how it is in the table):
    code   2009 goal   2008 goal
    A        25
    B        50
    C        10
    etc to Z
    A                          20
    B                          60
    C                          15
    Right now the data is structured in the table like:
    Code  Goal  Date (this is currently a string in the db)
    A        25     YTD 2009
    B        50     YTD 2009
    etc. A-Z for 2009 then:
    A        20      YTD 2008
    B        60      YTD 2008
    Any thoughts on strucuting a table would be appreciated.  thanks.

    Jennifer,
    Most of the DW examples I've seen use a dimDateTime table in the database. That table has multiple columns related to the specific time... For example, here are the columns that are in the, SQL Server sample database, "AdventureWorkdDW"... "DimTime" table
    COLUMN_NAME             COLUMN_INFO
    TimeKey               (int, not null)
    FullDateAlternateKey     (datetime, null)
    DayNumberOfWeek          (tinyint, null)
    EnglishDayNameOfWeek     (nvarchar(10), null)
    SpanishDayNameOfWeek    (nvarchar(10), null)
    FrenchDayNameOfWeek     (nvarchar(10), null)
    DayNumberOfMonth     (tinyint, null)
    DayNumberOfYear          (smallint, null)
    WeekNumberOfYear     (tinyint, null)
    EnglishMonthName     (nvarchar(10), null)
    SpanishMonthName     (nvarchar(10), null)
    FrenchMonthName          (nvarchar(10), null)
    MonthNumberOfYear     (tinyint, null)
    CalendarQuarter          (tinyint, null)
    CalendarYear          (char(4), null)
    CalendarSemester     (tinyint, null)
    FiscalQuarter          tinyint, null)
    FiscalYear          (char(4), null)
    FiscalSemester          (tinyint, null)
    Then all of the fact table receive their date stamps by linking back to this table, using the TimeKey as a foreign key.
    HTH,
    Jason

  • BPC 7.5NW SP8 PERIODIC APP–EVDRE TOTALS USING YTD MEASURE ARE INCORRECT

    Hello u2013
    I have 4 application sets with periodic applications in which all measures are set up exactly the same in BPC 7.5 NW SP8. Time in each of the appsets includes months, quarters, seasons and year. Measures include Periodic, QTD, STD, YTD and Rolling12. All measures work correctly with the exception of one application in which the YTD measure is summing incorrectly. This issue exists in both the DEV and PROD environments for this application.
    The Time dimension is maintained using fiscal years. The fiscal yearu2019s months run from February -> January. Time uses the same setup in all 4 appsets.
    The following steps have been taken in an attempt to fix this issue:
    1.     Verified the Time dimension hierarchy and levels are set up correctly
    2.     Cleared client cache
    3.     Deleted Time dimension .xls, .xlt and .xml files from the BW and re-processed the dimension
    4.     Ran light and full optimizations
    5.     Verified the formula in the BW for this app is the same as the formula in the other apps
    6.     Refreshed client-side dimension files
    7.     Used the How-to-guide u201CHow to Maintain Measure Dimension for BPCu201D and verified the UJA_FORMULA_APP table and UJA_API_DATA_CHECKER function module are maintained automatically and no missing entry messages exist
    8.     Deleted the PARENTH1 hierarchy from the Time dimension, processed, added the hierarchy back into the member sheet and re-processed
    9.     Updated application description and modified application
    Has anyone else had this problem? Any assistance in resolving this issue will be most appreciated.
    Thanks,
    Carrie
    YTD Measure Formula:
    MEMBER [MEASURES].[YTD] AS 'IIF([%ACCT_TRANS%].CURRENTMEMBER.PROPERTIES("2/CPMB/ACCTYPE")="INC",SUM(PERIODSTODATE([%TIME%].[LEVEL00], [%TIME%].CURRENTMEMBER),-[MEASURES].[/CPMB/SDATA]),IIF([%ACCT_TRANS%].CURRENTMEMBER.PROPERTIES("2/CPMB/ACCTYPE")="EXP",SUM(PERIODSTODATE([%TIME%].[LEVEL00], [%TIME%].CURRENTMEMBER),[MEASURES].[/CPMB/SDATA]),IIF([%ACCT_TRANS%].CURRENTMEMBER.PROPERTIES("2/CPMB/ACCTYPE")="AST",([MEASURES].[/CPMB/SDATA], CLOSINGPERIOD([%TIME%].[LEVEL03])),IIF([%ACCT_TRANS%].CURRENTMEMBER.PROPERTIES("2/CPMB/ACCTYPE")="LEQ",-([MEASURES].[/CPMB/SDATA], CLOSINGPERIOD([%TIME%].[LEVEL03])),-[MEASURES].[/CPMB/SDATA]))))';SOLVE_ORDER=3
    *EVDRE RESULTS     *
    MONTH         YTD     
    FY2010 FEB     128,790,195      
    FY2010 MAR     214,054,796      
    FY2010 APR     63,828,203      
    FY2010 MAY     445,898,233      
    FY2010 JUN     377,079,009      
    FY2010 JUL     288,502,058      
    FY2010 AUG     517,947,504      
    FY2010 SEP     678,612,886      
    FY2010 OCT     593,190,135      
    FY2010 NOV     879,439,971      
    FY2010 DEC     784,580,667      
    FY2010 JAN     949,300,083      
    FY2010 TOTAL     949,300,083      
    TIME DIMENSION                 
    ID     PARENTH1     LEVEL     MONTHNUM     TIMEID
    2010.FEB     2010.Q1     MONTH     1     20100100
    2010.MAR     2010.Q1     MONTH     2     20100200
    2010.APR     2010.Q1     MONTH     3     20100300
    2010.MAY     2010.Q2     MONTH     4     20100400
    2010.JUN     2010.Q2     MONTH     5     20100500
    2010.JUL     2010.Q2     MONTH     6     20100600
    2010.AUG     2010.Q3     MONTH     7     20100700
    2010.SEP     2010.Q3     MONTH     8     20100800
    2010.OCT     2010.Q3     MONTH     9     20100900
    2010.NOV     2010.Q4     MONTH     10     20101000
    2010.DEC     2010.Q4     MONTH     11     20101100
    2011.JAN     2010.Q4     MONTH     12     20101200
    2010.Q1     2010.STD1     QUARTER     3     10000001
    2010.Q2     2010.STD1     QUARTER     6     10000002
    2010.Q3     2010.STD2     QUARTER     9     10000003
    2010.Q4     2010.STD2     QUARTER     12     10000004
    2010.STD1     2010.TOTAL           6     10000005
    2010.STD2     2010.TOTAL           12     10000006
    2010.TOTAL           YEAR     12     10000007

    Hi Carrie,
    Your configuration looks OK to me. Can you provide us the output of the same EVDRE using the Periodic measure? Also, have you raised a customer message with SAP?
    Ethan

  • MDX YTD until previous month - problem for january

    Hello,
    I have a Time hierarchy YQMD
    I want to make an MDX calculation that  gives me the YTD until the previous month.
    I did this with formula:
    I first made a 'normal' ytd calculation resulting in 'MyMeasureYTD'
    sum
    (YTD([Time].[Years Quarters Months Weeks Days]),[Measures].[MyMeasure])
    and then I use the following formula
    ParallelPeriod([Time].[Years Quarters Months Weeks Days].[Months]),[Measures].[MyMeasureYTD]
    this works fine for all months except for january: when the selected month is 'january' (of any year) , the result should be NULL, instead of the YTD until december of the previous year (which is what the formula above gives me).
    I have tried with using an iif in the formula that checks on currentmember being the firstchild, but I don't seem to get the required result.
    I would be very gratefull for your help!
    kind regards
    Sylvie

    Hi Sylvie,
    Please refer to the MDX below with AdventureWorks sample:
    with member [x]
    as
    iif([Date].[Calendar].currentmember is
    Ancestor([Date].[Calendar].currentmember,3).firstchild.firstchild.firstchild,
    "NULL",[Measures].[Internet Sales Amount])
    select [x] on 0,
    [Date].[Calendar].[Month].members on 1
    from
    [Adventure Works]
    In my scenario, the hierarchy of Date Calendar is Year->Half Year->Quarter->Month->Day. So my Ancestor() function need to step back 3 levels. If you date hierarchy is Year->Quarter->Month->Day. It should be:
    Ancestor
    ([Date].[Calendar].currentmember,2).firstchild.firstchild
    If you have any question, please feel free to ask.
    Regards,
    Simon Hou
    TechNet Community Support

  • Wrong data values displayed for YTD in reports

    Hi,
    In my reports when i try to select measures as YTD, eg. March 2010 YTD, i get wrong values for entities. But, apart from YTD, i get absolutely correct values if i select measures as anually, quarterly or monthly.
    I have checked ISBEGINNING property in time dimension and assigned values as 0 and 1 for the respective values. I have also checked if i have any wrong statements in dbo.measureformula in SQL server Management studio which might give wrong calculations but could not find any.
    Please guide me through.
    Many thanks in advance.
    Regards,
    Poonam

    HI Nilanjan,
    Thanks for your suggestions but i do not have any data in Apshell to test if it is being displayed correct or not.
    Please advice me further.
    Regards,

  • Setting in BEx formula for calculation of YTD and MAT

    Hi,
    I have to implement 2 formulae in BEx.
    As I am trying to avoide ABAP coding, can anyone please suggest SETTINGS in BEx FORMULA to achieve these below mentioned 2 formulae -
    1 ) Calculate YTD - Average of the sum of the reported quarter values from the start of the year until and including the selected quarter. But, if we enter Quarter 3 and there is no data for quarter 2 then the average should be equal to sum of data for Q1 and Q2 divided by 2 instead of 3 even though user entered Q3.
    2) Calculate MAT - Average of the sum of the reported quarter values for the last 4 quarters. We need to check last 4 quarters. If data is present only for 3 quarters in the last four quarters then the MAT will be data for 3 quarters divided by 3.
    Please suggest BEx formulae settings, if any for the above calculations.
    Thanks a lot.
    Regards,
    Prerna

    Hi
    I am not sure requirement related YTD is possible without customer exits variable
    But regarding your 2nd requirement
    Calculate MAT
    Create four restricted key figures by using offset (0, -1, -2, -3) and restriction characteristic will be quarter.
    Create a calculated key figure "Count of Quaerter". This will consist of "Number of rows" key figure with exception aggr on the Quarter characteristic and aggr will be "Count for all not eq to 0".
    Create a calculated key figure which will be sum of four restricted key figures divided by Count of Quarter.
    Kindly let me know incase further details required
    Best Regards
    Rohit

  • YTD Dyna Calc calculation without DTS, problem whith other Dyn.Calc members

    Hello,
    I guess my problem is a very classic one :
    I want to use a specific dimension member to calculate Year to date (and not DTS for severals reasons).
    That's not the first time I'm doing this but I've a problem when I cross two Dynamic Calc members :
    I've too much data (i.e incorrect data value).
    I'm working with a classic Time Periods Dimensions. 12 Months in Never share/Addition. and Quarter and Semester in Dynamic Calc/Addition.
    and a dimension View with have One member "monthly" (which means "not cumulated"). And one member YTD in Dynamic Calc.
    I've tried these two formulas for the YTD member :
    @ACCUM("monthly", @CURRMBRRANGE ("Time", GEN, @CURGEN("Time"), , 0));
    @ACCUM("monthly", @RELATIVE("YearTotal", @GEN(@CURRMBR("Time"))));
    In "monthly" all is okay (Months, Quarters, Semesters)
    If I cross months (M01, M02 ...) with YTD it's okay.
    If I cross Quarters or Semesters with YTD (that is to say two Dynamic Calc), I've two much data (i.e data is incorrect). But I don't understand why.
    Is someone can explain what's happening or how to "workaround" it ?
    Best regards

    I've put my YTD member in "Two Pass Calc", and it seems to work better.
    I think my problem the evaluation order of my two pass calc :
    my dimension View (with YTD) is evaluated before my Time Dimension.
    But I don't understand why ??
    Because if the Evaluation order is always the same even if I changer the order of my dimensions in the outline or if I change the Evaluation order in Planning ??
    Is someone have an idea ?
    Thanks

  • Monthly FX conversion for months and quarters

    Hi,
    I have a scenario whereby my entities enter (YTD) data monthly. The FX conversion is defined with the "apply periodic" option, so it should work out the periodic change and apply the FX rate to that change. This works absolutely fine.
    I now need to add entities that only enter data on a quarterly level. If I simply let them enter data in periods MAR, JUN, SEP and DEC the FX converison won't work, since it will work out the monthly change rather than the quarterly.
    I though about in my time dimension having months (JAN to DEC) and quarters (Q1 to Q4) as base level elements all adding into the year. I would give JAN and Q1 a value of 1 for IS_BEGINNING.
    Should this work and calculate the correct FX conversion for my quarterly data?
    Thanks,
    Arnold

    Yes, it did work the way I thought

  • Custom YTD/TOTALS

    Hi all,
    I would like to customize the YTD & TOTAL inner calculations depending on the account type.
    For example, if I want the TOTAL or YTD sales I want that BPC calculates it as a sum of the different periods (this is what I understand is standard calculation).
    In the other side, if I want the Customer end of period TOTALS or YTD, I don't want BPC to accumulate from Jan to Dec (it should be great for my company results, but it's not the reality), I'd like to use a custom calculation that takes previous period data (for example Dec-08 if I am asking for the 2008 totals or DEC YTD).
    Can I customize it by using a business rule or is it better to create a mdx logic? I have allready created a mdx Logic, but it takes a long time to calculate the data.
    I'd apreciate if someone can help me on this issue or if someone has another possible solution.
    Thanks in advance for all your help.

    I am not sure if I completely follow your question, but I have a suggestion.  If you are using BPC 7M SP3 or higher, you may have more than 1 TIME HIERARCHY.  So it would be possible to have a Calendar view and a seperate view based on a different set months to quarters, years etc.
    If that doesn't solve your question, then I would look into building a custom MEASURE that would be executed on all sets of data for certain applications.  There is a How To Guide that has example of building a custom Measure for reporting purposes on SDN.
    Hope this helps.

  • YTD data for PnL Accounts

    Hi All,
    Need some advise on these.
    Our period dimension is Jan-Dec, however, the subsidiaries submit the data only in March, June, September and December.
    We set the DefaultFrequency to MTD, DefaultView to YTD, MissingData0ViewForNonAdj is YTD and MissingData0ViewForAdj is Periodic.
    The data that we load for BS and PnL accounts are all in YTD and we consolidate in YTD (ConsolidateYTD is Yes).
    Now we have situation where one of our entity is sold on December 2010.
    Since the setting zeroview for actual scenario is set to YTD, we are expecting that when we check the december period, the PnL accounts for this entity is in the system with the same amount of september data.
    However, the PnL account show 0 data, even if we select the View to YTD.
    And when we run the consolidation, the PnL data for this entity is not aggregated to the total consol due to the unavailability of the YTD data.
    Is it normal behavior of HFM? Is there any explanation about this?
    Many thanks.
    Regards,
    Indra

    What you see is based on the application design -- specifically the scenario settings. You need to understand the MissingDataAsZero settings. What you describe is the norm for a scenario where these settings are "YTD". That is, you've told HFM to interpret missing data as a YTD zero. In this case, HFM will derive a negative Periodic value in order to arrive at a zero YTD value.
    This is only one of your worries in my opinion. If you have foreign currency entities which only load quarterly rather than monthly, you have a translation problem if you use PVA for flow accounts (app setting) which is the most common configuration. In this case, the P&L accounts loaded only to the last periods of each quarter will use only that period's average rate for all of the activity, rather than the period in which the activity really took place.
    --Chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • YTD view in Periodic application

    Hi Experts,
    I got an answer from SAP Korea, the YTD is only available for quarter in BPC 7.5 NW in periodic application.
    IS IT TRUE???
    If it is just for BS, sounds OK since usually we get BS quarterly, but for PL, it should support monthly YTD view. Could you please copy and paste the measure(MDX) that BPC 7.5 NW uses?
    Regards,
    YH Seo

    Hi,
    May be the message didnt come up properly or was intended for something else. You can definitely view the YTD values for months also. You can see the measures in the SAP Program "UJA_MAINTAIN_MEASURE_FORMULA".
    There is a how to guide on SDN - "Create Customer measure formulas for Fiscal Periodic, QTD and YTD"
    Hope this helps.

  • YTD and QTD report issue

    Hi Experts,
    we have a timebyweek dimension, where week members are base members and on top of that i have month, quarter, year as parents. Also I need to load some data at month level so I have created another hierarachy with month.input members as base. Ex: 2012.Feb.input
    In the reports my Evgets for YTD works fine for normal members but YTD for month.input members for last quarters are calculating wrongly. we follow retail year calender which starts with feb and ends with Jan. so my last quarter is nov, dec, Jan.
    I have tried using ISbegining property setup to feb as 1.
    Any suggestions greatly appreciated. Thanks in advance for help.
    Please let me know if you need any more information.

    Hi Hari,
    For the ISBEGINNING property, this value should be set to 1 for periods that correspond to the beginning of a year (such as Q1 or January, for instance) in all Time dimensions that incorporate YTD calculations. Set this value to 0 for all other periods.
    i.e.
    ID,ISBEGINNING
    2011.TOTAL,1
    2011.Q1,1
    2011.Q2,0
    2011.Q3,0
    2011.Q4,0
    2011.JAN,1
    2011.FEB,0
    2011.MAR,0
    2011.APR,0
    2011.MAY,0
    2011.JUN,0
    2011.JUL,0
    2011.AUG,0
    2011.SEP,0
    2011.OCT,0
    2011.NOV,0
    2011.DEC,0
    Also, make sure your ISBEGINNING property is checked off as "INAPP"
    Thanks,
    John

  • FR : How to change from monthly to YTD or quarter data in the same report

    Hi,
    We have several basic reports with 12 month in columns with monthly figures. We would like to try to improve these reports with 2 options (and not creating new reports):
    - For each month, we would like to choose between monthly & year to date figures. (we do not have a view dimension with YTD member)
    - In our period dimension we also have quarter members. How to choose between displaying month or quarter with the prompts ? (ie without having to select each month one by one)
    Does it is possible to do this with FR without adding a new dimension for monthly or YTD data?
    thanks!
    Tipiak

    Hi Tipiak,
    In order to show YTD Actual figure for the selected month, I was doing something like that
    - Add a hidden col from Jan to Run Time period selected.
    - Add a visible formula col and add the formula showing the total of the hidden col.
    Your requirement seems more complex but you might meet some part as an initial step maybe...
    Regards,
    Ahmet

  • YTD, MTD, Prior Year, Prior Month calculations in SAP BW Universe

    I am finding the SAP BW based universe a totally different animal so far and my question comes from my inexperience in this domain.
    In a normal universe, one can use CASE Statement and Calendar or Time table to help do these calculations. Since BW based universes are based on a super BEx query, how are these calculations done in the universe? Are these calculations done in the BEx query itself?
    Are there any standards of what should be handled on the BEx side vs. what should be handled on the Universe side?
    Also, what's the syntax of a CASE statment or using Substring (or similar function) in a BW universe?
    Thanks!

    Hi,
    You can define calculated measures in OLAP universes using MDX language.
    To define a Calculated Measure, users must create manually new Measures in the Universe.
    Calculated Measures definitions are using MDX functions embedded in XML tags.
    In order to create calculated measures, users must to create pure MDX expression emclosed in XML tags: <EXPRESSION></EXPRESSION>
    In this new expression, we authorize to use any Designer function such as:
    u2022     @SELECT
    u2022     @PROMPT
    u2022     @VARIABLE
    The check integrity will validate the XML syntax and any of the Designer functions described above.
    No MDX parser is provided in this version of Universe Designer.
    This paragraph describes how to define calculated measures in MDX and using @Select and @Prompt functions.
    CASE statement is not supported in MDX but you can use IIF statement instead of.
    It is important to notice that the result of a calculated measure/member in SAP BW (using MDX) must be numeric due to a current limitation f the SAP MDX engine.
    Here is 2 samples of an MDX expression using YTD:
        <EXPRESSION>
    SUM(YTD(@Select(Key Figures\Billed Quantity
    </EXPRESSION>
        <EXPRESSION>
    SUM(YTD([Measures].[D3B1M57O3MN5499LF2X9UNHKA]))
    </EXPRESSION>
    Regards,
    Didier

Maybe you are looking for