Well, you can do that probably but then your spells won't deal much damage. If you look ingame at heroes attribute they range between cca 10 to 40 depending on level, and some other things like items, etc.
If you deal 7% out of 40, you'll deal about 2.8 damage
If you want your spells to be simple, you may want to forget the idea about spells dealing % of unit's damage and instead make them deal % of attribute (for example 120% of main attribute, etc.)
If you still want your spells to deal a percentage of unit's damage, then you will need to make your own database (via variable or hashtable in trigger editor) and save into it unit-type's Combat - Attack Damage, Combat - Number of Dices, Combat - Sides per Dice and unit's main attribute (as only main attribute increases damage).
You will also need to keep track of what buffs and debuffs the unit has, you will need to know how they stack one with another. You will need to keep track of items that increase unit's damage.
You will also need to keep track of techs that upgrade unit's damage (like basic units have for example Steel Forged Swords upgrade, etc.) - of course that aplies only if the unit uses such upgrades.
The buff/debuff part is probably the hardest one, as you need to always check your units whenever any unit casts spell that applies damage increasing/decreasing buff/debuff and then through periodic trigger you will need to pick all affected units and check each and every buff and debuff that increases/decreases damage.
Or make/find a custom buff system and set it up so it efficiently keeps track of (de)buffs on each unit.