3 Replies Latest reply on Mar 21, 2017 4:07 AM by Prayson Wilfred Daniel

    How to get last 3 weeks average on week number column?

    viraj gholap


      Hi,

       

      We are maintaining a table of transactions. It has columns such as client, revenue, date, tot_week.

       

      PFA workbook.

       

      tot_week is a count of week number that is maintained internally over years. Every sunday night, its value increases by 1. I need to find last 3 weeks of revenue and average revenue of last 3 weeks. In the workbook, I can hardcode the expression of Revenue last 3 week or Revenue last 3 week AVG and solve this issue.

       

      How to have use latest tot_week or max(tot_week) instead of hardcoded value?


      P.S. I need to use tot_week column only because of certain month_end logic associated with definition of a week.

       

      Regards,

      Viraj