Sum up years?

Hi - is it possible to sum up two accounts across 3 years?
this is the concept..
new_value = account1 + account2 + Fy09 + fy10 + fy11
thanks

The below is my calc script. I know that most of the VARs are getting the correct values, because I assign them to a month to see the output and they come out correct. The real_m2 to real_m3 are just tests to make the years sum up with the two VARs. The entire calc script works until it gets to real_m. This is the statement where I am trying to add all the years and 2 Vars together and put the total into 1 year that I appointed, but it just puts the values into the Years that they are originally from.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
var avail_my; var avail_y; var expir_my; var expir_y;
var new_avail_m; var new_avail_y; var new_expir_m; var new_expir_y;
var real_m; var real_m2; var real_m3; var real_m4;
var real_y;
FIX (Estimate3,Sandbox,FY09,FY10,FY11,A,MGM,@UDA (Titles,"MGM"))     
     "W1-Date"
(           /* gets the midpoint month */
     avail_my=@MAX(@INT("Available Date"->SHO / 100));
     avail_y=@INT(avail_my / 100)*100;
     new_avail_m=avail_my - avail_y;
     expir_my=@MAX(@INT("Expiration Date"->SHO / 100));
     expir_y=@INT(expir_my / 100)*100;
     new_expir_m=expir_my - expir_y;
                         /* @TRUNCATE */
     real_m= ((new_avail_m + new_expir_m )/2) - @REMAINDER((new_avail_m + new_expir_m )/2); /*Suppose to sum FY09:FY11 and new_avail_m and new_expir_m */
     real_m2= @SUM(FY09:FY11) + real_m; /*test */
     real_m3= @SUM(FY09:FY11) + new_expir_m;     /*test */
     real_m4 =(real_m3 + real_m2)/2;               /*test*/
     jan->sho->"amort amount"->"W1-PR"=avail_my;
     feb->sho->"Amort amount"->"W1-PR"=avail_y;
     mar->sho->"amort amount"->"W1-pr"=new_avail_m; /*10 */
     apr->sho->"amort amount"->"W1-PR"=expir_my;
     May->sho->"amort amount"->"W1-PR"=expir_y;
     jun->sho->"amort amount"->"W1-pr"=new_expir_m; /* 4 */
     Jul->sho->"amort amount"->"W1-PR"=real_m;     /* 7 */
     FY10->Dec->sho->"amort amount"->"W1-PR"=real_m4;     /* 7 */
     FY10->Nov->sho->"amort amount"->"W1-PR"=real_m3;
     FY10->Oct->sho->"amort amount"->"W1-PR"=real_m2;
ENDFIX

Similar Messages

  • Query takes much time while sum of yearly bases amount

    I have made query on the basis of joing to get payroll data it's woking fine but when we accumulate this on yearly basis while giving parameter from and to date then it takes much time, so how can we optimise this.
    please advice.

    this is query
    SELECT paa.assignment_id,MAX(EFFECTIVE_DATE) effective_date,
    paypa.business_group_id,paypa.payroll_id,
    nvl(SUM(decode(pet.element_type_id,10,decode(pivf.name,'Pay Value',TO_NUMBER(NVL(prrv.result_value, 0))))),0) AMOUNT
    FROM pay_assignment_actions paa,
    pay_payroll_actions paypa,
    pay_run_results prr,
    pay_element_types_f pet,
    pay_element_classifications pec,
    pay_run_result_values prrv,
    pay_input_values_f pivf
    where paypa.payroll_ACTION_id = paa.payroll_ACTION_id
    AND prr.assignment_ACTION_id = paa.assignment_ACTION_id
    AND paypa.action_status = 'C'
    AND paa.action_status = 'C'
    and paypa.action_type in ('Q','R')
    AND pet.element_type_id = prr.element_type_id
    AND pec.classification_id = pet.classification_id
    AND pivf.input_value_id=prrv.input_value_id
    AND prr.run_result_id = prrv.run_result_id
    AND pivf.element_type_id = pet.element_type_id
    AND paypa.effective_date BETWEEN pivf.effective_start_date AND pivf.effective_end_date
    AND paypa.effective_date BETWEEN pet.effective_start_date AND pet.effective_end_date
    AND paypa.effective_date between to_date('01-JUL-2010') AND TO_DATE('30-JUN-2011')
    group by paa.assignment_id,paypa.business_group_id,paypa.payroll_id
    any idea for this ,how can we improve performance,althoug it's woking fine without using group by function
    Edited by: oracle0282 on Mar 31, 2011 11:36 PM

  • Help Needed to Sum Column in Fixed Table

    I am new to LiveCycle.  I need to sum a column in a fixed table.  My rows are summing correctly.  I have tried every formula on the web both in FormCalc and Javascript.  I've cut and pasted script from Adobe templates and from forms on the web.  Nothing is working.  Each change produces a new set of errors.  The Hierarchy is:  (untitled Subform) (page 2), Table 2, Header Row {Header Row contains Year 1, Year 2...Year 5}, Row1 {Row1 contains Text Title, Cell2, Cell3, Cell4, Cell5, Cell6, (untitled Numeric Field) which is a calculated sum of Years 1-5}, Row2, Row3...Row7 are exactly the same.  I want to calculate the sum of each column in the footer row but I keep getting script errors.

    I am new to LiveCycle.  I need to sum a column in a fixed table.  My rows are summing correctly.  I have tried every formula on the web both in FormCalc and Javascript.  I've cut and pasted script from Adobe templates and from forms on the web.  Nothing is working.  Each change produces a new set of errors.  The Hierarchy is:  (untitled Subform) (page 2), Table 2, Header Row {Header Row contains Year 1, Year 2...Year 5}, Row1 {Row1 contains Text Title, Cell2, Cell3, Cell4, Cell5, Cell6, (untitled Numeric Field) which is a calculated sum of Years 1-5}, Row2, Row3...Row7 are exactly the same.  I want to calculate the sum of each column in the footer row but I keep getting script errors.

  • Display sum in matrix format

    Hi all,
    I have a table contains data in following format
    year style jan feb mar
    2001 a 10 5 6
    2002 a 5 5 6
    2003 a 10 10 6
    2004 a 5 6 6
    for this detail I want to create view that should have a structure as following
    style 2001 2002 2003 2004
    a 21 16 26 17
    any clue how I can achive this?

    scott@ORA92> -- test table and test data:
    scott@ORA92> SELECT * FROM your_table
      2  /
          YEAR S        JAN        FEB        MAR
          2001 a         10          5          6
          2002 a          5          5          6
          2003 a         10         10          6
          2004 a          5          6          6
    scott@ORA92> -- create view:
    scott@ORA92> CREATE OR REPLACE VIEW your_view AS
      2  SELECT style,
      3           SUM (DECODE (year, 2001, jan + feb + mar)) AS "2001",
      4           SUM (DECODE (year, 2002, jan + feb + mar)) AS "2002",
      5           SUM (DECODE (year, 2003, jan + feb + mar)) AS "2003",
      6           SUM (DECODE (year, 2004, jan + feb + mar)) AS "2004"
      7  FROM   your_table
      8  GROUP  BY style
      9  /
    View created.
    scott@ORA92> -- select from view:
    scott@ORA92> SELECT * FROM your_view
      2  /
    S       2001       2002       2003       2004
    a         21         16         26         17

  • Calculate gross profit, yearly sales,monthly sales,weekly sales?

    hi all
    i try to create procedures according to these conditions 
    What are my yearly sales?
    What are my monthly sales?
    What are my weekly sales?
    What are my daily sales?
    What is my Gross Profit?
    What is my Gross Sales?
    this is star schema
    now how i calculate yearly sales, monthly sales, and also gross profit.
    create procedure spgrossprofit
    as
    select as grossprofit from dimfact
    now which aggregate function i use for calculate above conditions?
    any help?

    Sorry(ETC) is a Spanish expression = the same for the next option
    The correct query:
    Year/Month
    create procedure spyearlysales
    as
    select sum(totalsales),Year(Dimtime.date) from Dimtime
    inner join Dimfact on Dimtime.Time_Key=dimfact.Time_Key
    group by Year(Dimtime.date)create procedure spmonthsales
    as
    select sum(totalsales),year(Dimtime.date),Dimtime.Month from Dimtime
    inner join Dimfact on Dimtime.Time_Key=dimfact.Time_Key
    group by Year(Dimtime.date),Dimtime.Month
    JM Claudio Dba/Consultor SQL/BI Pasiona - Spain

  • Aggregation for all the year

    Hello all
    We are using oracle express 6.3.4 for Cube Buildind using RAA/RAM.
    in our project the time dimension structure is as given below.
    Year>Quarter>Month
    we have measure called Number of Establishments Registred and Pension AMount Paid
    Number of establishments registred measure is shown as on date. AMount is also shown in for that year.
    for e.g
    year No.of Establishments Pension Amount paid
    1421 20 5000
    1422 25 10000
    1423 30 20000
    1424 36 25000
    1425 40 30000
    I would like to know the how do i get the Pension amount paid till 1425. ( which is sum of years 1421 to 1425). In OLAP how this can be done. Is there a way this can be done without altering the structure of Time dimension.
    Pls. suggestme
    THanks
    Narasimha

    I am not exactly clear on what you are asking. I don't think it matters whether it is RAA/RAM or not but you could use the Express movingtotal function or the total function with a related dimension. It depends on how you are using the results.

  • MDX - Average of months values for quarters, semesters and years

    Hello,
    I would like to aggregate month values in MDX query to get quarter, semester and year ones.
    The problem is that "SUM" is used by default, but I want the "average" for quarter, semester and year values.
    Example (AVG columns are expected, not SUM ones) :
    Year
    Month
    Value
    sum Q
    avg Q
    sum S
    avg S
    sum Y
    avg Y
    2011
    1
    130,71
    416,58
    138,86
    843,66
    140,61
    1499,33
    136,30
    2011
    2
    146,71
    2011
    3
    139,15
    2011
    4
    133,51
    427,08
    142,36
    2011
    5
    147,14
    2011
    6
    146,43
    2011
    7
    128,58
    373,59
    124,53
    655,67
    131,13
    2011
    8
    109,98
    2011
    9
    135,03
    2011
    10
    135,83
    282,09
    141,04
    2011
    11
    146,27
    2011
    12
    NULL
    Thanks for help.

    Hi Unkedeuxke,
    As Ken said, we do not have a measure Average aggregation type in SQL Server Analysis Services. We do have AverageOfChildren (or Average over time), however it is semi-additive and works only along a Time dimension. Fortunately, we have Sum and Count, and
    since Average = Sum / Count, we can build our own Average aggregation when we need one. Here is a blog about how to create a average measure, please refer to the link below.
    Average Aggregation in Analysis Services
    Regards,
    Charlie Liao
    TechNet Community Support

  • A Report for top spent with Given Sitecode and Year

    Customer Code
    Name
    Spent2011
    xyzaa
    Jon
    700.00
    nmcb
    Stuart
    400.00
    bncx
    Prakash
    300.00
    nmsd
    Srinu
    200.00
    opkls
    Kumar
    90.00
                      Table above as retrieved data For
       Site 01
    Rank the customers by top spent for 2011 or 2012 or 2013 or 2014
    Ex: A Financial year 2011 to be considered between the dates April 1<sup>st</sup> 2011 and Marc 31<sup>st</sup> 2012
    Customer table has the complete details of the customer 
    and with unique customer code
    Order Table has the details of the order placed and the Order Placed Date
    Order Item Table has the Gross   price of each Item.
    Site Table can be joined with Order Table (has a common column)
    A  T-SQL query for  the SSRS report needs to be build with Inputs  site code and Year

    Hi Visakh,
    Please find the below script
    --DECLARE @CustomerId varchar(255) = 'XX03045651';
    DECLARE @STOREID VARCHAR(10) ='XX01'
    SELECT
           OrderNumberStr,
           CustomerCodeStr
    INTO
           #Sales
    FROM
           OrderTable
            lEFT JOIN
     SiteShopTable
           ON
    SiteShopTable.SiteCodeStr=LEFT(Ordertable.OrderNumberStr,4)
    WHERE
           LEFT(Ordertable.OrderNumberStr,4)= @StoreID
                                AND
           LEFT(Ordertable.OrderedAtSiteCodeStr,4)=@StoreID
    SELECT
           #Sales.CustomerCodeStr,
           SUM(OrderItemTable.FinalPriceGrossMoney) AS TotalSpend,
           SUM(OrderItemTable.QuantityOrderedInt) AS NoOfItems
    --INTO
         --  #Spenders
    FROM
           OrderItemTable
           INNER JOIN
           #Sales ON OrderItemTable.OrderNumberStr = #Sales.OrderNumberStr
    GROUP BY
           #Sales.CustomerCodeStr
    ORDER BY      
           TotalSpend DESC
    SELECT
           distinct OrderTable.CustomerCodeStr,  
           '2014'=
           Case
           when year(Ordertable.OrderPlacedDateSdtm) = '2014' THEN sum(isnull(TotalSpend,0))  end,
           '2013'=
           Case when year(Ordertable.OrderPlacedDateSdtm) = '2013' THEN sum(isnull(TotalSpend,0)) end,
           '2012'=
           Case when year(Ordertable.OrderPlacedDateSdtm) = '2012' THEN sum(isnull(TotalSpend,0)) end ,
            'Before2012'=
           Case when year(Ordertable.OrderPlacedDateSdtm) < '2012' THEN sum(isnull(TotalSpend,0)) end
             --SUM(IF(year(Ordertable.OrderPlacedDateSdtm)=2010,orderitemtable.FinalPriceGrossMoney,0)) AS fy_2010
       --  , SUM(IF(fy.year=2011,i.invoiceValue,0)) AS fy_2011
       --  , SUM(IF(fy.year=2012,i.invoiceValue,0)) AS fy_2012
      FROM
    #Spenders
    left join
    OrderTable  
    on #Spenders.customercodestr=OrderTable.CustomerCodeStr
    GROUP BY
            OrderTable.CustomerCodeStr,
           Ordertable.OrderPlacedDateSdtm
    order by
    OrderTable.CustomerCodeStr
    drop table #Sales
    drop table #Spenders

  • SSRS LYTD Calculations

    I have the following matrix report layout:
                                |    YEAR
                                |   Program
     SalesRep | Month | Sum(Last Year Stuff) | Sum(This Year Stuff)
    How do I calculate YTD for 2013, 2014?
    I tried this expression below, it worked on  month level (showing Jan) but YTD Total showed 12 month total.
    = round(Sum(iif(Fields!month_date.Value>DatePart(DateInterval.Month,Parameters!date.Value),0, (Fields!Prev12MonthStuff.Value))))
    I tried to put sum(ReportItems!TextboxStuff.Value) into YTD (group total) row, but got an error:
    “Aggregate function can be used only on report itemscontained in page headers and footers”

    Hi BrBa,
    Per my understanding that you want to calculate the YTD value of each year based on the Calendar date parameter, right?
    I have some doubt about what the expect value of YTD you mean, for example, you have mentioned that if Parameters!date.Value='1/27/15' , you will expect to see LYTD sales up to 1/31 for 2013,2014,2015 ,If that means get the value of the Month Jan
    of each year like below, right?
                  2013                          2014         
            2015   
    YTD  17,813   24,184         24,184   14,814      31,486   51,616
    If you select "2/01/2015", it will calculate the YTD for each year of (Jan + Feb) ?
    I have tested on my local environment that using the expression as you have provided can get the aggregate value of the months based on the data in the parameter as below:
    = round(Sum(iif(Fields!month_date.Value>DatePart(DateInterval.Month,Parameters!date.Value),0, (Fields!Prev12MonthStuff.Value))))
    You can see the expression works fine as you expected.
    Please provide the sample data of all the field of the table in the DB and also more details information about the YTD values you want to get if I have some misunderstanding.
    Any problem, please feel free to ask.
    Regards
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • How to use a 'Percentofsum' function with a group selection

    Hi All!
    I have created a report using CR XI in which I select on certain records in a database and then further select on those records using a group selection. The displayed records in the subgroup are correct. I sum these totals of the grouping using a formula (Basically 3 formulas, one for Reset, another for the calculation, and the third for the display) since if I just use the 'built in' summary function it will still total all records that were selected before the group selection. My dilemma is that I need to get a percentage of the subtotal based on the total of that grouping. Below is an example of the layout of the report:
                                                                                __Dept %_            Program Bugt             Prgm % of Dept Bud              Cost of %_
    GH#1    ADMIN                                                        100%
    GF#2    LEGAL                                                                                448694                          4.22%                                 12382
    GF#2    CITY MGR                                                                               445414                          4.19%                                 12294
    GF#2    CITY CLERK                                                                           113075                          1.06%                                  3110
    GF#2    COM PROMO                                                                          391657                         3.69%                                  10827
    GF#2   CENTRAL                                                                               1430570                         13.46%                                 39492
    GF#1                                                                      293406                 2829410                                                                      78105
    The "2829410"  is the Display formula I used to accurately calculate the listed program budget numbers. The 3 formulas I used to get that number is a Reset formula (whileprintingrecords;Numbervar W := 0;) located in GH#1, a Calculation formula (whileprintingrecords;Numbervar W := w + Sum ({@Next Year Budget Amount}, {gl_master.a_org}); ) located in GF#2, and a Display formula (whileprintingrecords;Numbervar W;W) located in GF#1. The percentages that currently display in the "Prgm % of Dept Bud" are wrong as they use the 'built in' PercentofSum function when you right click on the filed in the details section and select summary as a percentage of. I need a formula that would do the following calculation: 448694/2829410 = 15.85% and thus the "Cost of %" formula that would do the following calculation: 293406*.1585 = 12382.
    I tried using a similar "Reset", "Calculation", and "Display" formulas but I cannot get to work correctly. Any help would be greatly appreciated.
    Thanks!
    P.S. The reason I am using a group selection is because it is easier than listing out all the accounts (departments) that I do not want in the report and that selection could change from time to time where as what is in the group selection would never change.
    Sorry for long winded explanation.

    Read all about it.
    You'd probably have to write a little wrapper (using JNI) that passes
    parameters and return values around between your C function and
    the JVM.
    kind regards,
    Jos

  • ASO - member level formula - rolling up non-additive values

    <p>I am trying to roll up not additive values (Yields, Percents,Spreads, etc.). In order to do this I have weighted members andmembers to weight them with. This seems to be working okay until Iget to a level where the weighting values are different. Here isthe formula I have today.</p><p> </p><p>IIF (IsLevel ( [Fixed_Float].CurrentMember, 0)</p><p>AND IsLevel ( [Public_Private].CurrentMember, 0)</p><p>AND IsLevel ( [Pre_Post Swap].CurrentMember, 0)</p><p>AND IsLevel ( [Credit Standing].CurrentMember, 0)</p><p>AND IsLevel ( [Credit Grade].CurrentMember, 0)</p><p>AND IsLevel ( [Acq_Disp Reasons].CurrentMember, 0)</p><p>AND IsLevel ( [Investment Type].CurrentMember, 0)</p><p>AND ISLevel ( [Division].CurrentMember, 0)</p><p>AND IsLevel ( [Asset Transactions].CurrentMember, 0)</p><p>AND ISLevel ( [Time].CurrentMember, 0)</p><p>AND ISLevel ( [Scenario].CurrentMember, 0), [Book YieldInput],</p><p>IIF (ISANCESTOR ( [Investment Type].CurrentMember, Derivatives), [Book Yield Wtd]/[Face Value] , [Book Yield Wtd]/[BookValue]))</p><p> </p><p>The outline structure is:</p><p> </p><p>Total Assets</p><p>        Assets  (Book Yield Weighted * Book Value)</p><p>            Bonds</p><p>            Mortgages</p><p>            etc.</p><p>        Derivatives(Book Yield Weighted * Face Value)</p><p>            LiabilitySwaps</p><p>            NonLiability Swaps</p><p> </p><p>Here is my outline. Basically anything on Derivatives &below should use Face Value and anything on Assets & Belowshould use Book Value.</p><p> </p><p>So when I get to Total Assets (Assets + Derivatives) how do Iblend the weighting values?</p><p> </p><p>Also, My formula as it is does not calculate the member"Derivatives" correctly either. How do I say Derivativesand all its children use Face Value?</p><p> </p>

    While there is an MDX way to calculate what you need, I think you'll want to use an alternative.
    The MDX member formula to calculate what you want, which you'd make the formula for a new account that you're trying to define, would be something like:
    Sum (
    Descendants ([Year].CurrentMember, [Year].Levels(0)),
    Sum (
    Descendants ([Time].CurrentMember, [Time].Levels(0)),
    [Interest Rate] * [Receivables]
    (I'm not sure what role [Transaction Count Indicator] plays; perhaps including
    Sum( Descendants([Transaction Count Indicator].CurrentMember, [Transaction Count Indicator].Levels(0) ...)
    is also warranted.)
    If your cube doesn't have any more dimensions than these, and they're not much bigger than you've indicated, then MDX performance on the aggregation won't be a big deal- your cube is pretty small. If your cube is much larger, then you really want to load a field that is the result of multiplying [Interest Rate] * [Receivables].
    When you say "Both sources contain attributes for all members in the Outline", I interpret that as "both sources have all the same dimensions". If that's the case, would it be possible to stage both sources to a single file and as part of the staging perform the multiplication? If you can stage to a table or even a view onto a join of two tables, then you can have SQL perform the multiplication. I don't think that you can specify the multiplication as part of a rules file (though I'd be happy to learn that you could).
    HTH
    George Spofford
    http://www.dsslab.com

  • Analytical Services failed to get user's parent group tree with Error

    Hi,
    We have a frequent errror during our weekly batch for an application.
    The context:
    - Essbase Administration Services we are using is version is 9.3.1.
    - 8 applications are calculated during the week-end. The scripts executed are exactly the same for the 8 applications.
    - For example let's say that 5 scripts are launched during the night in the batch for each application (script 1, script 2 ... script 5)
    - App1 and App2 are launched alone and before the 6 others applications as these applications database are 3 x bigger (App1 is calculated alone, then app2 is calculated alone, then app3 to app8 scripts are launched in the same time).
    The issue :
    - We don't see any issue for app3 to app8, the calculation are executed without any problem from script1 to script5.
    - But we have an error in App1 and App2 log when the bath execute script 4 and we see the following error in the server log **
    "Analytical Services failed to get user's parent group tree with Error".
    (** : we don't see any log for script 4 in the application log - it's like the server bypass script 4 to go directly from script 3 to script 5 )
    Nothing special is done in script 4 but just an aggregation of the Year dimension (using a @SUM(@RELATIVE(Year,0)) calculation.
    I think that there is may be a synchronization error with Shared Services but what is strange is that it's always for the same script 4 and the batch is launched at different time every week-end.
    Can the issue be linked to the size of the database of applications (8 Gb) and difficulties for the processor to executes aggregation in a large database volume ?

    Hi,
    According to your description, my understanding is that the error occurred when sending an email to the user in workflow.
    Did you delete the existing Connections before setting NetBiosDomainNamesEnabled?
    If not, I recommend to delete and recreate your AD connections, then set NetBiosDomainNamesEnabled to true.
    Or you can delete the original User Profile Service Application and create a new one, then set the NetBiosDomainNamesEnabled to true and start the User Profile Service Application
     synchronization.
    More reference:
    http://social.technet.microsoft.com/wiki/contents/articles/18060.sharepoint-20xx-what-if-the-domain-netbios-name-is-different-than-the-fqdn-of-the-domain-with-user-profile.aspx
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Ago function not working properly with time dimension

    Hi all,
    In OBIEE 11g we have the following issue:
    We have a fact which contains transaction's sum for the last day of each month.
    We use ago function like this : ago(<fact.column>,1)When we want to see the result from the time hierarchy the fact with the ago function works properly for quarters and half years but for the months shorter than the previous one can't take the right value /equals to NULL/.
    For example :
    sum for YEAR: 10000
    sum for Half Year 1 : 4000
    sum for Half Year 2 : 6000
    sum for Quarter 1: 1000
    sum for Quarter 2: 3000
    sum for Quarter 3: 2000
    sum for Quarter 4: 4000
    sum for month... - here the ago function is confused with the last day of previous month if it's shorter than itself: For example - for march it cannot take value for end of February ..etc.
    Any ideas?
    Thanks in advance,
    Alexander.

    Hi,
    I faced some issues previously with month, so I used month+year as id instead of month id. Instead of tragging month id 1-12 into your hierarchy, create another column into your table like month+year - 201201, 201202 which creates unique month_year_id and drag this column into month level instead of month_id. So the problem might be solved.
    Regards,
    Anitha.B

  • Loading Period 0 - Time Period

    Have a question in Hyperion Planning. We have a Time Period Dimension with two Children (Beg Balance and Year Total). Year Total has the usual childeren (Q1, Q2, etc) and the Q's have the usual children (Jan, Feb,...Dec). Where do people load Balance Sheet accounts? In our GL (PeopleSoft) we have a Period 0 which holds the roll-forward of the balance sheet accounts. I was thinking it gets loaded to Beg Balance, but in our outline, Beg Balance is ignored (~). Thx.

    Technically speaking, you can always create an alternate base time period member that is dynamic calc and summarize show sum of year total and beg balance.
    You can for example call this member "YearTotal with BegBalance" and the member formula would be something like (Jan+Feb+Mar+Apr.....+Dec+Begbalance).
    Although the common approach is marking Balance Sheet accounts time balances as Last, it's still technically OK to mark them as Flow as long as you report the accumulated figures in Months. Balance Sheet accounts are always cumulative. You can use dynamic time series (YTD) to report cumulative reports using periodic amounts.
    Cheers,
    Alp

  • Where clause won't propagate over dblink / function as where condition

    Hi there,
    I've here an rather complex problem with whom google couldn't help me.
    <h3>The Situation</h3>
    I've got two databases ( local db : oracle 10XE, remote db: non-oracle) which are connected via dblink. The connection works perfectly. On local db I want to execute this query:
    select sum(revenue), year, brand1
    from revenues@remote
    where cus_encryptData('MFGR#12', 'mykey') = category -- <--
    group by year, brand1
    order by year;whereas cus_encryptData(<str>, <str>) is user defined function which turns a plaintext into a ciphertext. This function can for security and technical reasons only reside on the local db. Here is the definition:
    create or replace function cus_encryptData2(plain varchar2, pw varchar2)
    return varchar2 deterministic PARALLEL_ENABLE is [...]<h3>The Problem</h3>
    This query works, although very slowly (because a lot of data has to exchanged between remote and local db). The execution plan suggests that the where condition is not propagated to the remote db. The only thing that happens on the remote db is the column select. But when I change the query to:
    select sum(revenue), year, brand1
    from revenues@remote
    where 'dLWEfksdaAWE321asDcASd2' = category --'dLWEfksdaAWE321asDcASd2' == cus_encryptData2('MFGR#12', 'mykey')
    group by year, brand1
    order by year;the where condition is propagated and everything works as it is supposed to (only the aggregation is done locally, but thats ok).
    <h3>The Question</h3>
    Does anybody know how to get oracle to just send the result of cus_encryptData to the remote db or rather to resolve the function first before sending it to the remote db? Moreover, the solution should be as simple as possible, i.e. if possible only standard SQL.
    Thanks a lot
    Chris

    user12047719 wrote:
    I've here an rather complex problem with whom google couldn't help me.A colleague ran into the exact same type of problem, dealing with a db-link to SQL-Server some weeks ago. I created a work-around for hm, but now I'm struggling to recall what it is... Sheez... it has been a long week and it is late Friday afternoon.. ;-)
    The basic issue was to get the local SQL parser to send the literal result (of the function) to the remote server to be parsed.
    If memory serves, I winded up using dynamic SQL. Not actually dynamic string SQL, but passing the value as a bind variable instead of using a function in the SQL statement.
    So instead of something line this:
    begin
      insert into local_table select * from remote_table@external_db where col1 = funkyFoo(123);
      ...Remove the function call and pass a bind variable instead:
    begin
      localVar := funkyFoo(123);
      insert into local_table select * from remote_table@external_db where col1 = localVar;
      ...I'm not sure why Oracle behaves like this. I would have expected the driving_site hint to basically do the same - resolve the local function and use the returned value as a bind variable value in the predicate for the remote SQL.. and I vaguely recall this working when I had to use a foreign database (via the Oracle Transparent Gateway for Informix). But it could have been that the Gateway s/w was more intelligent than the generic ODBC agent typically used today...

Maybe you are looking for

  • How to hide completed reminders

    How can I hide completed reminders in ipad2? I am synching tasks from outlook through exchange.

  • How do I install CS4 to my new iMac?

    I just purcahsed a new iMac and it doesn't have slots for CD or DVD. How do I install previous softwares I have on CD's? In particular CS4 and Microsoft Office 2008?

  • Client copy failed in SCM without livecache

    Hi, I am executing client copy on a SCM-EWM system with profile SAP_ALL. Client copy failed with error. How can I find what tables are not being copied? The copy fail at post processing steps for this exit program "/SAPAPO/OM_CLNT_COPY_UPLOAD". My SC

  • Many sites are broken or won't load with FireFox 3.6 on Win7

    Hello, When I installed Windows 7 & installed FireFox 3.5 on it, I discovered Facebook no longer worked properly on FF. It kept being displayed in a broken sort of way. I updated to 3.6.4 a little later, then when a security update came out, I instal

  • ECATT SAPGUI playback hanging..

    Hello, I have just recorded some new test script using the SAPGUI driver. The recording looks good but when i play back my recording is script hang after the first command and I loose control. I have tried many execution option but the problem still