1 Reply Latest reply: Jan 4, 2010 7:49 PM by ahassan RSS

    Calculate Sum based on Month and Year selection

    ahassan

      Hi All,

      I am trying to create a chart with the following requirements.

      Based on the month and year of Returns selected by the user e.g Feb as ReturnsMonth and 2007 as ReturnsYear, the chart need to display the sum of shipments for last 15 months.

      ReturnsMonth

      Jan

      Feb

      Mar

      Apr

      May

      Jun

      ….

       

      ReturnsYear

      2006

      2007

      2008

      ….

       

       

      Shipments

      Month

      Year

      TotalShipped

      Jul

      2006

      21

      Aug

      2006

      43

      Sep

      2006

      20

      Oct

      2006

      32

      Nov

      2006

      30

      Dec

      2006

      20

      Jan

      2007

      21

       

       

       

       

       

       

       

      There are two tables. The Returns table (containing return_date column) and Shipments table. Shipments table is loaded as shown above.

      I created a chart with first dimension as ReturnsYear, second dimension as ReturnsMonth. The expression should calculate Sum(TotalShipped) for last 15 months. Can someone please guide me how to build this expression? I am fairly new to Qlikview and was hoping that this can be accomplished without using set analysis.

      Please help!