Power BI SQL Server Connection
Create SQL Query
We will connect Power BI to Sql Server Management Studio so that we can run a power bi sql server direct query.
First we will make sure our sql query data returns correctly in sql server management studio.
Add SQL Direct Query to Power BI
Next will open Power BI and we can choose “Get Data” in the welcome screen.
You will then come to a window with all the data options and you can choose “SQL Server database”
If you close either of the first two windows without selecting SQL Server you still have two other ways of starting your connection.
First, You can choose SQL Server from the home menu.
The other option is to choose SQL Server from the “Get data” menu option.
Once you are in your connection window enter in your Database Server and Database name. Then select “DirectQuery” as your Data Connectivity mode
Add your SQL Query Statement. Click OK
Check your SQL query data
Your data from your query should show on the next screen. Click Load
All your query fields should display in the “Fields” window. You can now use the data for reporting
Power BI Tutorial