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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jyeager
Helper I
Helper I

¡Se necesita ayuda! Dividir columna en una tabla por columna en otra tabla

¡Hola! Espero que toda la gente inteligente pueda ayudarme con esto.

Necesito una medida que divida budgeted_hours por el estimated_units en otra tabla. El caviato es que tengo una base cuantitativa a la que necesito hacer referencia para encontrar el estimated_units adecuado. Así, por ejemplo:

El #1 de trabajo tiene horas de trabajo presupuestadas para las siguientes actividades:

  • Actividad de "configuración": 50 horas
  • Actividad "Casting": 100 horas
  • Actividad de "Parcheo": 10 horas

La #1 de trabajo también tiene cantidades presupuestadas que estamos produciendo y cada clase de cantidad correspondiente a la actividad anterior:

  • "Set-ups": 1 (se refiere a la actividad de configuración)
  • "Beams": 5 (se refiere a las actividades de fundición y parcheo)

Me gustaría tener una medida que me diga para Job #1 tengo 50 horas por configuración (50 horas divididas por 1 configuración) y que tengo 20 horas por haz para la fundición (100 horas divididas por 5 haces) y 2 horas por haz para parchear (10 horas divididas por 5 haces).

He adjuntado las dos tablas y cómo se vinculan:

tbl_structure.PNG

debe ser algo así como psi-labor_budgets[budgeted_hours] / psi-qty_budgets[orig_est_units] ... pero luego se filtró o se filtró a la cost_basis.... ¡Sé que toda la gente inteligente puede ayudarme con ésta! gracias de antemano!!

Jim

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@jyeager - Usted tendrá que utilizar RELATEDTABLE o podría utilizar LOOKUPVALUE por lo que algo como:

Measure = 
  DIVIDE(
    SUM('psi-labor_budgets'[budgeted_hours]),
    SUMX(RELATEDTABLE('psi-qty_budgets'),[orig_est_units]),
    0
  )


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Super User
Super User

@jyeager - Usted tendrá que utilizar RELATEDTABLE o podría utilizar LOOKUPVALUE por lo que algo como:

Measure = 
  DIVIDE(
    SUM('psi-labor_budgets'[budgeted_hours]),
    SUMX(RELATEDTABLE('psi-qty_budgets'),[orig_est_units]),
    0
  )


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler ¡¡Gracias!!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.