2 Replies Latest reply: Apr 11, 2017 5:37 PM by Balaji J RSS

    Aggr function with Hierarchy group

    Balaji J



      I am using a Aggr function on a dimension that I want it to dynamically change based on the Hierarchy selection from the Group that I created. Below is an example:


      I have these two tables with fields like this:

      Country | Sales | Margin

      Region | Sub-Region | Country

      Both these tables are associated by Country field and I have Geography group that has grouping of Region, Sub Region and Country. Now I am putting a (TreeMap) chart by the Geography group that showing Margin%. I am looking a function like this to use:

      Aggr( sum(Margin) / sum(Sales), Geography)

      and I want the Aggr function to work based on the Geography group level selected on the chart. If I define the Aggr() at Country level then I am not getting the desired output of Margin% for Region and Sub region level group selection. (it is giving a simple sum of all countries Margin% at the higher level).


      Can someone please advice how I can make the Aggr() work with grouped dimension?