16 Replies Latest reply: Oct 10, 2017 12:14 PM by Sunny Talwar RSS

    Issue with Multiple Count condition

    surya j

      Hi

       

      I have written the below condition in calculated field.Its nor showing an output or error.

      I am able to get the output if i enter single condition(i.e

      Count(IF([(CASEWHENAL1.BUS_LINE='PAS'THEN'PAS'WHENAL1.BUS_LINE='SMAF'THEN'PAS'WHENAL1.BUS_LINE='UMA'THEN'PAS'WHENAL1.BUS_LINE='UMAT'THEN'PAS'WHENAL1.BUS_LINE='BDI'THEN'PAS'WHENAL1.BUS_LINE='SMEI'THEN'PAS'WHENAL1.BUS_LINE='SMLC'THEN'PAS'WHENAL1.BUS_LINE='DMA'THEN'PA]='Non PAS' and REG_CAT_COARSE='PERSONAL' and [(CASEWHEN(SUM(AL2.TXN_CNT))>0THEN'Y'ELSE'N'END)]='N',ACCT))/

      Count(total(IF([(CASEWHENAL1.BUS_LINE='PAS'THEN'PAS'WHENAL1.BUS_LINE='SMAF'THEN'PAS'WHENAL1.BUS_LINE='UMA'THEN'PAS'WHENAL1.BUS_LINE='UMAT'THEN'PAS'WHENAL1.BUS_LINE='BDI'THEN'PAS'WHENAL1.BUS_LINE='SMEI'THEN'PAS'WHENAL1.BUS_LINE='SMLC'THEN'PAS'WHENAL1.BUS_LINE='DMA'THEN'PA]='Non PAS' and REG_CAT_COARSE='PERSONAL',ACCT))))

      as soon as i add the rest condition,its showing null.

       

       

       

       

      Code:

      Count(IF([(CASEWHENAL1.BUS_LINE='PAS'THEN'PAS'WHENAL1.BUS_LINE='SMAF'THEN'PAS'WHENAL1.BUS_LINE='UMA'THEN'PAS'WHENAL1.BUS_LINE='UMAT'THEN'PAS'WHENAL1.BUS_LINE='BDI'THEN'PAS'WHENAL1.BUS_LINE='SMEI'THEN'PAS'WHENAL1.BUS_LINE='SMLC'THEN'PAS'WHENAL1.BUS_LINE='DMA'THEN'PA]='Non PAS' and REG_CAT_COARSE='PERSONAL' and [(CASEWHEN(SUM(AL2.TXN_CNT))>0THEN'Y'ELSE'N'END)]='N',ACCT))/

      Count(total(IF([(CASEWHENAL1.BUS_LINE='PAS'THEN'PAS'WHENAL1.BUS_LINE='SMAF'THEN'PAS'WHENAL1.BUS_LINE='UMA'THEN'PAS'WHENAL1.BUS_LINE='UMAT'THEN'PAS'WHENAL1.BUS_LINE='BDI'THEN'PAS'WHENAL1.BUS_LINE='SMEI'THEN'PAS'WHENAL1.BUS_LINE='SMLC'THEN'PAS'WHENAL1.BUS_LINE='DMA'THEN'PA]='Non PAS' and REG_CAT_COARSE='PERSONAL',ACCT,

       

      Count(IF([(CASEWHENAL1.BUS_LINE='PAS'THEN'PAS'WHENAL1.BUS_LINE='SMAF'THEN'PAS'WHENAL1.BUS_LINE='UMA'THEN'PAS'WHENAL1.BUS_LINE='UMAT'THEN'PAS'WHENAL1.BUS_LINE='BDI'THEN'PAS'WHENAL1.BUS_LINE='SMEI'THEN'PAS'WHENAL1.BUS_LINE='SMLC'THEN'PAS'WHENAL1.BUS_LINE='DMA'THEN'PA]='Non PAS' and REG_CAT_COARSE='PERSONAL' and [(CASEWHEN(SUM(AL2.TXN_CNT))>0THEN'Y'ELSE'N'END)]='Y',ACCT))/

      Count(total(IF([(CASEWHENAL1.BUS_LINE='PAS'THEN'PAS'WHENAL1.BUS_LINE='SMAF'THEN'PAS'WHENAL1.BUS_LINE='UMA'THEN'PAS'WHENAL1.BUS_LINE='UMAT'THEN'PAS'WHENAL1.BUS_LINE='BDI'THEN'PAS'WHENAL1.BUS_LINE='SMEI'THEN'PAS'WHENAL1.BUS_LINE='SMLC'THEN'PAS'WHENAL1.BUS_LINE='DMA'THEN'PA]='Non PAS' and REG_CAT_COARSE='PERSONAL',ACCT,

       

      Count(IF([(CASEWHENAL1.BUS_LINE='PAS'THEN'PAS'WHENAL1.BUS_LINE='SMAF'THEN'PAS'WHENAL1.BUS_LINE='UMA'THEN'PAS'WHENAL1.BUS_LINE='UMAT'THEN'PAS'WHENAL1.BUS_LINE='BDI'THEN'PAS'WHENAL1.BUS_LINE='SMEI'THEN'PAS'WHENAL1.BUS_LINE='SMLC'THEN'PAS'WHENAL1.BUS_LINE='DMA'THEN'PA]='Non PAS' and REG_CAT_COARSE='IRA' and POE_CAT='RETIRE INT ROLLOVER','IRA - Internal Rollover' and [(CASEWHEN(SUM(AL2.TXN_CNT))>0THEN'Y'ELSE'N'END)]='N',ACCT))/

      count(total(IF([(CASEWHENAL1.BUS_LINE='PAS'THEN'PAS'WHENAL1.BUS_LINE='SMAF'THEN'PAS'WHENAL1.BUS_LINE='UMA'THEN'PAS'WHENAL1.BUS_LINE='UMAT'THEN'PAS'WHENAL1.BUS_LINE='BDI'THEN'PAS'WHENAL1.BUS_LINE='SMEI'THEN'PAS'WHENAL1.BUS_LINE='SMLC'THEN'PAS'WHENAL1.BUS_LINE='DMA'THEN'PA]='Non PAS' and REG_CAT_COARSE='IRA' and POE_CAT='RETIRE INT ROLLOVER','IRA - Internal Rollover' ,ACCT,

       

      Count(IF([(CASEWHENAL1.BUS_LINE='PAS'THEN'PAS'WHENAL1.BUS_LINE='SMAF'THEN'PAS'WHENAL1.BUS_LINE='UMA'THEN'PAS'WHENAL1.BUS_LINE='UMAT'THEN'PAS'WHENAL1.BUS_LINE='BDI'THEN'PAS'WHENAL1.BUS_LINE='SMEI'THEN'PAS'WHENAL1.BUS_LINE='SMLC'THEN'PAS'WHENAL1.BUS_LINE='DMA'THEN'PA]='Non PAS' and REG_CAT_COARSE='IRA' and POE_CAT='RETIRE INT ROLLOVER','IRA - Internal Rollover' and [(CASEWHEN(SUM(AL2.TXN_CNT))>0THEN'Y'ELSE'N'END)]='Y',ACCT))/

      count(total(IF([(CASEWHENAL1.BUS_LINE='PAS'THEN'PAS'WHENAL1.BUS_LINE='SMAF'THEN'PAS'WHENAL1.BUS_LINE='UMA'THEN'PAS'WHENAL1.BUS_LINE='UMAT'THEN'PAS'WHENAL1.BUS_LINE='BDI'THEN'PAS'WHENAL1.BUS_LINE='SMEI'THEN'PAS'WHENAL1.BUS_LINE='SMLC'THEN'PAS'WHENAL1.BUS_LINE='DMA'THEN'PA]='Non PAS' and REG_CAT_COARSE='IRA' and POE_CAT='RETIRE INT ROLLOVER','IRA - Internal Rollover' ,ACCT

       

       

       

       

       

       

      ))))))))))))