Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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.
Solved! Go to Solution.
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.
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.
Still getting the same error think it is an issue with my data as a whole thanks for the help.
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!!
Proud to be a Super User! | |
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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
7 | |
6 |
User | Count |
---|---|
14 | |
13 | |
11 | |
9 | |
9 |