Advanced Power BI • Training 04
Article-Training • Measure Before You Optimize

Performance Optimization

Improve Model Speed, DAX Efficiency and Report Responsiveness

Optimize the whole path: source → model → DAX → visuals → user experience.

Baseline → Find Slow Visual → Isolate Layer → Change One Thing → Re-measure → Keep / Revert
Source
→
Model
→
DAX
Visual
→
User
→
Measure
8learning modules
24interactive practices
5rapid review questions
50%certificate threshold
Learning target
Diagnose performance bottlenecks and optimize the layer that is actually slow.
Practice progress0 / 24

Complete 12 of 24 practices (50%) and enter your name to unlock the Certificate of Participation.

MODULE 01
⏱️

Measure First with Performance Analyzer

Performance Analyzer helps identify which visuals are slow and where their time is being spent. It turns 'the report feels slow' into measurable evidence.

⚙️
Do not optimize the report you imagine — optimize the bottleneck you measure

If one matrix takes 4.5 seconds while every card renders in 80 milliseconds, rebuilding the whole page is less useful than isolating that matrix first.

Core ideas

  • Record a baseline before tuning
  • Use Performance Analyzer per visual
  • Separate DAX/query time from rendering/other time
  • Copy slow visual queries for deeper investigation when appropriate
Baseline workflow
1. Open Performance Analyzer
2. Start recording
3. Refresh visuals
4. Reproduce the slow interaction
5. Sort by duration
6. Identify the slowest visual
7. Copy query if deeper DAX analysis is needed
8. Save the baseline before changes
✅

The first optimization deliverable is not a fix; it is a trustworthy baseline.

Practice — 3 cases

Practice 1 / Práctica 1
What should you do before changing DAX or model design?
Practice 2 / Práctica 2
What can Performance Analyzer show?
Practice 3 / Práctica 3
What is the strongest tuning habit?
MODULE 02
🧱

Shrink the Model Before You Tune the Formula

Import models benefit from efficient columnar compression. Unused columns, unnecessary detail and high-cardinality attributes can make the model heavier than the business question requires.

⚙️
The fastest value is often the value you never loaded

A transaction GUID used only for debugging may have millions of unique values. If report users never need it, carrying it into the semantic model can cost memory without analytical benefit.

Core ideas

  • Remove unused columns early
  • Reduce row grain when detail is unnecessary
  • Prefer efficient data types
  • Use clear star-schema fact/dimension structure
Model hygiene checklist
Ask for every column:
- Is it used in a visual?
- Is it used in a relationship?
- Is it used in DAX?
- Is it needed for RLS?
- Is it needed for drillthrough/detail?
If NO to all → candidate for removal.

Ask for every fact row:
- Is this grain required by the report?
✅

Model optimization starts with business necessity: keep what the report needs, not everything the source happens to contain.

Practice — 3 cases

Practice 4 / Práctica 4
Why does high cardinality increase model cost?
Practice 5 / Práctica 5
What is a strong model-size optimization?
Practice 6 / Práctica 6
Why is a star schema often good for performance and clarity?
MODULE 03
🧮

DAX Efficiency: Reuse Logic and Avoid Unnecessary Work

Good DAX performance begins with a good model, but formula design still matters. Reuse base measures, reduce repeated expressions, understand filter context, and avoid creating stored calculated columns when a dynamic measure is the better fit.

⚙️
A complicated measure often becomes simpler when the business logic is layered

Instead of repeating SUM(FactSales[Amount]) in ten formulas, create [Sales] once and build [Sales YTD], [Sales LY] and [Sales Margin] on top of it.

Core ideas

  • Create validated base measures
  • Use variables for repeated intermediate logic
  • Prefer measures over stored calculated columns when dynamic aggregation is the goal
  • Test slow queries instead of guessing which DAX is expensive
Layered DAX pattern
Sales =
SUM(FactSales[Amount])

Cost =
SUM(FactSales[Cost])

Margin =
VAR Revenue = [Sales]
VAR Expense = [Cost]
RETURN
    Revenue - Expense

