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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

Cómo transformar estos datos y mantener el modelo de datos correcto

Hola Comunidad,

Me gustaría transformar mi conjunto de datos como se muestra en la imagen de abajo.

ExampleEjemplo

¿Alguien podría ayudar?

Muchas gracias de antemano!

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hola @PSch_92

Cree una tabla de empleados sin ninguna relación con la tabla.

employee table = VALUES('Table 2'[Employee])

Crear medidas

selected = CONCATENATEX(ALLSELECTED('employee table'),'employee table'[Employee],",")

filtered = FIND(MAX('Table 2'[Employee]),[selected],1,0)

total_hours = var sums=CALCULATE(SUM('Table 2'[Hours]),FILTER(ALLSELECTED('Table 2'),'Table 2'[Client]=MAX('Table 2'[Client]))) return IF([filtered]=1,sums)

col_emp = var con=CONCATENATEX(FILTER(ALLSELECTED('Table 2'),'Table 2'[Client]=MAX('Table 2'[Client])),[Employee],",") return IF([filtered]=1,con)

Capture10.JPG

Saludos
Maggie
Equipo de apoyo a la comunidad _ Maggie Li
Si este post ayuda, entonces considera Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hola @PSch_92

Cree una tabla de empleados sin ninguna relación con la tabla.

employee table = VALUES('Table 2'[Employee])

Crear medidas

selected = CONCATENATEX(ALLSELECTED('employee table'),'employee table'[Employee],",")

filtered = FIND(MAX('Table 2'[Employee]),[selected],1,0)

total_hours = var sums=CALCULATE(SUM('Table 2'[Hours]),FILTER(ALLSELECTED('Table 2'),'Table 2'[Client]=MAX('Table 2'[Client]))) return IF([filtered]=1,sums)

col_emp = var con=CONCATENATEX(FILTER(ALLSELECTED('Table 2'),'Table 2'[Client]=MAX('Table 2'[Client])),[Employee],",") return IF([filtered]=1,con)

Capture10.JPG

Saludos
Maggie
Equipo de apoyo a la comunidad _ Maggie Li
Si este post ayuda, entonces considera Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

amitchandak
Super User
Super User

@PSch_92, horas que puede sumar

para el empleado que puede utilizar

https://docs.microsoft.com/en-us/dax/concatenatex-function-dax

concatenatex(Table,Table[employee])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.