Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Recreating Stored procedure in qliksense

I want to recreating stored procedure script in qliksense.

Reason : In coming days we are not using SQL. No access to SQL so I going to create flags 

We have data in QVD format for below example data.

Example script : 

CASE WHEN ISNULL([HLS_RSK_KDC].[Location L1 ], ''NULL'') = ''Asia''

         AND ISNULL([HLS_RSK_KDC].[BUSINESS ], ''NULL'') <> ''Banking''

         AND ISNULL([HLS_RSK_KDC].[ Entity ], ''NULL'') <> ''Finance''

       AND ISNULL([HLS_RSK_KDC].[Entity], ''NULL'') NOT LIKE ''Insurance%''

      AND ISNULL([HLS_RISK_KDCs].[Location L3], ''NULL'') IN (''Switzerland'', ''India'', ''Poland'')

         AND ISNULL([HLS_RSK_KDC].[Entity ], ''NULL'') NOT IN

         (

         '' ABC Corporation'',

         ) THEN ''XYZ'' ELSE ''NO'' END

         AS [Is XYZ]

 

Above script is from SQL Stored procedure

I want to create same as qliksense script . Please help me if anyone any Idea

Labels (1)
1 Solution

Accepted Solutions
maxgro
MVP
MVP

 

IF(
[Location L1] = 'Asia'
AND Business <> 'Banking'
AND Entity <> 'Finance'
AND NOT WildMatch(Entity, 'Insurance*')
AND MATCH([Location 3], 'Switzerland', 'India', 'Poland')
AND Entity <> 'ABC Corporation'
,
'XYZ', 'NO'
)
AS NewField

View solution in original post

5 Replies
PrashantSangle

yes you can handle this type of logic in qlik sense script. check some script control statement url

https://help.qlik.com/en-US/qlikview/May2022/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptC...

 

Regards,

Prashant Sangle

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
maxgro
MVP
MVP

 

IF(
[Location L1] = 'Asia'
AND Business <> 'Banking'
AND Entity <> 'Finance'
AND NOT WildMatch(Entity, 'Insurance*')
AND MATCH([Location 3], 'Switzerland', 'India', 'Poland')
AND Entity <> 'ABC Corporation'
,
'XYZ', 'NO'
)
AS NewField

Anonymous
Not applicable
Author

Thanks,  @maxgro  it helpful 

Anonymous
Not applicable
Author

Thanks @PrashantSangle it halpful

Anonymous
Not applicable
Author

Hi @maxgro Thanks for the reply

Please help me the same below.

 

 

CASE WHEN [DIM_Semster].[Location] IS NOT NULL THEN ''Semster'' ELSE ''NO'' END) AS [Is Semster]

ASE WHEN Entity <> "XYZ Corporation",

"ABCFinance",

"EEE Regulatory",

) THEN ''xyz'' ELSE ''NO'' END

AS field