I’m having a tough time putting together a Measure that would give me an “InTransit” total for our Transfer Shipments at Month-End. What needs taken into consideration is the following facts:
-Transfers have to occur on or before the Selected Date
-Receipts will have occurred after the Selected Date (if the data was received from those facilities)
-or Receipts have not occurred yet (if no data was received yet from those facilities)
With that said, I am looking to add anything that works ( TRUE/FALSE or Received Quantity) that will allow me to apply this filter to what actually populates for Receipts.
‘Table.B.Receipts’[Column.B3.ReceiptDate] > DATE( 2018, 11, 30)
Tables/Columns that would be Involved are:
Table.A.Transfers
Column.A1.SalesOrder#
Column.A2.Customer#
Column.A3.ShipDate
Column.A4.Item#
Column.A5.TransferQuantity
Column.A6.SO_ITEM (concatenate of SalesOrder# & Item#)
Table.B.Receipts
Column.B1.SalesOrder#
Column.B2.Customer#
Column.B3.ReceiptDate
Column.B4.Item#
Column.B5.ReceivedQuantity
Column.B6.SO_ITEM (concatenate of SalesOrder# & Item#)
My current Measure is this, (ignore the filtering added unless you find that it needs moved around if using different Functions than I started with here; these filters are important because we have multiple warehouses and I need the functionality of the measure results changing per location and different date selections; I will be replacing these set dates and customer# with SELECTEDVALUE functions as they are on Slicers on the Report page)
**InTransit** =
VAR vRecentTransfers = SELECTCOLUMNS( FILTER( 'Table.A.Transfers',
'Table.A.Transfers'[Column.A3.ShipDate] <= DATE( 2018, 11, 30) &&
'Table.A.Transfers'[Column.A3.ShipDate] > ( DATE( 2018, 11, 30) - 20 ) &&
'Table.A.Transfers'[Column.A2.Customer#] = 7525),
"Recent SO SKU", VALUES( 'Table.A.Transfers'[Column.A6.SO_ITEM] ) )
VAR vTransferQty = SUM( Column.A5.TransferQuantity )
RETURN
SUMX(
ADDCOLUMNS( vRecentTransfers,
"Transfer_Qty", vTransferQty,
"InTransit_Qty", **HELP** ),
InTransit_Qty * 1)