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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

DirectQuery and Power BI Service

I have a Power BI Desktop project that uses DirectQuery to access an on-premises
Microsoft SQL Server database.

From Power BI Desktop, you can query the database. But When I publish the Power BI Desktop project to the Power BI service, the visualizations cannot display the data. What should I do to resolve the issue?

1. Locate the published dataset for the project in the Power BI service and configure the
data source credentials.
2. Install the on-premises data gateway (personal mode) and republish the project.
3. Install the on-premises data gateway and configure a data source.

 

I think 1 is correct but why not 3..? Please can someone explain this?

 

Thank you!

1 ACCEPTED SOLUTION

Option 3 would be the way to go.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

View solution in original post

5 REPLIES 5
GilbertQ
Super User
Super User

Hi there

In order to use DirectQuery you need to install and configure the On-Premise data gateway in Enterprise mode.

Once that is done, then create a new data source in the Power BI Service to the SQL Server Database.

Once that is done, re-publish your PBIX file and once it has been published it should let you know that it has connected to the Gateway.

https://docs.microsoft.com/en-us/power-bi/service-gateway-enterprise-manage-sql




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Anonymous
Not applicable


@GilbertQ wrote:
Hi there

In order to use DirectQuery you need to install and configure the On-Premise data gateway in Enterprise mode.

Once that is done, then create a new data source in the Power BI Service to the SQL Server Database.

Once that is done, re-publish your PBIX file and once it has been published it should let you know that it has connected to the Gateway.

https://docs.microsoft.com/en-us/power-bi/service-gateway-enterprise-manage-sql

Thanks for your response.  My question was which is correct from given options?

 

I have a Power BI Desktop project that uses DirectQuery to access an on-premises
Microsoft SQL Server database.

From Power BI Desktop, you can query the database. But When I publish the Power BI Desktop project to the Power BI service, the visualizations cannot display the data. What should I do to resolve the issue?

1. Locate the published dataset for the project in the Power BI service and configure the
data source credentials.
2. Install the on-premises data gateway (personal mode) and republish the project.
3. Install the on-premises data gateway and configure a data source.

Hi there

I thought that I had explained it in my response and the associated link?




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Anonymous
Not applicable


@GilbertQ wrote:
Hi there

I thought that I had explained it in my response and the associated link?

Still not clear, just say option 1 is right or option 3..? 

Option 3 would be the way to go.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

FabCon and SQLCon Highlights Carousel

FabCon & SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

Users online (8,961)