3 Replies Latest reply on Jun 29, 2012 12:45 AM by Ranjan Sahoo

    How to refer to group of values in If clause?

    Ranjan Sahoo

      Hi,

       

      I am trying to refer more than one value for a boolean in If clause.I am not getting any direct function, I am forced to use "or".It seems giving some issue and also very inefficient and time consuming.

       

      Problem:      if ([Region] not in ('APMEA','Canada','Europe','Latin America','US')

       

      I am using 'or' . But seems,something is going wrong. Can you please help me.

       

      Query using "or" is not working:

       

      if (attr([Region])  <>'APMEA' or attr([Region]) <> 'Canada' or attr([Region]) <> 'Europe' or attr([Region]) <> 'Latin America'or attr([Region]) <> 'US')

      and (attr([Period_Trends]) <> '2006' or attr([Period_Trends]) <> '2007' or attr([Period_Trends]) <> '2008')  then (sum([Total number of stores having HOT(Incl FOE)]) / sum([Total Stores SW]))

      elseif (attr([Region]) <> 'APMEA' and attr([Period_Trends]) = '2007') then 2.5

      end

       

      Thanks,

      Ranjan