0 Replies Latest reply on Jan 4, 2012 7:56 AM by weedonpaul

    sum not working properly

    weedonpaul

      Title

      sum not working properly

      Your post

       

      I've done something really obviouse, but i don't know what.

      I am trying to count the occurance of a word in a field by date (month and year), over a 3 month period.

      in one table called coverage i create a calculation field called month year with this calculation

      "(MonthName ( Date of Publication  _dd_mm_yyyy_ )  & Year ( Date of Publication  _dd_mm_yyyy_ ))"

      I also create another field to count the occurance of the word "feature" 

      "If ( Type of Coverage = "Feature"; 1 )"

      in another table called coverage report

      i count the number of occurances by the if statment is to filter by companie and in this case all occurances in october (Month1)

      "If ( (Coverage::Customer = Company) and (Month1 = Coverage::month year); Sum(Coverage::FeatureCounter );0)"

      i do exactly the same line in 2 other fields but replace Month1 with Month2 and Month3 (November and December)

      the problem is that the count is not right, I should get 2,1,1 respectivly but I get 0,0,4

      Why is it counting them all in the december date? I can swap the order of the month1,2,3 so that December is 2 or 1 and december always has the total.

      The only thing I can think of is that it has something to do with the fact that december is the date of the last entry in table "coverage"