Margin % =
DIVIDE([Margin], [Sales])
✅

Optimize DAX after the model is sound and after measurement shows that DAX is actually the slow layer.

Practice — 3 cases

Practice 7 / Práctica 7
Why can calculated columns make an Import model heavier?
Practice 8 / Práctica 8
Why is measure reuse a strong DAX design habit?
Practice 9 / Práctica 9
What is a good use of DAX variables?
MODULE 04
🖥️

Visual Load and Query Reduction

Every visual has a cost. On interactive pages, slicers, cross-highlighting and cross-filtering can generate repeated queries. Report design is therefore part of performance engineering.

⚙️
A beautiful page that fires twenty expensive queries per click is still a slow page

If ten slicers each refresh on every click in DirectQuery, the source can receive a flood of queries before the user finishes selecting the intended filters.

Core ideas

  • Limit visuals to what supports the page question
  • Review unnecessary cross-filter/highlight interactions
  • Use query reduction / Apply controls where appropriate
  • Design one focused page instead of one overloaded page
Report interaction strategy
For a heavy DirectQuery page:
- Apply filters before adding expensive visuals
- Consider Apply all slicers
- Reduce unnecessary cross-highlighting
- Pause / refresh visuals during authoring when useful
- Use Performance Analyzer after each major design change
✅

Visual performance is a design decision: every chart, slicer and interaction should justify the query work it creates.

Practice — 3 cases

Practice 10 / Práctica 10
Why can a page with many interactive visuals be slow?
Practice 11 / Práctica 11
What does query reduction help reduce?
Practice 12 / Práctica 12
What is a strong report-design optimization?
MODULE 05
🗄️

Import vs DirectQuery vs Composite: Choose the Workload Path

Storage mode determines where query work happens. Import often gives the fastest interactive experience because data is in the semantic model. DirectQuery keeps queries closer to the source but makes source/network efficiency much more important. Composite models combine modes when needed.

⚙️
Performance architecture begins before the first visual

A model that needs near-real-time detail may accept DirectQuery complexity, while a daily executive dashboard may benefit more from Import and scheduled refresh.

Core ideas

  • Use Import when latency/freshness requirements allow it
  • Use DirectQuery only with a source capable of supporting interactive query load
  • Consider Composite / aggregation strategies for mixed needs
  • Choose storage mode from business requirements, not fashion
Architecture questions
Ask:
- How fresh must data be?
- How large is the model?
- Can the source handle interactive concurrency?
- Is network latency acceptable?
- Can high-level aggregates be imported?
- Is detailed live access required?
- What refresh window is available?
✅

Storage mode is a performance and freshness contract with the business.

Practice — 3 cases

Practice 13 / Práctica 13
What is the main performance characteristic of Import mode?
Practice 14 / Práctica 14
What is the main performance risk of DirectQuery?
Practice 15 / Práctica 15
When can a composite model help?
MODULE 06
🔄

Power Query and Query Folding: Push Work to the Right Layer

Power Query can often fold transformations back to a relational source. When folding works, the source performs filtering, joins and projections instead of moving unnecessary raw data into the mashup engine.

⚙️
Move less data; let the source do what it is good at

Filtering 100 million rows down to 2 million at the database is usually stronger than importing all 100 million into Power Query just to remove 98 million later.

Core ideas

  • Preserve query folding where possible
  • Filter rows and remove columns early
  • Materialize complex transformations at the source when appropriate
  • Use View Native Query / query diagnostics when available to validate behavior
Transformation placement
Prefer:
Source view / foldable Power Query
  → filtered, typed, shaped data
  → semantic model

Avoid:
Huge raw extract
  → many non-folding transformations
  → late filters
  → oversized model
✅

Performance improves when each layer does the work it is best suited to do.

Practice — 3 cases

Practice 16 / Práctica 16
What is query folding?
Practice 17 / Práctica 17
Why is query folding especially important for DirectQuery/Dual tables?
Practice 18 / Práctica 18
Where should heavy transformations often live when the relational source can handle them efficiently?
MODULE 07
🕸️

