3 Replies Latest reply on Aug 21, 2017 5:21 PM by Shinichiro Murakami

    Dcount with if condition

    Cecilia Saldaña

      Hello,

       

      I need to make a dcount sum or "orders" with the following characteristics:

       

      Order NumberProduct
      Sale Amount
      1A10
      1B10
      2C-10
      3B-10
      3E-10
      4F10
      5G10

      Dcount all orders with a Sale Amount > 0 (all sold Orders) should get 3

      Dcount all orders with a Sale Amount < 0 (all cancelled Orders) should get 2

      And then get the net number (Sold Orders - Cancelled Orders) should get 3-2 = 1

       

      Sold Orders should count orders 1,4 and 5

      Cancelled Orders should count orders 2 and 3

       

      I tried using LOD but I just don´t get to the correct amounts.

       

      Thank you,