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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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