Forum Discussion

olivere91's avatar
olivere91
Helper I
5 years ago
Solved

Incorrect Measure Totals

Hi, I'm having trouble with a measure giving inconsistent results:   Available Inventory = SUM('items'[Inventory]) - SUM('Sales_Lines'[Quantity on SO])   Below is an exmaple, the top line is c...
  • themistoklis's avatar
    themistoklis
    5 years ago

    Try the following formula

    Available Inventory = SUMX(VALUES ( 'items'[Item_Number] ), CALCULATE ( SUM ('items'[Inventory])))
    -
    SUMX(VALUES ( 'items'[Item_Number] ), CALCULATE ( SUM ('Sales_Lines'[Quantity on SO])))