4 Replies Latest reply: Apr 27, 2016 1:18 PM by Sunny Talwar RSS

    getfieldselections in sense

    Fernando Keuroglian

      Hi Expert!

       

      I have a pivot table with this simple expression:

       

      if(isnull(GetFieldSelections(Año))and isnull(GetFieldSelections(Mes)),sum({<[Fecha Nro]={"$(='>=' & num(AddMonths($(vMaxFecha), -11)) & '<=' & num($(vMaxFecha)))"}>}Cantidad),

      sum(Cantidad))

       

      if the user do not select AÑO or MES, sum the last 12 months, if the user select año or month sum only the selection.

       

      my problem is that if the user do not select anything, the pivot table crush and said me OUT OF MEMORY.

       

      there is any problem in using this kind of function in sense? is happen the same if i use GETSELECTEDCOUNT(AÑO)

       

      but if i use:

       

      if(1=1,sum({<[Fecha Nro]={"$(='>=' & num(AddMonths($(vMaxFecha), -11)) & '<=' & num($(vMaxFecha)))"}>}Cantidad),

      sum(Cantidad))

       

      it works  fine, evaluete 1=1 and do the correct sum

       

      what could be?

       

      i try it in  qlikview  and work great!!!

       

      Fernando K.