2 Replies Latest reply: May 13, 2016 10:22 AM by Jennie Elliott RSS

    Calculate percentage based on the # of Tuesday's in a month

    Jennie Elliott

      I have the following expression which gives me a sum for food cost. I then take this sum and divide by net sales to get a Food Cost %.


      Accounting wants to see this percentage averaged by the number of Tuesdays in the month to date. So for instance, the number of Tuesday for May to Date is 2, next week it will be 3 etc.


      Any ideas on how best to tackle this problem?


      Expression is Food Cost $/Net Sales (this expression is just the food cost)

      IF (Month=Month(Today()),
      Sum({$<Day={">=$(=1)<=$(=Max(Day(Today()-2)))"}, KEY_FormID={'DRSbwyPOS'}, KEY_Report={128}, KEY_Store-={210, 325}>}Amount),
      Sum({$<KEY_FormID={'DRSbwyPOS'}, KEY_Report={128}, KEY_Store-={210, 325}>}Amount))