Forum Discussion
AverageX and Summarize Measure with Slow Performance
- Anonymous3 years ago
Hi SerenaFan93 ,
First, make sure your data model is set up correctly. DAX is set up to work in a specific manner so you have to go with its flow to have a smoother experience.
Next, find the measures that are causing the most problems. Run them in the Server Timings in DAX Studio and look for unnecessary rows and Call Back Data IDs which affect the total duration of the measure’s calculation.
You can also find them in the Records column in the Physical Query Plan. Make sure that the number of records is equal or close to the number of rows of the final output. This ensures that your query is materializing enough tables for the results.
DAX Query Optimization Techniques And Lessons - Enterprise DNA
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi SerenaFan93 ,
Please try this.
Average Number of Additional Events =
VAR _table1 =
SUMMARIZE (
AllShoppingEvents,
AllShoppingEvents[Customer_ID],
"Event Count",
(
CALCULATE (
COUNT ( AllShoppingEvents[ShopType] ),
AllShoppingEvents[EventType] = "Subsequent Event"
)
)
)
RETURN
AVERAGEX ( _table1, [event count] )
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Polly,
This code worked, thank you! However, the matrices and other visuals are still running very slowly. I wonder if SUMMARIZE is slowing down the measures.
- Anonymous3 years agoNot applicable
Hi SerenaFan93 ,
First, make sure your data model is set up correctly. DAX is set up to work in a specific manner so you have to go with its flow to have a smoother experience.
Next, find the measures that are causing the most problems. Run them in the Server Timings in DAX Studio and look for unnecessary rows and Call Back Data IDs which affect the total duration of the measure’s calculation.
You can also find them in the Records column in the Physical Query Plan. Make sure that the number of records is equal or close to the number of rows of the final output. This ensures that your query is materializing enough tables for the results.
DAX Query Optimization Techniques And Lessons - Enterprise DNA
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.