Forum Discussion
Getting not enough memory error on powerbi
- Anonymous3 years ago
Hi SGV ,
Here's an optimized version of your DAX formula:
Column:
Impact = VAR Success = CALCULATETABLE ( VALUES ( Payment[Cust_Id] ), Payment[TransactionStatus] = "true", ALLEXCEPT ( Payment, Payment[Month] ) ) RETURN IF ( CONTAINS ( Success, Payment[Cust_Id], Payment[Cust_Id] ), "No", "Yes" )Measure:
Impact Measure := VAR Success = CALCULATETABLE ( VALUES ( Payment[Cust_Id] ), Payment[TransactionStatus] = "true", ALLEXCEPT ( Payment, Payment[Month] ) ) VAR CurrentCustIdMonth = CONCATENATE ( SELECTEDVALUE ( Payment[Cust_Id] ), SELECTEDVALUE ( Payment[Month] ) ) RETURN IF ( CONTAINS ( Success, Payment[Cust_Id], SELECTEDVALUE ( Payment[Cust_Id] ) ), "No", "Yes" )This formula uses and to create a table of unique values with successful transactions for each month. Then, it uses the function to check if the is in the table. If it is, the formula returns "No", otherwise, it returns "Yes".
If you still encounter memory issues, consider reducing the amount of data being processed or optimizing your data model. You can also use tools like DAX Studio to analyze and optimize your DAX queries.Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi SGV ,
Here's an optimized version of your DAX formula:
Column:
Impact =
VAR Success =
CALCULATETABLE (
VALUES ( Payment[Cust_Id] ),
Payment[TransactionStatus] = "true",
ALLEXCEPT ( Payment, Payment[Month] )
)
RETURN
IF (
CONTAINS ( Success, Payment[Cust_Id], Payment[Cust_Id] ),
"No",
"Yes"
)
Measure:
Impact Measure :=
VAR Success =
CALCULATETABLE (
VALUES ( Payment[Cust_Id] ),
Payment[TransactionStatus] = "true",
ALLEXCEPT ( Payment, Payment[Month] )
)
VAR CurrentCustIdMonth =
CONCATENATE ( SELECTEDVALUE ( Payment[Cust_Id] ), SELECTEDVALUE ( Payment[Month] ) )
RETURN
IF (
CONTAINS ( Success, Payment[Cust_Id], SELECTEDVALUE ( Payment[Cust_Id] ) ),
"No",
"Yes"
)
This formula uses and to create a table of unique values with successful transactions for each month. Then, it uses the function to check if the is in the table. If it is, the formula returns "No", otherwise, it returns "Yes".
If you still encounter memory issues, consider reducing the amount of data being processed or optimizing your data model. You can also use tools like DAX Studio to analyze and optimize your DAX queries.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- SGV3 years agoFrequent Visitor
Thank you so much!