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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Does a measure append the SQL in Direct Query Mode?

Hi,

 

I have noticed that the SQL that PowerBI generates is not that hot with regards to joins etc  (slow to load) ....

 

We have rewritten the code it outputed to make it quicker.

 

Does having a Calculate measure affect the SQL that is generated from PowerBI and if so is it then better to try and do the calculate in SQL or ar measures handled on the data that is retrieved from the Server?

 

Thanks

 

Chris

2 REPLIES 2
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

In DirectQuery mode, by default, measures are restricted to simple measures that are unlikely by themselves cause any performance issues. If enable Allow unrestricted measures in DirectQuery mode, the complicate measure may cause the performance issue. 

 

You should import data to Power BI wherever possible. This takes advantage of the high performance query engine of Power BI, and provides a highly interactive and fully featured experience over your data. If import mode can't meet the requirement, then choose DirectQuery. But some expressions that perform well when the data is imported may result in very slow queries to the backend source when in DirectQuery mode. For detail information, you can go through this article: Power BI and DirectQuery

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi

 

I have noticed that the SQL that PowerBI generates is not that hot with regards to joins etc  (slow to load) ....

 

We have rewritten the code it outputed to make it quicker.

 

Does having a Calculate measure affect the SQL that is generated from PowerBI and if so is it then better to try and do the calculate in SQL or ar measures handled on the data that is retrieved from the Server?

 

Thanks

 

Chris

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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