Forum Discussion
Anonymous
3 years agoNot applicable
Sum of Rows
Hi, I have a matrix table but the subtotals for each row is wrong. The current table that i have right now is this: This is my desired outcome: To get the values, I've crea...
Jihwan_Kim
Super User
3 years agoHi,
I am not sure how your datamodel looks like, but please try something like below whether it suits your requirement.
Test =
VAR ThisDate =
SELECTEDVALUE ( 'Date'[Date] )
VAR Hours =
SUMX (
DISTINCT ( 'Date'[Date] ),
CALCULATE (
( 100 - SUM ( 'Hours'[Loading] ) ) * 0.08,
FILTER (
'Hours',
'Hours'[Job Start Date] <= ThisDate
&& 'Staff Booking'[End date] >= ThisDate
)
)
)
RETURN
Hours