4 Replies Latest reply: Oct 21, 2015 8:07 AM by Mark James RSS

    How to compare average of last week with previous.

      I have a master calendar with WEEK, DAY, MONTH etc.

      How can I write set analysis expression?

      I guess I need to use for one field smth like max(week) but it may return not the full current week?


      Average I'm counting with this expression:


      Sum(points)/Count(distinct table_id)


      Here we can consider points as smth like sales. And table_id as one closed table in the restaurant,

      Also how can I make this kind of comparison for different restaurants. I have them 3 in database with fields restaurant_id = 1,2,3 respectively.


      Thank you for your time!