Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have loaded a 4MB excel into PBI (which concludes about 66,000 rows of data). And then I created a few calculated columns, and one of them got an error below:
There's not enough memory to complete this operation. Please try again later when there may be more memory available.
I searched online and tried some suggestions, for example,
However, all trials above went in vain.
Some threads suggested it might be due to the poorly written DAX format.
I don't know whether my DAX is bad or not because it is quite simple. Below is the DAX having such "memory issue":
MaxLastHotTime =
CALCULATE(
MAX('new vessel'[New Off Chassis Time]),
ALLEXCEPT('new vessel', 'new vessel'[TRACTOR_NO], 'new vessel'[VoyageID]),
'new vessel'[New On Chassis Time] < EARLIER('new vessel'[New On Chassis Time])
)
I had a trial to take away the EARLIER() function. It works completely fine.
I had a trial to minimize the data file (as the excel is actually a combined log, having one month amount log being put together). It works completely fine as well.
Therefore, I know that the root cause is due to the EARLIER() function.
Can anyone help solve this issue?
For Your Information, it is the specification of my laptop:
Memory: 16GB
CPU: Intel i5 7th Gen
Solved! Go to Solution.
Hello @Anonymous ,
ah sorry, I thought you get the error when you apply in PowerQuery.
Yes, in the calculated column I get the same error. From my point of view this comes from the EARLIER function, that can be quite expensive.
In general it's not recommended any more to use EARLIER as the function is quite confusing. The recommendation is to use variables instead.
Here from dax.guide:
It is recommended using variable (VAR) saving the value when it is still accessible, before a new row context hides the required row context to access the desired value.
As I didn't have the initial result, I can't really compare. But I think the following calculated column should produce the result you desire and without performance issues:
MaxLastHotTime_New =
VAR vTractorCurrentRow = 'new vessel'[TRACTOR_NO]
VAR vVoyageCurrentRow = 'new vessel'[VoyageID]
VAR vNewOnChassisCurrentRow = 'new vessel'[New On Chassis Time]
RETURN
CALCULATE(
MAX('new vessel'[New Off Chassis Time]),
ALL('new vessel'),
'new vessel'[TRACTOR_NO] = vTractorCurrentRow
&& 'new vessel'[VoyageID] = vVoyageCurrentRow
&& 'new vessel'[New On Chassis Time] < vNewOnChassisCurrentRow
)
Let me know if that works for you.
If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
Best regards
Denis
Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
80 | |
76 | |
60 | |
36 | |
33 |
User | Count |
---|---|
91 | |
60 | |
59 | |
49 | |
45 |