Introduction: Power BI Gantt Chart with milestones

Powerful insight into your planning and milestone performance
The Gantt chart is an excellent tool to visualize your program and project schedules and task dependencies. In the basis, it is a bar chart with tasks or activities on the vertical axis. The horizontal bars show for each task/activity the period between the start and end date (or time). Another important feature of the Gantt chart is that icons can be used to represent milestones: important moments within your project timeline.
The Power Gantt Chart for Power BI allows you to review both tasks/activities and milestones right in your Power BI reports. The Power Gantt Chart supports unlimited number of task/activities, hierarchy levels and milestones.

Key features of the Power Gantt Chart are:
- Excellent visualization of your program and project schedules: Get a high level overview at first, but dive into details using the collapse/expand buttons. Zoom and scroll into specific periods using the zoom slider;
- Progress bars: To indicate the progress and status of individual tasks;
- Unlimited number of tasks, hierarchy levels and milestones: Add as many items as you like to your chart, so you’ll never have to omit any details to your chart;
- Highly customisable: Add or remove columns, change colors of bars based on your own criteria, or change the date granularity;
- Formatting options: In line with the options you know from the Power BI Line Chart, so no need to learn a new interface. And of course, theme colors and settings are supported;
- Improved Tooltip support: Create independent tooltips for tasks and for milestones to show exactly the data you want.
How to use: Build visual
The large number of fields allows you to customize the Power Gantt Chart to exactly suit your needs. However, you don’t need to include them all to get started using the chart. At minimum, you need to specify four of the first five fields: Item, Item Name, Start date and End date. All other fields are optional. The following table shows example values of these fields and the resulting Power Gantt Chart.
- Item: each of the rows (projects/phases/tasks/etc.) you want to include requires a unique identifier. The field added here contains the unique identifier.
- Parent: to create a hierarchy of the items you need to add a field here that refers to the unique identifier of the corresponding parent. A row that has no value (NULL) will be displayed as a top-level element.
- Item name: add a field here with the descriptive name of each row.
- Start date: the field you add here will determine where the bar will start. Support for two date-fields (actual, baseline). Make sure this field is a Date or Date/Time field.
- End date: the field you add here will determine where the bar will end. Support for two date-fields (actual, baseline). Make sure this field is a Date or Date/Time field.
- Progress: each row in the Power Gantt can display the progress expressed as a fraction (value between 0 and 1) or as a percentage. Include the field containing the progress here to show the progress bar. Please note, make sure to set the summarization of this column to “Don’t summarize”. This prevents items being dropped in case no progress is entered.
- Additional columns: if needed you can show additional columns on the Power Gantt. These additional columns will be placed between the Item name and the bars. For example, add the owner or the duration of a task to your overview here.
- Legend: items can be grouped into categories. If you add a field containing these categories here each of the bars will be colored accordingly. At the top of the Power Gantt a legend will map each of the categories to a color.
- Label: add a field here to show labels in your task/ project bars.
- Tooltips: the fields added here will show in the tooltip when the user hovers over a specific bar.
- Milestone date: the field added here determines the position of the Milestone marker on the Power Gantt.
- Milestone: add a field here containing a descriptive label of the milestone. This label is visible in the Milestone tooltip
- Milestone Legend: milestones can be grouped into categories. If you add a field containing these categories here each of the Milestone markers will be colored accordingly. At the top of the Power Gantt a legend will map each of the milestone categories to a color.
- Milestone tooltips: the fields added here will show in the tooltip when the user hovers over a specific milestone marker.
- Custom scale date and Custom scale groups: if these fields are left empty, the Year-Month date scale will show up by default. Â Use the custom scale date and scale groups fields to add a custom date scale with custom groups. The aggregated hierarchy levels will show the custom hierarchy: anything that groups dates into a grouping, like the weeks of the year, ISO week numbers, Fiscal period, etc. Make sure to set to “Don’t summarize” and “Show items with no data”. If you have categories in the Custom scale groups field but no category in the Custom scale date, it will default to a standard Year-Month date scale. See Tutorial: how to add a custom date scale
How to use: Format visual
The Visual specific settings contain formatting properties that allow you to change the default behavior of the visual:
- License: here you can enter your license information to disable any license reminders.
- Grid: these settings allow you to change the formatting of the grid content (excluding the column headers). This includes adding/removing the grid lines, grid color and thickness, setting the padding between the rows, changing the row height, outline color and weight and changing the font color, family and text size.
- Column headers: headers can be customised individually in their respective column settings beneath. Here you can set their general settings like, font and background color, add an outline (None, Top, Bottom, Left, Right, Top+bottom, Left+right, Frame), set the font family and text size or enable text wrap. Click the toggle to switch off/on the column headers.
- Date scale: within this section you can change the type of date scale (Year, Year-Quarter, Year-Month, Year-Week). You can also enable the overflow text, show/hide the today-line, set the Start and End dates and change the text size and font family. If you have categories in the Custom scale date and Custom scale groups, the option to Show only groups in custom scale will be available. You can click the toggle to switch off/on the Date scale.
- Legend: Â show/ hide the legend by clicking the toggle on/off, set the Position of the legend (Top, Bottom, Left, Right, Top Center, Bottom Center, Left Center, Right Center), toggle the Title option on and add a Legend Name Title, or change the Color and Text Size and Font family.
- Items: change the color of the items (bars) and baseline, if you have added a category to the Legend field, you can set here the color to each category specified in the Legend. By default the option Treat parent as is set to Parent-Child, select Group to show tasks in groups instead. If you have multiple items or tasks that overlap in a single row, enable the Show multiple items option, the Transparency option will also show up, by default set to 60, this will enable the end user to distinguish whether there are multiple items overlapping, you can increase/ decrease the opacity. When the Show multiple items option is off and the Treat parent is set to Parent-child, by default the Add transparency option will be on, the children items will be lighter, this option can be switched off.
- Labels: add labels to your task/project bars, show/hide all labels by clicking the toggle on/off, enable Overflow text or change the Position (Outside start, Inside start, Center, Inside end, Outside end), Text size, Font color and Font family.
- Milestones: here you can change the Milestone color and shape; if you have added a category to the Milestone Legend field, you can also set here the color and shape to each category specified in the Milestone Legend.
- Progress bar: if you have a category in the Progress field, you can toggle the Progress bar option off/on, change the height and color.
- Zoomslider: here you can show/hide the zoom slider at the bottom of the visual. The zoomslider option helps you to easily examine a smaller range of the date/time in the Gantt chart without having to use a filter. The zoomslider is added on the chart’s x-axis and can be used for horizontal scrolling. Click and drag endpoints on sliders to adjust the dimensions of the chart, slide both endpoints toward the center. The closer the two endpoints are to each other, the more you zoom in to display shorter, finer segments. Click and hold down the left mouse button on the center section of the zoom bar and then scroll left or right to a particular point. Click on the label to display and select from the Calendar instead. You can also change the color, Text size, Font color and Font family of the zoomslider.
The General settings contain options that affect the visual container and are consistent across all visual types. Here you can also customize the general Title and Tooltips.
Try it yourself! Experience the Power Gantt Chart by trying it out for free. Click the button below to download the visual.
How to use: Examples
In this section you’ll find a couple of examples to get you started.
1: Only items

