Sub topic 15
Checking Your Choice with Performance Analyzer
This chapter assumes you can build a Power BI Desktop report, write basic DAX measures, and know the differences between Import, DirectQuery, and Direct Lake storage modes. You pick a storage mode on paper. Performance Analyzer shows whether that choice holds up when real visuals run.
What Performance Analyzer measures
Performance Analyzer is a pane in Power BI Desktop (View > Performance analyzer). It records what happens when you interact with a report page. For each visual it splits the time into three parts:
| Part | What it covers |
|---|---|
| DAX query | Time to run the query the visual sent to the semantic model |
| Visual display | Time to draw the visual after the data returns |
| Other | Time spent waiting on other visuals or background work |
For storage modes, the DAX query part matters most. A visual whose DAX query time is large is waiting on the engine or on the source.
Run a measurement
- Open the report page you want to test.
- Open the Performance analyzer pane and select Start recording.
- Select Refresh visuals so every visual runs from a clean state.
- Expand each visual's entry to read its durations.
- Select Copy query on a slow visual to get its DAX query.
Run the test twice. The first run can include cold caches. In Direct Lake, the first query may also load columns from OneLake into memory. A second run shows the steady state.
What to look for in each mode
- Import: DAX query times should be low, because VertiPaq answers from memory. A slow visual usually points to an expensive measure or a model with too many high-cardinality columns.
- DirectQuery: Each visual sends SQL to the source. Performance Analyzer shows a Direct query duration inside the DAX query time. A large value means the source is the bottleneck. Check indexes, source load, and whether the query folds well.
- Direct Lake: A slow first run followed by fast runs suggests column loading. Consistently slow queries may mean fallback to DirectQuery.
Compare modes with the same query
Copy a visual's query and run it in DAX Studio. This query matches the shape of a typical visual:
EVALUATE
SUMMARIZECOLUMNS (
'Date'[Year],
"Total Sales", [Total Sales]
)
ORDER BY 'Date'[Year]It depends on this measure:
Total Sales = SUMX ( Sales, Sales[Quantity] * Sales[UnitPrice] )Under Import and Direct Lake, VertiPaq evaluates the measure. Under DirectQuery, the engine translates it to a SQL query against the source. Running the same DAX query against each variant of your model gives a like-for-like comparison.
Common errors
- Testing with a tiny dataset. Differences between modes only appear at realistic data volumes.
- Reading one run. Cache state changes results. Repeat the measurement.
- Blaming the storage mode for a bad measure. Test the measure alone in DAX Studio before changing modes.
- Ignoring fallback. A Direct Lake model that falls back to DirectQuery behaves like DirectQuery, so the numbers will look like DirectQuery numbers.
Decide what to change
| Symptom | Likely cause | Option |
|---|---|---|
| Slow DirectQuery visuals | Source latency or heavy queries | Add aggregation tables or make dimensions Dual |
| Slow first Direct Lake query only | Column loading | Accept it, or warm the model with a query after framing |
| Slow Direct Lake queries every time | Fallback to DirectQuery | Fix the cause of the fallback |
| Slow Import visuals | Measure or model design | Optimize the DAX or reduce column cardinality |
Exercise
A Direct Lake report shows a slow DAX query on the first run and fast queries on later runs. Which cause fits this pattern, and how would you confirm it?
Show answer
Column loading fits. The first query loads the needed columns from OneLake into memory, and later queries use the in-memory copy. Confirm it by running Performance Analyzer twice with Refresh visuals and comparing the DAX query durations. If every run is slow, check for fallback to DirectQuery instead.