Forum Discussion

AmandaHore's avatar
AmandaHore
Helper I
1 year ago
Solved

Help with summing values by week

I am working with an SQL database provided by a vendor to build some power BI reports.   So far it has been all good but now I need some help.  

I want to calculate the billable time that people have worked over a given week from their timesheet.  

The catch is that the User Timesheet Table does not have a date field, it only has a week start and week end.  

Fields are:

FACTUserTimesheet [WeekStart]

FACTUserTimesheet [Week End] and 

FACTUserTimesheet [Billableminutes]

 

We have a Date table that has date, the week number already added and FirstofWeek and LastofWeek values

Fields are

DIMDateExtended [Date]

DIMDateExtended [FirstofWeek]

DIMDateExtended [LastofWeek]

DIMDateExtended [Week]

 

I want to create a sum of the billable minutes for every week and the cumulative values in a table like below.  

 

WeekStart of WeekBillable MinutesBillable HoursCumulative Values
120/12/20244507.57.5
26/01/202570011.6719.17
313/01/20255008.3327.50
420/01/202562310.3837.88

 

I need help with the mesures for Billable Minutes, Billable Hours and Cumulative values based on the week.  

 

Any guidance is really appreciated as I am not that experienced with Dax and this is getting a bit beyond my skills. 

 

1 Reply