Excelgoodies logo +44 (0)20 3769 3689

Lessons Learned Using SQL with Power BI in Real Projects


Most Power BI projects don’t fail dramatically.

They go live.
They get used.
And then — a few weeks or months later — problems start surfacing.

Reports feel slower than expected.
Numbers become hard to explain.
Small changes take far longer than planned.

After revisiting multiple Power BI implementations built on SQL — often during performance reviews, redesigns, or “why is this breaking now?” conversations — certain patterns consistently emerge.

These are not best practices written upfront. They are lessons formed in hindsight, after seeing the same issues repeat across real projects.

Lesson 1: “The Dashboard Is Simple” Does Not Mean the SQL Is

A very common scenario:
“It’s just a sales dashboard — totals by month, region, and product.”

The report looks clean.
Minimal visuals.
Nothing fancy.

But underneath, the SQL view feeding the dataset:

  • Joins 8–10 tables
  • Applies multiple CASE statements
  • Handles historical logic
  • Performs formatting
  • Aggregates data at multiple levels

The dashboard struggles under refresh, and troubleshooting becomes difficult because everything happens in one place.


What teams realised later:
The visual simplicity masked structural complexity in SQL.
Breaking SQL logic into layers early would have prevented most issues.
 

Lesson 2: Overengineered SQL Slows Teams More Than Reports

In several projects, SQL was designed to “handle everything”:

  • All business rules
  • All classifications
  • All aggregations
  • All exceptions

The intention was good: make Power BI fast and lightweight.

In reality:

  • Only one or two people fully understood the SQL
  • Small logic changes required database updates
  • Business users couldn’t trace numbers
  • Development slowed over time

When changes were finally required, teams often wished the SQL had been simpler, not smarter.


What teams learned:
SQL should provide a clean, stable foundation — not a black box.
 

Lesson 3: Power BI Exposes SQL That Was Never Designed for Analytics

A pattern seen repeatedly:

SQL works perfectly for applications.
Reports worked initially.
Then usage increased.

Power BI started:

  • Scanning more data
  • Applying more filters
  • Running queries repeatedly
  • Supporting more users

Suddenly:

  • Refresh times increased
  • DirectQuery reports felt sluggish
  • SQL Server load spiked

Nothing was “wrong” — SQL just wasn’t designed for analytical behaviour.


What teams learned:
Power BI doesn’t just consume SQL.
It stress-tests it.
 

Lesson 4: “Let’s Load Everything” Comes Back to Haunt Later

Early in projects, it’s common to hear:
“Let’s load all columns — we might need them later.”
“Let’s keep all history — better to be safe.”

Months later:

  • Models are bloated
  • Refreshes are slow
  • Changes are risky
  • Users only use a fraction of the data

Performance tuning begins — when the real issue was excessive scope from day one.


What teams learned:
Reducing data intentionally delivers bigger gains than late optimisation.
 

Lesson 5: Unclear Logic Ownership Creates Long-Term Confusion

In many projects:

  • Some logic lived in SQL
  • Some in Power Query
  • Some duplicated in DAX

No one could confidently answer:

  • Where is this rule defined?
  • Which version is correct?
  • Who should change it?

Over time, this led to:

  • Inconsistent numbers
  • Slower fixes
  • Increased dependency on individuals

Teams that paused to define where logic belongs recovered much faster.

This separation between SQL and Power BI is where many projects either stabilise — or quietly deteriorate.
For readers interested in how this balance is handled in practice, this Power BI + SQL approach is explained here: Power BI with SQL

Lesson 6: Indexing Helps — But Only After the Structure Is Right

Indexing was often introduced reactively:
“The report is slow — add indexes.”

Sometimes performance improved briefly.
Then data grew.
Then issues returned.

Projects that skipped proper modelling and relied on indexing alone eventually hit the same ceiling again.


What teams learned:
Indexing amplifies good design — it does not rescue poor design.
 

Lesson 7: DirectQuery Makes Every Shortcut Visible

DirectQuery projects often worked fine in testing.

Then real users arrived.

  • More filters
  • More interactions
  • More concurrency

Shortcuts that were invisible in Import mode suddenly became painful:

  • Inefficient joins
  • Missing indexes
  • Overly complex SQL


What teams learned:
DirectQuery requires disciplined SQL design and realistic usage testing.
 

Lesson 8: The Best Fixes Were Usually the Least Exciting

The most effective improvements were rarely dramatic.

They were things like:

  • Removing unused columns
  • Simplifying views
  • Clarifying grain
  • Reducing refresh scope
  • Moving logic to the right layer

Not exciting.
But consistently effective.


What teams learned:
Boring fixes scale. Clever tricks rarely do.
 

Final Thought

Using SQL with Power BI isn’t about choosing the most powerful approach.

It’s about:

  • Designing for analytics, not applications
  • Keeping logic understandable
  • Making future changes easier, not harder

The strongest Power BI projects weren’t the ones with the smartest SQL — they were the ones where SQL and Power BI were designed to work together deliberately.


Learning from Real SQL + Power BI Projects

For those who want to understand how these lessons translate into real reporting design decisions, the Power BI + SQL course by ExcelGoodies focuses on actual project patterns, trade-offs, and performance scenarios — not isolated features.

Check the Upcoming batch details
 

Editor’s Note

This article curates patterns observed across live Power BI projects using SQL as the primary data source, including post-go-live reviews, performance investigations, and redesign discussions. The lessons presented here emerged repeatedly over time rather than from isolated implementations.

Insights compiled with inputs from the ExcelGoodies Trainers & Power Users Community.
 

MS-SQL

New

Next Batches Now Live

Power BIPower BI
Power BISQL
Power BIPower Apps
Power BIPower Automate
Power BIMicrosoft Fabrics
Power BIAzure Data Engineering
Explore Dates & Reserve Your Spot Reserve Your Spot