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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
LasNoches
New Member

Direct query issues

Power Bi query, using direct query does not support use such as 'DECLARE', 'WITH', or even 'ORDER BY' , not sure why the developers does not use this tool at full potencial, but for sure have some potencial to improve. If the developers doest not find interesting or change the permission from direct query, maybe allows us to read an sql file .

1 REPLY 1
foodd
Super User
Super User

To Quote Chris Webb: "What can you do to work around this? There is really just one answer: model your data the way Power BI likes it (i.e. as a star schema) before it gets to Power BI. It’s the now-famous Roche’s Maxim. Even if you aren’t running into this limitation using SQL queries as the source of a table is a bad idea because it makes maintenance difficult and you end up doing any expensive transformations at query time and paying the performance penalty over and over again. And yes, I know, some of you don’t have permission to create views or get the data modeled correctly in the source and I know it’s tough, but that’s the way it is."

 

You are encouraged to search for an existing idea and vote for it or create a new Idea at https://aka.ms/PBI_Comm_Ideas in support of adding support.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

Top Solution Authors