Running Total in the template

Hi,
I Have a requirement is there is running page total at the every page which gets updated for page wise in the Actuate report.That part i am not able to implement in the BIP ,if i place the running toatl code in footer it throws errors saying that variabels cant be used in the footer.
How can i restrict the number of line in the report output and display the sum upto that part of records, and next diaplay the rest of records..
Example :
XML has : 1 to 75 values for the Amount paid on thatt day.
when i generate the output...assume it occupies 3 pages .
Running total : 1-25 records (total on that page)
25-50 records (earlier page total +this page total)
50-75 records (earlier two pages total +this page)
Kindly let me know.
Regards,
Sahithi Surineni
email : [email protected]
If you have still queries,kindly give me a call.So that i can explain you more clearly.

Hi,
I am looking for the similar stuff :( nobody helps ?

Similar Messages

  • Running totals at the footer of the report

    I want to create running totals but print them not in e.g. in a group footer. All totals should be printed at the end of the report. The number of needed running totals is not defined before, it depends on the number of different grouping criterias:
    Example
    Criteria   Amount
    1995      10
    1995       10
    1996       20
    1997       30
    1997       10
    At the end of the report shoul appear the following:
    1995     20
    1996     20
    1997     40
    There could be more criteria in the report (e.g. 1998 or 1999), but it is not defined before I start the report.
    Thank you for your support

    Hi Torsten,
    If you want to create year wise running totals without considering groups, you can create like :
    go in Field ExplorerRunning TotalsRight click and select New
    Give the name as 1995 and select Field to summarize and select Sum as type of summary
    In Evaluate select Formula and give a formula like : Year = 1995
    In Reset do not reset.  You get the value of 1995 year this can be placed at the end of your report.
    You may have to create different funning total for different year.
    Thanks,
    Sastry

  • Running total on the basis of condition

    Hi Gurus,
    I am stuck with a problem which as follows:
    I am having data in a table in the format
    data_id     data_val     data_val_min     Allowd_data_val
    1     18510578     782     7000000
    2     6103403     0     7000000
    3     1244370     3     7000000
    4     800000     100     7000000
    5     90000     80     7000000
    6     50000     100     7000000
    I want a output as shown below
    runn_data_val
    782
    6104185
    6104188
    6904188
    6994188
    6994288
    The logic for the output is
    if data_val si less then Allowd_data_val then we have to condider data_val_min for the running toal else we have to consider data_val.
    because 18510578 > 7000000 so I have to consider 782 as output
    Now 782+6103403 < 7000000 so I have to consider 782+6103403 = 6104185 as output
    now 782+6103403+1244370 > 7000000 so I have to sonsider 782+6103403+3 = 6104188 as output
    and so on...........
    I have to get the desigred output through SQL only I can't use PL/SQL or user defined functions
    Any help will be highly appreciated.
    Thanks & Regards

    with tab as (
      select 1 data_id,18510578 data_val,782 data_val_min,7000000 Allowd_data_val from dual union all
      select 2 data_id,6103403 data_val,0 data_val_min,7000000 Allowd_data_val from dual union all
      select 3 data_id,1244370 data_val,3 data_val_min,7000000 Allowd_data_val from dual union all
      select 4 data_id,800000 data_val,100 data_val_min,7000000 Allowd_data_val from dual union all
      select 5 data_id,90000 data_val,80 data_val_min,7000000 Allowd_data_val from dual union all
      select 6 data_id,50000 data_val,100 data_val_min,7000000 Allowd_data_val from dual union all
      select 6 data_id,50000 data_val,100 data_val_min,7000000 Allowd_data_val from dual
    --end of creating your test data
    ,newtab as (
      select t.*,row_number() over (order by data_id) rnum from tab t
    SELECT data_id,
      data_val     ,
      newcol
       FROM newtab
       model
        reference ref_cnt on (select count(*) cnt , 1 col from newtab)
        dimension by (col) measures(cnt cnt)
       main mainmodel dimension BY (rnum)
        measures(0 newcol,data_id,data_val data_val,Allowd_data_val,data_val_min)
        rules update iterate(10000000) until(iteration_number>=ref_cnt.cnt[1])
         newcol[iteration_number+1] = nvl(newcol[iteration_number],0) +
                                          case when nvl(newcol[iteration_number],0)+data_val[iteration_number+1]>Allowd_data_val[iteration_number+1]
                                           then data_val_min[iteration_number+1] else data_val[iteration_number+1]
                                          end
       )May be this won't :-)
    Ravi Kumar
    Edited by: ravikumar.sv on Mar 15, 2010 7:30 PM
    Added iterate condition

  • Getting running total of the count

    select a,count(*),sum(count(*)) over (partition by a)
    from t group by a order by 2.
    The query is giving me results like this given below.
    A Count Sum Count(*)
    a1     1 1
    a2     1 1
    a3     2     2
    a4     2     2
    a5     3     3
    Instead I require result like
    A Count Sum Count(*)
    a1     1     1
    a2     1     2
    a3     2     4
    a4     2     6
    a5     3     9

    SQL> create table t
      2  as
      3  select 'a1' a from dual union all
      4  select 'a2' from dual union all
      5  select 'a3' from dual union all
      6  select 'a3' from dual union all
      7  select 'a4' from dual union all
      8  select 'a4' from dual union all
      9  select 'a5' from dual union all
    10  select 'a5' from dual union all
    11  select 'a5' from dual
    12  /
    Tabel is aangemaakt.
    SQL> select a
      2       , count(*)
      3       , sum(count(*)) over (partition by a)
      4    from t
      5   group by a
      6   order by 2
      7  /
    A    COUNT(*) SUM(COUNT(*))OVER(PARTITIONBYA)
    a1          1                               1
    a2          1                               1
    a3          2                               2
    a4          2                               2
    a5          3                               3
    5 rijen zijn geselecteerd.
    SQL> select a
      2       , count(*)
      3       , sum(count(*)) over (order by a)
      4    from t
      5   group by a
      6   order by 2
      7  /
    A    COUNT(*) SUM(COUNT(*))OVER(ORDERBYA)
    a1          1                           1
    a2          1                           2
    a3          2                           4
    a4          2                           6
    a5          3                           9
    5 rijen zijn geselecteerd.Regards,
    Rob.

  • SSRS 2008 Running Totals - How are they created at the grouping by level

    I am trying to create the running total column(the right column) month-to-date, and I am new to SSRS.  Is this possible to do on the SSRS-side, or, will I need to do this in the SQL stored procedure that SSRS is calling?
    Number Enrolled
    Number Enrolled
    Enroll Date
    Enroll Type
    Enroll Group
    Enroll Offer
    Enroll Source
    DAILY
    MTD (Running Total)
    10/1/2013
    Online
    Internet
    1234
    ABC
    1
    1
    10/2/2013
    Online
    Internet
    1234
    ABC
    0
    1
    10/3/2013
    Online
    Internet
    1234
    ABC
    6
    7
    10/1/2013
    Online
    Internet
    1234
    DEF
    4
    4
    10/2/2013
    Online
    Internet
    1234
    DEF
    6
    10
    10/3/2013
    Online
    Internet
    1234
    DEF
    0
    10

    Hi Mitch1743,
    According to your description, you want to get the total number on each row. Right?
    In Reporting Service, we can use RunningValue function to do aggregation calculating for each row. Put expression: =RunningValue(Fields!Sales.Value,sum,”Group2”) into the last column (Group2 between “” is the parent group of detail rows).
    We have tested it in our local environment , the table and result will be looks like below:
    Reference:
    RunningValue Function (Report Builder and SSRS)
    Understanding Groups (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Showing  running totals on AR statatement Report

    Hi All I need assistance in populating the Running totals on AR statement Report  , I am trying to calculate the running total on the RDF using the (sum Over Partition ) and Not on the RTF template please assist .
    here is my query below :
    select customers.customer_name,
      detail.customer_id,
      detail.customer_site_use_id,
    :CP_ACC_NAME,
    :CP_ACC_NUM,
    :CP_BRNCH_NAME,
    :CP_COL_EMAIL,
    :CP_COL_PHONE,
    :CP_BRANCH_NR,
    decode(  (select meaning
    from ar_lookups
    where lookup_type = 'INV/CM/ADJ' and lookup_code =  detail.class), 'Payment', apply_date, trx.trx_date)  TRX_DATE,
    trx.INVOICE_CURRENCY_CODE,
    trx.INVOICE_CURRENCY_CODE INVOICE_CURRENCY_CODE_BAL,
    NVL(trx.term_due_date,trx.TRX_DATE)  term_due_date,
    detail.customer_id cst_id,
      detail.customer_site_use_id cst_site_id,
      detail.customer_trx_id,
      detail.trx_number,
       (select meaning
    from ar_lookups
    where lookup_type = 'INV/CM/ADJ' and lookup_code =  detail.class) class,
      detail.amount_full_original,
      detail.end_bal * -1 , (detail.end_bal + detail.amount_full_original)* -1  closing_balance ,
    detail.amount_full_original -  detail.the_order * -1  closing_bal,
      (detail.amount_full_original - detail.running_total) running_total ,
      detail.running_tot ,
      customers.customer_name address1,
      customers.address1 address2,
      customers.address2 address3,
      customers.address3 address4,
      customers.city||' '||customers.state address5,
      customers.country||' '||customers.postal_code address6,
      addr.address1 rm_address1,
      addr.address2 rm_address2,
      addr.address3 rm_address3,
      addr.address4 rm_address4,
      addr.address5 rm_address4,
       :p_as_of_date_from date_from,
       to_char(to_date(:p_as_of_date_to,'DD-MON-YYYY'),'DD-Mon-YYYY') date_to,
      addr.org_id rm_org_id,
       rtrim(to_char(sysdate,'DD')||' '||to_char(sysdate,'Month'))||' '||to_char(sysdate, 'YYYY') curr_date
    from (select customer_id, CUSTOMER_SITE_USE_ID, trx.CUSTOMER_TRX_ID,trx.TRX_NUMBER, null apply_date,ps.class,ps.AMOUNT_DUE_ORIGINAL amount_full_original, the_trx.end_bal,the_trx.running_total , the_trx.running_tot , 1 the_order
    select customer_trx_id, sum(acctd_end_bal) end_bal  , running_total  ,  running_tot
    SELECT ps.customer_trx_id ,
       sum(ar_calc_aging.begin_or_end_bal(ps.gl_date,ps.gl_date_closed,
       NULL,to_date(:p_as_of_date_from))
      * ps.amount_due_remaining) start_bal,
       sum(ar_calc_aging.begin_or_end_bal(ps.gl_date,ps.gl_date_closed,
       NULL,to_date(:p_as_of_date_to))
      * ps.amount_due_remaining) end_bal,
       sum(ar_calc_aging.begin_or_end_bal(ps.gl_date,ps.gl_date_closed,
       NULL,to_date(:p_as_of_date_from))
      * ps.acctd_amount_due_remaining) acctd_start_bal,
       sum(ar_calc_aging.begin_or_end_bal(ps.gl_date,ps.gl_date_closed,
       NULL,to_date(:p_as_of_date_to))
      * ps.acctd_amount_due_remaining) acctd_end_bal ,
       (sum(ar_calc_aging.begin_or_end_bal(ps.gl_date,ps.gl_date_closed,
       NULL,to_date(:p_as_of_date_from))
      * ps.amount_due_remaining) + sum(ar_calc_aging.begin_or_end_bal(ps.gl_date,ps.gl_date_closed,
       NULL,to_date(:p_as_of_date_to))
      * ps.acctd_amount_due_remaining) ) running_total ,  
       sum((sum(ar_calc_aging.begin_or_end_bal(ps.gl_date,ps.gl_date_closed,
       NULL,to_date(:p_as_of_date_from))
      * ps.amount_due_remaining) + sum(ar_calc_aging.begin_or_end_bal(ps.gl_date,ps.gl_date_closed,
       NULL,to_date(:p_as_of_date_to))
      * ps.acctd_amount_due_remaining) )) over (partition by ps.customer_trx_id  order by ps.customer_trx_id)running_tot
       FROM ar_payment_schedules_all ps
       WHERE ps.payment_schedule_id+0 > 0
       --JF2 AND ps.gl_date_closed >= to_date(:p_as_of_date_from)
       AND  ps.class IN ( 'CB', 'CM','DEP','DM','GUAR','INV')
       AND  ps.gl_date  <= to_date(:p_as_of_date_to)
       and org_id = nvl(:P_ORG_ID,org_id)--1246
       --and customer_id = :p_customer_id --1075
       --and CUSTOMER_SITE_USE_ID = :p_customer_site_id --1066
       --and customer_trx_id = 66291
       --'|| l_ps_org_where ||'
       GROUP BY ps.customer_trx_id ,ps.acctd_amount_due_remaining , ps.gl_date,ps.gl_date_closed ,ps.class , rownum 
      ps.customer_trx_id ,
       sum(ar_calc_aging.begin_or_end_bal(ps.gl_date,ps.gl_date_closed,
      ra.gl_date,to_date(:p_as_of_date_from))
      * ( ra.amount_applied  + NVL(ra.earned_discount_taken,0)
       + NVL(ra.unearned_discount_taken,0))) start_bal,
       sum(ar_calc_aging.begin_or_end_bal(ps.gl_date,ps.gl_date_closed,
      ra.gl_date,to_date(:p_as_of_date_to))
      * ( ra.amount_applied  + NVL(ra.earned_discount_taken,0)
       + NVL(ra.unearned_discount_taken

    Hi
    Yes i would like more help as i have never used group by roll up before
    SELECT p.employee_number,
    p.full_name employee_name,
    DECODE (p.sex, 'M', 'Male', 'F', 'Female') gender,
    (DECODE (p.per_information4,
    '01', 'Indian',
    '02', 'African',
    '03', 'Coloured',
    '04', 'White')) race,
    p.original_date_of_hire,
    a.effective_start_date startdate_current_position,
    RTRIM (SUBSTR (ps.NAME, 1, INSTR (ps.NAME, ';')), ';') current_position,
    ho.NAME current_organization,
    xx_return_company_name(a.person_id, a.effective_start_date) current_company,
    RTRIM (SUBSTR (ps1.NAME, 1, INSTR (ps1.NAME, ';')),';') previous_position,
    ho1.NAME previous_organization,
    xx_return_company_name(a1.person_id, a1.effective_start_date) previous_company,
    a1.effective_start_date startdate_prev_position
    FROM per_assignments_v2 a,
    per_assignments_v2 a1,
    per_all_people_f p,
    per_all_positions ps,
    per_all_positions ps1,
    hr_all_organization_units_tl ho,
    hr_all_organization_units_tl ho1
    WHERE a1.person_id = a.person_id
    AND NVL (a1.position_id, 9) <> a.position_id
    AND a1.effective_end_date = a.effective_start_date - 1
    AND p.person_id = a.person_id
    and ho.ORGANIZATION_ID=ps.ORGANIZATION_ID
    and ho1.ORGANIZATION_ID=a1.ORGANIZATION_ID
    AND a.effective_start_date BETWEEN p.effective_start_date AND p.effective_end_date
    AND a.position_id = ps.position_id
    and p.EMPLOYEE_NUMBER not in ('1','2','3')
    AND a1.position_id = ps1.position_id(+)
    order by p.full_name

  • Running Total not working correctly

    I have a running total setup inside a for loop, the problem is that the running total isn't "running" . Below is the syntax
    <?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,3,1)?>
    <?xdoxslt:set_variable($_XDOCTX,’DUPE’, xdoxslt:get_variable($_XDOCTX, ‘DUPE’ ) +1) ?>
    <?for-each-group@section:/ TMP008/LIST_G_ORDER_BY/G_ORDER_BY/LIST_G_INVOICE/G_INVOICE;G_INVOICE?>
    TABLE HERE+_
    <?end for-each?><?end for-each?>
    I am using this loop to print 3 copies of an invoice, then by using the running total I am trying to call a unique footer on each copy by having the following code in the footer.
    <?choose:?>
    <?when: xdoxslt:get_variable($_XDOCTX,’DUPE’)=”1”?>
    <?call:Footer1?>
    <?end when?>
    <?when: xdoxslt:get_variable($_XDOCTX,’DUPE’)=”2”?>
    <?call:Footer2?>
    <?end when?>
    <?otherwise:?>
    <?call:Footer3?>
    <?end otherwise?>
    <?end choose?>
    What is happening is the first copy is using Footer 3 and the other 2 copies are using Footer 1. FYI at the top of the rtf I have a import statement and set_variable statement as shown below:
    <?import:file:///C:\Documents and Settings\username\Desktop\MasterFooter.rtf?>
    <?xdoxslt:set_variable($_XDOCTX,’DUPE’, 0)?>
    The variable DUPE is getting the value 1 on every page which I don't quite understand.
    Any help would be greatly appreciated. I can attach the xml file and rtf if so desired. Thanks

    First initialise a variable and assign it value zero (with this code..)
    <?xdoxslt:set_variable($_XDOCTX, 'RunTotVar', 0)?>
    then embed the following code within the for loop where you want the running total displayed..
    the code below shows a running total for the xml field INVOICE_AMT
    <?xdoxslt:set_variable($_XDOCTX, 'RunTotVar', xdoxslt:get_variable($_XDOCTX, 'RunTotVar') + INVOICE_AMT)?><?xdoxslt:get_variable($_XDOCTX, 'RunTotVar')?>
    Hope this helps. its from one of the examples provided with the template builder for word.
    -Domnic

  • Problem with "Running Total"

    Hi, I've created a calcution using the analytic function template "Running Total" and the worksheet ran fine. I saved the workbook with this new calculation.
    The next day when I attempt to run that worksheet I received the error "Database Error - ORA-00923 From keyword not found where expected."
    For some reason it's loosing the SUM( ) from the calc.
    Here's what the calc looks like now -> No of Queries OVER(PARTITION BY Calendar Year and Month ORDER BY Calendar Date ASC ROWS UNBOUNDED PRECEDING )
    This is what it looks like when I created it -> SUM(No of Queries) OVER (PARTITION BY Calendar Year and Month ORDER BY Calendar Date ASC ROWS UNBOUNDED PRECEDING)
    Brent.

    Well, I guess my thought process was declaring warrBaseYrPrc in the @currWarrBaseYrPrc formula which would make it a global variable and accessible to all formulas where that same variable is declared. I thought that if I declared warrBaseYrPrc in @currWarr2YrPrc, it would have its value as calculated in @currWarrBaseYrPrc and use that. And since @currWarr2YrPrc returns the variable warrBaseYrPrc with some slight modifications depending on the if statment, it shouldn't have refused use in the Running Total.
    So I'm kind of leaning more toward an ordering screw up (i.e. it didn't know what formula to evaluate first because they were all in the same section and dependent on one another because of nesting formula invocations, and thus treated @currWarr2YrPrc warrBaseYrPrc variable, and subsequent calculations, as a constant as you talked about and you can't RT constants). I still find it perplexing why it would treat a variable as a constant, but I guess I'll have to experiment with it a little bit.
    By the way, do you know of any good free crystal report debugging tools?

  • How to calculate a percentage of a Running Total?

    Post Author: pvang
    CA Forum: Formula
    Hi folks,    Quite new here to the forum and to Crystal Report. As you can tell, I've already stumbled upon a roadblock. Here is what I'm trying to do:I am grabbing employee names and the number of cases that they are working via a sql query. So the sql query will result in something like 'Bob', '403'; Bob being the employee and 403 being the number of cases he's working on. In the report, I have a running total that sums up the total number of cases. I want to determine the ratio of Bob's(and every other employee's) cases over the running total amount of cases. So, for demo purposes, Bob has 403 cases and the total amount of cases is 1612, Bob's ratio would be 25%(403/1612). The equation that I am using right now is: /{#RTotal})*100 and it is not working. The ratio starts at 100%(effectively because the running total after the first record is equal to his/her cases) and then drops off dramatically. I know why it is doing that, just don't want those results. I tried using the EvaluateAfter function to no avail. Is this possible? If so, how? Many thanks in advance.

    Post Author: rroberson
    CA Forum: Formula
    Sounds to me like you don't need to use a running total.  Just group on name (bob) and do a normal total (not running total) for the group (group summary).  You can just divide that group summary total by the grand total (another crystal summary) and mult by 100.

  • Running total in group header doesn't display when it's at page bottom

    Post Author: Charles Denight
    CA Forum: Formula
    Hi, Using v.9 of Crystal Reports I've created some running totals using a cross-tab workaround to get the running totals into the group headers, but when the group header falls at the bottom of the page then the running total doesn't show up.Would appreciate knowing why and how to fix this.

    Replacing an item that is malfunctioning because of a manufacturing error is the bare minimum I would expect from customer service for any electronics item.
    The thing Apple does extremely well is their flat fee policy for repairs on their computers.
    I managed to break my MacBook pretty seriously (logic board needed to be replaced) and I'm sure it cost them more to repair the unit than the $328 they charged me.
    I probably would have been angry if it was something minor, but I'm guessing that most repairs to screens/motherboards/etc cost more than their flat fees.

  • Running Total Issue or Possibly Formula Issue in Crystal Reports 9

    Post Author: Jeffs23
    CA Forum: Formula
    My issue involves two formula's - @TotalTime and @Converted Time and a Running Total (RTotal0).
    @TotalTime{Data.ApptTime}/60@Converted Timenumbervar x := {#RTotal0};totext(truncate(x),0,"")" Hrs "totext(remainder(x,truncate(x))*60,0,"") + " Mins"Running Total (RTotal0)
    Field to Summarize - @TotalTime
    Type of Summary - sum
    Under Evaluate Section:
    "Use a Formula":
    onfirstrecord or
    {Data.ResourceStart} <> previous({Data.ResourceStart}) or
    {Data.Resource} <> previous({Data.Resource})
    ) and
    minimum({Data.ApptKind},{Data.ResourceStart}) = 1 AND
    maximum({Data.Column},{Data.ResourceStart}) >= '1'
    Reset on change of field {Data.Resource}
    A little background:My report deals with a Doctors schedule. In the doctors schedule, a appointment is booked and is by default placed into Column 1. It always defaults to Column 1. If the provider elects to double book their time and schedule another patient at the exact same time, the second appointment hits column 2. It expands in essence. It is possible to have up to 4 appointments in one time slot. This is why we wait forever at the Doctors office - appointments get overbooked because patients cancel or no show frequently and the provider would rather have the patients wait then risk no appointment at all. My Client wants the "TOTAL TIME" a provider was "scheduled" to see patients, not the time they actually saw the patients. So if the Provider was scheduled to see patients from 8 am to noon and had patients doublebooked for every time slot, I only want to report the overall time he saw patients regardless of the doublebooking, triplebooking or quadruplebooking. So the total time for my example should be 4 hours not 8 hours. The good news is this is painfully close to being correct! What is currently happening, is if the schedule contains more than 1 facility the time calculates wrong.  I think my issue may be in the running Total but not 100% sure. I need it to calculate time on each facility - {Data.Facility}.

    Post Author: Jeffs23
    CA Forum: Formula
    I had some minor issues with my formulas and Running Total so I modified them alittle:
    @TotalTime
    If {Data.ApptTime} = 0 then    0else    {Data.ApptTime}
    @Converted Time
    If {#RTotal0} = 0 then    "--"else    ToText(Truncate({#RTotal0}/60),0,"") + " Hour(s), " + ToText(Remainder({#RTotal0},60),0,"") + " Min(s)"
    My running total stayed the same.......
    Field to Summarize - @TotalTime Type of Summary - sum Under Evaluate Section: "Use a Formula":(onfirstrecord or{Data.ResourceStart} <> previous({Data.ResourceStart}) or{Data.Resource} <> previous({Data.Resource}) ) andminimum({Data.ApptKind},{Data.ResourceStart}) = 1 AND maximum({Data.Column},{Data.ResourceStart}) >= '1' Reset on change of field {Data.Resource}
    Some fake sample data:
    Resource = Francis, William MD
    Facility 1: River Oaks Main Clinic
    Facility 2: Western Medical Hospital
    Date of Service = 10/25/2007
    From 7:15 am to 11:45 am, Patients were treated at Facility 1: River Oaks Main Clinic *** (total time = 4 hours 30 min)
    From 12:15 pm to 1:00 pm, Patients were treated at Facility 2: Western Medical Hospital *** (total time = 45 min)
    From 1:00 pm to 3:15 pm, Patients were treated at Facility 1: River Oaks Main Clinic *** (total time = 2 Hours 15 min)
    The report should tell me Total time at River Oaks Main Clinic = 6 Hours 45 min and 45 min for Western Medical Hospital. What it currently is doing, is reporting the 6 Hours 45 min on the River Oaks Main Clinic and 7 Hours 30 min on the Western Medical Hospital. The time for this facility should be 45 minutes, yet its taking the full provider time and throwing it into this second facility. I am assuming its because the Running total tells it "Reset on change of field {Data.Resource}". Somehow, I need it to evaluate on both the Resource and the Facility. Any suggestions?

  • Cumulative Key Figure (Running Total) - how to use in formula?

    We have a scenario where I need to use the cumulative value of a Key Figure in a subsequent formula. The “Cumulated” property setting at the Key Figure level in the query is a “Displayed Data Only” setting, however, so the cumulated values are not available for use in a formula  The individual values are used by BW as opposed to the cumulative values that are displayed in the column.
    I’ve tried using the “Cumulated” property at the characteristic level. I am then able to use the displayed cumulative values in a formula. However, I also need to display the individual (not cumulated) Key Figure values in a column. These individual values are no longer available for display if the “Cumulated” property is set at the Characteristic level.
    I thought that the “Define Cells” functionality could possible be used, but there is only one Structure in the query, so the “Define Cells” functionality is unavailable. I could not think of a way to use a second structure in the rows, as the rows need to be dynamic (two characteristics, populated based on user input variables).
    It may be possible to accomplish this requirement by adding a column using VBA in the SAPBEXonRefresh sub, but use of VBA is not a preferred option, as the query may be run in either the Excel Analyzer or the Web Analyzer.
    The infoprovider does not contain a Key Figure field for Cumulative Volumes.
    The scenario details:
    Rows (Characteristics):
    A: Plant (values based on user input variable)
    B: Calendar day (values based on user input date variables for start & end dates)
    So there is one row for each day within each plant.
    Columns (Key Figures):
    A: Cumulative Volume at Start of Period (uses user input date variable for start date, and “Constant Value” property. Hidden column.)
    B: Daily Volume (for each day in the period defined by the user input variables for start and end dates)
    C: Cumulative Volume at End of Each Day (formula, meant to be equal to the sum of the Cumulative Volume at start of period plus the total so far of the Daily volumes. In other words, equal to the sum of Column A plus the running total of Column B).
    Does anyone out there have any more ideas on how to accomplish the required Cumulative Volume computation?

    Thanks for your reply Jurgen.
    I've created a Global Calculated Key Figure (CKF), and have looked at and tried a number of settings in the Properties of this new CKF.
    I have not yet been able to make this work for me.
    The "Cumulated" property for a Global CKF is also a display-only property. The displayed running total is not used in any formula containing this CKF, only the individual values are used in the formula.
    If I select the 'Enhance' option, where exception aggregation can be done as I think you suggested, I do not see a 'cumulated' option. If I select the 'Summation' option for 'Exception Aggregation', then the 'Reference Characteristic' pull-down is not available.
    Is there a different 'Exception Aggregation' option I should be using for running totals at the calendar day level?
    Or am I unclear on the concept of your suggestion?
    Perhaps you're on a later version of BW that has more Exception Aggregation options? (We're on BW3.5)

  • Running total and Next function in Crosstab

    <strong><font size="3"><font face="Times New Roman">Clarifications on getting Next Running sum and count on a Crosstab</font></font></strong><font face="Times New Roman" size="3"> </font> <p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Here is the example, which I am working on:</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Highlights of the Report:</font></p><p style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; tab-stops: list .5in" class="MsoNormal"><font face="Times New Roman"><span><font size="3">-</font><span style="font: 7pt &#39;Times New Roman&#39;">         </span></span><font size="3">Report is grouped on {Scenario Name}</font></font></p><p style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; tab-stops: list .5in" class="MsoNormal"><font face="Times New Roman"><span><font size="3">-</font><span style="font: 7pt &#39;Times New Roman&#39;">         </span></span><font size="3">Left side dates on any of the tables is {Version Date}</font></font></p><p style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; tab-stops: list .5in" class="MsoNormal"><font face="Times New Roman"><span><font size="3">-</font><span style="font: 7pt &#39;Times New Roman&#39;">         </span></span><font size="3">Dates on the top header on any of the tables is {Fsc Week End Dt}</font></font></p><p style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; tab-stops: list .5in" class="MsoNormal"><font face="Times New Roman"><span><font size="3">-</font><span style="font: 7pt &#39;Times New Roman&#39;">         </span></span><font size="3">Other formulae used in this report are:</font></font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">1) = ({Query1.Demand Qty})/100000</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Numerical values displayed in the "Original values" table.</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">2) =</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">if {Query1.Scenario Name} = &#39;DLYPRD:ASCP-PRD:PRD&#39; </font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">THEN mid ({Query1.Scenario Name},13,3)</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">ELSE mid ({Query1.Scenario Name},13,6)</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Second column with value PRD in any of the tables.</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">3) {next qty} = if not onlastrecord then next({@ShortDemandQty}) else 0;</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">(used in the "next values vertically" table)</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">4) - running total to calculate horizontally</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Evaluate - For each record</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Reset - On change of field: {Version Date}</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">5) - running total to calculate vertically.</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Evaluate - For each record</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Reset - On change of field: {Fsc Week End Dt}</font></p><font face="Times New Roman" size="3"> </font> <p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">In this report design, when I go and change the Sort order in the Record Sort Expert, some of the values go for a toss. I got two cases where the vertical values are correct in one case and horizontal values are correct in another case.</font></p><font face="Times New Roman" size="3"> </font><strong><font size="3"><font face="Times New Roman">First Case:</font></font></strong> <p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Cumulative vertical values are correct.</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal">&#160;</p><font face="Times New Roman" size="3"> </font><strong><font size="3"><font face="Times New Roman">Second Case:</font></font></strong> <p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Cumulative horizontal values are correct.</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal">&#160;</p><font face="Times New Roman" size="3"> </font><strong><span style="color: blue"><font size="3"><font face="Times New Roman">Is there any way to consistisize both the horizontal and vertical running totals. I even tried forcing the evaluate & reset like below and clearing the record sort order, but it did not work:</font></font></span></strong><strong><span style="color: blue"><font face="Times New Roman" size="3"> </font></span></strong> <p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">1) - running total to calculate horizontally</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Evaluate - On change of field: {Fsc Week End Dt}</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Reset - On change of field: {Version Date}</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">2) - running total to calculate vertically.</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Evaluate - On change of field: {Version Date}</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">Reset - On change of field: {Fsc Week End Dt}</font></p><font face="Times New Roman" size="3"> </font><strong><span style="color: blue"><font size="3"><font face="Times New Roman">And one more observation on the running total, how it works in the crosstab is, the total runs likes a spiral rather than resetting at the column or row level. Is there any way to restrict this?</font></font></span></strong><font face="Times New Roman" size="3"> </font> <p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">3) {next qty} = if not onlastrecord then next({@ShortDemandQty}) else 0;</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">(used in the "next values vertically" table)</font></p><font face="Times New Roman" size="3"> </font> <p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">For example, onlastrecord does not seem to work on the "next values vertically" crosstab, rather brings the record from the next column.</font></p><p style="margin: 0in 0in 0pt" class="MsoNormal"><font face="Times New Roman" size="3">For 3/7/2007 - 01/APR/07, the value is 157.84 which is incorrect and should be 0.</font></p><strong><span style="color: blue"><font size="3"><font face="Times New Roman">I need to get a next on the running total. Next (fld) doesnot work for running totals. Please guide me, how to get the next values for the running total fields.</font></font></span></strong>

    Post Author: redtop6683
    CA Forum: Formula
    Whoops I guess I should have mentioned that I've already tried using Sum and Round(Running Total, 2) and haven't had any luck.
    I also should have mentioned that Groupings 1 and 2 are sums, and that Running Total is a running total that changes on every change of the grouping.  There are 4 groupings.
    Grouping 1 (Employee Name)
    Grouping 1.1 (Shift)
    Grouping 1.2.1 (Payroll Department Code)
    Grouping 1.2.1.1 (Description)
    Below these 4 groupings is where the running total is.  The issue is that in the footer of grouping 1 is a field that sums the elapsed hours for the particular employee by each payroll department code, these are then summed using the running total.  The issue is as stated in the earler post that I can round these individual sums on the groupings, but I get the number on my running total to round differently as you can see by the earlier post's example.
    Thanks for the help.
    ~Jason

  • Running total of another running total ( or some other solution )

    I posted in my previous thread that I would like to be able to do rounding at the subtotal level and then have a total of these subtotals.  Here is the original thread:
    totals in a cross tab report
    So I was told that with the cross-tab report I can either do rounding at the details level or at the final total level.  However, I need to be able to do the following:
    Suppose I receive payments from different states.  In my report I would like to be able to display:
    - a total of all payments for one given state, rounded to whole dollars - this one is easy because I just create a running total for the payments and then at the end I round it to whole dollars
    - a total of all payments and all states as one number.  However, the problem I can't figure out here is that this grand total needs to be calculated as the SUM of the totals for each state where the total for each state is rounded to a whole dollar before being added to the grand total.  So the rounding should not be done on the final grand total but rather:
    1. calculate the total of payments for one state and round it to a whole dollar - let's call it StateTotal ( rounded)
    2. calculate the SUM of all StateTotal values.  So it needs to be a SUM of the already rounded state totals.
    Any help will be greatly appreciated.
    thanks

    hello all,
    if you want to use a manual running total then that is okay. you don't actually put the manual running total in the cross-tab expert though as you will get a print time error.
    you use the "Display String" formula dialogue on an existing cross-tab summary to do the manual running total in.
    have a look at the attached sample...there are 2 manual running totals in there...one that goes horizontally (across the columns) and one that goes vertically (down the rows).
    there is also a Xtab Info column that is there just to show you how the manual running total counter variables are incremented through the cross-tab. in crystal reports 2008 there are a lot of new cross-tab functions that are different from this but that is a completely different topic.
    i hope this helps,
    jamie

  • Cumulative Balance Running Total

    Hello community,
    i am doing a business partner Account balance report, i have already successfully fetch my data in to crystal reports as well as the running total for the cumulative balance, my problem is i have a duplicated rows in debit side, now how will i say to crystal reports (in Formula expression) that the 1st line if duplicated will the only one to be evaluated. for more detail please see image below
    http://i264.photobucket.com/albums/ii184/abing430/CRDuplicatedRows.png
    http://i264.photobucket.com/albums/ii184/abing430/CRDuplicatedRows-1.png
    please help.
    best regards,
    Fidel

    hello sharonamt,
    thanks for the response.
    //Head
    Shared NumberVar OB := {Command.Open Balance}
    //Line
    shared numbervar OB;
    OB := OB + {BP_AccountBalance;1.Credit} - {BP_AccountBalance;1.Debit}
    //Footer
    Shared numbervar OB
    i have this ff. formula the header is put in the page header, the line is put ing Group Footer section and the footer is put in report footer section. my group is grouped by Ref field w/c is unique in this report.
    the duplicated rows is eliminated since i put my line formula in the group footer. but using the ff. formula's the report is ok, the results is fine on the first page only, because in the second page it will get the OB balance which is in the page header of the report., i dont needt to reset my running total.
    thanks.
    please help
    best regards.
    EDIT:
    i have manage to figure out my problem... i just use this formula and it works.
    whileprintingrecords;
    if pagenumber = 1 then Shared NumberVar OB := {OpeningBalance.Open Balance}
    else
    0
    since im having problem with reseting of the openingbalance, i had trap the page numvber and never reset the running total. this formula works for me as of now.
    Fidel
    Edited by: Avelino Fidel on Jan 24, 2011 2:46 PM

Maybe you are looking for

  • Microsoft home and business 2013 64-bit Product Key not working to activate.

    Hi, I just bought on ebay india.  ( MS office home and business 2013  64-bit)  During activation the screen says that there was problem. Your computer has already installed 64-bit files and 32-bit cannot install. To install 32-bit please delete the f

  • Supporting Multiple Registrars with CME

    Hello, I am attempting to utilize the "Multiple Registrars on SIP Trunks" IOS feature with my Call Manager Express. http://www.cisco.com/en/US/docs/ios/voice/sip/configuration/guide/sip_cg-multi-registrars.html I want to register to a BroadSoft via t

  • I lost the sound after install osx maverick

    help me please i dont know what to do...i just installed the osx maverick 10.9 and the sound gone..i check all and its ok...all i can hear is the "chan" at the beginning  ,the music plays ok but i cant hear on speakers headphones etc..its seem that s

  • IE03 - Serial number history and business documents linkage after archive

    Guru, SAP has provided serial number history feature within Equipment master display IE03. History works fine as long as data are in live system. However when it becomes real history - meaning once order or notification linked to material + serial nu

  • Why do Oz users get ripped off all the time.

    Hi Can anyone explain why it costs $AUD16.99 an album or $AUD1.69 per song to buy music through the Itunes store in Australia when it costs $US9.99 to buy the same album ( or $US0.99) per song if you buy in the US. The current exchange rate is at aro