Forum Discussion
Explosion de datos
- 2 years ago
Hi Selvin
It seems you don't have ID's which can be used directly to link the tables. You you have them please use them. If not, you can use a strategy which leverages composite keys.
Create Composite Keys:
- In both datasets, create a new column that concatenates the product attributes to form a unique key for each product.Key = DATA BOM[CX] & "-" & DATA BOM[Style] & "-" & DATA BOM[Color] & "-" & DATA BOM[Size]
- In both datasets, create a new column that concatenates the product attributes to form a unique key for each product.
Relate the Tables:
- Use the newly created keys to establish a relationship between the tables in the "Model" view.
Calculate Actual Consumption:
- Once the tables are related, you can create a new column in the production table to calculate the actual consumption:Actual Consumption = DATA 2 PRODUCTION[Pieces Quantity] * RELATED(DATA BOM[Consumption])
- Once the tables are related, you can create a new column in the production table to calculate the actual consumption:
Visualize:
- Use the tables to create visuals in Power BI to analyze the actual accessory consumption.
Creating a composite key based on product attributes ensures that you can link the tables accurately, even if there's no pre-existing unique identifier. Let me know if it worked!
Pedro Reis - Data Platform MVP / MCT
Making Power BI and Fabric Simple
If my response resolved your issue, please mark it as a solution to help others find it. If you found it helpful, please consider giving it a kudos. Your feedback is highly appreciated!
Find me at LinkedIn
Hi Selvin
It seems you don't have ID's which can be used directly to link the tables. You you have them please use them. If not, you can use a strategy which leverages composite keys.
Create Composite Keys:
- In both datasets, create a new column that concatenates the product attributes to form a unique key for each product.Key = DATA BOM[CX] & "-" & DATA BOM[Style] & "-" & DATA BOM[Color] & "-" & DATA BOM[Size]
- In both datasets, create a new column that concatenates the product attributes to form a unique key for each product.
Relate the Tables:
- Use the newly created keys to establish a relationship between the tables in the "Model" view.
Calculate Actual Consumption:
- Once the tables are related, you can create a new column in the production table to calculate the actual consumption:Actual Consumption = DATA 2 PRODUCTION[Pieces Quantity] * RELATED(DATA BOM[Consumption])
- Once the tables are related, you can create a new column in the production table to calculate the actual consumption:
Visualize:
- Use the tables to create visuals in Power BI to analyze the actual accessory consumption.
Creating a composite key based on product attributes ensures that you can link the tables accurately, even if there's no pre-existing unique identifier. Let me know if it worked!
Pedro Reis - Data Platform MVP / MCT
Making Power BI and Fabric Simple
If my response resolved your issue, please mark it as a solution to help others find it. If you found it helpful, please consider giving it a kudos. Your feedback is highly appreciated!
Find me at LinkedIn