1 Reply Latest reply on Jan 5, 2018 2:00 AM by eva.lesny

    How to get a count of group size and use it in a calculation?

    Martin Dale

      Hi,

       

      I'm a bit of a noob to data analytics and my use case is scientific data, not sales data so quite different to a lot of examples I can find.

      I have a dataset where I need to run a calculation on data (Y_Values) that is averaged within bands.  These bands are defined as groups and within the calculation I need to use the number of elements within the group as the divisor.

       

      eg. for the group named "25" I want to run the following calcuation --> SQRT(SUM(SQUARE(Y_Values_within_group)) / 6)   where "Y_Values_within_group" is the data that matches the rows where X_Values is between 22 and 27 (hence divide by 6)

      for the group named "31.5" I want to run the following calcuation --> SQRT(SUM(SQUARE(Y_Values_within_group)) / 7)   where "Y_Values_within_group" is the data that matches the rows where X_Values is between 28 and 34 (hence divide by 7)

      etc

      etc

       

      Can anyone help me?

       

      Thanks

      Martin