Forum Discussion
JLambs20
4 years agoHelper III
Create Measure and Line Chart for Future Occupancy
Hello, I would like to create a line chart that will show how much a facility will be occupied (or was occupied) for any given date. My x-axis would be every day of the year with the values bein...
- 4 years ago
Hi, JLambs20
You can try the following methods.
Date Table:
Date = CALENDAR(MIN('Table'[Start]),MAX('Table'[End]))Measure:
Measure = VAR N1 = CALCULATE ( COUNT ( 'Table'[Room] ), FILTER ( ALL ( 'Table' ), [Start] <= SELECTEDVALUE ( 'Date'[Date] ) && [End] >= SELECTEDVALUE ( 'Date'[Date] ) ) ) VAR N2 = CALCULATE ( COUNT ( 'Table'[Room] ) ) RETURN DIVIDE ( N1, N2 )Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-zhangti
4 years agoCommunity Support
Hi, JLambs20
You can try the following methods.
Date Table:
Date = CALENDAR(MIN('Table'[Start]),MAX('Table'[End]))
Measure:
Measure =
VAR N1 =
CALCULATE (
COUNT ( 'Table'[Room] ),
FILTER (
ALL ( 'Table' ),
[Start] <= SELECTEDVALUE ( 'Date'[Date] )
&& [End] >= SELECTEDVALUE ( 'Date'[Date] )
)
)
VAR N2 =
CALCULATE ( COUNT ( 'Table'[Room] ) )
RETURN
DIVIDE ( N1, N2 )
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.