March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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 transactions.
The INVENTORY table has only one line for each inventory item/
I'm wanting to make a column in the INVENTORY table that has the total stock level based off the multiple lines in the STOK table.
Example.
STOK table
InvUnq = 1 , Qty = 5
InvUnq = 1, Qty = 4
on the INVENTORY TABLE I want to make new column called "total stock" that would add the qty of both lines (they are the same part as the unique number is 1 for both of them).
How to do I do a sum based on totaling all the parts in the STOK table to display as one number in the INVENTORY column called Total Stock I just made?
Thanks!!!
Solved! Go to Solution.
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
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
Thanks!
Is is possible to do this as column not a measure?
Hey,
as I stated just create a calculated column in the inventory table:
Regards,
Tom
My appologies, I misread. Thank you so kindly!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
164 | |
116 | |
63 | |
57 | |
50 |