the tables and formula (and its proof) work for when all attacking units are the same unit and when all the defending units are the same unit. Otherwise you have to approximate by calculating an average power and average number of units. Example:
on attack: 5 infantry, 4 tanks, 2 fighter.
Total pips: 5+4(3)+2(3) = 23.
Number of units = 5+4+2 = 11
23/11=2
So we can approximate this stack with 11 units hitting at 2, or 11 artillery.
I guess you would use power level 2 and number of units 11 for the purposes of lanchester tables.