Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Sreeja_G
Microsoft Employee
Microsoft Employee

Initial dax query run against a Fabric semantic model is taking time

Hi,

 

Initial dax query run against a Fabric semantic model is taking time. what could be the reason for it and any optimization that can be done while retrieving data from Fabric to avoid taking more time in the intial run.

1 ACCEPTED SOLUTION

Hi @Sreeja_G,

 

There are many factors that can influence and we need to dive deeper to understand. Did you try using the Performance analyzer in Power BI to find out where DAX query spends lot of time?

 

1. Check if it falls back to DirectQuery mode. Check this blog: https://fabric.guru/controlling-direct-lake-fallback-behavior

2. Check if you have the correct capacity for running the queries and there are not so many parallel queries running corresponding to the capacity you use. 

 

In addition to this, you can try prewarming your dataset by calling Power BI REST API for running queries which will fill the cache. Check this: https://www.tackytech.blog/how-to-pre-warm-your-power-bi-semantic-model-from-fabric-data-pipelines/#... 

View solution in original post

4 REPLIES 4
v-huijiey-msft
Community Support
Community Support

Hi @Sreeja_G ,

 

The reason for the initial DAX query may take the following points:

 

1. When the first access semantic model or data is accessed, the initial loading time is slow.

 

2. Data volume is too large.

 

3. Dax query statements are more complicated.

 

Regarding the optimization of DAX, you can consider from the following aspects:

 

1. Use the latest version of Power BI to take advantage of the latest performance enhancements.

 

2. Minimize the number of calculations and aggregations performed in your Dax queries.

 

3. Avoid using nested calculations in your Dax queries, as they can be resource-intensive.

 

4. If possible, use simpler Dax functions instead of more complex ones.

Where appropriate, use calculated tables to precalculate frequently-used data.

 

5. Minimize the use of calculated columns, as they can slow down query processing.

 

For more relevant information, please refer to:

How to Optimize Dax Queries in Power BI - Zebra BI

 

If you have other questions, please contact me at any time.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

govindarajan_d
Super User
Super User

Hi @Sreeja_G,

 

Does the DAX query use DirectLake mode or DirectQuery mode?

Yes @govindarajan_d it uses Direct Lake

Hi @Sreeja_G,

 

There are many factors that can influence and we need to dive deeper to understand. Did you try using the Performance analyzer in Power BI to find out where DAX query spends lot of time?

 

1. Check if it falls back to DirectQuery mode. Check this blog: https://fabric.guru/controlling-direct-lake-fallback-behavior

2. Check if you have the correct capacity for running the queries and there are not so many parallel queries running corresponding to the capacity you use. 

 

In addition to this, you can try prewarming your dataset by calling Power BI REST API for running queries which will fill the cache. Check this: https://www.tackytech.blog/how-to-pre-warm-your-power-bi-semantic-model-from-fabric-data-pipelines/#... 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.