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: 
Not applicable

Compare variables using IF statement in Set Analysis

I'm trying to get the code below to work.  It works fine when using the line that is commented out -

if( (Business_GF_Old<>Business_GF) and (Report_Grouping_Old<>Report_Grouping),Constant,0)

However, I need these values to change dynamically with the values for vBus_Dim_Name_Old and vBus_Dim_Name.  I've tried single quotes, double quotes, but can't get it to work.  Any help is greatly appreciated.  Thanks.

Sum (

{<

Hires={0},Terms={0}

>}if( ($(vBus_Dim_Name_Old) = $(vBus_Dim_Name)) and (Report_Grouping_Old<>Report_Grouping),Constant,0)

//>}if( (Business_GF_Old<>Business_GF) and (Report_Grouping_Old<>Report_Grouping),Constant,0)

)

10 Replies
Not applicable
Author

hi arthil21,

     Both are syntactically correct, the second one essentially converts it to a string.