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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Syndicate_Admin
Administrator
Administrator

Cómo encontrar la diferencia entre dos fechas en horas.

Hola
Soy nuevo en Dax. Quiero encontrar diferencia entre dos fechas en horas. Lo intenté usando la función DATEDIFF pero excluye minutos
11.png
Quiero un resultado como este
1.png
¿Hay otra manera de resolver este problema?
@amitchandak

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

Hola @MahyarTF ya he probado usando datediff quiero ans como este:
1.png

Hola

Debe calcular la hora y los minutos por separado, luego agregar el texto particular Hr y Min al texto.

Utilice el siguiente código para su medida:

DateDiffInHour = CONCATENAR(
CONCATENAR(
DATEDIFF( valores(Hoja244[En el tiempo]), valores(Hoja244[Tiempo de salida]),hora)
, " RRHH ")
,
CONCATENAR( valor( DATEDIFF( valores(Hoja244[En el tiempo]), valores(Hoja244[Tiempo de salida]), minuto), 60)," min")
)
MahyarTF_0-1667343132240.png

Syndicate_Admin
Administrator
Administrator

Hola

¿Utilizaste el intervalo en tu dax?

DateDiffInHour = DATEDIFF( valores(Hoja244[En el tiempo]), valores(Hoja244[Tiempo de salida]),HORA)

MahyarTF_0-1667291274571.png

Aprecio sus felicitaciones y por favor marque mi respuesta como una solución si le ayuda

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.