Forum Discussion
DAX Query Performance vs Nested Measures
- 1 year ago
Hi WishAskedSooner,
Glad to hear the suggestions were helpful.
When you get to the optimization phase, you might find these Microsoft resources handy for planning and prioritizing improvements:
Covers data model design best practices, column/cardinality tips, and storage mode considerations. Optimization guide for Power BI - Power BI | Microsoft Learn
Step-by-step guide on capturing and interpreting performance metrics. Use Performance Analyzer to examine report element performance in Power BI Desktop - Power BI | Microsoft Learn
This way, when you have the time to focus on optimization, you will have a solid starting point.
Hope this helps clarify things and let me know what you find after giving these steps a try happy to help you investigate this further.
Thank you for using the Microsoft Community Forum.
Hi WishAskedSooner,
Thanks for raising this. Also, thanks to Ritaf1983, collinq, for those inputs on this thread. I understand you are using Mixed Storage Mode and facing performance issues due to deeply nested DAX measures, and you are looking to confirm if unnesting them could improve query performance.
Use DAX Studio to Analyse Performance: Since Performance Analyzer is limited in Mixed Mode. Use DAX Studio to Track server timings. Measure query duration. Identify bottlenecks (e.g., heavy usage of nested IF/VARs, context transitions).
Understand the Cost of Nested Measures: In general, nesting measures does not inherently slow down performance, unless: They involve repeated context transitions (e.g., CALCULATE, FILTER, RELATEDTABLE, etc.). There is redundant evaluation of the same logic multiple times. However, in Direct Query, each nested measure can result in an additional SQL query, making nesting more costly.
Best Practice: Flatten Critical Measures: For performance-critical calculations (especially on report visuals with latency). Try flattening the logic into one optimized measure. Avoid reusing intermediate measures if they add overhead.
Use Hybrid Tables Where Possible: If certain tables can be mostly used in Import mode, consider splitting them or changing them to Import to avoid the DQ overhead entirely.
Kindly refer to the below mentioned link for better understanding:
Use Performance Analyzer to examine report element performance in Power BI Desktop - Power BI | Microsoft Learn
Also, when flattening or optimizing your measures, follow DAX variable best practices to reduce unnecessary recalculations and improve readability:
Best practices for DAX variables
Hope this helps clarify things and let me know what you find after giving these steps a try happy to help you investigate this further.
Thank you for using the Microsoft Fabric Community Forum.
Thank you for all the great suggestions! I also appreciate the insight on DAX Studio vs Performance Analyzer.
Optimizing will be a project in itself. Just need to prioritize and allocate time now.
- v-kpoloju-msft1 year ago
Community Support
Hi WishAskedSooner,
Glad to hear the suggestions were helpful.
When you get to the optimization phase, you might find these Microsoft resources handy for planning and prioritizing improvements:
Covers data model design best practices, column/cardinality tips, and storage mode considerations. Optimization guide for Power BI - Power BI | Microsoft Learn
Step-by-step guide on capturing and interpreting performance metrics. Use Performance Analyzer to examine report element performance in Power BI Desktop - Power BI | Microsoft Learn
This way, when you have the time to focus on optimization, you will have a solid starting point.
Hope this helps clarify things and let me know what you find after giving these steps a try happy to help you investigate this further.
Thank you for using the Microsoft Community Forum.- v-kpoloju-msft1 year ago
Community Support
Hi WishAskedSooner,
Just checking in to see if the issue has been resolved on your end. If the earlier suggestions helped, that’s great to hear! And if you’re still facing challenges, feel free to share more details happy to assist further.Thank you.
- v-kpoloju-msft1 year ago
Community Support
Hi WishAskedSooner,
Hope you had a chance to try out the solution shared earlier. Let us know if anything needs further clarification or if there's an update from your side always here to help.Thank you.