2 Replies Latest reply: Nov 23, 2017 6:18 AM by Staffan Johansson RSS

    Show data from last 7 days

    Carl Mason

      Hi,

       

      I'm trying to create a simple table which shows the user a total for a selected day and the total for the last 7 days. Ideally, I need to do this without any scripting or variables.

       

      My table looks something like this:-

       

      Ticket_DateTicket_Week_StartWeight
      1/1/171/1/1710
      2/1/171/1/1712
      3/1/171/1/1716
      4/1/171/1/1712
      5/1/171/1/1710
      5/1/171/1/1712
      9/1/178/1/1715
      9/1/178/1/1710

       

      The user selects a date from a list and it shows the total weight for that date. I also want a column that gives the last 7 days. I've tried using set analysis but don't seem to be doing it right.

       

      The expression I'm using at the moment is:-

       

      Code

      SUM({ 1<Ticket_Date = {">$(=getfieldselections(Ticket_Date)) - 7, 'DD/MM/YYYY')"}> } Weight)

       

      This current returns: 0

       

      Thanks in advance for any help!