Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Nested Aggregation

Hello,

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.

thanks.

10 Replies
Not applicable
Author

This seems to work for me. Thanks Sunny.