Forum Discussion
Multiply Minutes times Quantity
Hi,
I have two measures like below.
Now, I want to multiply them, but when I do that, the results are decimal numbers.
How to change them to Minutes/Hours?
11 Replies
- v-gizhi-msft
Community Support
Hi,
Please try this measure:
Measure = FORMAT(SUM(TSENB_CUSTINVOICETRANS[QTY])*SUM('Production Standards'[Time]),"HH:MM:SS")Hope this helps.
Best Regards,
Giotto
- pawelj795
Post Prodigy
v-gizhi-msft
Your solution works, thanks.
But, I can't figure out issue with suming time (Total).Why isn't correct?
- pawelj795
Post Prodigy
Same issue even with columns.
- amitchandak
Super User
pawelj795 , New column in minute
New column = hour([Time])*60 + minute([Time]) // Change data type from whole number to decimal
- pawelj795
Post Prodigy
amitchandak
The problem is that I have indirect relationship between these two tables.
That's why I must use measures instead of columns.- amitchandak
Super User
You can use
sumx(Table,hour(Table[Time])*60 + minute(Table[Time]))
But mutiplcation need to done on a common row context . Refer
You may have use summarize or values