The data used for calculating the attendance percentage visible in School Gateway can be seen in SIMS via the Attendance tab in the student record (accessed via the Links on the right-hand side).
This same calculation is used for the $AttendPercentage$ wildcard in Messaging