Forum Discussion

Selvin's avatar
Selvin
New Member
2 years ago
Solved

Explosion de datos

Hola,   Trabajo para una coorporación de manufactura, y necesitamos empezar a medir los consumos de accesorios por cada prenda costurada.   Tengo 2 datas: 1-DATA BOM: Esta data es la base donde ...
  • pmreis's avatar
    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.

     

    1. 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]
    2. Relate the Tables:

      • Use the newly created keys to establish a relationship between the tables in the "Model" view.
    3. 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])
    4. 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