Forum Discussion
Calculation between two tables based on other calculations
Hi,
Im trying to calculate the yield on component level by calculating like this:
Created Column
Created Measure
VAR CompCount = COUNTROWS(GROUPBY(BOM list,BOM list[Component],BOM list[Reference]))
VAR TotalPCB = DISTINCTCOUNT(NG Data[Serial Number])
VAR Total Component= CompCount * TotalPCB
But my first CompCount takes all the component for that product in the calculation instead of specific component.
What should I change ?
Relation ship is Bomlist.product - NGdata.product
| BOM list | ||||
| Product | Component | Reference | ||
| A | AAA | A1 | ||
| A | AAA | A2 | ||
| A | BBB | B1 | ||
| A | CCC | C1 | ||
| NG Data | ||||
| Serial number | Product | Component | Reference | Result |
| 1111 | A | AAA | A1 | NG |
| 1111 | A | BBB | B1 | NG |
| 2222 | A | AAA | A1 | NG |
| 3333 | A | CCC | C1 | NG |
The result I'm looking for is yield for all components but here is a examlple for component AAA.
Total count of component AAA should be 6 components and the Yield for the component AAA should be 66,67% yield.
3 Replies
- AnonymousNot applicable
Hi TcT85,
I couldn't find BOM list[Position] column/'NG Data'[Filter Total NG Comp] in your sample and I couldn't find “TotalPanels” in the "Total_Component" part.
Please show me more details about your table and data model. You can share a sample file with me and show me a screenshot with the result you want. This will make it easier to find the solution.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- TcT85
Helper III
Hi Anonymous ,
I have now updated the details, sorry for the inconvenience.
- TcT85
Helper III
Anonymous
Sorry for delay, have been on vacation and parental leave.
I have uploaded the .pbix file with example data.
https://www.transfernow.net/dl/20230808MuGeB7up