Forum Discussion

unclejemima's avatar
unclejemima
Post Patron
7 years ago
Solved

Sum inventory quantity in another table

I've got a table called STOK and one called INVENTORY.  Each table has a record called InvUnq what is the inventory unique number.   The STOK table has multiple lines in it showing the stock transa...
  • TomMartens's avatar
    7 years ago

    Hey,

     

    due to the fact that the INVENTORY table has on line per item you can leverage the power of relationships. Create a relationship between the table INVENTORY on the one side and the table STOK on the many side like so:

    This allows to create a calculated column inside the INVENTORY table using this DAX statement:

    Column = CALCULATE(SUM('STOK'[Qty]))

    Hopefully this is what you are looking for.

     

    Regards,

    Tom