Forum Discussion
Dynamic table calculations based on slicer
- 9 years ago
If you simply create a calculated field (measure) instead of a calculated column, your formula should work:
Billable% = DIVIDE (SUM(tblTime[BillableHours]), SUM(tblTime[DurationHours]))
If you want a calculated column for any reason, this should work:
Billable% =
CALCULATE (
SUM ( tblTime[BillableHours] ),
FILTER ( tblTime, tblTime[User] = EARLIER ( tblTime[User] ) )
)you can also add a AND condition if you want in the above formula as:
&& tblTime[Team] = EARLIER ( tblTime[Team])
Thanks
If you simply create a calculated field (measure) instead of a calculated column, your formula should work:
Billable% = DIVIDE (SUM(tblTime[BillableHours]), SUM(tblTime[DurationHours]))
If you want a calculated column for any reason, this should work:
Billable% =
CALCULATE (
SUM ( tblTime[BillableHours] ),
FILTER ( tblTime, tblTime[User] = EARLIER ( tblTime[User] ) )
)
you can also add a AND condition if you want in the above formula as:
&& tblTime[Team] = EARLIER ( tblTime[Team])
Thanks
- Anonymous9 years agoNot applicable
Thanks Prakash!
Somehow I'd created a calculated column and not a measure. I'll go and pour some coffee in my eyes now...