Power BI data import fails due to special characters in Jira custom field names

Power BI data import fails due to special characters in Jira custom field names

This article explains how to resolve a Power BI import failure caused by special characters in a Jira custom field name.

Environment

  • Platform: Jira Cloud

  • App: Power BI Connector

Problem

Power BI reports the following error while importing Jira data:

Failed to save changes to the server. Error returned: 'OLE DB or ODBC error: [DataSource.Error] OData: Last segment in context URL ... should not be KeySegment. OLE DB or ODBC error: Exception from HRESULT: 0x80040E4E.'

Diagnosis

This issue began appearing after the Power BI Connector for Jira was upgraded from OData v3 to OData v4. In OData v4, Power BI fails to import data when Jira custom field names contain special characters, such as commas (,), question marks (?), and colons (:), and are used to form Power BI data tables or models.

These special characters do not cause issues if the field names are only used at the column level.

Root Cause

Power BI uses Jira custom field names in forming data tables and models. Special characters, such as commas (,), question marks (?), and colons (:), in field names are not supported by OData v4 specifications when used in URLs or metadata paths, resulting in data model formation failure.

This is an issue only if the custom field name is used to form Power BI Data Tables or Models. Otherwise, the custom field works at the column level.

Solution

Power BI Connector automatically replaces special characters with an underscore (_) when exporting data to Power BI.

Custom fields in action.

Options

To fix the issue, use either of the options listed below.

  • Update table names in Power BI Workbooks. The table names must be changed if they are referred to in reports, Power Queries, or dashboards.

  • Rename tables in Power BI Desktop

    Use the dropdown menu pictured here to rename tables in Power BI Desktop.
  • Rename custom Jira fields and exclude special characters.

    • This change also requires customers to change table names used elsewhere, but is recommended for a long-term fix.