Forum Discussion
Not enough memory to complete this operation
- 3 years ago
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
Hey Anonymous ,
how big is the size of your data model?
Can you post a picture of the metrics of the model or even better export them with DAX Studio?
Does this happen on your Desktop or in the service?
Best regards
Denis
Thanks, selimovd
After loading into the PBI, it is about 4MB. Sorry that I don't have a DAX Studio currently. It will be good if it can be solved without touching DAX Studio.
I am using PBI Desktop.
Below is the model and their relationship.