10 Replies Latest reply: Mar 17, 2015 6:32 AM by Harshal Patil RSS

    Exclude current month from YTD Expression

    Amit Saini

      Hi Folks ,


      I'm trying to neglect current month form the YTD expression , below is my expression :


      My Month field here is "POPER_NEW"


      if(sum({<Date={">=$(=YearStart(Date))<=$(=Max(Date))"},Year={2015},POPER_NEW=,Date=>}[Act Planned Production Hours]) = 0, avg({<Date={">=$(=YearStart(Date))<=$(=Max(Date))"},Year={2015},POPER_NEW=,Date=>}[Act OEE]),

      sum({<Date={">=$(=YearStart(Date))<=$(=Max(Date))"},Year={2015},POPER_NEW=,Date=>}[Act OEE]*[Act Planned Production Hours])/sum({<Date={">=$(=YearStart(Date))<=$(=Max(Date))"},Year={2015},POPER_NEW=,Date=>}[Act Planned Production Hours]))


      I tried something like below :

      POPER_NEW={"(=max(POPER_NEW)-1)"}  , but its not working.


      kindly help me here!'