6 Replies Latest reply: May 23, 2013 6:21 AM by Manohar Reddy Bhavanam RSS

    Need help in using Aggr Function

      Hi All,

       

      I have the sales data at State level and Regions is mapped to state as below

       

      StateRegionSales
      S1R110
      S2R220
      S3R130
      S4R240
      S5R150

       

      and i have to show a straight table in qlikview like below

       

      StateState SalesRegional Sales
      S11090
      S22060
      S33090
      S44060
      S55090

       

      I created a table with dimension as 'State' and created two expressions as below

      1. 'Sum(Sales)' to show State Sales

      2. 'Sum(aggr(Sum({<State=>}Sales),Region))' to show Regional sales

       

       

      But the aggr function is showing aggregated value for one state per region and rest of the values it is showing 0's.

      Here is the output am getting

       

      StateState SalesRegional Sales
      S11090
      S22060
      S3300
      S4400
      S5500

       

       

      Is there anything wrong with the expression that i used for Regional Sales? Please somebody help me to get the regional values for every state.

       

       

      Thanks,

      Manu