Forum Discussion
Calculate QTY for a two part IF function
- Anonymous2 years ago
Hi Jorjor ,
You can try formula like below to calculate QTY = Remanin finish * BOM QTY:
QTY 1 = VAR CurrentBOMID = 'RemainingFinishTable'[BOM ID] VAR CurrentComponent = 'RemainingFinishTable'[Component] VAR BOMQTY = CALCULATE ( SUM ( 'BOMTable'[BOM QTY] ), FILTER ( 'BOMTable', 'BOMTable'[BOM ID] = CurrentBOMID && 'BOMTable'[Component] = CurrentComponent ) ) RETURN BOMQTY * 'RemainingFinishTable'[Remain Finish]Best Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Jorjor -create a measure to calculate the QTY for each component
QTY Measure =
SUMX(
FILTER(
'All Demand',
'All Demand'[BOM ID] = 'WORKORDERS_OPEN'[BOM ID]
&& 'All Demand'[Component] = 'WORKORDERS_OPEN'[Component]
),
'All Demand'[BOM QTY] * 'WORKORDERS_OPEN'[REPORTREMAINASFINISHED]
)
Hope it works for both components.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Hi this is having the same issue it is only returning the top value of the BOM not all of the values for each component.