Forum Discussion
connork
7 years agoFrequent Visitor
Annual Total not Calculating
I have the following measure to calculate overtime hours as the difference between actual hours worked [Hours] and 'regular' hours [OT Base2]: OT Hoursv2 =
IF(CALCULATE([Hours], all(refDate...
v-yulgu-msft
Microsoft Employee
7 years agoHi connork,
Have you checked this article? Dealing with Measure Totals
Besides, if possible, please post some dummy data in source table.
Regards,
Yuliana Gu
connork
7 years agoFrequent Visitor
Hi v-yulgu-msft
Ok - here's the data, the measures and then a videw of the matrix with related columns:
DATA
dataTime
refDatesDAY
refEmployee
MEASURES
OT Hoursv2 =
IF(CALCULATE([Hours], all(refDatesDAY[Date])) - calculate([OT Base2], all(refDatesDAY[Date]))<0,0,
CALCULATE([Hours], all(refDatesDAY[Date])) - calculate([OT Base2], all(refDatesDAY[Date]))
)OT Base2 = calculate(sum(refDatesDAY[OTBaseHours]),
filter(refDatesDAY,
refDatesDAY[Date]<=[MeasTerm]
&&refDatesDAY[Date]>=[MeasHire]))Hours = sum(dataTime[EMP_HOURS])
MeasHire = maX(refEmployee[Hire])
MeasTerm = max(refEmployee[Term])
REPORT VIEW