This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
I am trying to connect SQL Server to Power BI Using Custom Scripts,During this facing issue.
Regarding please check below Details -
Python Script -
import pandas as pd
import pyodbc
conn = pyodbc.connect('Driver={SQL Server};'
'Server= ServerName ;' - Mentioned Correctly
'Database=Test;' - Mentioned Correctly
'Trusted_Connection=yes;')
cur= conn.cursor()
sqlquery = pd.read_sql_query('SELECT * FROM Customers',conn) - Mentioned Correctly
print(sqlquery)
Note - I have already Installed libaries which are needed.
pip install pyodbc
pip install pandas
pip install matplotlib
Solved! Go to Solution.
Hi @Dnyaneshwar_21 ,
You can refer to the following official Microsoft link for a detailed description of the error and the solution, as the situation is caused by your specific situation, and you can follow the steps in the link to troubleshoot it,refer:
Best Regards
Lucien
Hi @Dnyaneshwar_21 ,
You can refer to the following official Microsoft link for a detailed description of the error and the solution, as the situation is caused by your specific situation, and you can follow the steps in the link to troubleshoot it,refer:
Best Regards
Lucien
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 35 | |
| 32 | |
| 25 | |
| 22 | |
| 18 |
| User | Count |
|---|---|
| 65 | |
| 35 | |
| 32 | |
| 25 | |
| 23 |