Gantt Chart Power BI: Visuals and Data Setup

Charts & pivot tables · Updated December 5, 2026

Power BI does not have a native Gantt chart visual in its default visualization pane; you must import a custom visual from AppSource or use a stacked bar chart workaround. Most users mistakenly try to find a “Gantt” button in the main menu, but the functionality resides in the certified community visuals library.

Importing the Gantt Visual from AppSource

The fastest way to create a professional timeline is to use the official Gantt chart visual provided by Microsoft in the AppSource marketplace. This visual allows you to map task names, start dates, end dates, and duration without writing complex DAX formulas. To add it, go to the Visualizations pane and select the three dots (ellipsis) icon, then choose Get more visuals. In the search bar of the AppSource window, type “Gantt” and select the one developed by Microsoft. Once you click Add, the Gantt icon appears in your Visualizations pane for use in any report page.

Once the visual is on your canvas, you must map your data fields to the specific buckets provided in the Visualizations pane. Drag your task description or project phase into the Legend or Task field. Place your start date into the Start Date bucket and your completion date into the End Date bucket. If you have a column for percent complete, drag it into the % Complete bucket to see a progress bar fill the task bar. Labels may differ slightly by version, but these four buckets are the standard requirements for the visual to render correctly.

The Microsoft Gantt visual is designed for linear project tracking where each task has a defined start and end. It handles date hierarchies automatically, meaning you can drill down from years to quarters to months. If your dates are not recognized, check that the data type in the Data view is set to Date or Date/Time. If the dates are stored as text, the visual will remain blank or show an error. You can change this by selecting the column and adjusting the Data type in the Column tools tab.

Structuring Data for Timeline Visuals

A Gantt chart requires a specific table structure to function, as it relies on the relationship between a task identifier and two distinct date points. Your data source should be a flat table where every row represents a single task. This is different from a summary table where tasks might be grouped. To ensure the visual renders without gaps, every task must have a non-null start date. If a task is missing a start date, Power BI cannot place the bar on the X-axis, and the entire row will be omitted from the chart.

For advanced tracking, you should include a duration column and a resource column. While the visual can calculate duration from start and end dates, having a pre-calculated duration in days allows you to create filters based on task length. A resource column allows you to use the Legend field to color-code bars by the person or department responsible for the task. This transforms the chart from a simple timeline into a resource allocation map.

Data Field Required For Visual Impact
Task Name All Gantt Types Y-Axis Labels
Start Date All Gantt Types Bar Starting Position
End Date / Duration All Gantt Types Bar Length
% Complete Progress Tracking Internal Shading of Bar
Resource/Category Resource Management Bar Color (Legend)

One common misconception is that you can simply drag a single date and a duration into a standard bar chart to get a Gantt effect. In reality, a standard bar chart starts all bars at zero on the X-axis. To simulate a Gantt chart without a custom visual, you must create a “transparent” bar that pushes the actual task bar to the right. This requires a stacked bar chart where the first segment is a measure calculating the number of days between the report start date and the task start date, and the second segment is the actual task duration.

Building a Gantt Workaround with Stacked Bar Charts

If your organization restricts the use of AppSource custom visuals for security reasons, you can build a functional Gantt chart using the native Stacked Bar Chart. This method relies on calculating the offset from a fixed project start date. First, identify the earliest start date in your entire project. Create a measure to calculate the days from this project start to each individual task start date. With a project start date in cell A2 and a task start date in B2, the logic follows a subtraction of dates.

In Power BI, create a measure for the offset: Offset = DATEDIFF(MIN('ProjectDates'[StartDate]), SELECTEDVALUE('Tasks'[StartDate]), DAY). Then, create a second measure for the duration: Duration = DATEDIFF(SELECTEDVALUE('Tasks'[StartDate]), SELECTEDVALUE('Tasks'[EndDate]), DAY). Drag the Task Name to the Y-axis and both the Offset and Duration measures to the X-axis. This creates a stacked bar where the first segment represents the waiting period and the second segment represents the work period.

To make this look like a Gantt chart, you must hide the offset bars. Go to the Format pane > Bars > Colors. Select the color for the Offset series and set it to 100% transparency or match it exactly to the background color of your report page. This leaves only the Duration bars visible, floating in the correct chronological position. Note that this method does not natively support dependencies (arrows between tasks) or percent-complete shading, which are standard in the custom Microsoft Gantt visual.

