Forum Discussion

david_piepgrass's avatar
david_piepgrass
Frequent Visitor
4 years ago
Solved

Nested tables: "Column 'Id' in Table...contains a duplicate value '241' and this is not allowed"

Our OData API returns objects that contain nested child rows, something like this:   { "@odata.context": "https://localhost:5001/odata/$metadata#entities", "value": [ { "Id": 1, "Nam...
  • david_piepgrass's avatar
    4 years ago

    The problem turned out to be that Power BI assumes relationships that don't exist. Specifically, it assumes that if two objects both have an Id, there is a 1-to-1 relationship between them:

    The solution is to delete these relationships before expanding the child rows.

    Now, for some reason after expanding the tables, it re-reads the same information from the OData API. But at least the error is gone!