3 Replies Latest reply: Sep 24, 2010 1:31 AM by At titude RSS

    Aggr

      Hi,

      did I get it right: Aggr is used to do a "group by"
      I"d like to sum(sales) "grouped by" the postal code.

      Table contains:

      Sales_Rep, Sales_Postal_Code, Sales_Amount

      Thanks

        • Aggr
          Neil Miller

          Yes, you're on the right track. Aggr allows you to group over a specific set of dimensions.

          For your purpose, you may not need it. You could create a chart or table that uses postal code as the only dimension. Then create an expression for Sum(Sales_Amount) and you have sales by postal code.

          If you want to create a table with Sales_Rep and postal code as dimensions, but have one of the fields be a postal code sales total, then you would use the Aggr function. Something like: aggr( sum(Sales_Amount), Sales_Postal_Code )

            • Aggr

              Hi,

              I think I need to use Aggr in my calculations, I currently rely on using the dimensions to generate my required grouping but there are a couple of numbers that are going astray.

              Do you have a simple example of how this might work in a straight table or pivot?

              Cheers

              Lee

              • Aggr

                Hi NMiller,

                Could you please tell me what does this does then? It will group by which value? Country or Region? OR does it group by Country group by Region???

                 

                aggr( sum(Sales), Country, Region )


                Please help me out!