Formula for sum of minimums in a category

These are my table columns:
| Date | Item | Remaining |
| Feb 1, 2009 | A | 10 |
| Feb 2, 2009 | A | 6 |
| Feb 1, 2009 | B | 4 |
| Feb 2, 2009 | B | 3 |
| Dec 31, 2038 | A | 1 |
I have it categorized by Item.
Within each item (category), I want to capture the minimum of Remaining where the date is <= NOW(). Then I want the sum of those Remaining values.
I'm guessing this needs an array function, but I can't figure out how to compose it or if it even works... Anything I try tells me "Arrays can contain only constant values".
For the above table, the desired answer would be 9. I welcome your suggestions...

Hello
My guess is that 9 is not the value returned given your requirements description.
I added an auxiliary column requested by a clear bug.
In Table 1, the formula in column E is
=CODE(C)
In "Unnamed Table"
A2 is empty
A3 contains the letter "A"
A4 contains the letter "B"
in column B, the formula is:
=TODAY()
in column C, the formula is:
*CAUTION, the message parser truncates the formula so I pass it as a screenshot.*
Here is the text one but it will be truncated
=IF(ISBLANK(A),SUMIF(Table 1 :: B,"<" values whose date is less than the date stored in column B
When the cell in column A contains a letter, it returns the sum of every 'Remaining" values whose date is less than the date stored in column B and whose Item is the one defined in column A.
The auxiliary column is required because at this time, when we ask Numbers to compare two cells containing the same letter, it returns FALSE.
Using CODE() I ask it to compare two numerical values and it behaves correctly.
Here is the report which I sent to Apple Bugs Hunters:
Your tracking number for this issue is Bug ID# 6562953
<div class="jive-quote">May you test that:
In cell B2 I typed the letter A
In cell D2 I typed the same letter A
In cell E2 I typed the formula =(B2=D2)
In cell F2 I typed the formula =(CODE(B2)=CODE(D2))
In Numbers '08 it logically returns:
In E2 : TRUE
in F2 : TRUE
In Numbers '09 it returns
In E2 : FALSE
in F2 : TRUE
It resembles to a bug</div>
Yvan KOENIG (from FRANCE vendredi 6 février 2009 15:40:22)

Similar Messages

  • Numbers formula for "sum of all cells above this row"

    Is there a way, using the cell formulas in Numbers, to say "sum of all the cells above this row"?  I'm trying to make a ledger of sorts, and I want to have a column that is "how much you've spent so far" for each entry, which is the sum of all the "Price" cells for that row and above.
    Is this possible?  Thank you in advance for your help!

    Hi Alexander,
    You could start with a table like this:
    To get started,
    Cell D2 =C2
    Then to continue,
    Formula in D3 (and Fill Down)
    =D2+C3
    Row 10 is waiting for you to fill in details... .
    Regards,
    Ian.

  • How can I sum up raws? the sum function seems to work for columns only and right now I have to create a separate formula for each raw

    How can I sum up raws? the Sum function seems to work only on columns. Right now I have to create a separate formula for each raw

    Hi dah,
    "Thanks, but can I do one formula for all present and future raws? as raws are being added, I have to do the sum function again and again"
    You do need a separate formula for each group of values to be summed.
    If the values are in columns, you need a copy of the formula for each column.
    If the values are in rows, you need a copy of the formula for for each row.
    If you set up your formulas as SGIII did in his example (shown below), where every non-header row has the same formula, Numbers will automtically add the formula to new rows as you add them.
    "Same formula" in this context means exactly the same as all the formulas above, with one exception: the row reference in each formula is incremented (by Numbers) to match the row containing the formula.
    Here the formula looks like this in the three rows shown.
    B2: =SUM(2)
    B3: =SUM(3)
    B4: =SUM(4)
    That pattern will continue as rows are added to the table.
    Also, because the row token (2) references all of the non-header cells in row 2, the formula will automatically include new columns as they are added to the table.
    Regards,
    Barry

  • Is there a way to create a formula to sum all fields in which a secondary field is a specific string?

    I would like to be able to create a spreadsheet with several different ways of looking at financial results.
    So, while I might have my typical budget prepared by functional area, I would also like to identify whether a line item is a weekly, monthly, or annual expense. So, column A will include a functional header
    Column B the amount itself
    Column C will be the frequency.
    Is there an easy way to create a Sum Field that pulls the info from all fields in which column B = Weekly?
    More importantly, is there a way to do this across multiple tables within a single sheet? I am breaking out divisions into individual tables and performing similar tasks for each division, and then summarizing for the full organization in a separate table.
    I am using Number '09 2.1
    Many thanks,
    Keith

    The more generalized solution is to modify the Summary Table as follows:
    - Add a header row to give the name of the source table for each column (the name you give each table should match the name in the header for each column)
    - use the following formula in B2:
    "=SUMIF(INDIRECT("'"&B$1&"' ::"&"Frequency"), "="&$A2, INDIRECT("'"&B$1&"'::"&"Amount"))"
    fill down, then select B2 - B4, then fill across
    In the "Total" column for the Summary table paste the formula:
    E2:  "=SUM(B2:D2)"
    Fill down
    I hope this helps
    Wayne

  • Error in Fast Formula for Supplemental Earnings Elements

    Hi,
    I have an requirement in Supplement Earning Elements for US Localization. I need to define some Supplement Earning Elements that should comes in Payroll with the extension of existing Elements.
    Here are the Steps for setups which i have done so far-
    Step 1:Created new Elements with their values with effective dates for existing user Table name
    Step 2:Done the setup for New Elements with classification as Supplemental and Category also attached the formula like "FLAT AMOUNT" formula for Calculation rule in Element Earning screen.
    Step 3: when i tried to query for the element i have created, the value in Calculation Field is "Elementname_FLAT_AMOUNT_RWSI" which is not same for the existing elements.Existing Element which is of same classification and same category the Calculation rule field is "ElementName_FLAT_AMOUNT".
    Step 4: After that i did setup for Element Description and Element Link.
    Step 5: Then i have copied the Formula from Existing element(which is previously configured and working fine for the existing elements ), made the modifications for the newly created element. When Compiling the formula ,i am getting an Error "Incorrect Data type"
    I have two queries -
    1- The setup in Earnings Screen with Calculation Rule is correct or not. As the Calculation Field for newly elements and the existing elements are different (as mentioned in Step 3).
    2- Compilation Error "Incorrect Data Types" in Fast Formula.(as mentioned in Step 5).
    I m pasting the Fast Formula code here for ready reference
    Default for TERMINATED_EMPLOYEE      is 'N'
    Default for RUN_TYPE               is 'R'
    Default for FINAL_PAY_PROCESSED      is 'N'
    default for PAYROLL_TERMINATION_TYPE is 'L'
    default for BG_TERMINATION_TYPE is 'L'
    default FOR LAST_STANDARD_PROCESS_DATE_PROCESSED IS 'N'
    DEFAULT FOR ELEMENT_NAME_NEG_EARNINGS_ASG_GRE_ITD     IS 0
    DEFAULT FOR ELEMENT_NAME_ADDITIONAL_ASG_GRE_ITD     IS 0
    DEFAULT FOR ELEMENT_NAME_REPLACEMENT_ASG_GRE_ITD     IS 0
    DEFAULT FOR ELEMENT_NAME_ASG_GRE_YTD IS 0
    DEFAULT FOR ELEMENT_NAME_ASG_GRE_RUN IS 0
    Default for PAY_EARNED_START_DATE is '02-JAN-0001' (DATE)
    Default for PAY_EARNED_END_DATE is '02-JAN-0001' (DATE)
    Default for ASG_NUMBER is ' '
    Default for ELEMENT_NAME_ASG_GRE_FYTD IS '0'
    Default for CURRENT_ELEMENT_TYPE_ID is 0
    Default for GROUP_KF_PAY_FREQUENCY is '0'
    DEFAULT FOR Amount IS 0
    INPUTS ARE Amount
    IF ELEMENT_NAME_REPLACEMENT_ASG_GRE_ITD WAS DEFAULTED OR ELEMENT_NAME_REPLACEMENT_ASG_GRE_ITD = 0 THEN
    pay_frequency = GROUP_KF_PAY_FREQUENCY
    ELEMENT_TYPE_ID_PASSED = CURRENT_ELEMENT_TYPE_ID
    annual_rate = HCS_GET_SUPPLEMENT_RATE(ELEMENT_TYPE_ID_PASSED, PAY_EARNED_END_DATE, 'General Rate')
    annual_bal = ELEMENT_NAME_ASG_GRE_FYTD
    IF annual_bal = annual_rate THEN
    Amount = 0.00
    mesg = 'Contract amount '||TO_CHAR(annual_rate)||' fully paid for '||ASG_NUMBER
    ELSE
    Amount = annual_rate / TO_NUMBER(pay_frequency)
    If abs(annual_bal+amount-annual_rate) < 1 then
    Amount = annual_rate-annual_bal
    IF ELEMENT_NAME_ASG_GRE_RUN=0 THEN
    flat_amount = Amount
    + ELEMENT_NAME_ADDITIONAL_ASG_GRE_ITD
    + ELEMENT_NAME_NEG_EARNINGS_ASG_GRE_ITD
    ELSE
    ( flat_amount = Amount )
    ELSE
    (flat_amount = ELEMENT_NAME_REPLACEMENT_ASG_GRE_ITD + ELEMENT_NAME_ADDITIONAL_ASG_GRE_ITD
    + ELEMENT_NAME_NEG_EARNINGS_ASG_GRE_ITD
    clear_repl_amt = -1 * ELEMENT_NAME_REPLACEMENT_ASG_GRE_ITD
    IF ELEMENT_NAME_ASG_GRE_RUN = 0 THEN
    IF ELEMENT_NAME_ADDITIONAL_ASG_GRE_ITD <> 0 THEN
    clear_addl_amt = -1 * ELEMENT_NAME_ADDITIONAL_ASG_GRE_ITD
    IF flat_amount < 0 THEN
    (IF (PAYROLL_TERMINATION_TYPE WAS DEFAULTED AND
    BG_TERMINATION_TYPE = 'A' AND
    TERMINATED_EMPLOYEE = 'Y' AND
    FINAL_PAY_PROCESSED = 'N') OR
    (PAYROLL_TERMINATION_TYPE = 'A' AND
    TERMINATED_EMPLOYEE = 'Y' AND
    FINAL_PAY_PROCESSED = 'N') OR
    (PAYROLL_TERMINATION_TYPE WAS DEFAULTED AND
    BG_TERMINATION_TYPE = 'L' AND
    TERMINATED_EMPLOYEE = 'Y' AND
    LAST_STANDARD_PROCESS_DATE_PROCESSED = 'N') OR
    (PAYROLL_TERMINATION_TYPE = 'L' And
    TERMINATED_EMPLOYEE = 'Y' AND
    LAST_STANDARD_PROCESS_DATE_PROCESSED = 'N') THEN
    neg_earn = -1 * ELEMENT_NAME_NEG_EARNINGS_ASG_GRE_ITD
    ELSEHuman Resource Management (HRMS)
    (neg_earn = flat_amount - ELEMENT_NAME_NEG_EARNINGS_ASG_GRE_ITD
    flat_amount = 0
    ELSE
    (IF ELEMENT_NAME_NEG_EARNINGS_ASG_GRE_ITD <> 0 THEN
    neg_earn = -1 * ELEMENT_NAME_NEG_EARNINGS_ASG_GRE_ITD
    IF (PAYROLL_TERMINATION_TYPE WAS DEFAULTED AND
    BG_TERMINATION_TYPE = 'A' AND
    TERMINATED_EMPLOYEE = 'Y' AND FINAL_PAY_PROCESSED = 'N') OR
    ( PAYROLL_TERMINATION_TYPE = 'A' AND
    TERMINATED_EMPLOYEE = 'Y' AND FINAL_PAY_PROCESSED = 'N') OR
    (PAYROLL_TERMINATION_TYPE WAS DEFAULTED AND
    BG_TERMINATION_TYPE = 'A' AND
    TERMINATED_EMPLOYEE = 'Y' AND FINAL_PAY_PROCESSED = 'Y'
    AND RUN_TYPE != 'R') OR
    ( PAYROLL_TERMINATION_TYPE = 'A' AND
    TERMINATED_EMPLOYEE = 'Y' AND FINAL_PAY_PROCESSED = 'Y' AND
    RUN_TYPE != 'R') THEN
    (STOP_ENTRY = 'Y'
    mesg = ' ELEMENT_NAME earning has been stopped for this assignment.'
    ln_calc_meth = SET_ALTRNT_FLAT_RATE_CALC_METH('NOT_APPLICABLE','NOT_APPLICABLE')
    if (1 = 1) then (
         soe_run = ELEMENT_NAME_ASG_GRE_RUN
         soe_ytd = ELEMENT_NAME_ASG_GRE_YTD
    RETURN flat_amount, clear_addl_amt, clear_repl_amt, neg_earn, STOP_ENTRY, mesg
    Can anyone help me in solving this problem. Any kind of pointers would be helpful.
    Thanks
    Pradeep.

    Hi Pradeep,
    Hope you created the new element using the 'Earnings Template' form. If it is created using the 'Earnings Template' form then the calculation rule
    should be correct. You said you are modifying the new element formula by using the existing element formula code, have you checked if the
    formula code to the old and new once have changed anything other than the element name and standard input elements reference. Try to use
    the debug messages in formula and see if that give you any clue. You should find the document in metalink how to debug a formula.
    Thanks,
    Satin

  • How to create a running total formula for different calendar years

    Hello everyone,
    I am looking for some help in creating a running total formula for different calendar years in Oracle. This is what I currently have organized in the crosstab report: vertically I have the cities from our database organized, then horizontially have the following information for each city:
    2006 /2007 /2008
    Amount /Amount Spent /Unspent Amount Amount Recieved/Amount Spent /Unspent Amount Amount Recieved/Amount Spent/Unspent Amount
    Recieved
    I am trying to create a formula that will specify each calendar year. For example, I'd like to have a formula in 2007 which would total the: 2007= {2006 unspent amount + the unspent amount in 2007} and same for 2008= {2007 unspent amount + the unspent amount in 2008}. I hope this is clear, I have simplified the report into a basic interpretation of what i've been trying to accomplish.
    Would anybody know if this is possible and how to approach this?
    Really appreciate it! Thanks.
    Alex

    Hi,
    you can try and define a running total as a calculation in the crosstab as:
    sum(Unspent Amount) over (partition by city order by year)
    i find the crosstab format comfusing sometime since the aggregation is auto applied.
    I would start with a flat table and then "duplicate is as a cross tab"
    for your running total you can sort the data by the city,year and get it to 3 lines for each city, for example:
    city year Unspent Amount all other amount...
    X 2007 10
    X 2008 20
    X 2009 30
    Y 2007 5
    Y 2008 15
    Y 2009 25
    then you can use a funtion to calculate the amount :
    sum(Unspent Amount) over (partition by city order by year)
    this is the sql i used just to check it:
    SELECT city,year,"Unspent Amount"
    ,SUM("Unspent Amount") over (PARTITION BY city ORDER BY YEAR)
    FROM (
    SELECT 'X' city, 2007 YEAR, 10 "Unspent Amount" FROM dual UNION ALL
    SELECT 'X', 2008 ,20 FROM dual UNION ALL
    SELECT 'X', 2009 , 30 FROM dual UNION ALL
    SELECT 'Y', 2007 , 5 FROM dual UNION ALL
    SELECT 'Y', 2008 , 15 FROM dual UNION ALL
    SELECT 'Y', 2009 , 25 FROM dual
    Tamir

  • Needing to input formula for percentage

    It need to look like this...(obviously I can do this part), but I need to input the formula for the third column to automatically take off the 30% discount from each list price (they will all be different. Then, I need the last column to keep the running total for all discounted prices column. I am having trouble finding this in the helps, as alot of the info is similar to what I need, but I have not found one that actually shows how to just take the 30% off the list price. Thanks a bunch for any help.
    Title
    Author
    List Price
    30% Vendor Discount
    Running Total
    BlahBlah
    Blah
    19.99
    need formula for reducing 30% of list price
    This column needs to keep a running total of discounted price

    Hi gayle,
    The formula in the 30% discount column (D2) is simply:
    =C2*.3
    Fill this down.
    A running total of every number in column D would look like this:
    SUM(D$2:D2)
    fill this down.
    quinn

  • Formula for printing balance on top and bottom

    Post Author: something_stupid
    CA Forum: Formula
    Hi guys,
    I'm fumbling around quite a while now and browsed the forum without any success (probably due to lack of knowledge of the right key-words in English). I want to print the balance of transactions at the top and at the end of each page. As there is some grouping (departmens, account group and accounts) and then in front of the transaction-lines (flag = 2) of each group first some summary lines show up (flag = 1) it's not that easy as I thought.
    Here's a verbal description of what I did so far:
    defined global nubmverars in a formular-field in the report-header-section
    added a formular-field for summing up the required fields and increment a counter for the detail-lines in the detail-section (only 6 or 7 transactions each page should be printed depending on if there's a balance from the last page or not)
    adding sub-sections in front and after the detail-section that show the balance of the last page respectively the balance of the current page
    both balance-sub-sections are suppressed if the flag of the data-row is not 2. the balance-sub-section at the top is suppressed if there's no balance
    summary of each account should be directly printed if there are no more detail-lines of after the top-balance
    a formular-field in the page-header-section should set the counter back to 0.
    the balance-detail-sub-section at the bottom is printed, if counter = 7 (incl. top balance-sub-section) and a pagebreak is forced.
    The big problem I encountered was that the counter was not resetted to 0 at the beginning of each page and it was also not evaluated in the section-setting area (where you can turn pagebreak on/off etc). In the section-setting-area only "WhilePrintingRecords" is allowed, but that doesn't help.
    So how can I achieve this kind of report? Best would be a special field like RecordNumber giving the number of records printed on a certain page so far. Any suggestions?
    Regards,
    Torsten
    Now here comes a visual description with some comments. Hope this makes it a bit clearer.
    Departement: 1
    summary1: 100.00 A                   (flag = 1)
    summary2: 400.00 A                   (flag = 1)
    Summary of Group A: 500.00
    .... &#91;some more Groups&#93;
    Summary of all groups: 7500.00
    &#91;second part of report for Department 1&#93;
    Account 1
    detail1: +50     (flag = 2)
    detail2: -30     (flag = 2)
    detail3: +10    (flag = 2)
    balance: of this page: +30       &#91;showing 3 detail-lines&#93;
    &#91;pagebreak&#93;
    balance: of last page: +30
    detail 3: +80   (flag = 2)
    detail4: -10    (flag = 2)
    balance: of this page: +100      &#91;showing only 2 detail-lines as there's the balance of the last page&#93;
    ====================
    Summary of Account 1: 100
    &#91;pagebreak&#93;
    Account 2:
    Department 2
    &#91;summaries&#93;
    Account 1:
    &#91;accounts&#93;

    I don't use You Tube but at least in Vimeo, their encoder sees something like this correctly.
    Here is what I assume is what you did…
    To change the aspect ratio of the image without changing the frame size (which is what you're showing) use the Trim function in the Transform>Crop options. You will lose some of the image in the re-framing.
    Russ

  • Need help with MDX formula to sum months

    I was able to use Gary C's suggestion to sum daily data for 90 days with the following formula.
    SUM( TAIL( TUPLERANGE(
    ([FY_2006], [01/01]), ([Scenario].CurrentMember,
    [Time].CurrentMember) ), 90 ))
    This formula works great - even when crossing different years in the Scenario dimension.
    I'm now trying to sum the prior 3 months using a similar TupleRange command:
    SUM( TAIL( TUPLERANGE(
    ([FY_2006], [JAN]), ([Scenario].CurrentMember,
    [Time].CurrentMember) ), 3 ))
    I'm running into an issue due to additional parents in the time dimension. January and February of the current year are pulling data from the children of another parent in the Time dimension as opposed to Nov and Dec from prior year.
    My Time dimension is setup as follows:
    Time
    |
    |-Total Year
    | |-Jan
    | | |-01/01
    | | |-01/02...
    | |.
    | |-Feb... Dec (each month has days as children)
    |.
    |.
    |-QTDs
    | |- Various parents and shared children
    |.
    |-Weeks
    | |-FY08_Weeks
    | |.
    | |-FY09_Weeks
    Using the previous TupleRange command, when I retrieve data for Jan it retrieves data from the following members:
    Jan
    FY08_Weeks
    FY09_Weeks
    Any suggestions on how I can write the MDX formula so my 3 Month formula pulls in the correct members? (That is, it should only pull in members from the 'Total Year' parent.)

    In ASO architecture, if you want to aggregate these multiplied values you probably want to do the multiplication prior to loading so the sum of the products rolls up. Right now, you can't have the multiplication done in MDX and then have ASO aggregate. It's mostly a performance concern; you can do the multiplication and aggregation in one formula if you want.<BR><BR>The basic multiplication is just<BR> [Standard Material Per Unit] * [Units Sold]<BR><BR>To aggregate, you need to wrap in additional clauses. I've attached code here so you can see it with indenting- I believe that consistent indenting helps catch a lot of syntax errors.<BR><BR>You will also need to assign the formula to a new member (account or otherwise).<BR><BR>If you only want to see the values at level-0 and you don't want them aggregated, it's very easy:<BR><BR>iif (<BR> [Product].CurrentMember.[LEVEL_NUM] = 0,<BR> [Standard Material Per Unit] * [Units Sold],<BR> MISSING<BR>)<BR><BR><BR>

  • Formula for calculating aggregate percentage and percenatge of gender

    hi all
    i have a sp from which i get result columns  gender,percentage,studentcount,year
    my sp is like this..
    IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[usp_GetState]') AND type in (N'P'))
    DROP PROCEDURE usp_GetState
    GO
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE PROCEDURE [dbo].[usp_GetState]
    ( @ExamYear Smallint
    ,@ExamType Nvarchar(10)
    AS
    BEGIN
    SET NOCOUNT ON;
    WITH cte_Schools AS
    SELECT
    [Foreign]= CASE WHEN M.Zone ='F' THEN 'Y' ELSE 'N' END
    ,CASE WHEN M.Zone ='F' THEN UPPER(C.CountryName) ELSE UPPER(S.StateName) END StateName
    ,COUNT( DISTINCT M.SchoolCode) Schools
    ,SUM( M.Nos) Students
    FROM rptFinalResultSummaryMaster M
    LEFT OUTER JOIN State S ON M.StateCode=S.StateCode AND M.Zone=UPPER(LEFT(S.Zone,1))
    LEFT OUTER JOIN Country C ON S.CountryId= C.CountryId
    WHERE M.Year=@ExamYear AND M.CourseCode=@ExamType
    GROUP BY CASE WHEN M.Zone ='F' THEN 'Y' ELSE 'N' END
    ,CASE WHEN M.Zone ='F' THEN UPPER(C.CountryName) ELSE UPPER(S.StateName) END
    SELECT
    SlNo=ROW_NUMBER() OVER(PARTITION BY [Foreign] ORDER BY StateName)
    ,[Foreign] ,StateName, Schools, Students
    , Percentage = (Students/(SELECT SUM(Students)*1.000 FROM cte_Schools))*100
    FROM cte_Schools
    ORDER BY [Foreign],StateName
    END
    GO
    now..i wrote formula for percentage  and when i connected this sp to my rdl where i took tablixi gave percentage value to gender and total percentage column
                                           gender(column group)                      
    total
    number   percentage
    passcategory         
    this is my tablix format
    my output looks like
    boys     girls                                     
    total
    number(percentage)
    passcategory1  (percenatge)                        21 (40.38)          43 (56.75)          
           64(48.56)          
    passcategory2   (percenatge)                       11  (21.15)         10    (13.51)               31(17.33)
    passcategory3    (percentage)                       20 (38.46)         21    (28.37)               41(33.41)
    total                     (percentage)                     
    52(xxx)           74  (xxx)                     136   (100%)
    i'm not getting thegender percentage properly for girls and boys total percentage of boys and girls coming correctly but individual percentage is not properly coming...that's because in sp i gave calculation for only total percenatge ..how can i calculate
    the individual percentage of girls and boys in single column...so that i can place in gender column in tablix..and i can retrieve individual percentgaes of girls and boys seperately as shown in output..
    please reply..its urgent
    thanks in advance..
    lucky

    please reply..its urgent
    Here is a tip: if you want to tick off people from helping you, you should absolutely include "urgent" in your post. That's a good way to encourage people to move to the next post. I did see this one earlier today, but did not have the time.
    Anyway, I cannot really make out heads or tails of your question. Your output takes about gender, but I cannot see it in the output from the query, which appears to group by "Foreign" and StateName. How does the boys and girls get into the picture?
    And for that matter that "totals" column?
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Formula for Pricing procedure

    Hi,
    I got a requirement where I need to write a formula for Pricing procedure say ZAUSX1. The requirement is :
    s.no. 170 = s.no. 150 - (sum of s.no. 151 to s.no. 169).
    s.no. 450 = s.no.170 - (sum of s.no.171 to s.no.449).
    Can anyone send me the steps for the above requirement and the relevant suggestions will be highly appreciated.
    thanks,
    Bhaskar

    Hi
    In the pricing you should create a 4 fields:
    - One (A) to store the value of position 150
    - One (B) to store the value of the total from 151 to 169
    So assign a routine to calculate the position 170: A - B
    - One (C) to store the value of position 170;
    - One (D) to store the value of the total form 171 to 449
    So assign a routine to calculate the position 450 = C - D
    U can enhance the structure KOMPAZ in order to create the fields A,B, C and D for KOMP, or create an APPEND structure of KOMP
    Max

  • Formula for division of result rows in BEx 3.5

    Hi All,
    We have created 3 new formulas A,B and C respectively.C=sum/sum (At record level)
    Our requirement is that the result row of C should be calculated as "value in result row of A/value in result row of B".
    We are able to achieve this division for individual records but at the result row level this division does not work.
    Can someone please help us write a formula for this?
    Regards,
    Suchitra

    When you want to consider result of operands.
    C = SUMCT(A)/SUMCT(B)
    When you want to consider overall result
    C = SUMGT(A)/SUMGT(B)
    More on using these check the below link
    http://help.sap.com/saphelp_nw04/helpdata/en/03/17f13a2f160f28e10000000a114084/frameset.htm
    Hope this helps.

  • Formula For Calculating An Average

    I have the below formula in a group footer (Group Footer #1) that is suppose to calculate the average between the accumlated number of days (i.e. {@Days Taken}) divided by the number of records (i.e. Count (). The value for the number of days is correct and the value for the record count is correct. For some reason the value for the average is not correct.  The average is not re-calculating when there is a new group.  The average is repeated for each group.  Is there anything wrong with this formula ?
    Sum ({@Days Taken})/Count ()

    Lenell,
    You need to tell it to divide the sums per group.
    So;
    Sum ({@Days Taken},)/Count (,)
    Replace with the field that you are grouping on.

  • Formula for Average

    Post Author: kbrinton
    CA Forum: Formula
    Good Morning,
    I have a ticket number field that is a string so all I can do is a count on the field.  But I need to do an average.  Does anyone know a formula for this?

    Post Author: V361
    CA Forum: Formula
    What does the sting look like ?, is it just numbers, or numbers and characters 888-888-8888, depending on the string, you should be able to convert it to a number (using a formula) and then sum the formula.   Please provide an example of your strings if you can.

  • 17 numbers max of BeX formula for Analyzer ?

    Hi experts,
    We have an Analyzer Excel Workbook, in that, we use a query with two keyfigures and on formula that sums the 2 keyfigures, in visualization options, all 3 have units and 9 decimals:
    The 2 keyfigures are FLTP types, one is an integer and the other is decimal number. One result is like this:
    Kfigure1 _____________ Kfigure2
    1.201.145.200.010 _____ 0.987025432
    The result of the formula is: 1.201.145.200.010'987000000
    As you see it doesn't take care more than 17 numbers, is 17 numbers the limit for BeX in Analyzer Workbooks ?
    Do you know any notes about that issue ?
    Thanks in advance.

    Hello John,
    This could be a limitation of BEx Analyzer/Excel or the OLAP engine limitation.
    Please, check if this behavior occurs on RSRT2 and RSRT transactions.
    You have to input the query's technical name instead the workbook's ID.
    If the behavior only occurs on BEx Analyzer, try to download the latest version:
           > bi710sp12_1200-10004472.exe   (if you are using BEx Analyzer 7.0)
           > bw350gui710_8-10004473.exe    (if you are using BEx Analyzer 3.x)
    Best regards,
    Edward John

Maybe you are looking for