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
Rodloeloco
New Member

Nuevo en la comunidad Power BI con un gran problema... HH:MM:SS

Buenas tardes a todos.

 

Estoy en mis inicios con esta gran herramienta y actualmente tengo un gran problema, he intentado algunas soluciones siguiendo videos tutoriales pero aun no logro dar con ello.

 

De ante mano está deciros que muchas gracias por leerme y por el apoyo que podais brindarme.

 

El problema es el siguiente:

 

Tengo 2 columnas de Tiempo, donde me indica fecha yhora, necesito extraer la duración entre ambas tablas.

 

Ejemplo: 

Rodloeloco_2-1694001902806.png

Rodloeloco_3-1694001911537.png

Necesito obtener el tiempo que ha pasado desde el Inicio hasta el Fin.

 

Por una parte, no he podido hacer que me haga el calculo cuando es de 1 dia para otro. PRIMER PROBLEMA.

 

Por otra parte, lo que si he realizado es desgranar cada columna, separando la fecha de la hora, por ese lado va todo bien.

Rodloeloco_4-1694002194136.png

Me he dado cuenta que la hora me la muestra de la siguiente manera 

Rodloeloco_5-1694002294484.png, he intentado transformar el dato, etc, para eliminar el decimal en los segundos y que muestre el redondeo al alza de los segundo.

En mi caso y creo que me ayudaria mucho a obtener lo que deseo, seria unicamente hh:mm:ss sin esos decimales.

 

He intentado crear 3 columnas a partir del tiempo: hora / minuto / segundo ( llevando el valos de los segundos a la alza), perfecto, lo que queria.

Rodloeloco_6-1694002519053.png

 

El problema lo tengo, cuando nuevamente quiero unificar estas 3 columnas.

 

Intento crear una nueva columna personalizada, con el 

Rodloeloco_7-1694002745560.png obtengo la tabla pero me muestra el DIA 

Rodloeloco_8-1694002788244.png ya que se lo indico en la formula, pero al querer transformar nuevamente esta a DURACION me sigue mostrando lo mismo.

Rodloeloco_9-1694002888844.png

 

Perdonar si me he liado un poco, estoy hecho un lio.

 

Lo que necesito es obtener el tiempo de duracion entre una fecha y otra.

 

Muchas gracias por vuestra ayuda.

 

Un abrazo.

 

 

 

 

 

 

1 ACCEPTED SOLUTION

 

Yes, this is how the duration data type is presented: d.hh:mm:ss.

What do you want to do with this output? If you want to be able to make calculations with it later, it will need to either be in a Duration or Decimal data type, as these are both based on numbers in the background. If you want to display, for example, a duration of 2.00:18:55 as 48:18:55 then this will have to be created as Text data type, which you will no longer be able to make calculations with later.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

4 REPLIES 4
AlfonsoCorona1
New Member

Buen dia,

Me gustaría externar mi problema, llevo 5 dias trabajando en un reporte de power bi y en este momento se me acaba de cerrar el programa  y no lo puedo abrir segun este esta en formato de powerQuery, me dice que power bi no lo puede abrir y que necesita otro programa. 

Adjunto una imagen.imagenimagen

 

BA_Pete
Super User
Super User

Hi @Rodloeloco ,

 

To get the time between in Duration format, you can add this as a new custom column:

Duration.TotalMinutes([EndTime] - [StartTime]) / 1440

 

You can then convert this column to Duration data type.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Hola @BA_Pete , gracias por responder.

 

He realizado lo que me dices, sin embargo me muestra aun el "DIA", y los segundos con los decimales

Rodloeloco_0-1694075023574.png

Lo seguire intentando.

 

Muchas gracias por la ayuda.

 

Yes, this is how the duration data type is presented: d.hh:mm:ss.

What do you want to do with this output? If you want to be able to make calculations with it later, it will need to either be in a Duration or Decimal data type, as these are both based on numbers in the background. If you want to display, for example, a duration of 2.00:18:55 as 48:18:55 then this will have to be created as Text data type, which you will no longer be able to make calculations with later.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




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.

Top Solution Authors
Top Kudoed Authors