Data Science Community Question

Why is my Power BI dashboard so slow when calculating Year-over-Year growth measures?

Posted on 2025-05-14 • In Data Science • By Kimberly Lawson

I have a relatively large dataset and my YoY growth DAX measures are taking forever to load in my visuals. I am using the SAMEPERIODLASTYEAR function combined with CALCULATE, but the report feels very laggy. Is there a more efficient way to write this DAX code or a way to optimize the data model to speed up these time-intelligence calculations?

3 Answers 15,461 Views

All answers to this question 3 Answers

Brian Miller Answered on 2025-02-18
Answered

Are you checking your performance in the Power BI Performance Analyzer tool to see if it’s actually the DAX or the visual rendering that’s slow?

Michael Fletcher Commented on 2025-02-19
Commented

Brian, that’s a great point. Performance Analyzer is the first thing Kimberly should look at. Kimberly, if the "DAX Query" time is high, then Margaret’s advice on variables is your best bet. However, if "Other" is high, you might have too many visuals on a single page. I’ve found that reducing the number of cards and slicers can sometimes improve the perceived speed more than rewriting the DAX itself.

Susan Mitchell Answered on 2025-02-20
Answered

I always recommend using Star Schema. If your data is in a flat table, time intelligence functions have to scan the whole thing, which kills performance as the row count grows.

Kimberly Lawson Commented on 2025-02-21
Commented

Totally agree, Susan! Moving to a Star Schema changed my life. Kimberly, once I separated my "Sales" fact table from my "Calendar" dimension, my load times dropped by nearly 70%.

Margaret Sullivan Answered on 2025-05-16
Answered

Performance issues in DAX often stem from "callback dataids" or inefficient filter contexts. While SAMEPERIODLASTYEAR is convenient, it can be slow on large tables. A more performant approach is to create a dedicated, marked Date Table and use CALCULATE with a manual filter on the DateKey. Also, ensure you aren't performing arithmetic on columns directly within the measure; instead, use variables (VAR) to store results. This prevents the engine from re-calculating the same logic multiple times during the evaluation of a single visual, which drastically reduces the processing time for your dashboard.

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.