Forum Discussion
BoPowerBI
6 years agoFrequent Visitor
Average time calculation, calculated column or measure?
Hi all, I'm trying to get my head around PowerBI and measures and I couldn't find an answer, please help. This is an excerpt from my datatable of 18th of June 2020 during different time slots...
amitchandak
Super User
6 years ago@BoPowerBI , Not sure I got you.
But Multiplication should be Sum(A*B) not sum(A) * sum(B) . If we want sum(A) * sum(B), we should force a row context
Similarly, divide should be sum(A)/ sum(B) not Sum(A/B) . A/B is done when you want a simple Avg
BoPowerBI
6 years agoFrequent Visitor
I just meant the difference between mine without divide:
WaitingTimeAvgSec = SUMX(WaitingTable,WaitingTable[NumCalls] * WaitingTable[WaitingTimeAvg] * 86400) / SUM(WaitingTable[NumCalls]
and yours with divide:
MEASURE = divide(SUMX(Table[NumCalls] *Table[WaitingTimeAvg]*86400),SUM(Table[NumCalls]))
- ryan_mayu6 years ago
Super User
Divide Performs division and returns alternate result or BLANK() on division by 0.
https://docs.microsoft.com/EN-US/dax/divide-function-dax