At times, the totals in a table may differ from totals calculated using other methods. There are some easy ways to figure out the cause of such discrepancies.
Some values that exist in your data file may not be in the value set and thus these values will not be counted in the totals. For example, a value set might include the numbers 1 through 6. The data file might have a value of 7 or 8 for the variable or in some cases might contain blank (notappl) values for the variable. To see if this is the case, try including custom special values in your table. Make sure to check the boxes for the special values notappl, undefined, and default. Run the table again and check to see if any of the rows/columns for special values have counts in them.
If you have counts for the special value undefined then there are values in your data file that are not in the value set that you are tabulating. You may either edit the data file to eliminate such values or change your value set to include them. To find the actual values that are not in the value set, use the Tabulate Frequencies tool with the Each value found option.
If you have counts for the special value notappl then there are blanks in your data file for the variable in question. You will either need to impute the blanks or add an entry for notappl to your value set.
If you have counts for the special value default then there are values in your data file that cannot be read by CSPro. This can be because the properties of the variable in the dictionary do not match the data in the file. For example if the data type in the dictionary is numeric but the value in the data file contains non-numeric characters or if there is a decimal character in the data file but none specified for the item in the dictionary. It can also be because when the data file was written the value of the variable overflowed the length specified for the variable in the dictionary.
You should examine the data file and the dictionary file for discrepancies and also check any programs that have written to the data file to see if they could be writing default values.
There may be some values in your value set that are repeated and are being counted in more than one row or column of the table. For example, in the following value set, age 5 is in both the 0-5 and the 5-10 ranges and therefore each person with and age of 5 will be counted twice: once in the 0-5 category and once in the 5-10 category. The total will be the correct count of the number of persons, however, the sum of the age categories will not match the total.
Check your value set to make sure that no single value is repeated and that no ranges overlap. Of course, in some cases, you may want to have overlapping ranges in your value set, for example if you want to show subtotals.
See Also: Implications of Data Dictionary Value Sets, Special Values