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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. 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
Solution Supplier
Solution Supplier

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
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.