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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
nima_mlk
Frequent Visitor

DirectQuery error: DirectQuery may not be used with this data source. PostgreSQL

I have a report, exclusively made up of visualizations from a PostgreSQL database on DirectQuery mode. It works just fine in Dektop. I published it to Service and configured an enterprise gateway. When I visit the report page, none of the visualizations work, all throwing this error:

 

DirectQuery error: DirectQuery may not be used with this data source - please consider moving to a supported data source or upgrading the SQL Server data source to the latest available version.
Please try again later or contact support. If you contact support, please provide these details.

Activity ID25c0d669-ba89-46f4-bc07-ebf4e5bc3b70
Request ID1304ac04-2bb2-c7d1-eb19-c52168c9505b
Correlation IDb2a81c79-9993-99eb-4553-c96088575240
TimeWed Sep 11 2019 18:05:33 GMT+0200 (Central European Summer Time)
Version13.0.10668.164
Cluster URIhttps://wabi-west-europe-d-primary-redirect.analysis.windows.net
 
Which doesn't make a lot of sense. PostgreSQL is now supported, according to the documentation.
What is going on here?
 
PS: The same PostgreSQL database and data source on Import Mode work just fine, both in Desktop and Service.
1 ACCEPTED SOLUTION
nima_mlk
Frequent Visitor

The solution in my case:

 

I went through this Microsoft's support team, and after a few days, it was apparent that DirectQuery for PostgreSQL was released as a feature for Power BI Desktop, but the on-premises Data Gateway was not supporting it. 

Last week around Sep 20, the new version of the Data Gateway was released and fixed the issue.

View solution in original post

5 REPLIES 5
nima_mlk
Frequent Visitor

The solution in my case:

 

I went through this Microsoft's support team, and after a few days, it was apparent that DirectQuery for PostgreSQL was released as a feature for Power BI Desktop, but the on-premises Data Gateway was not supporting it. 

Last week around Sep 20, the new version of the Data Gateway was released and fixed the issue.

Anonymous
Not applicable

HI @nima_mlk ,

Any advanced query operation in your query editor? (e.g. merge, combine , reference other query, invoke custom function)

If this is a case, power bi gateway datasources may not map correctly with these advanced operations query tables.

Regards,

Xiaoxin Sheng

Hi @Anonymous , thanks for your reply.

 

Not really. I have to tables coming from the same PostgreSQL data source in my Query Editor, and the only steps are "Source", and "Navigation", which is choosing the respective table from the database.

 

Also the aggregations on the visualizations are extremely simple. Only a count per category.

 

Regards,

Nima

Anonymous
Not applicable

Hi @nima_mlk ,

Maybe you can take a look at following links about use custom data connector to achieve odbc directquery:

Enabling direct query for a data source via an odbc driver

Data connectors/m_extensions

Use custom data connectors with the on-premises data gateway

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Hi,

 

What is your gateways status? Does your postgres db allow connection from External IP ? It could be firewall blocking your Power BI service IP address. 

 

If you have found a way do it please do post the solution,  since being a new feature it would be useful to have this figureout. 

 

thanks 

Helpful resources

Announcements
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.

June 2025 community update carousel

Fabric Community Update - June 2025

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