Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
rammohanhdvd
Contributor
Contributor

script

@Anonymous 

IF( ISNULL([HLS_RISK_KDCs].[BUSINESS L2], 'NULL') = 'Wealth and Personal Banking' AND ISNULL([HLS_RISK_KDCs].[BUSINESS L3], 'NULL') <> 'Global Private Banking and Wealth' AND (ISNULL([HLS_RISK_KDCs].[Legal Entity L3], 'NULL') <> 'PT Bank Ekonomi Raharja' AND ISNULL([HLS_RISK_KDCs].[Legal Entity L3], 'NULL') <> 'HSBC Finance Corporation' AND ISNULL([HLS_RISK_KDCs].[Legal Entity L2], 'NULL') <> 'HFC Bank Limited'), IF( ISNULL([HLS_RISK_KDCs].[BUSINESS L3], 'NULL') IN ('Asset Management', 'Group Insurance'), [HLS_RISK_KDCs].[BUSINESS L3], IF( ISNULL([HLS_RISK_KDCs].[Location L2], 'NULL') = 'HSBC UK', 'UK RFB', ISNULL([HLS_RISK_KDCs].[Location L2], 'Global') ) ), IF( ISNULL([HLS_RISK_KDCs].[BUSINESS L3], 'NULL') = 'Global Private Banking and Wealth', 'Private Banking', 'NA' ) ) AS [Modified Location L2 - RBWM]

Labels (1)
2 Replies
rubenmarin

Hi, IsNull function has one parameter, that is the value to check if is null, also you can compare string without the need to check if it's null, so it would be something like:

If([HLS_RISK_KDCs].[BUSINESS L2] = 'Wealth and Personal Banking' 
    AND [HLS_RISK_KDCs].[BUSINESS L3] <> 'Global Private Banking and Wealth'
    AND [HLS_RISK_KDCs].[Legal Entity L3] <> 'PT Bank Ekonomi Raharja'
    AND [HLS_RISK_KDCs].[Legal Entity L3] <> 'HSBC Finance Corporation'
    AND [HLS_RISK_KDCs].[Legal Entity L2] <> 'HFC Bank Limited'
  ,If(Match([HLS_RISK_KDCs].[BUSINESS L3],'Asset Management', 'Group Insurance')
    ,[HLS_RISK_KDCs].[BUSINESS L3]
    ,If([HLS_RISK_KDCs].[Location L2] = 'HSBC UK'
      ,'UK RFB'
      ,If(IsNull([HLS_RISK_KDCs].[Location L2])
        ,'Global'
        ,[HLS_RISK_KDCs].[Location L2]
      )
    )
  )
  ,If([HLS_RISK_KDCs].[BUSINESS L3] = 'Global Private Banking and Wealth'
    ,'Private Banking'
    ,'NA'
  )
) as [Modified Location L2 - RBWM]
MarcoWedel

is there any question you would like to ask?