Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

New Contributor

how to convert case into expression


Can you help me how to convert the below condition into qlik expression ?


CASE WHEN ISNULL(ManualBV_Outcome,'') = ISNULL(AutomatedBV_Outcome,'')
AND ISNULL(ManualBV_Outcome_Reason,'') = ISNULL(AutomatedBV_Outcome_Reason,'') THEN 'match'
ELSE 'nomatch' END AS Manual_Discripency_Case_Status


select eBVDiscrpt_Parent_Case_Id

where Manual_Discripency_Case_Status = 'Match'



I tried doing this but no luck --

=COUNT ( DISTINCT IF((ManualBV_Outcome_Reason = AutomatedBV_Outcome_Reason ) AND (ManualBV_Outcome = AutomatedBV_Outcome ) , eBVDiscrpt_Parent_Case_Id))

Labels (1)
1 Reply

Re: how to convert case into expression

Perhaps this? I assume, you have real null values

If(ISNULL(ManualBV_Outcome) = ISNULL(AutomatedBV_Outcome)
AND ISNULL(ManualBV_Outcome_Reason) = ISNULL(AutomatedBV_Outcome_Reason), 'match', 'nomatch') as Manual_Discripency_Case_Status

After that, you can call it out for set analysis like

COUNT ({<Manual_Discripency_Case_Status={'match'}>} DISTINCT eBVDiscrpt_Parent_Case_Id) // For match records

COUNT ({<Manual_Discripency_Case_Status={'nomatch'}>} DISTINCT eBVDiscrpt_Parent_Case_Id) // For no-match records

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)