How do I optimize slow DAX measures in a Power BI report with millions of rows?
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.
2025-03-14 in Data Science by Kimberly Thompson
| 16413 Views
All answers to this question.
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.
Answered 2025-04-22 by Martha Stewart
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?
Answered 2025-05-10 by Gregory White
-
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.
Commented 2025-05-18 by Kimberly Thompson
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.
Answered 2025-06-05 by Justin Bradley
-
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.
Commented 2025-06-12 by Martha Stewart
Write a Comment
Your email address will not be published. Required fields are marked (*)

