Multiple Condition Calculation - New to Numbers

I am new to numbers and/or excel but what Im trying to do ended up being a lot harder than I thought it should be.
Im trying to create a summary of items based on multiple conditions
_ID TYPE # DATE_
a000001 1 5 Jan 1, 2008
b000002 7 2 Jan 2, 2008
a000001 7 1 Jan 3, 2008
a000001 1 6 Jan 4, 2008
b000002 1 32 Jan 5, 2008
c000003 7 6 Jan 6, 2008
c000003 1 6 Jan 7, 2008
If ((ID == a000001) AND (TYPE == 1)) then add the # column to the current total.
OR
If ((ID == a000001) AND (TYPE == 1) AND (DATE == Jan 1, 2008)) then add the # column to the current total.
Does that make sense? Ive found may versions of conditional on this forum but I cant find any with running totals.
Thanks all!
null

Bo,
I'm going to give you a method that you can massage to your liking.
The E-column may be hidden, and will contain your condition logic. Now E2 contains:
=AND(A2="a000001", B2=1)
Column A2 of the Formula Table contains:
=SUMIF(DataTable :: E, TRUE, DataTable :: C)
The first argument is the test range, your logic, the second argument is the valid condition for the test range, and the third argument is the range to be summed.
Jerry

Similar Messages

  • MDX Calculated Member With Multiple Conditions

    I need to create a calculated member in my cube that spans multiple dimensions. A current calculated member looks like this:
    [Employee Hours Category].[Utilization Category].[NON-PTO], [Measures].[Employee Hours]
    This calculated member returns all the hours an employee worked that are not PTO.
    I need to select employee hours but with multiple conditions:
    - [DIM BILL STATUS][Bill Status] equals 0
    - [Employee Hours Time Category].[Time Category] equals "Client Facing"
    - [DIM PROJECT].[Client] isn't like "Olson"
    I know this is probably pretty easy, but I'm horrible with MDX!
    Thank you!!
    A. M. Robinson

    Thank you...
    Your answer looks good but I was actually able to figure out most of it, but still looking how to incorporate a FILTER into the MDX. I would like to FILTER like this:
     FILTER ([DIM Project].[Client].[Client].Members , 
                 NOT InStr([DIM Project].[Client].CurrentMember.MEMBER_NAME, "Olson")
    Heres the MDX I have so far that is working fine:
    ([Employee Hours Time Category].[Time Category].&[Client Facing],
       [DIM BILL STATUS].[Bill Status ID].&[1], [Measures].[Employee Hours])
    Do you just wrap the whole MDX in the filter, and if so, how would that be formatted?
    A. M. Robinson

  • Calculation formula userexit not working for multiple condition types

    Hi,
    we have a problem in the CRM ISA-B2B scenario where the custom user exit is only working for single condition type.
    but we need it for multiple condition types .
    the value of the subtotal is not being retrieved for multiple conditions. at a time only one condition value is being retrieved and shown in the webshop - shopping basket.
    for ex:
    we have scenario 1 where Y001 -Freight condition type is applicable for one customer.and Y002 is applicable for another customer.
    when we are trying to show the subtotal condition value in the webshop by using a single custom user exit in the pricing procedure it is only working for either of the above 2 customers depending on the VMC cache status.
    is there any problem if use the single user exit for both condition types?
    and if it needs to be differentiated how exactly we can do that with the same logic in the java class.
    Thanks in advance,
    PSR.

    Hi Arshi,
    below is the code:
    public class ZValFormula_ZZWI1 extends ValueFormulaAdapter {
         private static String zzwi = "ZZWI1";
         private static char  zzwiC = '@';
         private static UserexitLogger userexitlogger = new UserexitLogger(
         ZValFormula_ZZWI1.class);
         public BigDecimal overwriteConditionValue(IPricingItemUserExit item,
                   IPricingConditionUserExit condition) {
              ICurrencyValue val = condition.getConditionValue();
              userexitlogger.writeLogDebug( "value saved for " + zzwi + " (" + zzwiC + ") = "
                        + val.getValueAsString());
              item.setSubtotal( zzwiC, val.getValue());
              return val.getValue();
    hope this would give more idea to look at the problem.
    Thanks,
    PSR

  • Multiple Users syncing data on Numbers spreadsheet

    What's the best way for multiple users to share a numbers spreadsheet and upkeep of data?
    Thanks! I know- I'm pretty new at this.

    All I know is in the following thread, I have no personal experience with it:
    http://discussions.apple.com/thread.jspa?messageID=10209828&#10209828
    I hope that helps.

  • I am using CC adobe Acrobat to combine multiple pdfs and add page numbers. Mac users can no longer read the page numbers but pc users can.

    I am using CC adobe Acrobat to combine multiple pdfs and add page numbers. As of about 2 weeks ago the mac users can no longer read the page numbers they get a font error message and see only -- where the page information should be. The pc users do not have this same problem. When I replace our regular font (URW Grotesk) with a system font (Verdana) everyone is able to read the page numbers. This is a new issues, I have been creating these documents in the same way for years without a problem. I have been on hold and on and off calls for the last two hours, I keep getting hung up on once I find someone in adobe support to talk to!

    Hi KnoopL,
    Are the Mac users using Preview to view the pdfs or Adobe Reader?
    Regards,
    Rave

  • Mail step should be sent to all the users in multiple condition

    hi experts,
                      I have a requirement on invoice posting.Say if invoice amount is 1000 then person A can post the invoice.
    if >= 1000 person B can post the invoice.
    If >=2000 person C can post the invoice.
                                                                      what i have did is, created a multiple condition and then based on the inv amount assigned 3 methods for invoice posting.My problem is if a person posts an invoice amount of 1000.A mail has to be sent to Person B and C informing that an amount of 1000 is posted with user id.Same for person B, ie mail should be sent to person A and C informing regarding invoice posting.Now inside the multiple condition i cannot assign mail step.Coz based on the condition it will go to a particular user for invoice posting but where as mail should be sent to all the users.So how can i achieve this??.

    Hi Priyanka,
    I am getting 1 thing why you need need multiple conditions. No need to create any multiple conditions.
    1. Create a rule using transaction PFAC. (you can use the example as Rule: 0000168).
        a. Create an function module with table parameters as ACTOR_TAB (type SWHACTOR) and AC_CONTAINER (Type
            SWCONT). You can aswell copy the FM used in 168 rule and change it. check the logic mentioned below.
        b. In PFAC transaction, go to container tab and create 2 container elements.  For amount and Mail_indicator (type should be
            same as that of the amount field in your workflow) .
    2. Use this Rule in your workflow to send mail.
    Logic:
    ""Lokale Schnittstelle:
    *"       TABLES
    *"              ACTOR_TAB STRUCTURE  SWHACTOR
    *"              AC_CONTAINER STRUCTURE  SWCONT
    *"       EXCEPTIONS
    *"              NOBODY_FOUND
      INCLUDE <CNTAIN>.
      DATA BEGIN OF ORG_OBJECT OCCURS 0.
              INCLUDE STRUCTURE SWHACTOR.
      DATA END OF ORG_OBJECT.
      DATA: BEGIN OF NEW_AC_CONTAINER OCCURS 3.
              INCLUDE STRUCTURE SWCONT.
      DATA: END OF NEW_AC_CONTAINER.
      DATA: V_AMOUNT TYPE <AMOUNT FIELD>.
      DATA: V_MAIL_INDICATOR TYPE <FLAG>.
      REFRESH: actor_tab.
    Get the org-object under consideration. AMOUNT is the container name defined in your PFTC transaction
      SWC_GET_ELEMENT AC_CONTAINER 'AMOUNT' 'V_AMOUNT'.
    Get the org-object-type and the org-object id.
      SWC_GET_ELEMENT AC_CONTAINER 'MAIL_INDICATOR' V_MAIL_INDICATOR .
    Pass the org-object, the org-object-type and the org-object-id
    to a new container.
    The org object get a new name: ORG_AGENT.
      SWC_SET_ELEMENT NEW_AC_CONTAINER 'AMOUNT' 'V_AMOUNT'.
      SWC_SET_ELEMENT NEW_AC_CONTAINER 'MAIL_INDICATOR' V_MAIL_INDICATOR .
    check for V_AMOUNT and V_MAIL_INDICATOR.
    if the v_amount = 1000 .'
      if  v_mail_indicator = ' '.
        actor_tab-OTYPE = 'US'  .
        actor_tab-OBJID = 'SAPUSER1'.
        append actor_tab
      else.
        actor_tab-OTYPE = 'US'  . 
        actor_tab-OBJID = 'SAPUSER2'.
        append actor_tab
        actor_tab-OTYPE = 'US'  .
        actor_tab-OBJID = 'SAPUSER3'.
        append actor_tab
      endif.
    endif.
    Similarly write the logic for other conditions.
    This way you can use same for different purposes.
    If you pass the indicator that means you are sending mail to other approvers for information.
    Revert back if u need more help.
    Regards,
    Gautham

  • Multiple condition : Error when starting a SWITCH branch

    Hi,
    In our Z Leave Workflow,I am facing the errors listed below.
    Error when starting a SWITCH branch
    Error during CASE evaluation in SWITCH mode for node 0000000158
    Operator 'EQ': The value of the left operand cannot be determined
    Error in the evaluation of expression '<???>&REQ.STATUS&' for item '1'
    Unable to determine the value of component ''
    It gives error in Multiple condition Request Approved? which is similar to standard WF12300111 node number 158 (u can say copy of WF12300111
    This multiple condition works in some scenario But it gives dump at other scenario .
    I have checked the value of REQ.STATUS in runtime. It populates the value as 'POSTED' in runtime,
    Please suggest if any solution on this.
    Regards,
    Kalpesh

    Hi There was some problem with task which was comprising class CL_PT_REQ_WF_ATTRIBS and APPROVE method. This method is to change the status of particular leave workitem.After running this particular task ,the status was not changin instantly.This method locks particular workitem and was releasing the workitem once the WF gets completed.Hence I was getting REQ.STATUS as sent.
    I have changed that task with following code in new task...
    DATA:
          REQUEST_ID TYPE PTARQ_DEDUCTION-REQUEST_ID,
    request      TYPE REF TO if_pt_req_request,
        new_status   TYPE tim_req_status.
      SWC_GET_ELEMENT CONTAINER 'REQUEST_ID' REQUEST_ID.
    CALL FUNCTION 'ENQUEUE_EPTREQ'
        EXPORTING
          mode_ptreq_header = 'E'
          request_id        = request_id
        EXCEPTIONS
          foreign_lock      = 1
          system_failure    = 2
          OTHERS            = 3.
      IF sy-subrc <> 0.
        MESSAGE w058(hrtim_abs_req) WITH request_id.
      ELSE.
    CALL METHOD ca_pt_req_header=>agent->get_request
          EXPORTING
            im_request_id = request_id
          IMPORTING
            ex_request    = request.
    execute state transition
        CALL METHOD request->initiate_state_transition
          EXPORTING
            im_transfer_event = 'APPROVE'
          IMPORTING
            ex_new_status     = new_status.
    COMMIT WORK.
        CALL FUNCTION 'DEQUEUE_EPTREQ'
          EXPORTING
            request_id = request_id.
    ENDIF.
    This will create new status for leave item during WF processing.
    Apart from that also added Wait for  2 minutes after that task....
    Thanks for your help.
    Regards,
    Kalpesh

  • Multiple condition for payment terms

    Hi,
    I wanted to create new payment terms with multiple combination say for example
    95% Payment in Advance & Remining 5% in Net 360 days.  How to configure with multiple conditions.

    Hi
    You may have to use instalment payment terms.
    Regards

  • Multiple conditions and multiple derivation in a derived column, SSIS

    Hi I am trying fairly new to SSIS , and my task is to convert dates in string as given below to a datetime.
    These are my date of birth  in the source file (string data type):
    Source date of birth  (String)                                            
    Desired DOB (Date Time)
    1050101                                                       
    2005-01-01 00:00:00
    1060101                                                        2006-01-01
    00:00:00 
    470324                                                         1947-03-24
    00:00:00                                   
    320209                                                          1392-03-24
    00:00:00
    101                                                               
    NULL
    0                                                                    NULL
    I have this ssis expression,
    (([Drv DOB] == "0") || ([Drv DOB] == "101") ? NULL(DT_DBTIMESTAMP) : (DT_DBTIMESTAMP)(SUBSTRING([Drv DOB],1,2) + "-" + SUBSTRING([Drv DOB],3,2) + "-" + SUBSTRING([Drv DOB],5,2)))
    It handles all dates but except for 7 digit sting date of birth. How can handle such multiple condition. Help much appreciated.

    I tried to use your expression but I had to omit LEN("190000606")<8, then only I had the valid syntax.
    However, I changed my initial expression to this :
    [Drv DOB] == "101" || [Drv DOB] == "0" ? NULL(DT_DBTIMESTAMP) : (LEN([Drv DOB]) == 6 ? (DT_DBTIMESTAMP)(SUBSTRING([Drv DOB],1,2) + "-" + SUBSTRING([Drv DOB],3,2) + "-" + SUBSTRING([Drv DOB],5,2)) : (DT_DBTIMESTAMP)(SUBSTRING("20" + [Drv DOB],2,2) + "-" + SUBSTRING([Drv DOB],5,2) + "-" + SUBSTRING([Drv DOB],7,2)))
    now it handles length-7 date of birth, but doesn't handle length-6. All the DOB for length-6 are represented as NULL. Can you look over it?

  • Multiple Conditions\Actions in a Workflow

    I am in the process of creating an expense approval form with a workflow that has two Approval stages. In the first stage, however, the approver would be dynamic based on a selection in the form. The second stage approval would go to the same
    person\group. What's the best\correct way to do multiple\conditions\actions in a single step? As an example of the workflow:
    If Field1 equals Value1 Assign a task to Person1. If Associated Task is Approved create a new Task and Assign it to Person 10
    there would be about 12 different iterations of the first step, Value2 Assign to Person 2 and so on.

    Hi pjs, it depends on who the person is/how they're related to the selection on the form. If it's the user's manager, you can get that information by using the link below. If there's no real correlation to the selection made, then you'd have to make a list
    with two columns- "selection" and "person to email." Then check that list against the selection and get the corresponding email for the particular approver.
    http://www.sharepointanalysthq.com/2011/04/user-profile-data-in-sharepoint-designer-workflows/
    cameron rautmann

  • New to Numbers - best Tax organization?

    Hi All,
    I am new to Numbers. I am self-employed and unfortunately terrible at organization! I very simply need to keep track of all my expenses throughout the year, including home office expenses, flights, meals, materials, etc. Most everything I do can be deducted and I have trouble keeping up and staying orderly. Any suggestions for me on which aspect of Numbers might be most fruitful? Thanks and enjoy your afternoons.

    I am in a similar situation to you.
    Keep it simple and just list items under groups, subtotal those and then use another list which consists of nothing but the subtotal items with calculations on them to work out the tax.
    Then work those into the Totals of major categories.
    eg Take Stationery. Just list every purchase that is stationery in one table and total it.
    You may have another which is software/computer and another which is Rent/Heating/Power etc.
    The totals of all these would go into an *Office Expenses* heading.
    Depreciated items would be in their own table which would run across years and give yearly results that would be picked up under a major heading etc.
    Often it pays to mimic the tax form, I'm not American so I don't know what yours looks like, but I use ours as the model. That way it makes it very easy to simply transfer over the results.
    Peter

  • Is it possible to save a set of conditional format rules in Numbers?

    I am a doctor, and I have a call schedule that comes out each month (in an Excel spreadsheet). So, I want to open up the spreadsheet in Numbers and have each instance of my name (Smith) highlighted, by setting the background of the cell to a fluorescent yellow. This is easy to do by using conditional formatting, and it works well.
    My problem is that each time I want to use the same conditional formatting rule, I have to manually set it up. I would like to be able to save the 'rule', ideally linked to a toolbar button, so that I can run this conditional formatting on any Numbers spreadsheet with one (or two) click(s).
    Does anyone know if this is possible?

    Create a table with the conditional rules then use Format > Advanced > Capture Table
    Each time you will create a new table from the captured table it will have all the source's attributes.
    Of course, you must save in the native Numbers format.
    If you export as Excel most of these settings will be lost.
    Yvan KOENIG (from FRANCE vendredi 9 janvier 2009 19:44:05)

  • Applying SUBTOTAL to multiple condition SUMPRODUCT

    Hi
    I have created the following formula which works:
    =SUMPRODUCT(--($AG$10:$AG$1999<>0),$U$10:$U$1999/SUMIF($AG$10:$AG$1999,"<>"&0,$U$10:$U$1999),$X$10:X$1999)
    Column AG is a "type" filter where I've assigned 0 values to data I need to ignore when doing my sumproduct, U is my values column so the values I want to sumproduct with column X which is my return column. So this works fine to ignore my blank
    types and sumproduct the remaining values and returns to give me a total.
    However I'd like to extend this so that when I put a filter on my data the forumla holds.
    I've previously used the following for subtotals
    =SUMPRODUCT(X9:X1999,SUBTOTAL(109,OFFSET($U$9,ROW($U$9:$U$1999)-ROW($U$9),,1))/$U$7)
    but this doesn't account for the fact that I need to strip out the types that are blank which I do in the above via: --($AG$10:$AG$1999<>0)
    Is there anyway to combine these two forumlae???
    I'm trying to build the spreadsheet to be robust enough for new data to be pasted into cells A9:AG1999 each month and the required metrics pop out at the top so that others can use without having to update pivots etc. I need it dummy proofed so all they
    do is paste in new data and the forumulae do the rest!
    Any help would be greatly appreciated :O)  Happy to provide more detail if the above isn't clear!

    Try:
    =SUMPRODUCT(X$9:X$5129,SUBTOTAL(109,OFFSET($U$9,ROW($U$9:$U$5129)-ROW($U$9),,1))/SUMPRODUCT(SUBTOTAL(109,OFFSET($U$9,ROW($U$9:$U$5129)-ROW($U$9),,1)),--($AG$9:$AG$5129<>0)),--($AG$9:$AG$5129<>0))
    Solved by NVBC in the OzGrid Excel forum: tipost titled "Apply SUBTOTAL to multiple condition SUMPRODUCT inc SUMIF"

  • Multiple Condition Exclusion

    The new price procedure I'm configuring has price conditions that need multiple condition exclusion logic.
    Example, say my conditions are:
    1) ZPR1 - price 1
    2) ZPR2 - price 2
    3) ZDIS1 - discount 1 %
    4) ZDIS2 - discount 2 value
    5) ZDIS3 - discount 2 %
    Logic are:
    A) If ZPR1 is used ZDIS2 and ZDIS3 are excluded.
    B) If ZPR2 is used ZDIS1 is excluded.
    C) If ZDIS2 is used, ZDIS3 is excluded.
    D) If ZDIS3 is used, ZDIS2 is excluded.
    A is easy. Just group ZPR1 and ZDIS1 together and ZPR2, ZDIS2 and ZDIS3 together, then make 1 exclusive of 2.
    B is easy also.
    What about C and D? Can you just put ZDIS2 in another group and ZDIS3 in a different group and create an exclusion rule against each other?
    Thanks.

    In my opinion you can follow the following link to achieve your requirement:
    - [Proposed Pricing Procedure|https://docs.google.com/leaf?id=0B-5wCmYJ-6dlNDIxNTg0YzUtMTE0Yy00M2VmLTliOWItMTNkMWE4YTZkMzY4&hl=en] for the requirement
    If you have any other thoughts then you can share you proposed pricing procedure.
    I hope this can assist you.
    Thanks & Regards
    JP

  • Multiple condition does not work

    Hi,
    I took a copy of the standard Leave request workflow (WS12300111) to a new workflow (WS90000002).
    The class that was used in this workflow (CL_PT_REQ_WF_ATTRIBS) was also replaced with a copy (ZHR_CL_PT_REQ_WF_ATTRIBS).
    The workflow is used for the approval of leave requests.
    Now in the workflow there is a multiple condition which verifies whether the request was approved, rejected or withdrawn (this was also there in the standard).
    The condition contains the rules:
    Approved    &REQ.STATUS& = POSTED or &REQ.STATUS& = APPROVED or &REQ.STATUS& = ERROR
    Withdrawn  &REQ.STATUS& = WITHDRAWN
    Other values Rejected
    --> REQ is an object of the class mentioned above. The rules were created in the normal way by clicking on the object in the container.
    The workflow always stops at this condition, because it can not define the value of REQ.
    If I check the container in the workflow report, the field REQ and its STATUS are correctly filled.
    What could be wrong here?
    Thanks,
    Wim

    Hi,
    I solved it...
    Just had to add a commit work to the task that is executing the status change of the request.
    Kr,
    Wim

Maybe you are looking for