Hi,

I watched Brians video some time ago with how to correctly calculate the share of total% using ISINSCOPE.

In my example i have “competitors” and “articles” so I would like to calculate the share of “competitors” by the grand total and then the “articles” within the competitors so they are the grand total.

GrandTotal_IsInScope.pbix (18.7 KB)

So when using this measure the DAX looks like this:

```
Sales share% =
VAR AllSales =
CALCULATE ( [Sales], REMOVEFILTERS ( PricesAndProducts ) )
VAR AllCompetitor =
CALCULATE ( [Sales], REMOVEFILTERS ( PricesAndProducts[Competitor] ) )
VAR Result =
SWITCH (
TRUE (),
ISINSCOPE ( PricesAndProducts[Competitor] ), DIVIDE ( [Sales], AllCompetitor ),
DIVIDE ( [Sales], AllSales )
)
RETURN
Result
```

Buts its returning the wrong result. I have attached two print screens with what the DAX measure produces a result with no filter and then with filtering on “Ebay DE” with the correct result.

WRONG result - i.e. the 10.7% should be 15.7% as in the print screen below:

CORRECT result but im using a filter on Ebay DE only which i do not want to do: