1 Reply Latest reply on Jul 24, 2018 6:14 PM by Ken Flerlage

    fixed calculation and then "sum-if"

    Alex Martino

      Hello. I have orders #'s and categories.

      For example, I might have (per row)

       

      #1   Polo

      #1   Polo

      #2. Hoodie

      #2  Polo

       

      How can I count the instances where an order has more than 1 category?

       

      And then in the same note, I would like to sum/average the (total) quantity of these orders that have multiple categories. Thanks.

        • 1. Re: fixed calculation and then "sum-if"
          Ken Flerlage

          You can use an LOD to get the number of categories for each order. We'll call the field "Category Count"

           

          {FIXED [ID] : COUNTD([Category])}

           

          Then a calculated field like this will tell you if there are more than one.

           

          IF [Category Count] > 1 THEN

              1

          ELSE

              0

          END

           

          Then you can simply SUM or AVG this calculated field to get the total you're looking for.

          1 of 1 people found this helpful