0
0
Power BIbi_tool~10 mins

SQL Server connection in Power BI - Cell-by-Cell Formula Trace

Choose your learning style9 modes available
Sample Data

This data represents the key details needed to connect Power BI to a SQL Server database: server name, database name, username, password, and the resulting connection string.

CellValue
A1ServerName
B1SQLServer01
A2DatabaseName
B2SalesDB
A3Username
B3user123
A4Password
B4********
A5ConnectionString
B5Server=SQLServer01;Database=SalesDB;User ID=user123;Password=********;
Formula Trace
CONCATENATE("Server=", B1, ";Database=", B2, ";User ID=", B3, ";Password=", B4, ";")
Step 1: CONCATENATE("Server=", B1)
Step 2: CONCATENATE("Server=SQLServer01", ";Database=", B2)
Step 3: CONCATENATE("Server=SQLServer01;Database=SalesDB", ";User ID=", B3)
Step 4: CONCATENATE("Server=SQLServer01;Database=SalesDB;User ID=user123", ";Password=", B4)
Step 5: CONCATENATE("Server=SQLServer01;Database=SalesDB;User ID=user123;Password=********", ";")
Cell Reference Map
    A           B
1 |ServerName |SQLServer01|
2 |DatabaseName|SalesDB   |
3 |Username   |user123   |
4 |Password   |********  |
5 |ConnectionString|---------> Uses B1, B2, B3, B4 to build string
Cells B1 to B4 provide the values for server, database, username, and password that are combined to form the connection string in B5.
Result
    A               B
1 |ServerName     |SQLServer01                      |
2 |DatabaseName   |SalesDB                         |
3 |Username      |user123                         |
4 |Password      |********                        |
5 |ConnectionString|Server=SQLServer01;Database=SalesDB;User ID=user123;Password=********;|
The final connection string in cell B5 shows all parts combined correctly. This string is used by Power BI to connect to the SQL Server database.
Sheet Trace Quiz - 3 Questions
Test your understanding
What value does the formula use from cell B2?
ASalesDB
BSQLServer01
Cuser123
D********
Key Result
CONCATENATE joins text and cell values step-by-step to build a connection string.