Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
I have some issues calculating Production fact and planed (BOM) consumption.
In data model there is five tables:
Data Model looks like this:
I created two measures to calculate consumption for 1 unit. (In Item Ledger Entry qty comes in basic unit of measure, meanwile in BOM it's uses unit wich is set in BOM header, so BOM qty I have to divide by conversion rate):
Fact qty per unit = -CALCULATE(SUM('Item Ledger Entry'[Quantity]);FILTER('Item Ledger Entry';'Item Ledger Entry'[Entry Type]=5))/SUM('Prod Order line'[Prod QTY])
BOM QTY per unit = SUM('BOM Line'[BOM quantity])/AVERAGE('Prod Order line'[Conversion])
The problems are:
I was thinking about creating aditional table: Order No., Matierial No., Cogs, EUR, Fact QTY, per unit, BOM qty per unit, but I have no clue how to do this.
Can someone help me or maybe you have other suggestions to solve the problems?
There is pbix file:
https://www.dropbox.com/s/xfv1ei76lr92c4q/Community2.pbix?dl=0
Solved! Go to Solution.
@Anonymous ,
Actually the two problems are both about table relationship, in the sample, table 'Matierial' has one-many relationship with table 'Item Ledger Entry' and 'BOM Line' and the direction is single, so you can only filter from 'Matierial' to both 'Item Ledger Entry' and 'BOM Line'. So when you drag three columns from these three table, it's always use [Material No] in 'Matierial' to filter [Item No_] in 'Item Ledger Entry' and 'BOM Line'.
In addtion, to achieve what you want, you may reverse the relationship direction from both 'Item Ledger Entry' and 'BOM Line' to 'Matierial'. However, it seems like the relationship type and direction can't be changed. So I would recommend you to add two bridge tables as you mentioned between 'Matierial' and 'Item Ledger Entry' , 'BOM Line'.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous ,
Actually the two problems are both about table relationship, in the sample, table 'Matierial' has one-many relationship with table 'Item Ledger Entry' and 'BOM Line' and the direction is single, so you can only filter from 'Matierial' to both 'Item Ledger Entry' and 'BOM Line'. So when you drag three columns from these three table, it's always use [Material No] in 'Matierial' to filter [Item No_] in 'Item Ledger Entry' and 'BOM Line'.
In addtion, to achieve what you want, you may reverse the relationship direction from both 'Item Ledger Entry' and 'BOM Line' to 'Matierial'. However, it seems like the relationship type and direction can't be changed. So I would recommend you to add two bridge tables as you mentioned between 'Matierial' and 'Item Ledger Entry' , 'BOM Line'.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
109 | |
100 | |
95 | |
38 | |
37 |
User | Count |
---|---|
152 | |
125 | |
75 | |
74 | |
63 |