17 Replies Latest reply: Dec 22, 2015 7:36 AM by Nayan Lalla RSS

    Showing Info for the last 7 Days sales



      I am creating a chart table where I want to show Sales Quantity per day, for the last 7 days sales.  The 2 dimensions are [Trans Date] & [Sales Qty] . 


      The last date (or max date) sales quantity formula works (see formula below), however when I apply similar formula to the other dates, it does not work. I have used variable (from variable overview) for my formulas. (see screen shot attached)


      Please can you tell me where I am going wrong in my formula


      Does work

      =SUM({<[Trans Date]={'$(MaxTransDate)'}>}[Sales Qty])  - This works


      Don't work

      =SUM({<[Trans Date]={'$(MaxTransDate1)'}>}[Sales Qty]) 

      =SUM({<[Trans Date]={'$(MaxTransDate2)'}>}[Sales Qty]) 

      =SUM({<[Trans Date]={'$(MaxTransDate3)'}>}[Sales Qty]) 

      =SUM({<[Trans Date]={'$(MaxTransDate4)'}>}[Sales Qty]) 

      =SUM({<[Trans Date]={'$(MaxTransDate5)'}>}[Sales Qty]) 

      =SUM({<[Trans Date]={'$(MaxTransDate6)'}>}[Sales Qty]) 

      =SUM({<[Trans Date]={'$(MaxTransDate7)'}>}[Sales Qty]) 


      kind regards