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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
pawelj795
Post Prodigy
Post Prodigy

Multiplicar minutos por cantidad

Hola
Tengo dos medidas como las que se muestran a continuación.
image.pngimage.png


Ahora, quiero multiplicarlos, pero cuando lo hago, los resultados son números decimales.
¿Cómo cambiarlos a Minutos/Horas?

11 REPLIES 11
v-gizhi-msft
Community Support
Community Support

Hola

Por favor, pruebe esta medida:

Measure = FORMAT(SUM(TSENB_CUSTINVOICETRANS[QTY])*SUM('Production Standards'[Time]),"HH:MM:SS")

Espero que esto ayude.

Saludos

Giotto

@v-gizhi-msft
Tu solución funciona, gracias.

Pero, no puedo averiguar el problema con asumir el tiempo (Total).

¿Por qué no es correcto?
image.png

@pawelj795 , para GT correcto tienes contexto de fila de fuerza, tratar como

Measure = FORMAT(SUMX(Summarize('Production Standards', 'Production Standards'[Item],"_1",Sum(TSENB_CUSTINVOICETRANS[QTY]),"_2",SUM('Production Standards'[Time])),[_1]*[_2]),"HH:MM:SS")
Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Mismo problema incluso con columnas.
image.png

Hola

Se debe a que el total de medida depende del contexto, no del campo actual en visual.

Este es un problema total de medida clásica.

Por favor, intente esto:

Measure =
FORMAT (
    SUMX (
        DISTINCT ( TSENB_CUSTINVOICETRANS[Item name] ),
        TSENB_CUSTINVOICETRANS[QTY] * 'Production Standards'[Time]
    ),
    "HH:MM:SS"
)

Espero que esto ayude.

Saludos

Giotto

@v-gizhi-msft
@amitchandak

Intenté la solución de las dos cosas, pero aún así no funcionó.

En algunos casos los resultados son correctos, pero en la mayoría de los casos son incorrectos.

image.png

amitchandak
Super User
Super User

@pawelj795 , Nueva columna en minutos

Nueva columna: hora([Tiempo])*60 + minuto([Tiempo]) // Cambiar el tipo de datos de número entero a decimal

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

@amitchandak

El problema es que tengo una relación indirecta entre estas dos tablas.
Es por eso que debo usar medidas en lugar de columnas.

Puede usar

sumx(Table,hour(Table[Time])*60 + minute(Table[Time]))

Pero mutiplcation debe hacer en un contexto de fila común. recomienda

https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-2-Date-Differ...

Es posible que haya utilizado suma o valores

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

@amitchandak
Está bien, lo entiendo, gracias.

Pero, ¿hay alguna manera de mostrar horas/minutos/segundos en medida como formato de hora como el siguiente columna?
image.pngimage.png

@pawelj795 , consulte https://community.powerbi.com/t5/Desktop/Sum-of-H-MM-SS/td-p/124007

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Solution Authors
Top Kudoed Authors