How do I sum a column with 3 conditions?

Here is what I'm trying to do.  If the box is checked in Hours::B, and Hours::Companies = Invoiced::A2, then sum Duration.  This all takes placed in the Invoiced::Duration Invoiced cell.  So once I invoice a company for a certain amount of hours for the month, I can check the invoiced box, and it automatically calculates the total duration invoiced for that company.  I know there has got to be a way, I just can't get the formula right.  Currently it is doing the sum of the duration for any company with invoiced checked.  Help!

Hi Taryn,
If I'm reading this correctly, there are two conditions, not three.
Company name
State of checkbox
Invoiced::D2 should read 6h 0m,
Invoiced::D2 should read 1h 30m
Formulas:
Invoiced::D2 (and filled down to D3):    =SUMIFS(Hours :: F,Hours :: $A,A,Hours :: B,TRUE)
To Invoice::C2 (and filled down to C3): =SUMIFS(Hours :: F,Hours :: $A,A,Hours :: B,FALSE)
To Invoice::D2 (and filled down to D3): =IFERROR(B*DUR2HOURS(C),"")
The error trap is needed when, as in the sample, there are no hours to be invoiced. SUMIFS will return a zero, and DUR2HOURS, expecting a Duration, but finding a number, will throw an error. IFERROR catches the error and returns an empty string, acceptable to SUM in the Footer cell, D4.
Regards,
Barry

