Very common problem, given the way Power BI evaluates the total row(s).
eDNA Expert @Greg has put together a fantastic set of resources to help you resolve this issue in the DAX Patterns section. Please take a look at this, and if you still have problems, give a shout…