Forum Discussion
How to Create Gantt Chart Visual With Multiple Milestones On One Line?
Suppose I have the following data structure (from an Excel file but I guess this doesn't really matter here)
| Name | MS1 | MS2 | MS3 |
| Task 1 | 15.03.2021 | 30.06.2021 | 30.10.2021 |
| Task 2 | 01.02.2021 | 01.04.2021 | 31.08.2021 |
| Task 3 | 01.02.2021 | 30.06.2021 | 15.09.2021 |
I would like to create a visual as a gantt chart that
- uses a free PowerBI visual (e.g. Gantt or Gantt Chart by MAQ)
- shows one "line" in the gantt per Task 1, Task 2, Task 3
- on each "line" shows three milestones for MS1, MS2, MS3 with the dates given in the table
- each milestone has a color (or icon or whatever) according to its "category" (e.g. all MS1 are green, all MS2 are red)
I am of course happy to transform the data in any way needed.
However so far I am simply not able to get it to work. Can't figure out the right data format and / or which data to put into which fields of the above mentioned visuals. Also this date hierachy puzzles me - in some attempts, when at least showing some milestones (never more than one per line) I usually end up with "earliest date" for those...
If all fails I would also accept to have each milestone on a single line grouped by the Task name.
Any hints would be appreciated.
Edit: not sure why the table layout is messed up like this, should look like this
Please check out the As Timeline visual. I unpivoted your data and tried that. Key thing is to uncheck the Stacked option in the formatting options.
Regards,
Pat
6 Replies
- Ashish_Mathur
Super User
Hi,
In the Query Editor, right click on the Name column and select "Unpivot other columns".
Hope this helps.
- mahoneypat
Microsoft Employee
Please check out the As Timeline visual. I unpivoted your data and tried that. Key thing is to uncheck the Stacked option in the formatting options.
Regards,
Pat
- AnonymousNot applicable
Hi Pat
Which timeline visual you have used?
Thanks
Hazari
- ali_b
Advocate I
Looks like the "As Timeline" custom viz is no longer available?
I've looked here, but get a 404 on the download: https://blog.pragmaticworks.com/power-bi-custom-visuals-as-timeline
Also obviously looked via get custom viz in Power BI too
- AnonymousNot applicable
Can someone help me with this? I have as a visual 1.5 and gantt chart visuals imported and i have a gazillion dates I need on the same x-axis / line, similar to M1,M2,M3 but I cant get it to work for me. can i get a detailed step by step?
- janitor048
Helper I
mahoneypat Ashish_Mathur thanks for your replies! Unpivot of my table indeed did the trick, especially together with the "As Timeline" visual.