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
Anonymous
Not applicable

El valor necesita convertir el tiempo en Q Editor

Hola Equipo,

Necesita ayuda para convertir el formato hh:mm:ss en el editor de consultas para la columna de duración del ciclo (estos valores se consideran segundos), Esta columna está en formato de texto

gshastri_0-1600070078091.png

1 ACCEPTED SOLUTION
AiolosZhao
Memorable Member
Memorable Member

Hola @gshastri ,

Una manera fácil de resolver eso:

Duration.From([Orderid] / 86400)

Value need to convert time in Q Editor.PNG

Por favor, inténtelo.

Aiolos Zhao





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

Proud to be a Super User!




View solution in original post

4 REPLIES 4
AiolosZhao
Memorable Member
Memorable Member

Hola @gshastri ,

Una manera fácil de resolver eso:

Duration.From([Orderid] / 86400)

Value need to convert time in Q Editor.PNG

Por favor, inténtelo.

Aiolos Zhao





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

Proud to be a Super User!




amitchandak
Super User
Super User

@gshastri, prueba así

Duration(Number.IntegerDivide(Number.FromText([Cycle:duration]),86400) ,Number.IntegerDivide(Number.Mod(Number.FromText([Cycle:duration]),86400),3600),
Number.IntegerDivide(Number.Mod(Number.Mod(Number.FromText([Cycle:duration]),86400),3600),60),
Number.Mod(Number.Mod(Number.Mod(Number.FromText([Cycle:duration]),86400),3600),60)
)

AllisonKennedy
Super User
Super User

Lo siento, no entiendo, ¿ya tienes los segundos y necesitas HH:MM:SS o necesitas calcular los segundos?

Si tiene HH::MM:SS y necesita obtener segundos, Dividir columna por delimitador:
A continuación, cambie el nombre de las columnas a HourPart, MinutePart, SecondPart
A continuación, realice una columna calculada:
[HourPart]*3600 + [MinutePart]*60 + [SecondPart] y llame a esta columna calculada Seconds

Si tiene Seconds y necesita HH:MM:SS, utilice Number.Mod() y Number.IntegerDivide() para hacer lo contrario

[HourPart]- Number.IntegerDivide-[Seconds], 3600)
[Seconds2]- Number.Mod([Seconds], 3600)
[MinutePart]- Number.IntegerDivide([Seconds2], 60)
SecondsPart á Number.Mod([Seconds2], 60)

A continuación, combine columnas con : como delimitador.


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

Greg_Deckler
Super User
Super User

@gshastri Bueno, si fuera DAX podrías hacerlo de esta manera: https://community.powerbi.com/t5/Quick-Measures-Gallery/Seconds-2-HHMMSS/m-p/195615#M18

Sin embargo, debería ser capaz de seguir una técnica similar en Power Query.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.