3 Replies Latest reply: Aug 28, 2017 7:44 AM by Sunny Talwar RSS


    vikram dumala

      Hi all ,

      i would like to use two aggr functions in set anaysis at one statement like



      but it is showing error pls help to make correct




        • Re: SetAnalysis
          An Pham

          Try this

          SUM({<Year={2016},CurrentStatus={'TXNS'}>} AmountUSD)
          Count({<Year={2016},CurrentStatus={'TXNS'}>} UBID)
          • Re: SetAnalysis
            Jonathan Dienst

            If the previous suggestion works for you, then use it. If the overall sums do not give the correct result, then you may need something like


            =Sum({<Year={2016},CurrentStatus={TXNS}>} Aggr(Sum(AmountUSD)/Count(UBID) ....))

            (where ... is a comma separated list of the chart/table dimensions)



            =Sum(Aggr(Sum({<Year={2016},CurrentStatus={TXNS}>} AmountUSD)/Count({<Year={2016},CurrentStatus={TXNS}>} UBID) ....))

            • Re: SetAnalysis
              Sunny Talwar

              I think one of the above two solution should work for you, but the point to note here is that set analysis can only be used within a aggregation function such as Sum, Max, Min, Avg, Mode, Median... etc... in your case you just added set analysis before your aggregation function which is not the right syntax....


              The correct syntax goes like this

              Sum({<Set Analysis>}AmountUSD)/Count({<Set Analysis>}UBID)


              Also, read more about set analysis here:

              A Primer on Set Analysis