0 Replies Latest reply: Jul 2, 2012 5:03 PM by Raj vadde RSS

    Need help with the expression for calculating average

    Raj vadde

      i have year 2011, 2012,2013, but this is fiscal year data ( 2011-2012), (2012-2013)


      now i need to calculate the 2 yr avergae for a selected week


      count(disctinct (year) =3  but i need 2 here if i subtact the vaule using -1 then if user selects single year whole vaule is 0


      how to write a expression for this ?


      i need a expression some what like this


      (sum( max( week) + sum( max(week-52))/count(max(week) + count(max(week-52))


      here (week-52) is the previous week but count(max(week) is showing null