0
0
Power BIbi_tool~20 mins

SQL Server connection in Power BI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
SQL Server Connection Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding SQL Server Connection Strings in Power BI

Which of the following connection strings correctly connects Power BI to a SQL Server instance named SQLPROD01 on the default port, using Windows Authentication?

AData Source=SQLPROD01;Initial Catalog=SalesDB;Integrated Security=False;
BServer=SQLPROD01,1433;Database=SalesDB;User Id=admin;Password=pass123;
CServer=SQLPROD01;Database=SalesDB;Integrated Security=False;User Id=admin;Password=pass123;
DServer=SQLPROD01;Database=SalesDB;Trusted_Connection=True;
Attempts:
2 left
💡 Hint

Windows Authentication uses Trusted_Connection=True or Integrated Security=True.

dax_lod_result
intermediate
2:00remaining
DAX Measure for SQL Server Data Refresh Status

You have a table RefreshLog with columns RefreshDate and Status. You want a DAX measure that returns the count of successful refreshes in the last 7 days.

Which measure produces the correct result?

ASuccessfulRefreshes = COUNTROWS(FILTER(RefreshLog, RefreshLog[Status] = "Success" && RefreshLog[RefreshDate] <= TODAY() - 7))
BSuccessfulRefreshes = CALCULATE(COUNTROWS(RefreshLog), RefreshLog[Status] = "Success" && RefreshLog[RefreshDate] <= TODAY() + 7)
CSuccessfulRefreshes = CALCULATE(COUNTROWS(RefreshLog), FILTER(RefreshLog, RefreshLog[Status] = "Success" && RefreshLog[RefreshDate] >= TODAY() - 7))
DSuccessfulRefreshes = CALCULATE(COUNTROWS(RefreshLog), RefreshLog[Status] = "Success", RefreshLog[RefreshDate] >= TODAY() - 7)
Attempts:
2 left
💡 Hint

Use FILTER inside CALCULATE to apply multiple conditions correctly.

visualization
advanced
2:00remaining
Best Visualization for SQL Server Query Performance Over Time

You have imported SQL Server query performance data with columns QueryName, ExecutionTime (in milliseconds), and ExecutionDate. You want to visualize trends of execution time for multiple queries over the last month.

Which visualization type is best suited for this purpose in Power BI?

ATable showing <code>QueryName</code> and average <code>ExecutionTime</code> for the last month
BLine Chart with <code>ExecutionDate</code> on X-axis and <code>ExecutionTime</code> on Y-axis, with separate lines for each <code>QueryName</code>
CPie Chart showing percentage of total execution time by query
DStacked Bar Chart showing total execution time per query for the last month
Attempts:
2 left
💡 Hint

To show trends over time for multiple categories, use a line chart with series.

🔧 Formula Fix
advanced
2:00remaining
Troubleshooting SQL Server Connection Timeout in Power BI

You try to connect Power BI to a remote SQL Server but get a timeout error. Which of the following is the most likely cause?

AThe SQL Server instance is not configured to allow remote connections.
BThe Power BI desktop version is outdated and incompatible with SQL Server.
CThe SQL Server database is empty with no tables.
DThe Power BI report has too many visuals causing slow rendering.
Attempts:
2 left
💡 Hint

Timeout errors usually relate to network or server settings.

data_modeling
expert
3:00remaining
Optimizing Data Model for SQL Server DirectQuery in Power BI

You are using DirectQuery mode to connect Power BI to a large SQL Server database. To improve report performance, which modeling practice is best?

AUse star schema with fact and dimension tables, minimize calculated columns, and push calculations to SQL Server views.
BImport all tables fully and create many calculated columns in Power BI.
CCreate many-to-many relationships between all tables to increase flexibility.
DDisable query folding to ensure all transformations happen in Power BI.
Attempts:
2 left
💡 Hint

Good data modeling and pushing calculations to the source improves DirectQuery performance.