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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
babyjb1979
Helper I
Helper I

Error Code

Hi all,

 

I am creating a dataset by introducing DirectQuery table(Employee Transaction). 

 

babyjb1979_1-1688408327128.png

The report is properly showed in dataset's report page:

babyjb1979_3-1688408509434.png

However after I published the dataset to workspace, and connected the report to the dataset, there is a error happening :

babyjb1979_4-1688408600136.png

 

babyjb1979_0-1688408286206.png

I don't understand what the issue is. Could anyone help?

 

Thank you in advance!

Branko

1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi , @babyjb1979 

Accoridng to your description, you connect to sql server using direct query mode in your Power Bi Desktop. And when you publish to Power Bi Service , you get an error code "DMTS_DatasourceHasNoCredentialError".

The error message "DMTS_DatasourceHasNoCredentialError" occurs when the data source credentials are not provided or are incorrect.You can tru to check this :
(1)If your data source is a local data source, then you need to check whether you have installed the gateway correctly and whether the gateway is online. (Because Power BI Service needs to install and download the local data gateway to connect to local data sources).

For more information, you can refer to :
On-premises data gateway - Power BI | Microsoft Learn

Install an on-premises data gateway | Microsoft Learn

Second, you need to create the corresponding data source definition credential information on the gateway, so that your gateway can connect to your data source.

Add or remove a gateway data source - Power BI | Microsoft Learn

vyueyunzhmsft_0-1688523722384.png

And you need to make sure that your data source can be successfully connected in Power BI Serve.

 

(2)If you are connecting to your cloud sql server, you need to edit the credentials in "Data Source credential" in your dataset setting interface, and re-enter your credentials to connect to the data source.

 

 

In addition, you can also try to use Dataflow to test your connectivity with the Sql server.

For more information, you can refer to :
Creating a dataflow - Power BI | Microsoft Learn

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

View solution in original post

1 REPLY 1
v-yueyunzh-msft
Community Support
Community Support

Hi , @babyjb1979 

Accoridng to your description, you connect to sql server using direct query mode in your Power Bi Desktop. And when you publish to Power Bi Service , you get an error code "DMTS_DatasourceHasNoCredentialError".

The error message "DMTS_DatasourceHasNoCredentialError" occurs when the data source credentials are not provided or are incorrect.You can tru to check this :
(1)If your data source is a local data source, then you need to check whether you have installed the gateway correctly and whether the gateway is online. (Because Power BI Service needs to install and download the local data gateway to connect to local data sources).

For more information, you can refer to :
On-premises data gateway - Power BI | Microsoft Learn

Install an on-premises data gateway | Microsoft Learn

Second, you need to create the corresponding data source definition credential information on the gateway, so that your gateway can connect to your data source.

Add or remove a gateway data source - Power BI | Microsoft Learn

vyueyunzhmsft_0-1688523722384.png

And you need to make sure that your data source can be successfully connected in Power BI Serve.

 

(2)If you are connecting to your cloud sql server, you need to edit the credentials in "Data Source credential" in your dataset setting interface, and re-enter your credentials to connect to the data source.

 

 

In addition, you can also try to use Dataflow to test your connectivity with the Sql server.

For more information, you can refer to :
Creating a dataflow - Power BI | Microsoft Learn

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors