Forum Discussion

rrafferty37's avatar
rrafferty37
Helper I
6 years ago
Solved

Surprise - total not adding up correctly

My story begins like many others before me. A simple measure that does exactly what I want:

 

001 QTY = if([NetQTYR12] = 0, blank(),

CALCULATE(
    SUM('Item Availability'[Qty Avl]),
    'Item Availability'[Location] = "111",
    all('tem Availability'[Location]),
    all('Accounts'[Account Name])))

I have a matrix table that is filtered to one specific account via a slicer (table name Accounts)

In this Table I pull in the inventory available in a location specific to that account.
I want to see what inventory is available in our general location that houses most of our product.  

The measure works great, but the total is totaling everything in Location 111 instead of just within the context of my other filters (If the account I am filtered on carries a product I want to see that, but if it doesn't carry that product I don't want to see the inventory from location 111 in my total.  

 

I have tried a few variations of IF(HASONEFILTER( + some combination of SUMX to no avail.

The 111 QTY is not totaling correctly.

 

Thank you for any help!!

2 Replies