
Re: Comparing 2 Values from 2 Tables??
John Witherspoon May 18, 2011 7:23 PM (in response to Gualter Guizado)I'm not sure what you mean by "check table 1". You can't actually refer to values in a different chart. However, since it appears your dimensions are exactly the same, you can just recalculate them in table 2. I also don't recommend using isnull() ever, because it doesn't work correctly in some versions of QlikView. Use len() instead, which seems to work in all versions I've encountered. So something like this, perhaps:
if(Logic='YES' and len(sum(if(Report='current',$(var_sales))))=0,rgb(255,0,0)
,if(Logic='NO' and len(sum(if(Report='current',$(var_sales))))>0,rgb(255,0,0)
,rgb(0,255,0)Or to avoid doing the sum() twice:
if(len(sum(if(Report='current',$(var_sales))))
,if(Logic='NO' ,rgb(255,0,0),rgb(0,255,0))
,if(Logic='YES',rgb(255,0,0),rgb(0,255,0))