Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello All,
I'm using the below DAX to create a calculated table and I get the following error while performing this operation "There's not enough memory to complete this operation. Please try again later when there may be more memory available."
Hi @Anonymous ,
Try increasing memory management cache and clear currently used cache under Options. Then restart Power BI Desktop to see if the error disappears.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @Anonymous ,
I've tried this but I still get the same error.
Regards,
Mahesh
If Contract_EmployeeName is already available in 'Global Data', remove the LOOKUPVALUE from the calculation, which consumes more memory. You can directly reference the column from 'Global Data' instead.
If possible, filter down your dataset to the relevant rows before performing the operation to reduce memory usage.
Hi @Kedar_Pande ,
The reason for using a separate table for Contract_EmployeeName is I have a condition to get only selected records from the table which match the criteira.
Would you happen to have any suggestions to get over this memory issue?
Regards,
Mahesh
Hi @Anonymous
The error you're encountering is likely due to the high memory requirements of the `LOOKUPVALUE` function and the complex operations involved when generating a calculated table. This often happens when there are a large number of rows in the tables being referenced. Here are some things you should consider regarding the formula:
### Issues in the DAX Formula:
1. **Memory Overuse**: The `LOOKUPVALUE` function can be quite memory-intensive, especially when working with large datasets. When used in combination with `SELECTCOLUMNS`, it results in the creation of multiple virtual tables, which can significantly increase memory consumption.
2. **Calculated Tables**: Calculated tables are computed and stored in memory, which means they add a considerable overhead. When using such operations across a large dataset, it might be better to avoid creating calculated tables in DAX if possible.
### Alternatives to Optimize Performance:
1. **Data Modeling Optimization**:
- Instead of creating a calculated table, consider adjusting the existing data model. It might be possible to achieve your desired result using relationships between tables and calculated columns instead of building an entirely new table.
- Consider normalizing your model if there are redundant fields, which could simplify calculations and reduce memory use.
2. **Replace `LOOKUPVALUE` with Relationships**:
- Instead of using `LOOKUPVALUE`, ensure that you have a relationship defined between `Global Data` and `ContractEmployee` tables. If they are related by a common key, you could simply add the fields from the related table to your visual or calculated column without resorting to `LOOKUPVALUE`.
- Creating measures that aggregate the data based on these relationships may provide the same output more efficiently.
3. **Power Query Transformation**:
- Perform the data transformation in Power Query rather than in DAX. You could use Power Query to merge the `Global Data` table with the `ContractEmployee` table. This will allow you to perform lookups without consuming additional memory during runtime since Power Query transformations happen before the data is loaded into the model.
4. **Virtual Tables with Variables**:
- Consider using DAX variables to store intermediate results and reduce redundant calculations. This approach might help with simplifying the logic and reducing memory overhead.
Example:
```DAX
Global Data Valid =
VAR EmployeeNames =
ADDCOLUMNS('Global Data',
"EmployeeName", LOOKUPVALUE(ContractEmployee[Contract_EmployeeName], ContractEmployee[Contract_EmployeeName], 'Global Data'[Contract_EmployeeName])
)
RETURN
SELECTCOLUMNS(EmployeeNames,
"EmployeeName", [EmployeeName],
"Process", 'Global Data'[HR/Employee],
"StartDate", [Expected Create Date],
"EndDate", [Expected End Date],
"OverallStatus", 'Global Data'[Overall_status],
"Country", 'Global Data'[Country],
"Hire_Date", 'Global Data'[Hire_Date]
)
```
This approach can sometimes help reduce the computational load since intermediate steps are calculated and reused.
5. **Aggregation Logic**:
- Evaluate whether you need a calculated table at all. If the desired outcome is just for visual representation or analysis, consider creating DAX measures that can be calculated on the fly, rather than storing data in a new table.
6. **Database-Level Summarization**:
- If none of the above options work and you still face memory limitations, consider summarizing the data directly at the database level. You can create a **view** in your database that performs the necessary joins and aggregations, which can then be imported into Power BI as a summarized data source. This approach reduces the memory load in Power BI and allows you to handle large datasets more effectively.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi @Ritaf1983 ,
I've tried the query you provided and still see the error. Would you have any other suggestions to get over this issue?
regards,
Mahesh
Hi @Anonymous
It feels like I’ve suggested everything I could. 😞
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.