Relationships and Filter Paths: Simpler Is Usually Faster

Relationships determine how filter context travels. Complex many-to-many designs and unnecessary bidirectional filtering can make query behavior harder to predict and can increase query complexity.

⚙️
A relationship line is executable model logic

If filters can reach a fact table through multiple competing paths, you have both a correctness problem and potentially a performance problem.

Core ideas

  • Prefer clear fact-to-dimension many-to-one relationships
  • Use single-direction filtering by default
  • Use many-to-many / bidirectional only for intentional patterns
  • Validate unknown/unmatched keys and relationship quality
Relationship review
For each relationship ask:
- Is the dimension key unique?
- Does the fact key match valid dimension values?
- Is cardinality correct?
- Is cross-filter direction necessary?
- Is there another path between the same areas?
- Could a bridge table model this more clearly?
✅

Relationship tuning protects both performance and trust in totals.

Practice — 3 cases

Practice 19 / Práctica 19
Why can bidirectional relationships hurt performance?
Practice 20 / Práctica 20
What relationship pattern is usually simplest for a star schema?
Practice 21 / Práctica 21
What should you investigate if totals are slow and ambiguous filter paths exist?
MODULE 08
🏭

Production Performance Playbook: Tune the Whole System

Power BI performance is end-to-end. A good production process measures source, model, DAX, visuals and interactions as one path, then assigns each bottleneck to the right layer and owner.

⚙️
The fastest report is not useful if the numbers are wrong or the refresh cannot finish

A performance change that cuts a visual from 4 seconds to 1 second but breaks filter logic is a regression, not an optimization.

Core ideas

  • Keep before/after measurements
  • Validate correctness after every tuning change
  • Monitor service/source behavior after deployment
  • Document architecture decisions and tradeoffs
Production checklist
1. Capture baseline with Performance Analyzer
2. Identify slow visual / interaction
3. Determine source vs model vs DAX vs rendering
4. Remove unnecessary data/model weight
5. Review relationships and cardinality
6. Simplify / reuse DAX where evidence points there
7. Reduce unnecessary visual/query activity
8. Validate Power Query folding / source efficiency
9. Reconsider storage mode if architecture is mismatched
10. Re-measure under comparable conditions
11. Verify totals / filters / refresh
12. Monitor after publishing
✅

Performance optimization is not a bag of tricks. It is a disciplined measurement-and-validation loop.

Practice — 3 cases

Practice 22 / Práctica 22
What is the strongest production optimization loop?
Practice 23 / Práctica 23
What should you verify besides speed after a tuning change?
Practice 24 / Práctica 24
What is the strongest production rule for Power BI performance?
5-Question Knowledge Check

Can you find the real bottleneck before tuning?

Open each item after answering it in your own words. The 24 interactive practices above drive certificate progress.

1. What is the first step in Power BI performance tuning?

Measure before changing anything.

2. Why does model size matter?

A smaller purposeful model is easier to query efficiently.

3. What does query folding achieve?

It lets the source do more of the work.

4. Why is DirectQuery performance different from Import?

DirectQuery keeps source/query latency in the interactive path.

5. What makes a tuning change successful?

Faster and still correct is the goal.

Performance Diagnostic Map

Find the slow layer before choosing the fix

SymptomInvestigate
One visual is slowPerformance Analyzer + DAX/query behavior
Whole Import model is heavyColumns, rows, cardinality, calculated columns
DirectQuery page sends many queriesVisual count, interactions, query reduction, source performance
Refresh / load is slowPower Query folding and source transformations
Totals behave strangely and queries are complexRelationships, cardinality, filter direction

Certificate of Participation

Complete at least 12 of the 24 practice cases (50%) and enter your name.

0 / 24 • 0%
Current feature reference

This training is aligned to current Microsoft Learn performance guidance.

Microsoft Learn — Performance Analyzer

Microsoft Learn — DirectQuery model guidance

Microsoft Learn — Query folding guidance