Forum Discussion
Matrix as Gantt Chart for Room Utilisation - multiple start and end times
- 4 years ago
Hi Anonymous ,
You should be able to do this with a change or two to the measure you have currently. I've created a rough setup but the idea should work the same.
Keep your time table unlinked, and create a measure like this one
Measure = Var _time = SELECTEDVALUE('Time Table'[Time]) Var _activity = CALCULATE(COUNTROWS('Table'), 'Table'[Start]<= _time , 'Table'[Finish] > _time) Return _activity + 0The idea is to look at the current time, then count how many events are active at that time, using CALCULATE to filter the table.
If you add the 'Operating Theatre' field into you rows, turn off 'stepped layout' under row headers formatting and then add this measure to values
That will give you something like this
And then you can format the 1s to show colour and the 0s to be blank, as you have before.
Hope that helps,
Any problems please let me know.
Hi TomMartens and AntonioM
Thank you both so much for your responses. Antonio I used your code and it worked beautifully (it's so easy when you know how hey? 😄) Thank you so much.
Tom, I've to do a little more figuring out with your code in order to implement it but the article you sent is very informative and the pbix will be a great help. I will be trying this out also.
Thanks to you both again.
Ciara