Similar Messages

  • How to convert rows into columns with decode function

    Hi,
    How to convert rows into columns with the help of decode function in oracle.
    thanks and regards
    P Prakash

    say
    col1 col2
    1 10
    2 20
    3 30
    then use
    select col1,
    sum(decode(col2,10,10)) "new1"
    sum(decode(col2,20,20))"new2"
    sum(decode(col2,30,30))"new3"
    from table_name
    group by col1;
    we used sum u can use ny function if wont u have to give the column name i.e col2 name also
    so i think u got it nw
    regards

  • How do I autofill a column with numbers increasing by 1?

    How do I autofill a column with numbers increasing by 1?

    Hi Patricia,
    Type in your first 2 values. Select both and drag the yellow dot down to fill the remainder.
    quinn

  • How can i sum the columns by condition?

    ID    Type    QTY
    1      A         20
    2      A         20
    3      B         20
    I want to some QTY group by A but I also need the ID column to identify the order of  row.
    How can I sum QTY group by A and the result is sort by ID ?
    Thanks you 

    Whats your expected output?
    Is this the below?
    Create Table test(id int,[Type] char(1), QTY int)
    Insert into test Values(1,'A',20),
    (2,'A',20),
    (3,'B',20)
    SElect *,SUM(qty)Over(partition by Type) From test Order by id
    Drop table test

  • How to save data in columns with headers?

    I'm trying to save 10 different types of data into individual columns with headers, but I can either get one giant column of data with the given header at the start of each data set (imbeded in the column) or I can get the headers in different columns, but the data all in one row. This seems like a simple problem, but for the life of me I can't figure it out--HELP!
    I've attached my code...don't laugh, I think I've created a monster trying to figure this out. What I'm trying to get is one column with the header "Power (watts)" and then the power data in that column, one column with the header "angular acceleration (rad/s^2)" and then the angular acceleration data in that column, and so on...
    Thanks!
    Attachments:
    RILE-25.vi ‏335 KB

    Hi
    Take a look at this VI / Block diagram pic
    Here, I am demonstrating how to write data to a file column wise along with relevant column headers
    Hope this helps
    Regards
    Dev
    Attachments:
    header_column data.JPG ‏49 KB
    header_column data.vi ‏20 KB

  • How to fix "Modifying a column with the 'Identity' pattern is not supported"

    When doing Code First Migrations my mobile service always errors in the seed method with: 'Modifying a column with the 'Identity' pattern is not supported. Column: 'CreatedAt'. Table: 'CodeFirstDatabaseSchema.Methodology' for the CreatedAt column. All my
    models inherit from EntityData. 
    // Sample model
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using Microsoft.WindowsAzure.Mobile.Service;
    namespace sbp_ctService.Models
    public class Methodology : EntityData
    public Methodology()
    this.Scenarioes = new List<Scenario>();
    public string Id { get; set; }
    [Required]
    [StringLength(50)]
    public string EntryMethod { get; set; }
    [Required]
    [StringLength(50)]
    public string TestDirection { get; set; }
    [Required]
    [StringLength(50)]
    public string PassCriteria { get; set; }
    [Required]
    [StringLength(50)]
    public string Dependency { get; set; }
    public bool ExtraInfo { get; set; }
    public virtual ICollection<Scenario> Scenarioes { get; set; }
    And in my Configuration.cs file during an update here's my seed method:
    protected override void Seed(sbp_ctService.Models.sbp_ctContext context)
    // This method will be called after migrating to the latest version.
    context.Methodologies.AddOrUpdate(
    m => m.Id,
    new Methodology { Id = "Methodology1", EntryMethod = "P/F", PassCriteria = "P/F", Dependency = "None", ExtraInfo = false, TestDirection = "Round" },
    new Methodology { Id = "Methodology2", EntryMethod = "P/F", PassCriteria = "Best", Dependency = "None", ExtraInfo = false, TestDirection = "Round" },
    new Methodology { Id = "Methodology3", EntryMethod = "P/F", PassCriteria = "Best", Dependency = "None", ExtraInfo = false, TestDirection = "In/Out" },
    new Methodology { Id = "Methodology4", EntryMethod = "P/F", PassCriteria = "Best", Dependency = "None", ExtraInfo = false, TestDirection = "Out" }
    For some reason on an update the CreatedAt field is created and given a value of null. So of course on an insert/update it will error because CreatedAt is an Identity field.
    I've tried to configure the modelBuilder in my context to tell it that CreatedAt is an identity field, but that still doesn't work.
    modelBuilder.Entity<Methodology>()
    .Property(m => m.CreatedAt)
    .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
    So far the only way to fix this is by commenting out my Seed data, but it's not a fix. I've seen other solutions where you can force it to not serialize certain fields, but I don't know if those solutions apply.

    So I think this occurs because you might have created the database (Code-first) with POCOs that didn't have the CreatedAt field in them. I think that's what I did and the easiest way to fix it for me was to delete my database and re-create it with my POCOs
    inheriting from Entity Data from the very beginning. We were still in development so it worked out for us but I know some people might not be able to do that. Here's what my table looks like after it was created correctly:
    USE [database_name]
    GO
    /****** Object: Table [sbp_ct].[Methodologies] Script Date: 2/24/2015 9:48:45 PM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [schema_name].[Methodologies] (
    [Id] NVARCHAR (128) NOT NULL,
    [EntryMethod] NVARCHAR (50) NOT NULL,
    [TestDirection] NVARCHAR (50) NOT NULL,
    [PassCriteria] NVARCHAR (50) NOT NULL,
    [Dependency] NVARCHAR (50) NOT NULL,
    [ExtraInfo] BIT NOT NULL,
    [Version] ROWVERSION NOT NULL,
    [CreatedAt] DATETIMEOFFSET (7) NULL,
    [UpdatedAt] DATETIMEOFFSET (7) NULL,
    [Deleted] BIT NOT NULL,
    [Name] NVARCHAR (MAX) NULL
    GO
    CREATE CLUSTERED INDEX [IX_CreatedAt]
    ON [schema_name].[Methodologies]([CreatedAt] ASC);
    GO
    ALTER TABLE [schema_name].[Methodologies]
    ADD CONSTRAINT [PK_schema_name.Methodologies] PRIMARY KEY NONCLUSTERED ([Id] ASC);
    Does yours look something like that?

  • HT3354 How do i create a column with a percentage formula

    Im really struggling creating a line of columns with different formulas.
    colin

    The title of your post and the text of your post sound like two different questions. One is about creating a column of percentages and the other is about a "line of columns with different formulas".  Neither gives enough information about the problem for anyone to provide a good answer, unless we guess at what you are asking. Here is my guess:
    If B2 has a number in it and C2 has the formula =B2*5%, C2 will be 5% of B2. If you copy/paste or fill-down that formula to the rest of the column, C3 will be 5% of B3, C4 will be 5% of B4, etc.
    I have no idea what "a line of columns with different formulas" means so I'm not going to hazard a guess.

  • How to create a service product with a condition record?

    Hi all
    I'm quite new to CRM programming and I now need to create a service product with a condition record. For creating the product I use function COM_PROD_SERVICE_MAINTAIN_API and it creates a product propperly. The function offers parameter IT_CONDITIONS for creating conditions. But when you have a look at type COM_PRODUCT_CND_API_TAB of the parameter, then you will find a deeep tabletype with lots(!) of additional tables. In the conditions tab of the product I simply enter a Condition Type, a Sales Organization, a Distribution Channel, an Amount, a Currency and a Unit and everything is fine after saving.
    Can anyone of you help me in how to set up parameter IT_CONDITIONS to get the above values into the product?
    Thanks fou you help,
    Michael Drechsler

    Hi,
    The link is https://support.oracle.com , you will have to request Oracle to link your user with your company support account.
    Cheers,
    Vlad

  • How to read an interal table with dynamic conditions

    Dear all,
       I have an internal table IN_TAB and I want to read a record of the table with dynamic condition as below.
    a) IN_TAB  structure : |      ColA     |      Col B     | Col C        | Col D        |
    b) Requirement: there are four condtions, and reading data from IN_TAB (not use loop) based on these conditions. If one condition is empty, it'll be ommited.
    Ex: |      ColA     |      Col B     |    Col C      |    ColD      |
    x1
    b
    c
    d
    x1
    x2
    x3
    x1
    x2
    x3
    x4
    y1
    y2
    y3
    y4
    The conditons consist of ColA = ' x1' , ColB = 'x2' , ColC = '', ColD = ''
    The result will be:
    x1
    x2
    x3
    x1
    x2
    x3
    x4
    Could you please help to solve this problem.
    Thanks and regards,
    Nguyen Huy.

    Hi Nabheet,
      Thanks for your solution, It solved my problem. I also suggest the another way to obtain this.
    - The internal table have to declare with header line, note that the internal table mustn't has x type in the structure.
    - Assign all conditions into header line wether condtion is empty or not.
    - Use statement READ TABLE IN_TAB.
    Ex:
       DATA: BEGIN OF RT OCCURS 0,
            MATNR(18) TYPE C,
            ERNAM(12) TYPE C,
            BISMT(18) TYPE C,
            LAEDA TYPE MARA-LAEDA,
          END OF RT .
    SELECT
      MATNR
      ERNAM
      BISMT
      LAEDA
      UP TO 10 ROWS
      INTO CORRESPONDING FIELDS OF TABLE RT
      FROM MARA.
    RT-MATNR = '7F01113'.
    RT-LAEDA = '20111005'.
    READ TABLE RT.
    @ponvignesh : thanks for your reply, I thinks that the Nabheet's solution is the good way.
    Kindly regards,
    Nguyen Huy

  • How do I create multiple columns with bullets in pages

    I'm trying to figure out how to create multiple columns within a document in which I bullet information...

    At the point you wish to change to two columns, Insert > Columns and then in the Layout Inspector, select the number of columns. After the insertion point, you will also need to insert another Column Change to return the following paragraphs to single column.
    Then Select the text to be bulleted and in the Text Inspector > List tab select the type of bullets.
    Note: This creates two columns that flow together. This can be tricky if you add any text later.
    If you wish to ensure alignment, create a two column text table and remove the lines with the Graphic Inspector > Lines > No Lines option and insert your text in each column and apply the bullets as above.
    This will create a text box - you then need to ensure it moves with the text by electing "Object Moves With Text" in the Wrpa Inspector.
    Message was edited by: bwfromspring hill

  • How do you sum a column based on categories ?

    OK so I'm trying to get round the dissapointing idea that you can't use category headings as values. I am trying to sum the values in a category and use the result.
    So I take it the work around for using the summary values is to sum the values conditional on the type of category ?
    How do you do this ? Looking at other posts its probably something to do with SUMIF or SUMIFS ?

    David,
    Thank you very much for your Reply.I was looking,who could understand my situation and guess "YOU DID'
    I'll tell my situation David.
    We used to have a sql filter for this Report .In 11.1.1.3 version it used to work ,but in 11.1.1.5 we have a bug .if you have a sql filter in the Report it is not allowing us to use navigation links on that report it is saying some "Assertion Error".
    We are using this Report on Dashboard .If we use the report on Dashboard and if that Report contains the Sql Filter than it's throwing the "ASSERTION ERROR".
    but if i open the same Report from the catalog then the navigation links works fine
    Can you help me out with this one .
    Thanks
    Xavier

  • How do I SUM filtered column set only in FormsCentral View Responses?

    Hello... When I use the FormsCentral "view responses" tab's excel spreadsheet report, I can't seem to SUBTOTAL any columns once they have been filtered!
    I only see an option for adding SUM in the last row, but it calculates all of the filtered and unfiltered amounts together anyway... How can I only add up and report the amount for the filtered set selected??
    Thank you!  -Chris

    Hi wcanerday,
    Thanks for the green tick and your feedback. Yes, the SUMIF function is powerful!
    When you adapt the Personal Budget template, make sure that the items in the Category Column (A) on the Budget sheet exactly match the items in the Pop-Up Menus in Column C of the Transactions sheet.
    Editing a Pop-Up Menu in Numbers 3 is easy. Please call back if you need more help.
    Regards,
    Ian.

  • How to generate a dynamic column with unique value in AMDP

    Hi Collegue,
    For AMDP I have a table with material plant,i have to assign a unique number to each unique combination of material,plants into a dynamic column say sequence.
    Please suggest me how to proceed.
    Regards,
    Saurabh

    hi
    Firstly, have a look at the following code to see how this can be implemented -
    REPORT ZTEST.
    perform test.
    class test definition.
      public section.
        methods: create_screen.
    endclass.
    class test implementation.
      method create_screen.
        data:  report_line(72),
               report_source like table of report_line.
        data: err_message(240),
              err_line type i,
              err_word(100).
        report_line = 'REPORT TEST.'.
        append report_line to report_source.
        report_line = 'PARAMETERS: P_TEST TYPE I.'.
        append report_line to report_source.
        report_line = 'START-OF-SELECTION.'.
        append report_line to report_source.
        report_line = 'WRITE : P_TEST.'.
        append report_line to report_source.
        syntax-check for report_source message err_message
                                       line    err_line
                                       word    err_word.
        if err_message is initial.
          INSERT REPORT 'ZZZTESTZZZ' FROM REPORT_SOURCE.
          SUBMIT ZZZTESTZZZ VIA SELECTION-SCREEN AND RETURN.
        endif.
      endmethod.
    endclass.
    form test.
      data test type ref to test.
      CREATE OBJECT TEST.
      call method test->create_screen.
    endform.
    As you can see, the report is being written dynamically. Once the INSERT REPORT statement is executed, the program is available. you can you external subroutine calls to pass the data between the programs now.
    Regards,
    ravish
    <b>plz dont forget to reward points if helpful</b>

  • Tabular form - how to auto populate a column with the user name

    Hi,
    I have a tabular form with 3 columns - (customer name, notes, user). my users are allowed to enter customer details in the notes section... as soon as the user completes notes section and save the form, I want "USER" field to be auto populate with the user name so that I may track activity by the user...
    Please advice how to accomplish it...
    thanks in advance

    Hi,
    After user saves the forms that means commit to the database, so you can simply write a trigger like:
    CREATE OR REPLACE TRIGGER "AUDIT"
    before insert or update on TABLE1
    for each row
    begin
    :new.user_field := nvl(v('APP_USER'),user);
    end;
    Regards,
    Aljaz
    Edited by: Aljaz on 4.3.2012 22:03

  • Using letter templates: how to make left hand column with logo/info repeat?

    Hi all,
    If you use one of the templates in Pages that has a column down the left-hand side of the page where you can put your company logo and information (e.g. the Modern Photographer Letter), I've noticed that when I do replace it with my info on the first page, if my letter runs over a page, the logo and info on the left-hand column for subsequent pages reverts to the template default.
    Am I missing a step here?
    How can I "set" it so that my own logo and info repeats on every page?
    Thanks!

    On page 60 in the english version Pages User Guide you canread this:
    +Reusing Sections+
    +You can make a section in a document reusable by adding it to the pop-up menu that+
    +appears when you click Pages in the toolbar.+
    +To reuse some or all the pages in a section:+
    +1 Select the section in the thumbnail view.+
    +2 Choose Format > Advanced > Capture Pages.+
    +3 In the dialog that appears, type a name for the page or pages, use the Include pop-up+
    +menu to indicate which pages you want to reuse, and then click OK.+
    +The page or pages are available in the pop-up menu that appears when you click the+
    +Pages button in the toolbar.+
    To download the Guide select PAges Uder Guide in the Pages Help menu.

Maybe you are looking for

  • Time machine backups up the Downloads folder every backup

    On my current and previous MBP, for some reason, after some event changes something, Time Machine decides that my Downloads folder has changed between every backup. Not just a file, but the entire folder - all 20GB of it - and backs it up again and a

  • Setting image background transparent

    I want to know how can I set the background of an existing images to transparent. I am a web desginer and currently i want's to change background color of one of my site http://twxdroid.com but here the problem arises that some of my used images back

  • Run windows services from java application

    can java application run a windows server i have a web server that runing using tomcat and mysql can i make a icon in the systray that give me the option to (using a menu) run the server ,wicth means : tomcat and mysql are runing stop the server get

  • Pages publish your web

    Moving from PC to Apple need to publis my web www.electricwindmillcar.com few times in 30 mins every morning etc has to be fast update. Key west Apple Store said Apple does not make a way to publish Pages to your web... is this right if so how can we

  • HELP! How can I open .doc spreadsheets in InDesign?

    I have several spreadsheets of information in .doc format. Is there a way that I can open this information in InDesign? Searched for a plug-in but to no avail. HELP!