Forum Discussion
Matrix Visual as a Gantt Chart - by Hour
Good Morning,
Edited: Have edited this message in an attempt to provide additional data and clarity.
I am attempting to create a gantt type chart using the Matrix visual.
My task is to depict activity (represented by various letters) that happens in a train yard on a daily basis. Because the activity happens overnight, my "Project" is depicted as the date range, and the hourly timeline is represented as such.
I have mocked up a simplified example in Excel as follows.:
In Power BI, I have created my Column Headers using a Time Dimension table and the Row Headers from a Fact Table:
| Project | Task(TrainID) | Departure | ReleaseRounded | TrainLength |
| 7/31 - 8/1 | 199 | 9:15 | 2:45 | 9680 |
| 8/1 - 8/2 | 199 | 9:15 | 2:45 | 10000 |
| 8/2 - 8/3 | 199 | 9:15 | 3:00 | 9609 |
| 8/3 - 8/4 | 199 | 9:15 | 1:30 | 8500 |
| 8/4 - 8/5 | 199 | 9:15 | 2:00 | 9200 |
My Fact table has the Release Time for TrainID 199 = 02:45 for the first record. I would like the "1" (or "R"), to show up in the correct time column. I am unable to get a Measure that will resolve this.
My fields are TrainStatistics[ReleaseRounded] and Dim_Time_Matrix[HHMM]. And then similarly, for each other activity I need to represent (i.e. D = Departure).
Appreciate any guidance and support from the Community.
Thanks and best regards,
2 Replies
- V-lianl-msftCommunity Support
Built in vision is not feasible. See if this r visual can meet your needs:
https://community.powerbi.com/t5/R-Script-Showcase/Schedule-view/m-p/69026/thread-id/43
- rsbinCommunity Champion
Thank you for the reply. I will look into this. Will need to install the R package and study this. I have never used R scripts before. But it may lead to a viable solution to get me what I need.
Thanks again!