2 Replies Latest reply: Apr 15, 2011 12:06 PM by Matt Cayford RSS

    'Simple' increase/decrease calculation in textbox

      Hi all,

       

      I wish to have a text box expression which counts a field (enq_Id) based on a varying week class.(either Current Week or Week-1)

       

      This is currently working where it count all Enquiries recieved in the current week

      ='Enquiries:'&num(COUNT(if(Week_Class=('Current Week'),Enq_Id)))

       

       

      but I also wish to display the previous weeks result and the increase or decrease between current week and week -1.

      I have tried various variations on the following



      ='Enquiries:'&num(COUNT(if(Week_Class=('Current Week'),Enq_Id))) & if (num(sum(COUNT(if(Week_Class=('Current Week',Enq_Id) -COUNT(if(Week_Class=('Week-1',Enq_Id,' enq INCREASE ',' enq DECREASE ')&'on prior week'

      I cannot get the increase/decrease calculation to work no matter how much I adjust the syntax.
      Any ideas?