I created a awk program to work witha data file to output a table and subtotal the rows and total up the collums and average
I got it to work
but when i added a presentation header before my totals go away.

working code so far

can be viewed at

and when i added the presentation headder
my totals went away

im using awk -f wtest datafile.dat

figured it out using functions and restructuring my program