cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cdawidow
Helper III
Helper III

OPTIMIZE SUMX MEASURE PERFORMANCE PLEASE HELP!

Hi guys.  I have a basic calculation to model new sales ( New Proposed Sales) based on implementing a product discount ( Proposed Discount) across my customer base and their respective sales history ( based on average quantity sold).  Because I have to iterate across each customers respective average sales data to accomplish my measure, I used SUMX.  The formula is shown below.  The formual works but it is too clunky and I want to optimize it so the memory use is minimized perhaps using virtual tables but I am running into a brick wall and cannot seem to get the answer apart from using SUMX.  Any help would be appreciated !
CLUNKY.PNG

 

2 REPLIES 2
Mohammad_Refaei
Solution Specialist
Solution Specialist

It will help a lot if you share a file with random data.

In general, the if statement in your measure will force the formula engine to operate and will generate a CallBackDataID which impacts the performance.

I don't understand the significance of the Sales[PI], if you can't avoid the condition, try to evaluate it in a variable.

 

lbendlin
Super User
Super User

Are you familiar with DAX Studio?  Use it to analyze the performance of this measure (and all its upstream measures) and then decide if it needs optimizing or not.

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.

Top Solution Authors
Top Kudoed Authors