12 Replies Latest reply: Sep 3, 2015 4:44 PM by Dok Mbini RSS

    Select case

    Dok Mbini

      Hi,

       

      I'm trying to convert this case code to Qlikview, could I please get assistance.

       

      CASE

        when MAC_CODE = 963 then ''SNL''

        Else ''MLOAN''

      END as PRODUCT_CODE

       

       

      CASE when REGISTRATION_MONTH_CODE = ''NOTREG''

        then ''N''

        else

        CASE when ( year(INFORMATION_DATE)*100 + month(INFORMATION_DATE) )

       

       

        else ''N''

        END as  REG_LAST_3MONTHS_IND

       

       

      CASE when FINAL_ML_AMT <= 50000   then  ''A''

        when FINAL_ML_AMT <= 100000  then  ''B''

        when FINAL_ML_AMT <= 150000  then  ''C''

        when FINAL_ML_AMT <= 350000  then  ''D''

        when FINAL_ML_AMT <= 700000  then  ''E''

       

        else ''F''

      END as MLOANS_BANDS_CODE