Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Selvin
New Member

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 me refleja: construcción,estilo, color, talla, los accesorios necesarios para costurar dicho estilo, y su consumo respectivo como por ejemplo

 

CX                                      Estilo            Color                            Talla               Accesorio            Consumo

SS BASIC TEE AB TA           PC54            LEMON YELLOW           XL                 CAJA                    0.02778

SS BASIC TEE AB TA           PC54            LEMON YELLOW           XL                 CASE LABES         0.02778

SS BASIC TEE AB TA           PC54            LEMON YELLOW           XL                 LABEL                   1

SS BASIC TEE AB TA           PC54            LEMON YELLOW           XL                 LANA                    0.00373

SS BASIC TEE AB TA           PC54            LEMON YELLOW           XL                 ROBBON               0.00002

SS BASIC TEE AB TA           PC54            LEMON YELLOW           XL                 TAPE                      0.00047

 

DATA 2 PRODUCCIÓN, Está data me refleja la planta que realizo la producción, construcción, estilo, color, talla, cantidad en piezas, cantidad en docenas. Como por ejemplo.

 

Planta     CX                                    Estilo        Color                        Talla              Cant piezas             Cant docenas

5 star      SS BASIC TEE AB TA         PC54         LEMON YELLOW      XL                 2000                        166.66

 

 

Necesito hacer una explosión de datos para que en la data 2, me desgloce los accesorios de dicho estilo, la cantidad en piezas debe ser repetitiva para cada linea para calcular el consumo real. por ejemplo 

 

Para calcular el consumo es:

Cantidad de piezas producidas * el consumo del accesorios. 

 

Favor si alguien me dar un solución, se lo agradeceria.

 

Saludos.

1 ACCEPTED SOLUTION
pmreis
Most Valuable Professional
Most Valuable Professional

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

View solution in original post

1 REPLY 1
pmreis
Most Valuable Professional
Most Valuable Professional

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

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.