6.1 Performance Analyzer and DAX Query View

Key Takeaways

  • Performance Analyzer captures the duration of each visual's query, including DAX query, DirectQuery, and rendering times.
  • Start recording, clear cache, then interact with the report to get accurate measurements.
  • DAX query view allows writing and testing DAX queries directly against the model without affecting reports.
  • Long DAX query times indicate measure optimization is needed; long DirectQuery times indicate source optimization.
  • Export Performance Analyzer results to JSON for detailed analysis and comparison over time.
Last updated: March 2026

Performance Analyzer and DAX Query View

Quick Answer: Performance Analyzer (View tab) records how long each visual takes to load, broken into DAX query time, DirectQuery time, and visual rendering time. Clear the cache first for accurate results. DAX query view (separate view in Desktop) lets you write and test DAX queries directly, helping identify slow measures before they reach reports.

Performance Analyzer

Accessing Performance Analyzer

View tab → Performance Analyzer → Start Recording

What It Measures

For each visual on the page, Performance Analyzer records:

MetricDescription
DAX QueryTime for the VertiPaq engine to execute the DAX
Direct QueryTime for the source database to respond (DirectQuery only)
OtherPower BI internal processing
Visual DisplayTime to render the visual in the browser
TotalSum of all components

Best Practice: Accurate Measurement

  1. Start recording from the Performance Analyzer pane
  2. Clear the visual cache: right-click the Performance Analyzer area → Refresh Visuals (or press Ctrl+Shift+F5)
  3. Interact with the report (change slicers, navigate pages)
  4. Stop recording and analyze results

Why clear cache? Without clearing, Power BI may serve cached results, making visuals appear faster than they actually are for first-time users.

Interpreting Results

SymptomLikely CauseSolution
Long DAX query timeComplex or inefficient measuresOptimize DAX formulas
Long DirectQuery timeSlow source databaseOptimize source, add indexes
Long visual displayToo many data points in visualReduce cardinality, use Top N
Many visuals loadingPage has too many visualsReduce visual count, use bookmarks

Copying the DAX Query

Click "Copy query" next to any visual to see the exact DAX sent to the engine. Paste it into DAX query view for further analysis and optimization.

DAX Query View

DAX query view is a dedicated view in Power BI Desktop for writing and testing DAX queries.

Accessing DAX Query View

Click the DAX query view icon in the left sidebar (looks like a code bracket), or:

View tab → DAX Query View

Writing DAX Queries

DAX queries use the EVALUATE keyword:

// Simple table evaluation
EVALUATE
Products

// Filtered evaluation
EVALUATE
FILTER(Products, Products[Category] = "Electronics")

// Measure testing with SUMMARIZE
EVALUATE
SUMMARIZECOLUMNS(
    Products[Category],
    "Total Revenue", SUM(Sales[Amount]),
    "Order Count", COUNTROWS(Sales)
)

// Testing a complex measure
DEFINE
    MEASURE Sales[Test Revenue YTD] = TOTALYTD(SUM(Sales[Amount]), 'Date'[Date])
EVALUATE
SUMMARIZECOLUMNS(
    'Date'[Month Name],
    "YTD Revenue", [Test Revenue YTD]
)

Benefits of DAX Query View

  • Test measures before adding them to the model
  • Debug complex DAX by examining intermediate results
  • Compare performance of different DAX approaches
  • Explore data without creating visuals
  • Validate calculations against expected results

Model Performance Optimization Strategies

1. Reduce Model Size

  • Remove unnecessary columns — every column consumes memory
  • Remove unnecessary rows — filter historical data to relevant periods
  • Reduce cardinality — high-cardinality columns (many unique values) compress poorly
  • Avoid calculated columns when Power Query can do the same transformation

2. Optimize Data Types

  • Use Whole Number instead of Decimal when possible (better compression)
  • Use Date instead of Date/Time if time component is not needed
  • Avoid Text columns with high cardinality for filtering

3. Reduce Granularity

If your fact table has one row per second but reports only need daily aggregation:

  • Aggregate in Power Query before loading
  • Use Group By to summarize to the needed level
  • Smaller tables = faster queries

4. Improve Relationship Design

  • Ensure integer keys for relationships (faster than text keys)
  • Use star schema — avoid snowflake or complex relationship chains
  • Minimize bi-directional cross-filtering
  • Set Assume Referential Integrity for DirectQuery relationships

5. Optimize DAX Measures

  • Use variables to avoid redundant calculations
  • Avoid iterators (SUMX) when simple aggregations (SUM) suffice
  • Use DIVIDE() instead of IF checks for division
  • Minimize use of FILTER() inside CALCULATE — prefer direct column filters
  • Avoid DISTINCTCOUNT on high-cardinality columns when possible

On the Exam

The PL-300 frequently tests:

  • Using Performance Analyzer to identify slow visuals
  • Interpreting Performance Analyzer results (DAX time vs. visual display time)
  • Writing DAX queries in DAX query view for testing
  • Strategies for reducing model size and improving performance
  • Understanding the impact of cardinality on compression and query speed
Test Your Knowledge

A visual takes 8 seconds to load. Performance Analyzer shows: DAX query = 7.2s, Visual display = 0.8s. What should you optimize?

A
B
C
D
Test Your Knowledge

Why should you clear the visual cache before recording in Performance Analyzer?

A
B
C
D
Test Your Knowledge

Which of the following is the MOST effective way to reduce model size?

A
B
C
D