6 Replies Latest reply: Sep 18, 2013 4:58 AM by Bradley Coyne RSS

    Set analysis IF Statement syntax

    Bradley Coyne

      hi. i have the following scenario

       

      • Itemnumber
      • ItemstatusToday = 1,2,6,7
      • Currency = USD, EUR
      • Purchase Price

       

      The business rule states when  Item Status is 6 or 7 show the Purchase Price in USD for the article number.

       

      I have the following statement however it requires that an article number is selected to work otherwise it is blank.

       

      this means i need to use set analysis, but i am unable to get the syntax right.

       

      below is my code today.

       

      sum(if(ItemstatusToday =6 or ItemstatusToday =7 and C = 'USD',POPrice)

       

      and with the attempt of set analysis below;

       

      sum(if(ItemstatusToday =6 or ItemstatusToday =7 and C = 'USD',)),

      $<Itemnumber= {Itemnumber}>} POPrice

       

       

      any help would be greatly appreciated.

       

       

      Best

      Bradley