Forum Discussion
Shippable Inventory Dax & Matrix
Hello,
I have a Power BI Report that is using 4 different tables (Order Backlog, Inventory, Incoming Shipments & Production) I am trying to leverage all 4 tables to see what amount of inventory to fulfil my "Order Backlog" orders. I currently have a Dax measure that looks like this:
5 Replies
- parry2kSuper User
nmoriello try this:
Shippable Qty Total = SUMX ( VALUES ( productTable[Product] ), VAR BacklogQty = [YTD Qty Total] VAR OnHandQty = CALCULATE(SUM('Total On Hand Qty'[OnHandQty])) VAR IncomingQty = CALCULATE(SUM('Total CZUB Shipments'[Qty])) VAR ProductionQty = CALCULATE(SUM('Total Unit Production'[Calculated_Qty])) VAR TotalAvailableQty = OnHandQty + IncomingQty + ProductionQty RETURN MIN(BacklogQty, TotalAvailableQty) )- nmorielloFrequent Visitor
Hi Parry2k,
That unfortunetly didnt work, it doesnt look like its even calculating the row level correctly with the SUMX and VALUES.
- parry2kSuper User
nmoriello try this, if not It will be easier if you share pbix file using one drive/google drive with the expected output. Remove any sensitive information before sharing.
Shippable Qty Total = SUMX ( ProductTable, VAR BacklogQty = [YTD Qty Total] VAR OnHandQty = CALCULATE(SUM('Total On Hand Qty'[OnHandQty])) VAR IncomingQty = CALCULATE(SUM('Total CZUB Shipments'[Qty])) VAR ProductionQty = CALCULATE(SUM('Total Unit Production'[Calculated_Qty])) VAR TotalAvailableQty = OnHandQty + IncomingQty + ProductionQty RETURN MIN(BacklogQty, TotalAvailableQty) ) - nmorielloFrequent Visitor
Since I have multiple Companies on each table I created a unique link (PartNum Link). That each table in the diagram below is linking to the Part Table. That allows me to geat to each part from the tables.
As for the Matrix I am using the PartNumber as the bottom value, then above that I am using a PartCategory field that lives on that same Part Table.