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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
vanessafvg
Community Champion
Community Champion

Direct Query Issue

I have a very strange issue, when i connect via the deskop to my server (im am connecting onto another domain, however my environment is set up to allow me to do this) if i use the default method Get Date method by just inputting a SQL server name and then waiting for the databases to be loaded, i can access the database and then by select the tables i want, no problem.

 

However i  want to write a sql query to pull the data from the table and when i do this i get this issue,  at the point of entering the server / database / sql query in the advanced pane - i have tried it a million times in a million ways and it definitely seems buggy to me.

 

anyone else getting this?

 

erro power ni.PNG

 

 

 

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




4 REPLIES 4
hugoberry
Responsive Resident
Responsive Resident

Maybe the problem is indeed with the way Power BI accesses SQL Servers on other domains. Is it possible to run Power BI as a different user? The user with which you are trying to connect to that SQL DB?

runas /netonly PBIDesktop.exe
hugoberry
Responsive Resident
Responsive Resident

Try verifying that you use the right user to connect to you SQL server. I've seen instances where Power BI would try to act clever and default to different set of permissions than needed.  Try checking that in the Data Source Settings > Edit Permisions >... the Credentials are set to your desired setup.

The credentials are set up correctly as far as i can see,  its only when i go into a native query mode that it wants me to renter details.  I am logging on to another domain which works fine if you dont change the default setting and just put in the server.   But as soon as i write my sql statement, or maybe its when i put in the database that it all goes belly up.

 

I am busy looking at the trace files, it looks like an issue with the firewall maybe.  I just find it odd that as soon as i put a database name it says the user is not authorised - i have tried to put in alternative credentials but it doesn't authorise it.    I did try switching the native database queries in the settings (require user approval) on and off, makes no difference





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




FarhanAhmed1984
Resolver III
Resolver III

Can you check by enabling the traces thru

 

FILE --> OPTIONS & SETTINGS --> OPTIONS

 

and see what error you are receiving.

 

Look for line like "DataMashup.Trace Error" in file

 

Tracing Power BI.png

Helpful resources

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

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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