3 Replies Latest reply on Mar 11, 2015 12:15 PM by MartinBishop

    Count Calulation



      Count Calulation


      Can't figure out how to add an additional option into this calculation...

      ValueCount ( FilterValues ( List ( Products::ProductStatus ) ; "New" ) ) + ValueCount ( FilterValues ( List ( Products::ProductStatus ) ; "Carryover" ) )

      Would like to have a count of:

      (Products::ProductStatus "New" + Products::ImageStatus "Hidden") +

      (Products::ProductStatus "Carryover" + Products::ImageStatus "Hidden") 

        • 1. Re: Count Calulation

          Do you mean you want the count of produces with "new" and "hidden" plus the count of products with "carryover" and "hidden"?

          You'd need to either use ExecuteSQL to produce that count or add a calculation field to the Products table:

          Call it cHiddenAnd:

          (ProductStatus = "new" or ProductStatus = "CarryOver" ) and ImageStatus = "Hidden"

          Select a Number result type.

          Then: Sum ( Products::cHiddenAnd )

          will return the count that you want.

          • 2. Re: Count Calulation

            Thanks for the reply, but I am still not quite getting the results I need. I tried adding the calculations to both Projects and Product tables, but I am looking to count the Projects children from Products table. 

            • 3. Re: Count Calulation

              Actually, working fine once I tried putting the countSum into the products table... Must've done something wrong the first time around. Thank you very much!