The percentages are based on the TOTAL column values instead of the COUNT column values. : Our code is correct.
The percentages are right when the TOTAL column values are used. The USER is mistakenly believing the percentages are based on the COUNT values.
The PCT value is calculated by the following line In the Pan Audit Plus macro INTRVL1. INTRVL1_PCT_ = (INTRVL1_TOTAL_ * N100_ / IVPCT_TOT_) + PCT_RND_NEG_
Observe: The PCT column isn’t computed using the COUNT value vs the total COUNT. It is computed using the TOTAL value vs the FINAL TOTAL.
Additional Information
Add the following to the OPTIONS table: DDIVRND (CT)
DDIVRND {Y|N}
DDIVRND specifies whether the result of a division operation is rounded or truncated when the number of decimal places in the result exceeds the number of decimal places defined for the field.
- Y The value is rounded.
- N The value is truncated. This is the default.
When the DDIVRND option is ‘Y’ the values will be more precise.