7 Replies Latest reply: Oct 27, 2010 2:10 PM by Karl Pover RSS

    Need to divide by an aggregation

      Is it possible to divide by an aggregation calculation either in the expression or calculated dimension field?

        • Need to divide by an aggregation
          Karl Pover

          You can divide within the aggr function like AGGR(Sum(Renewed)/sum([ Quantity]), [ Account Name]), but are you looking to do something like AGGR(Sum(Renewed),[Account Name])/AGGR(sum([ Quantity]), [ Customer])?

          Do you have an example of what you want to do?

          Regards.

            • Need to divide by an aggregation

              Correct, I am trying to divide two separate aggregations. See example below:

              aggr(sum([Line Count]),Procedure,State,Specialty)/aggr(sum([Line Count]), Specialty, State)

              The reason for the separate aggregations is that the numerator is being aggregated over three dimensions while the denominator is being aggregated over two dimensions.

                • Need to divide by an aggregation
                  Karl Pover

                  If you divide the aggr functions like that, it will return a number that appears to be one element of the list generated by aggr in the numerator by the one element of the list generated by the aggr in the denominator.

                  I don't think that is what you want. Can you explain the table or chart you are looking to generate to see if there is another way to formulate it?

                  Regards.