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
fstupot
Helper II
Helper II

powerbi convertir tiempo de duración hh:mm:ss en fecha hh:mm:ss

Hola, chicos

por favor, puede ayudar.

Tengo una fuente de datos de Excel que muestra la duración en hh:mm:ss cuando se tira en powerbi agrega fecha y también cambia la hora.

Sólo quiero que lo deje en paz!

¿cómo dejo de powerbi convirtiéndolo, o convertirlo de nuevo?

cada vez que intento cambiar el formato de nuevo a hh:mm me da la duración incorrecta

por favor ayuda

Lucy x

5 REPLIES 5
fstupot
Helper II
Helper II

Hola a todos

la hora de inicio/fin no son los datos desde donde se calcula el tiempo de movimiento para que no funcione

No entiendo por qué powerbi puede mostrarlo como se muestra en Excel.

realmente molesto x

Nathaniel_C
Super User
Super User

Hola @fstupot ,

Traje las dos veces a PQ y luego dejé que PQ creara la duración.


Avísame si tienes alguna pregunta.

Si esto resuelve sus problemas, márquelo como la solución, para que otros puedan encontrarlo fácilmente. Kudos 👍son agradables también.
Nathaniel

duration23.PNG

duration.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




fstupot
Helper II
Helper II

VehículoGrupoEmpezarFinalTiempo totalconmovedor% En movimientoRalentí% de ensocupmientoDetenido% DetenidoParadasmillas
BF63XUVStaff_Lichfield OPS02/11/2020 08:0525/11/2020 14:3177:46:0924:29:5331.522:03:1628.3624:30:5531.5259457.6
BF67EUKStaff_Leek OPS03/11/2020 07:2725/11/2020 15:39111:49:5232:36:4929.1611:49:5610.5850:06:3144.81107618.9
BF67EUUStaff_Lichfield OPS02/11/2020 11:3925/11/2020 13:5286:52:0724:43:0128.4529:13:4733.6517:42:5220.3969460.4
BF67EUVStaff_Gailey OPS02/11/2020 07:2325/11/2020 15:00125:52:2039:36:5131.4708:05:156.4361:00:3048.47145804.7
BF67EUWStaff_Lichfield OPS02/11/2020 06:4425/11/2020 14:0383:54:5427:08:1132.3406:19:197.5327:27:4932.7374459.2
BF67EUTratamientos Staff_Surface02/11/2020 07:1225/11/2020 14:03123:06:2823:28:0019.0610:27:268.4984:39:2868.77133480.3

Gracias por los datos @fstupot

No estoy completamente seguro de dónde se calcula su tiempo total, así que si @Nathaniel_C solución ayuda, genial. si no, puede intentar dividir columna por delimitador para convertir sus columnas de duración en columnas numéricas

pegar el siguiente código en el editor avanzado para ver lo que quiero decir

Dejar
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("jZLLbhNRDIZfJZp15fpyrl4iAQuQQArhoiqqojIREYVFCQveHtsnNCPSRaWRxmP7+Hzz+7+5mV68KvJ583G6mtbH3X5/+/Zw921/mO+/rt69X1sW+ZrompFxhU0xW4rzY4qSClmqVk1FsXs1KXfNYqEQRD8rilLxsIGU0SSoOZ+a2N7ZD6dcoUzbq+CqLzdvzlzz/P0fkpyRqnL9Dymr+Cgi0mQgPltYpdiXd3YIklM1QoTcnAAVy/iflKBRlHx6oQZ9QbV5jlp2QXAs0WTgtGJvjdEmRBJFGtqkkKurNSavikDxFJm8PM4yQowtIVdBSAuw8xpf7w73858ndmiCyYVgiH4JZ8dij6W7YJnGfoIltq/kOAWShCx20PboIG00UfxBwwR1gfXpWe6yBaULd6Ff1Ey3ZI9XqxoIBRiDeMoOkknmelQI37G7Yqzbmqqnagp3deAF15dHrvXvh/3ubl59eJh3xx/zz+OvC9mIn4YjFrcNu4Ms5HZSswMOczkLe2gaOVIz7/fRXxrUkE0kRLTdTtvtXw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Vehicle = _t, Group = _t, Start = _t, End = _t, #"Total Time" = _t, Moving = _t, #"% Moving" = _t, Idling = _t, #"% Idling" = _t, Stopped = _t, #"% Stopped" = _t, Stops = _t, Miles = _t]),
"Tipo de cambio" - Table.TransformColumnTypes(Source,"Vehicle", tipo text, "Group", texto de tipo, "Inicio", escriba datetime, "End", escriba datetime, "Total Time", escriba text, "Moving", escriba text, "% Moving", tipo de número de tipo, "Idling", escriba text, "% Idling", número de tipo, "Detención", tipo "Detenido", escriba texto, "% Detenido", número de tipo, "Stops", Int64.Type",
"Resta de tiempo insertada" - Table.AddColumn(-"Changed Type", "Subtraction", each [End] - [Start], type duration),
"Columnas reordenadas" - Table.ReorderColumns("Insered Time Subtraction","Vehicle", "Group", "Start", "End", "Moving", "% Moving", "Idling", "% Idling", "Stopped", "% Stopped", "Stops", "Miles", "Subtraction", "Total Time")
"Dividir columna por delimitador" ? Table.SplitColumn('"Columnas reordenadas"", "Tiempo total", Splitter.SplitTextByDelimiter(":", QuoteStyle.Csv), ''Tiempo total.horas'', "Tiempo total.minutos", "Tiempo total.segundos"),
"Changed Type1" á Table.TransformColumnTypes('Dividir columna por delimitador",''Total Time.hours', Int64.Type', ''Total Time.minutes'', Int64.Type', ''Total Time.seconds'', Int64.Type'),
"Minutos Totales Insertados" - Table.AddColumn(-"Changed Type1", "Subtraction Total Minutes", cada Duration.TotalMinutes([Subtraction]), número de tipo),
"Added Custom" á Table.AddColumn(-"Inserted Total Minutes", "Total Time.Total minutes", cada [Tiempo Total.horas]*60 + [Tiempo Total.minutos]+[Tiempo Total.segundos]/60)
En
"Añadido personalizado"


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

AllisonKennedy
Super User
Super User

Borrar el formato en Excel - ¿cuál es el valor realmente introducido como? ¿Es fecha o texto?

Si puede proporcionar algunos datos de ejemplo en el formato real podemos ayudar mejor.

El tipo de datos de duración de Power BI se convierte en número decimal en el informe.

https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-data-types#datetime-types


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

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.