Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
¿Cómo puedo obtener el valor de max timestamp y min timestamp en la tabla 1 de la tabla 2 según la escena a continuación-
@akapoor03 suponiendo que está intentando hacer esto como una columna calculada en la tabla 1, podría usar algo como:
MIN Timestamp =
VAR _USERNAME = Table1[UserName]
RETURN
CALCULATE(
MIN(Table2[Timestamp]),
Table2[User] = _USERNAME
)y
MAX Timestamp =
VAR _USERNAME = Table1[UserName]
RETURN
CALCULATE(
MAX(Table2[Timestamp]),
Table2[User] = _USERNAME
)
gracias. Sólo una pregunta de seguimiento--
¿Cómo puedo obtener la diferencia de la hora de inicio y finalización en horas (como el ejemplo de número entero 5,6.5, etc.)-
Probé con esto, pero consiguiendo tiempo mínimo de toda la Tabla 2 y Tiempo máximo de toda la Tabla 2 como abajo-
donde como quiero tiempo mínimo de 21/07/201 y tiempo máximo de 21/07/201, y de manera similar tiempo mínimo de 22/07 amd tiempo máximo de 22/07 y así sucesivamente . Por lo tanto, básicamente la hora mínima y máxima de la fecha.
@akapoor03 disculpas, no capté ese requisito en su descripción inicial.
¿Qué tal estos:
MIN Timestamp =
VAR _USERNAME = Table1[UserName]
VAR _DATE = FORMAT(Table1[Date], "dd/mm/yyyy")
VAR _Result =
CALCULATE(
MIN(Table2[Timestamp]),
Table2[User] = _USERNAME,
FORMAT(Table2[Timestamp], "dd/mm/yyyy") = _DATE
)
Return
_Result
MAX Timestamp =
VAR _USERNAME = Table1[UserName]
VAR _DATE = FORMAT(Table1[Date], "dd/mm/yyyy")
VAR _Result =
CALCULATE(
MAX(Table2[Timestamp]),
Table2[User] = _USERNAME,
FORMAT(Table2[Timestamp], "dd/mm/yyyy") = _DATE
)
Return
_Result
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.