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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
att9728
New Member

Crear columna calculada para la fecha de inicio y finalización

Estoy trabajando con las dos tablas siguientes:

  1. Tabla de ejemplo de datos, que muestra los datos recopilados con un identificador de "etapa", así como la hora en que se recopiló.
    1. HoraEtapaValor1Valor2
      5/22/2020 13:01:151
      5/22/2020 13:02:151
      5/22/2020 13:03:151
      5/22/2020 14:01:152
      5/22/2020 14:02:152
  2. Tabla de resumen de etapa, esto muestra resúmenes de la etapa (la salida deseada).
    1. EtapaEmpezarFinal
      15/22/2020 13:01:155/22/2020 13:03:15
      25/22/2020 14:01:155/22/2020 14:02:15

Estas tablas se realifican a través del número de etapa. Para la tabla 2, donde tengo problemas es calcular la hora de inicio y finalización. Para la hora de inicio, necesita filtrar los datos 1 por la etapa correspondiente y encontrar la primera vez.

He probado la siguiente expresión DAX, pero estoy obteniendo resultados extraños:

Start = CALCULATE(FIRSTDATE(ParameterValues[date].[Date]),USERELATIONSHIP(ParameterValues[stageId],Stages[_id]))

Cada fila devuelve 1/1/2020 12:00:00 AM para el inicio y 12/31/2020 12:00:00 AM para el final, pero ninguno de estos valores está en la tabla.

Estoy seguro de que estoy cometiendo un simple error, pero he estado atascado y no puedo conseguir que se dé cuenta. Gracias de antemano por la ayuda!!

2 REPLIES 2
amitchandak
Super User
Super User

@att9728 , No muy claro, Tanto como una nueva columna en la tabla 2

iniciar la tabla de tiempo 2 - minx(filter(table1,table1[Stage] ?table2[Stage]),table1[Time])
Tabla de tiempo final 2 - maxx(filter(table1,table1[Stage] ?table2[Stage]),table1[Time])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

¡Gracias por esto! Esta es la respuesta.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Solution Authors
Top Kudoed Authors