4 Replies Latest reply: Jan 25, 2013 11:55 AM by leviwong RSS

    Sum corresponding field in script

      Hi Guys,

       

      I have a field in my master calendar for MonthYear (MMM-YY)

      I also have a field in there to Flag certain days (contains 1 or 0)

       

      The MasterCalendar data holds a record for each day.

       

      I want to produce another table which will sum all of the flags that contain 1 for each MonthYear.

       

      I tried something like this:

       

      SumFlags:

      LOAD MonthYear,

      SUM(Flags)

      RESIDENT MasterCalendar;

       

      But Qlikview gave me an error.

       

      I would like it end up with a table as below:

       

      MonthYear          FlagTotal

      Jan-12                    15

      Feb-12                    18

      Mar-12                    20

       

       

      Can anyone help with getting the right script for this?

       

      Thanks

       

      L