Forum Discussion

marcoscruz's avatar
marcoscruz
New Member
4 years ago
Solved

occupancy

hello all

 

I am trying to calculate an occupancy report for the use of some resources, the final goal is to have how many days of the month the resource is used and also calculate the percentage of the month that the resource is used, so far I use the following measure, but the calculation is not correct, could you help me with that?

 

occupancy_days = CALCULATE(SUMX(SUMMARIZE(capacity_view,capacity_view[Start],capacity_view[End],
"occupancy_s",SUMX(capacity_view,DATEDIFF('capacity_view'[Start], capacity_view[End], DAY)),
"occupancy_e",SUMX(capacity_view,DATEDIFF('capacity_view'[Start], capacity_view[End], DAY))),
[occupancy_s]),USERELATIONSHIP(capacity_view[Start],'calendar'[Date]))
 
 

Any suggestions are really appreciated

 

Thanks in advance

2 Replies