You might want to instead base it on Cursing the attacking unit (making it miss), rather than giving the target unit some Evasion. This is because a unit will only be attacking one target, but a target may be under attack from many units. This way, every attacker can have the correct (different) chance to miss.
With the event Unit is attacked, do whatever kind of calculation you want to compare the attacker and the triggering unit's agility, and use a dummy caster to Curse the attacking unit. The Curse spell can have multiple levels for different chance to miss. This will always work because the event Unit is attacked runs before the attack actually happens. The drawback is that it would conflict if any unit in your map has a spell based on Curse, or if any unit is able to dispel magic.