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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

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, @Anonymous 

 

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors