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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Arranafc19
Helper IV
Helper IV

Calulcate Diferencia de tiempo total entre dos datetimes

Hola

Estoy trabajando en una medida que calcula la diferencia de tiempo total entre las columnas datetime en power bi.

Estoy usando la columna personalizada a continuación para obtener esto, pero mi problema es que esto crea una columna de tipo de texto que no me permitirá sumar.

•Duration.ToText([AlarmClearedUTC]-[AlarmSentUTC])

¿Hay alguna manera de obtener la diferencia horaria entre datetimes que luego me permitirá resumir esto en una medida?

2 REPLIES 2
Anonymous
Not applicable

Hola @Arranafc19 ,

Puede utilizar "datediff" para el cálculo.

Aquí está la referencia:

https://dax.guide/datediff/

Saludos
Kelly
¿He respondido a tu pregunta? ¡Marca mi puesto como una solución!
harshnathani
Community Champion
Community Champion

Hola @Arranafc19 ,

Puede probar estas soluciones

https://community.powerbi.com/t5/Community-Blog/Aggregating-Duration-Time/ba-p/22486

https://community.powerbi.com/t5/Desktop/Calculate-Hours-between-dates-for-only-business-hours/td-p/...


saludos

Harsh Nathani


Apreciar con un Kudos!! (Haga clic en el botón Pulgares arriba)

¿He respondido a tu pregunta? ¡Marca mi puesto como una solución!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.