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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Marco_Iac
Frequent Visitor

Create a Function to Direct Query SQL Server Table

HI,

i create this function to import table by insering the table name from a SQL server with mor then 10k tab (Get data show only the first 10k table).

 

matto2727_0-1607092338232.png

 

Is it possible to create something similar that Direct query a table instead import?

This is the function code:

matto2727_1-1607092458050.png

i found some workaround like direct query a table and then change the name in advenced editor but  i need do this with a function,

Thanks

 

1 REPLY 1
v-alq-msft
Community Support
Community Support

Hi, @Marco_Iac 

 

It is unsupported to change connectivity mode in PowerQuery. The Storage mode property is a property that you can set on each table in your model and controls how Power BI caches the table data.

e1.png

 

There are some limitations for DirectQuery. In DirectQuery, there are very limited Power Query functionality and DAX functions are limited. For further information, please refer to the following document.

Manage storage mode in Power BI Desktop 

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors