5 Replies Latest reply: May 30, 2014 3:19 AM by Suvi Ahlstedt RSS

    If and set analysis in same expression

    Suvi Ahlstedt

      Hi,

      I have problem with if / set analysis expression. Expression definition:

      =if(CashPeriod=1 and CashCalcMark=1, sum({<Year={$(=varCurrentYear)},Month={$(=vMinMonth)}>}CashFlowAmount),

      if(CashPeriod=1 and CashCalcMark=2, sum({<Year={$(=varCurrentYear)},Month={$(=vMinMonth)}>}CashFlowAmount*-1),

      if(CashPeriod=2 and CashCalcMark=1, sum({<Year={$(=varCurrentYear)}>}CashFlowAmount),

      if(CashPeriod=2 and CashCalcMark=2,sum({<Year={$(=varCurrentYear)}>}CashFlowAmount*-1)))))

       

      And it returns only -.

      Can someone please help me with this, I don´t know what´s wrong there.

      Thanks!