  The MacWilliams Identity is a well established theorem relating the weight
enumerator of a code to the weight enumerator of its dual. The ability to use a
known weight enumerator to generate the weight enumerator of another through a
simple transform proved highly effective and efficient. An equivalent relation
was also developed by Delsarte which linked the eigenvalues of any association
scheme to the eigenvalues of it's dual association scheme but this was less
practical to use in reality. A functional transform was developed for some
specific association schemes including those based on the rank metric, the skew
rank metric and Hermitian matrices. In this paper those results are unified
into a single consistent theory applied to these "Krawtchouk association
schemes" using a $b$-algebra. The derivatives formed using the $b$-algebra have
also been applied to derive the moments of the weight distribution for any code
within these association schemes.
