Forum Discussion
Jorjor
2 years agoFrequent Visitor
Calculate QTY for a two part IF function
I want to calculate the QTY for each component in my data set. The forumula I'm using is only calculating for the top item not all of them. BOM Q = SUMX(FILTER('All Demand',[BOM ID]=EARLIER('WOR...
- 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.
Anonymous
2 years agoNot applicable
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 Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Jorjor
2 years agoFrequent Visitor
Still getting the same error think it is an issue with my data as a whole thanks for the help.