Memory Allocation Failure: Large number of relationships
I have been using Power BI for a while and I have never run into something that it cannot do. I have loaded large amounts of data into it and it has handled it without any problems. However, I am getting the "Memory Error: Memory Allocation Error.Try simplifying or reducting the number of queries." This is on a 64-bit Windows 10 desktop with 8 GB of ram. The memory usage on the box is 4GB while this is running.
There seems to have an interernal limit on the number of relationships that it can handle.
I have 2 tables: Association and Organization. Organization has about 70k organizations in it and the table is fairly wide with 20 or so columns. Association has about 140k relationships between those businesses and is made up of ParentOrgID, ParentName, and ChildOrgID. The entire model is well under 100 MB. I am just trying to create a relationship between Association.ChildOrgID and Organization.OrgID. That is when the memory error occurs. An organization can belong to many different associations and a single Association can have 8k Organizations.
Tried logging this issue with Microsoft support and they were not able to help.
Error Message:
{"changes":[{"relationshipUpdateProperties":{"isActive":false,"referentialIntegrity":false,"fromTableName":"Association","toTableName":"Child Org","fromColumnName":"ParentOrgId","toColumnName":"OrganizationID"}},{"relationshipCreate":{"isActive":true,"referentialIntegrity":false,"fromCardinality":"Many","toCardinality":"One","crossFilteringBehavior":"OneDirection","securityFilteringBehavior":"OneDirection","fromTableName":"Association","toTableName":"Child Org","fromColumnName":"ChildOrgId","toColumnName":"OrganizationID"}},{"relationshipDelete":{"fromTableName":"Association","toTableName":"Child Org","fromColumnName":"ParentOrgId","toColumnName":"OrganizationID"}}],"hasQueryImpact":true}
Failed to save modifications to the server. Error returned: 'Memory error: Memory Allocation failure . Try simplifying or reducing the number of queries.
'.
2 Comments
- v-qiuyu-msft
Community Support
Hi brownrobm,
Please update the Power BI desktop to the latest information. Also please remove unnecessary rows or columns in Query Editor then apply change. Also please share pbix file with us if possible.
Best Regards,
Qiuyun Yu
- brownrobmFrequent Visitor
This has nothing to do with the Query Editor. The query is fine and super simple; this error is in the relationship definition screen.
I have actually worked around this error by pulling back a small subset of data, creating the relationship, and then modifying the query to pull the full dataset. I believe there is a bug somewhere that is causing this problem because PowerBI is able to handle my full dataset without any issues.