Here are steps on how to deal with incorrect totals in Power BI.
Learning the Contexts: The most frequent reason for wrong totals is the row context versus filter context problem. In order to get a true total with functions such as SUMX or CALCULATE, one must use explicit logic-i.e., an IF(HASONEVALUE(), RowLogic, TotalLogic).
Checking Relationships: The relationships within the data model must be checked. An inactive relationship or a many-to-many relationship may also throw the totals off. Use USERELATIONSHIP for those and add a filter with CROSSFILTER as needed.
Debugging with Variables is the Next DAX command you would use: During intermediate calculations, place the variable 'VAR' appropriately in DAX to spot where totals deviate. Simplify measures to test behavior in isolation.
Test Filters and Tools—Tools such as Performance Analyzer or DAX Studio could be used to check filters or issues with relationships that give rise to incorrect totals.
This ensures that the totals defined here are correct, whether visible in visuals or a table.