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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Naps_230
Creator
Creator

How to convert Sql code to Qlikview code

Hi ,

Could you please help on below part, i have try from my side create Qlik code, getting issue.

SQL CODE:

CASE
WHEN MKT.mft_def_desc = 'Target Brand'
AND cstm_prod_grp_value = 'APTIOM' and P.RNK BETWEEN '1' AND '128' THEN
Sum(total_rx) else 0
END AS APTIOM_TRX,

Qlik code:

if(MKT.mft_def_desc = 'Target Brand',
if(cstm_prod_grp_value = 'APTIOM',
if(P.RNK>= 1 and P.RNK <= 128,Sum(total_rx),0))) as APTIOM_TRX,

Labels (2)
1 Reply
sidhiq91
Specialist II
Specialist II

@Naps_230  Your Qlik expression would be something as below:

IF(MKT.mft_def_desc = 'Target Brand' and cstm_prod_grp_value = 'APTIOM' and (P.RNK>= 1 and P.RNK <= 128),

Sum(total_rx),0 ) as APTIOM_TRX

If this resolves your issue, kindly like and accept it as a solution.