Based on these four fields the Power Gantt will display the 4 projects (A, B, C and D) as you can see above. Each of the items (here Projects) has a bar from the start date until the end date. The Zoomslider at the bottom allows you to narrow the time period shown. This can be done by dragging one of the round date markers horizontally towards the opposite marker.
2: Items & milestones

In this second example we’ll add the milestones to our data. To make sure there are no limitations to the number of milestones you can add per item you need to include them as shown in the table above. The first milestone can be added as a column to the item. All subsequent milestones need to be added as additional rows with the same ItemID, while the rest of the row remains empty.
Note: in case an ItemID exists multiple times and has multiple Start dates, then only task with the oldest Start date is shown. To prevent this situation, make sure to only enter data to the ItemID column in rows intended for the milestones. Alternatively, duplicate these rows.
2.1: Showing Stacked milestones
Stacked milestones represented by an asterisk “*” will show up in the bars and in the legend when two or more milestones are finishing together and have the same completion date. The asterisk symbol will help you to quickly identify the items/ projects that have several milestones/ activities ending in the same date. When hovering over the Stacked milestones you get a tooltip where you can see the multiple milestones. You can format the color of the Stacked milestones and both the color and shape of the Milestones.

3: Items with hierarchy

In this third example we’ll create an item hierarchy. The most flexible way to include hierarchy is the use of a so-called parent-child relation. To achieve this, we’ll create a column in which a child refers to its parent. If there is no parent specified the item will be displayed on the highest level. As you can see in the table above: items 18, 29, 30 and 41 have no value in the ParentTask column, so they will be placed at the highest level in the Power Gantt chart.
3.1: Treat parent as
Add a category to the Parent field and use the Treat parent as property to set it to Parent-child or Group. By default items will show as a Parent-child relation (see section 3. Items with hierarchy), select Group to create a group of tasks or items without expand/ collapse.


4: Show multiple Items
By default the Show multiple items option is Off and the Gantt chart will show the first item from your dataset.


You can group multiple start and end dates to a single item and switch the Show multiple items option On, under Format your visual > Visual > Items.
If no category is set in the Legend but have multiple items (rows) under the same project with different start/ end dates, you will see different opacities of blue (standard color) with a default transparency of 60%. You can change the Items color in the palette and the Transparency by increasing the number for a lighter opacity or decreasing for a darker opacity.

If a category is set in the Legend, you will get the categories you have added listed under the Items and you will be able to change the colors per item.

5: Adding a Baseline
Use a baseline to compare your original timeline with the current timeline of a project. This will help you to identify which tasks performed on time or ahead of schedule and which ones got delayed.
To create a baseline, go to your table and add two columns, one with the Baseline start dates and another with the Baseline end dates.

Then add the current start/ end date and then the baseline start/ end date categories from the Fields panel to the Start date and End date fields in the Visualizations panel.
The black bar below the active taskbar (in blue) represents your baseline. Move the cursor over the bars to see the actual and baseline dates in the tooltip.

Go to the Items in the Format pane to change the Items color and Baseline color.

Sorting
You can sort items by column header or by using the Power BI sorting.
To Sort on column header, click on the up/down arrows. By default, you can sort order on the ItemName category. Add other categories to the Additional columns, to sort order on a specific column other than ItemName.

To use the Power BI sorting, click on More options, select Sort descending or Sort ascending, click Sort by > check the category you want to sort by. By default it sorts by Start date. If you add a category to the Legend, the sort order of the legend items will also react to the sort order set in Power BI for the column.

For any questions or remarks about this Visual, please contact us by email at Nova Silva Support, or visit the Community forums. Or just simply experience the Power Gantt Chart by trying it out for free!