Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hola
A continuación se muestran los datos de ejemplo.
Quiero hacer unión en la misma tabla para 3column una tabla (id,opendate,Status) como la tabla 1 y (ID,CloseDate,Status) como la tabla 2.
Unión
Filtrar tabla 1 con estado - Nuevo y min en fecha abierta
y filtrar el estado de la tabla2 - Cerrado y min en ClosedDate
| Id | OpenDate | Estado | ClosedDate | TestDate |
| 1 | 01/09/2019 | Nuevo | ||
| 1 | Cerrado | 01/10/2019 | ||
| 1 | 01/09/2019 | Prueba | 01/10/2019 | 05/09/2019 |
| Id | Fecha | Estado | ||
| 1 | 01/09/2019 | Nuevo | ||
| 1 | 01/10/2019 | Cerrado |
Gracias
Solved! Go to Solution.
Hola @bideveloper555 ,
Puede intentar crear una tabla calculada por Nueva tabla en Cálculos.
NewTable =
VAR table1 =
SELECTCOLUMNS (
FILTER (
'Table',
[Status] = "New"
&& [OpenDate] = CALCULATE ( MIN ( 'Table'[OpenDate] ), ALL ( 'Table' ) )
),
"ID", [ID],
"Date", [OpenDate],
"Status", [Status]
)
VAR table2 =
SELECTCOLUMNS (
FILTER (
'Table',
[Status] = "Closed"
&& [ClosedDate] = CALCULATE ( MIN ( 'Table'[ClosedDate] ), ALL ( 'Table' ) )
),
"ID", [ID],
"Date", [ClosedDate],
"Status", [Status]
)
RETURN
UNION ( table1, table2 )
Puede consultar más detalles desde aquí.
Saludos
Stephen Tao
Si este post ayuda,entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
Hola @bideveloper555 ,
Puede intentar crear una tabla calculada por Nueva tabla en Cálculos.
NewTable =
VAR table1 =
SELECTCOLUMNS (
FILTER (
'Table',
[Status] = "New"
&& [OpenDate] = CALCULATE ( MIN ( 'Table'[OpenDate] ), ALL ( 'Table' ) )
),
"ID", [ID],
"Date", [OpenDate],
"Status", [Status]
)
VAR table2 =
SELECTCOLUMNS (
FILTER (
'Table',
[Status] = "Closed"
&& [ClosedDate] = CALCULATE ( MIN ( 'Table'[ClosedDate] ), ALL ( 'Table' ) )
),
"ID", [ID],
"Date", [ClosedDate],
"Status", [Status]
)
RETURN
UNION ( table1, table2 )
Puede consultar más detalles desde aquí.
Saludos
Stephen Tao
Si este post ayuda,entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
@bideveloper555 , Probar algo como
sindicato(
resume(filter(Table,not(isblank(table[OpenDate]))), table[ID], table[OpenDate])
resume(filter(Table,not(isblank(table[closeDate]))), table[ID], table[closeDate])
)
Proporcione sus comentarios y consejos para nuevos videos
Tutorial Series Dax Vs SQL Direct Query PBI Consejos
Apreciamos tus Felicitaciones.
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.