SharePoint Document Issues

Fix the SharePoint Gantt Chart “Failed to Compare Two Elements” Error

Jason MillerJason Miller Nov 14, 2026 868 views

Question details

Resolve an error when opening a SharePoint Online task list in a Gantt view after changes to the Task Name column.

Fix the SharePoint Gantt Chart “Failed to Compare Two Elements” Error
Product
SharePoint Online
Device & OS
not provided
Scenario
A user wants to view tasks in a Scheduling Gantt view and use a drop-down for task-related values.
Observed behavior
The Gantt view displays “Failed to compare two elements in the array,” particularly after the Task Name column was renamed.
Before you start

Open the affected task list and review its columns and Gantt view settings. Note which Task Name field is required and whether the Scheduling Gantt view has custom settings.

Solution 1Recommended

Create a task list with the original Task Name column intact

Use this approach when the Gantt error began after the required Task Name field was changed or replaced.

1
Create a task list

On the SharePoint site, select Settings > Add an app, then create a Tasks list if the Tasks app is available.

2
Keep the required field

Open the new list's List Settings and leave the original Task Name column unchanged and required. Do not remove it or replace it with a Choice column.

3
Add a drop-down column

In List Settings, select Create column, choose Choice, and enter the values you want in the drop-down.

4
Add and test tasks

Add tasks with values in the required Task Name field and select values in the new Choice field. Switch to the Gantt view and check that it opens.

Create a task list with the original Task Name column intact
Task names are still required: The separate Choice column provides the drop-down; it does not replace the required Task Name field.
Free Microsoft Office alternative

Track task data in WPS Spreadsheets

WPS Office is a free, lightweight alternative for working with task data in a familiar spreadsheet interface. Its Microsoft Office format support makes it easy to move existing files, although it does not repair SharePoint Gantt views.

Organize task names, dates, and status values in a spreadsheetOpen and edit Microsoft Excel XLSX filesWork in a familiar, easy-to-use Office-style interfaceMove existing Office files into a lightweight application
microsoft office alternative - wps office

Frequently Asked Questions

Can I replace the Task Name column with a drop-down?

Keep the original Task Name column required and unchanged. In List Settings, use Create column to add a separate Choice column for drop-down values.

Will renaming the task list cause this error?

Renaming the list itself is different from changing the Task Name column. If the error continues, review the list's columns and the affected Gantt view settings in List Settings.

What if only my customized Gantt view shows the error?

Open the customized view under List Settings > Views and review its columns and scheduling settings. Compare it with the standard Gantt Chart view, if available.

Does WPS Office fix the SharePoint Gantt view?

No. The SharePoint view and task list settings must be corrected in SharePoint. WPS Spreadsheets can be used separately to organize task data in Excel-compatible files.