This is a public Forum  publicRSS

Forum post

    Patrick Holzer
    Getting the total of fields depending on the value in...Answered
    Forum post posted February 13, 2009 by Patrick Holzer, last edited February 9, 2012
    60 Views, 2 Comments
    Title:
    Getting the total of fields depending on the value in another field
    Post:

    Hi,

    My Goal:

    I'd like my FileMaker to return the total of pieces sold (field: "total_sold") for all of my products.

    Every order has one product to it (and only one), but has different quantities of that product. Also, an order always has a status (pending, returned, cancelled, etc.).


    The Problem:

    The challenge now is that I'd like only orders with the status "shipped" to be summarized in the field "total_sold".

    How can this be done?

    Thanks!

    - Patrick

    Best Answer

    raybaudi
    posted February 13, 2009 by raybaudi  Permalink

    Hi Patrick

     

    make a calculated field ( shipped ) in the orders table:

     

    Case( status = "shipped" ; quantity )

     

    and a summary field ( total_sold ): total of shipped

    Answer

     

    • raybaudi
      posted February 13, 2009 by raybaudi  Permalink

      Hi Patrick

       

      make a calculated field ( shipped ) in the orders table:

       

      Case( status = "shipped" ; quantity )

       

      and a summary field ( total_sold ): total of shipped

    • Patrick Holzer
      posted February 16, 2009 by Patrick Holzer  Permalink

      Thanks very much, Daniele!

       

      I applied it and it worked!

       

      - Patrick