To handle date formatting on the X-axis in this workaround, you may need to create a separate Date table. A Date table ensures that the X-axis represents actual dates rather than a count of days. You do this by creating a calculated table using CALENDARAUTO() and linking it to your task dates. This allows you to use the Date hierarchy to zoom in on specific months or weeks of the project timeline.

Managing Dependencies and Task Hierarchies

Complex projects often require task hierarchies, where a “Parent” task encompasses several “Child” tasks. To achieve this in Power BI, your data table must have a Parent ID column. In the Microsoft Gantt visual, there is a specific bucket for Parent tasks. When you drag the Parent ID into this field, the visual creates a collapsible tree structure. This allows you to hide the granular details of a project phase and show only the high-level milestones during executive presentations.

Dependencies, or the relationship where Task B cannot start until Task A finishes, are handled differently depending on the visual. The official Microsoft Gantt visual supports a Predecessor field. By dragging a unique Task ID into the Predecessor bucket, the visual draws lines connecting the end of one task to the start of another. If you are using the stacked bar workaround, dependencies cannot be visualized with lines; you must instead rely on sorting the Y-axis by the start date to imply the sequence of work.

When managing these hierarchies, ensure that your Task IDs are unique integers. If you use text-based IDs, the predecessor logic may fail or sort alphabetically rather than numerically. If you find that your tasks are appearing in the wrong order on the Y-axis, go to the Column tools and use the “Sort by Column” feature. Sort the Task Name column by the Start Date column to ensure the timeline flows from top-to-bottom chronologically.

Handling Date Gaps and Non-Working Days

A significant challenge in Power BI Gantt charts is the treatment of weekends and holidays. By default, DATEDIFF and most Gantt visuals count every calendar day. To exclude weekends, you must create a custom calendar table that flags working days versus non-working days. Use a calculated column in your Date table: . This creates a binary flag where 1 is a weekday and 0 is a weekend.

To calculate a true working-day duration, you cannot use a simple subtraction. You must create a measure that counts the rows in your Date table where the date is between the task start and end dates AND the IsWorkingDay flag is 1. This is done using . Using this measure in your Duration bucket ensures that a task spanning a weekend is not artificially lengthened by two days.

Gantt Chart Performance for Large Datasets

As your project grows to hundreds or thousands of tasks, the Gantt visual may experience lag during zooming or filtering. This is because the visual must calculate the position and length of every bar relative to the X-axis scale in real-time. To optimize performance, use a slicer to limit the time window being displayed. Instead of showing the entire project from start to finish, provide a date range slicer that allows users to focus on the current month or quarter.

Another performance optimization is to reduce the number of columns being passed to the visual. Only map the fields absolutely necessary for the view. If you have 20 columns in your table but only use 4 for the Gantt chart, the visual will load faster if those 4 columns are part of a dedicated summary table rather than a massive raw data table. You can create this summary table using the SUMMARIZE function to keep only the Task, Start, End, and Resource columns.

If the visual becomes unresponsive, check the granularity of your X-axis. Displaying a 5-year project at a daily granularity requires the visual to render thousands of small units. Switching the axis to a monthly or quarterly view reduces the rendering load on the browser. You can control this in the Format pane under the X-axis settings, where you can define the scale and the date format.

Gantt Visuals for External Sharing

When publishing a report containing a custom Gantt visual to the Power BI Service, ensure that the visual is “Certified.” Certified visuals undergo a more rigorous security review by Microsoft and are safer for organizational use. If you use a non-certified visual, some organization tenants may block the visual from rendering for end-users. You can check the certification status in the AppSource store; look for the blue checkmark next to the developer’s name.

For users viewing the report on mobile devices, Gantt charts can be difficult to read due to their horizontal nature. To solve this, create a separate mobile layout in Power BI Desktop. Instead of a full Gantt chart, use a simple table visual that lists the Task, Start Date, and % Complete. This provides the essential data without requiring the user to scroll horizontally across a wide timeline, which is often a poor experience on small screens.

Related

Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.

More in Charts & pivot tables

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.