Forum Discussion
Calculating Average Occupancy Between Times
- 7 years ago
Hi Anonymous
Do you use this formula to create a calculated column in the table1->Meetings?
If so, please modify with the following formula
average = CALCULATE( AVERAGE(Censor[Average Occupancy (%)]), FILTER( ALLEXCEPT(Censor, Censor[Space Name]), [Date] = Meetings[Start Date] && [Date Time] >= EARLIER(Meetings[Start Time]) && [Date Time] <= EARLIER(Meetings[end time]) ) )If it doesn't solve your problem,
could you create a pbix only contains some rows of these two table and apply your formula as the screenshot and then share with me?
Best Reagrds
Maggie
Hi Anonymous
Do you use this formula to create a calculated column in the table1->Meetings?
If so, please modify with the following formula
average =
CALCULATE(
AVERAGE(Censor[Average Occupancy (%)]),
FILTER(
ALLEXCEPT(Censor, Censor[Space Name]),
[Date] = Meetings[Start Date] && [Date Time] >= EARLIER(Meetings[Start Time]) && [Date Time] <= EARLIER(Meetings[end time])
)
)
If it doesn't solve your problem,
could you create a pbix only contains some rows of these two table and apply your formula as the screenshot and then share with me?
Best Reagrds
Maggie
The formula was correct it was the modeling of the data that was incorrect. The time feilds came in as date time and I guess this didn't work properly due to that. thanks