Data Science Community Question

How do I optimize slow DAX measures in a Power BI report with millions of rows?

Posted on 2025-03-14 • In Data Science • By Kimberly Thompson

I’m working on a retail dashboard with over 20 million rows, and my "Year-over-Year" growth measures are taking forever to load. I’ve used DAX Studio to check the Server Timings, and it seems like the Formula Engine is doing too much heavy lifting. Should I be pushing these calculations back to the Power Query layer, or is there a way to rewrite my CALCULATE functions to be more efficient? I’m specifically struggling with nested FILTER and ALL functions.

3 Answers 16,432 Views

All answers to this question 3 Answers

Martha Stewart Answered on 2025-04-22
Answered

Optimizing large models usually starts with the Star Schema. Ensure you aren't using Snowflake schemas, as those extra joins kill performance. For your DAX, avoid using FILTER(TABLE, ...) and instead use KEEPFILTERS or filter specific columns like FILTER(ALL(Table[Column]), ...). This allows the Storage Engine to use its columnar compression and avoids the slow Row-by-Row processing of the Formula Engine. Also, check if you can pre-calculate the YOY values in a SQL view or during the ETL process in Power Query. Reducing the complexity of the "on-the-fly" calculation is the best way to ensure a snappy user experience for your stakeholders.

Gregory White Answered on 2025-05-10
Answered

Are you using any "Iterator" functions like SUMX or AVERAGEX over that 20-million-row table, or are the measures purely based on standard aggregations?

Kimberly Thompson Commented on 2025-05-18
Commented

Gregory, I am using SUMX to calculate weighted averages across multiple dimensions. I suspect that's the bottleneck because it has to evaluate the expression for every single row before aggregating. I’m going to try moving that logic into a Calculated Column during the refresh period instead, even though I know it increases the model size. At least the report visuals will render faster for the end-users during their Monday morning meetings.

Justin Bradley Answered on 2025-06-05
Answered

Performance issues are often solved by "Auto Date/Time" settings. Turn that off in the global options and use a proper central Date Table to simplify your time intelligence.

Martha Stewart Commented on 2025-06-12
Commented

Justin is spot on. Disabling Auto Date/Time reduced my model size by nearly 30% once, which immediately improved the calculation speed of all my time-based measures.

Write a Comment

Your email address will not be published. Required fields are marked (*)

Join the LearnersEra Community

Ask questions, share knowledge and learn from professionals across technology, project management and certification topics.

Change Country and Nearest City

Select your country and nearest city to see courses available in your region.