10 Replies Latest reply: Dec 9, 2016 4:49 AM by Ganesh Bagavathi RSS

    Nested Aggregation

    Ganesh Bagavathi



      I am trying to achieve the below to fit into a single textbox, please give me your suggestions.


      Fiscal PeriodCountry=Num(FirstSortedValue( Aggr(Sum(PRC_USD_AMT),SLS_RPT_TRNS.INVC__DT,CTRY_NAM),-Aggr(DT_CONS_DIM.FISC_DAY_OF_MTH_NBR,SLS_RPT_TRNS.INVC__DT,CTRY_NAM))/1000000,'#,###,##0.00 M')
      201610Mexico3.45 M
      201610Germany11.96 M
      201610India13.27 M
      201610US33.92 M
      Sum64.86 M


      I want the Sum to be displayed in a text box. It is the Sum of Sales for the most recent date for each country.

      please let me know if more information is needed.