4 Replies Latest reply: Jan 18, 2017 11:22 PM by Lokesh Patel RSS

    Rolling 3, 6, 12 months based on filter selection - Qlik Sense

    Lokesh Patel

      Hi Guys,

       

      I have weekly sales data which only has following fields.

       

      Fields
      RepName
      ProductName
      Sales (Total number of sales)
      WeekDate (every 7th Date)

       

      I am planning to do an inline load containing 1 column and 6 rows as per below so that I can use it as filter.

       

      SumType
      RM
      RQ
      RY

       

       

      One of my expression is like below

       

      Sum(Sales)/Sum(TOTAL <RepName> {<ProductName>} Sales)

       

      What would be the best way to write above expression based on what sumType is selected rolling 3, 6 or 12 months.

       

      Thanks