I have people with hours worked for each day. I want to group by week (ending Friday and starting Saturday) then sum hours for each person. See column D for solution example:
Made some small changes to your measure, give this a go:
sum_weekhrs v2 =
var selperson = VALUES('sample'[person])
VAR startOfWeek = VALUES( Dates[WeekStartingSaturday] )
var result =
CALCULATE(
SUM('sample'[hrs]),
'sample'[person] IN selperson,
'Dates'[WeekStartingSaturday] IN startOfWeek,
REMOVEFILTERS( Dates[Date] ), REMOVEFILTERS( 'sample'[hrs] )
)
return result
.
With this result
Note you don’t need REMOVEFILTERS( ‘sample’[hrs] ) if you remove that field from the table visual.