Forum Discussion
jen8080
5 years agoHelper I
Spread value across time between 2 dates
Hello- I need to be able to determine the number of months betwen the start and end date and show how many employees I need to per month to fill these requested hours. The requested hours should ...
xMikeDx
5 years agoFrequent Visitor
your time req in months is not going to fly when you are looking at partial months especially at both ends.
i believe you need to use datediff to get the count of days filter out any non workdays then determin how many hours per day each row is projected to meet your est. 50.
this is psudeo code.
measure =:
var __hours = 50
var __dayrange = calculate(datediff (facttable[start_date], facttable[end_date], Day),'datetable'[isweekend]=false)
var __result = divide( __dayrange, __hours)
return __result
something like this