5 Replies Latest reply: Aug 19, 2016 1:04 PM by Hiren Jadiya RSS

    Aggr Function with Varible Error

    suresh m

      Hello,

      In Qliksense

       

      Aggregrate Function with DrillDown group Getting Error

       

      Dim (Drilldown group)  --> Quarter,Month,Date   Created

      Created 1 Variable -->

      vDim = IF(GETSELECTEDCOUNT([Quarter])=1 AND GETSELECTEDCOUNT([Month])=1,'[Date]',

      IF(GETSELECTEDCOUNT([Quarter])=1,'[Month]','[Quarter]'))

       

      Until This Works Fine.

       

      When i use Aggr Function Looks Like

      Num(Aggr(sum({<[PL.paidindays] = {'-14'}>}[PL.DueAmt]),Quarter),'$#,##0')

      Num(Aggr(sum({<[PL.paidindays] = {'-14'}>}[PL.DueAmt]),Month),'$#,##0')

      Num(Aggr(sum({<[PL.paidindays] = {'-14'}>}[PL.DueAmt]),Date),'$#,##0') --> All these 3 Expression Works fine


      When i use Variable instead of Field it Getting ' - ' (error)

      Num(Aggr(sum({<[PL.paidindays] = {'-14'}>}[PL.DueAmt]),$(vDim)),'$#,##0')  --> Getting Error.


      I tested the Variable by using Textobject with Expresion as  $(vDim) its Working Fine, Reflecting the Same Filed Names.

      Please Suggest any Solution ASAP