<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[The Practical Architect]]></title><description><![CDATA[The Practical Architect]]></description><link>https://thepracticalarchitect.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sat, 05 Dec 2026 21:15:37 GMT</lastBuildDate><atom:link href="https://thepracticalarchitect.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Throttled Capacity, Slow Reports: How I Find the Bottleneck in Power BI]]></title><description><![CDATA[A step-by-step walkthrough using Fabric Capacity Metrics, Performance Analyzer, DAX Studio, and Tabular Editor. This builds on my initial post, My DAX…]]></description><link>https://thepracticalarchitect.hashnode.dev/throttled-capacity-slow-reports-how-i-find-the-bottleneck-in-power-bi</link><guid isPermaLink="true">https://thepracticalarchitect.hashnode.dev/throttled-capacity-slow-reports-how-i-find-the-bottleneck-in-power-bi</guid><dc:creator><![CDATA[Damilola Oyetunji]]></dc:creator><pubDate>Fri, 04 Dec 2026 19:49:33 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6b10805678273057da6f3236/19dafebe-a5ad-4f20-9961-d7049b7f5c61.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>A step-by-step walkthrough using Fabric Capacity Metrics, Performance Analyzer, DAX Studio, and Tabular Editor.</em></p>
<p>This builds on my initial post, <a href="https://thepracticalarchitect.hashnode.dev/my-dax-studio-notes-server-timings-and-vertipaq-analyzer">My DAX Studio Notes: Server Timings and VertiPaq Analyzer</a>. Here, I take the next step: walking through a report investigation from the Fabric capacity signal to the visual, the DAX calculation, and the model review.</p>
<p>When a Power BI report becomes slow and Fabric capacity usage starts climbing, increasing capacity can look like the obvious next step.</p>
<p>My first question is different: <strong>what is consuming the capacity, and is that work necessary?</strong></p>
<p>I start with the capacity, follow the expensive operation to the report or semantic model, and then investigate the calculation behind the slow visual. In this walkthrough, I use that approach to examine a sales report and replace an expensive DAX conversion.</p>
<p>My captured query executions went from <strong>5,668 ms to 250 ms</strong>: approximately <strong>22.7 times faster</strong>, or a <strong>95.6% reduction in server execution time</strong>.</p>
<p>The timing improvement is useful, but the investigation is the part I want to make repeatable.</p>
<h2>What I am using</h2>
<p>Each tool has a specific job:</p>
<table>
<thead>
<tr>
<th>Tool</th>
<th>What I use it for</th>
</tr>
</thead>
<tbody><tr>
<td>Fabric Capacity Metrics app</td>
<td>Identify high-consumption operations and the items behind them.</td>
</tr>
<tr>
<td>Power BI Performance Analyzer</td>
<td>Find the slow visual and capture its DAX query.</td>
</tr>
<tr>
<td>DAX Studio</td>
<td>Examine query execution and compare a candidate calculation.</td>
</tr>
<tr>
<td>Tabular Editor Best Practice Analyzer</td>
<td>Review semantic-model practices that deserve further investigation.</td>
</tr>
</tbody></table>
<p>My example uses a fictional sales dataset with <strong>five million rows</strong>, an Import semantic model, and a category-by-month matrix. Sales is related to Date, Product, and Region.</p>
<p>The project is <code>OptimizeDAX-Performance-Demo.pbip</code>. A PBIP is the project entry point, so I keep its companion report and semantic-model folders together. The same troubleshooting workflow also applies to a report saved as a PBIX.</p>
<h2>Step 1: Prepare the tools</h2>
<h3>Fabric Capacity Metrics</h3>
<p>I need access to the capacity's metrics before I can investigate its workload. If the app is not already available, a capacity administrator can follow Microsoft's <a href="https://learn.microsoft.com/en-us/fabric/enterprise/metrics-app-install">Capacity Metrics installation guide</a>.</p>
<p>Installing the app requires the permissions and licensing described in that guide. If I do not administer the capacity, I work with the capacity administrator rather than assuming I can see every operation.</p>
<h3>DAX Studio</h3>
<p>I use the installer rather than the portable download when I want Power BI Desktop integration:</p>
<ol>
<li>Open the <a href="https://daxstudio.org/downloads/">DAX Studio download page</a>.</li>
<li>Download and run the installer.</li>
<li>Choose <strong>All Users</strong> if organizational policy and installation permissions allow it. This option registers DAX Studio under Power BI Desktop's <strong>External tools</strong> ribbon.</li>
<li>Finish the installation and restart Power BI Desktop if it was open.</li>
<li>Open the report and select <strong>External tools &gt; DAX Studio</strong>.</li>
</ol>
<p>DAX Studio should open connected to the report's model.</p>
<p>The <a href="https://daxstudio.org/docs/installation/index/">installation options</a> explain the differences between All Users, Current User, and Portable installations. Current User and Portable installations do not provide the same automatic External Tools integration.</p>
<p>If I launch DAX Studio separately, I can select the running Desktop model in its connection dialog. I keep the intended report open and use the <a href="https://daxstudio.org/docs/tutorials/getting-connected/">connection guide</a> to confirm the connection method. Live-connected reports have additional connection considerations covered there.</p>
<p>If the ribbon entry is missing, I check the installation choice and restart Desktop. This <a href="https://www.youtube.com/watch?v=jScicVBrr0s">External Tools troubleshooting video</a> is another useful reference.</p>
<h3>Tabular Editor</h3>
<p>For the model review, I use <strong>Tabular Editor 2</strong>, the free, open-source version shown later in this post:</p>
<ol>
<li>Review the <a href="https://docs.tabulareditor.com/en/getting-started/Getting-Started-te2.html">Tabular Editor 2 getting-started guide</a>.</li>
<li>Download its MSI installer from the <a href="https://github.com/TabularEditor/TabularEditor/releases/latest">official release page</a>.</li>
<li>Install it, allowing the installer to register the External Tools entry.</li>
<li>Restart Power BI Desktop if necessary.</li>
<li>With the report open, select <strong>External tools &gt; Tabular Editor</strong>.</li>
</ol>
<p>Tabular Editor 3 is a separate commercial product. Both versions support BPA, but their included rule collections and some interface details differ.</p>
<p>Before changing model metadata, I save a working copy or use version control.</p>
<h2>Step 2: Start with the capacity, not the DAX</h2>
<p>I open the <a href="https://learn.microsoft.com/en-us/fabric/enterprise/metrics-app">Fabric Capacity Metrics app</a> and select the capacity and period associated with the issue.</p>
<p>My first pass is simple:</p>
<ol>
<li>Look for utilization spikes, sustained high utilization, and throttling.</li>
<li>Identify whether <strong>Interactive</strong> or <strong>Background</strong> operations are the main contributors.</li>
<li>Drill through the affected period to the <strong>Timepoint</strong> page.</li>
<li>Work downward from the operations with the largest compute contributions.</li>
<li>Use <strong>Timepoint Item Detail</strong> to narrow the investigation to the workspace, item, and operation type.</li>
</ol>
<img src="https://cdn.hashnode.com/uploads/covers/6b10805678273057da6f3236/59d5b3e4-d3ab-4ee0-aabb-3a2788fd98e7.png" alt="" style="display:block;margin:0 auto" />

<p>Interactive operations commonly include report queries. Background operations commonly include refreshes and other scheduled or backend work. That distinction determines where I go next: a costly refresh needs a different investigation from a slow report interaction.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b10805678273057da6f3236/913a775f-3433-4a7c-a3c9-a85b576ba31e.png" alt="Fabric Capacity Metrics Timepoint Detail showing interactive query operations and their capacity contributions." style="display:block;margin:0 auto" />

<p>In this capture, I am looking at an <strong>F8</strong> capacity. One query operation contributes <strong>29.59% of base capacity</strong> in the selected timepoint.</p>
<p>That gives me a place to investigate. It does not, by itself, mean the capacity is overloaded or prove which visual generated the operation.</p>
<p>I note the workspace, item, operation times, duration, CU seconds, and throttling information. I then correlate those details with the report activity. Smoothing affects timepoint attribution, so I do not expect every operation's start time to fall inside the displayed timepoint.</p>
<p>The two pages I use here are documented in the <a href="https://learn.microsoft.com/en-us/fabric/enterprise/metrics-app-timepoint-page">Timepoint guide</a> and <a href="https://learn.microsoft.com/en-us/fabric/enterprise/metrics-app-timepoint-item-detail-page">Timepoint Item Detail guide</a>.</p>
<blockquote>
<p>High utilization is a reason to investigate the workload, not an automatic instruction to increase capacity.</p>
</blockquote>
<h2>Step 3: Find the visual responsible for the slow interaction</h2>
<p>Once the investigation points to a Power BI report or model, I open it in Desktop.</p>
<p>For this example, I open the PBIP, set <code>DataFolder</code> to the folder containing the demo data, and refresh. On <strong>01 - Slow overview</strong>, I use the large matrix showing rounded sales by category and month.</p>
<p>I capture its performance as follows:</p>
<ol>
<li>Set Year and Region to <strong>All</strong> for the initial comparison.</li>
<li>Select <strong>Optimize &gt; Performance Analyzer</strong>.</li>
<li>Select <strong>Start recording</strong>.</li>
<li>Select <strong>Refresh visuals</strong>.</li>
<li>Expand the matrix's entry.</li>
<li>Inspect <strong>DAX query</strong>, <strong>Visual display</strong>, and <strong>Other</strong>.</li>
<li>Select <strong>Copy query</strong> for that matrix.</li>
</ol>
<img src="https://cdn.hashnode.com/uploads/covers/6b10805678273057da6f3236/75228b93-c886-4ead-a9f9-72720e1e1e4a.png" alt="Performance Analyzer with the Rounded sales by category and month matrix expanded, showing its DAX query duration and the highlighted Copy query action." style="display:block;margin:0 auto" />

<p>In this capture, the DAX query takes <strong>6,011 ms</strong> of the visual's <strong>6,352 ms</strong>, which points me toward model execution. I use the highlighted <strong>Copy query</strong> action to take that request into DAX Studio.</p>
<p>I make sure I am copying the matrix query, not a slicer or a diagnostic card.</p>
<p>The breakdown matters. If rendering or other work dominates, changing DAX might not address the main delay. Microsoft's <a href="https://learn.microsoft.com/en-us/power-bi/create-reports/performance-analyzer">Performance Analyzer documentation</a> explains these categories.</p>
<p>I copy the <strong>entire query</strong>. The generated variables, filters, <code>SUMMARIZECOLUMNS</code>, subtotals, and any <code>TOPN</code> are part of what the visual requested.</p>
<p>The measure is the calculation I want to investigate; the copied query preserves the context in which the report uses it.</p>
<h2>Step 4: Run the baseline in DAX Studio</h2>
<p>With the report still open, I launch DAX Studio and confirm that it is connected to the correct model.</p>
<p>Then I:</p>
<ol>
<li>Paste the copied query into a new query tab.</li>
<li>Enable <strong>Server Timings</strong> and <strong>Query Plan</strong>.</li>
<li>Run the query without changing it.</li>
<li>Record the total duration, FE duration, SE duration, SE CPU, and SE query count.</li>
<li>Inspect the scan text and query plan for expensive work.</li>
</ol>
<p>Server Timings tracing requires the relevant server permissions. For a service connection, I verify those permissions rather than assuming that report access also permits tracing.</p>
<p>Here is my baseline capture:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b10805678273057da6f3236/97e826ad-a982-49a2-8769-b1e2774db750.png" alt="DAX Studio baseline showing 5,668 ms total duration, 6 ms FE, 5,662 ms SE, 26,453 ms SE CPU, and four SE queries." style="display:block;margin:0 auto" />

<p>I start with <strong>total duration</strong>, then use the other metrics to understand it.</p>
<table>
<thead>
<tr>
<th>Metric</th>
<th>How I use it</th>
</tr>
</thead>
<tbody><tr>
<td>Total duration</td>
<td>The server-side elapsed time I want to improve.</td>
</tr>
<tr>
<td>FE duration</td>
<td>The displayed Formula Engine component of the execution.</td>
</tr>
<tr>
<td>SE duration</td>
<td>Time attributed to Storage Engine work.</td>
</tr>
<tr>
<td>SE CPU</td>
<td>Supporting evidence about CPU work; it can exceed elapsed time because of parallel execution.</td>
</tr>
<tr>
<td>SE queries</td>
<td>A description of the execution strategy, not a score to minimize in isolation.</td>
</tr>
</tbody></table>
<p>In this capture, FE duration is only <strong>6 ms</strong>, while SE duration is <strong>5,662 ms</strong>. The scan text includes a callback expression involving <code>FORMAT</code>.</p>
<p>That is why I do not diagnose the problem from FE percentage alone. Callback-related work can occur within SE requests, so a low displayed FE duration does not establish that the expression is inexpensive.</p>
<p>The <a href="https://daxstudio.org/docs/features/traces/server-timings-trace/">Server Timing Trace documentation</a> is worth keeping nearby while interpreting these values.</p>
<h2>Step 5: Inspect what the measure is actually doing</h2>
<p>The matrix uses this measure:</p>
<pre><code class="language-dax">Rounded Sales - Slow =
SUMX (
    Sales,
    Sales[Quantity]
        * CURRENCY (
            FORMAT ( Sales[NetPrice], "0.0", "en-US" )
        )
)
</code></pre>
<p>The business rule is to round each unit price to one decimal place, multiply by quantity, and sum the results.</p>
<p>However, the expression converts the price into formatted text and then converts that text back into a number:</p>
<p><strong>Number -&gt; formatted text -&gt; number -&gt; multiplication</strong></p>
<p>Across a large fact table, that is extra work for a calculation that can stay numeric.</p>
<p>I replace it with:</p>
<pre><code class="language-dax">Rounded Sales - Fast =
SUMX (
    Sales,
    Sales[Quantity] * ROUND ( Sales[NetPrice], 1 )
)
</code></pre>
<p>I still round the unit price before multiplying by quantity. I leave display formatting to the measure's format string, <code>#,0.00</code>.</p>
<p>This is not a rule against <code>FORMAT</code>. It is a distinction between <strong>formatting for presentation</strong> and <strong>calculating a numeric result</strong>.</p>
<p>I also preserve the order of the business calculation. Rounding the final aggregated sales amount would be a different rule.</p>
<p>Because text parsing, numeric types, locale, and rounding boundaries can affect results, I validate the replacement against the data rather than assuming that similar-looking expressions are always equivalent.</p>
<h2>Step 6: Compare the same request with one changed calculation</h2>
<p>For a cleaner experiment, I duplicate the captured query instead of copying a second query from another page.</p>
<p>Inside its existing <code>DEFINE</code> section, before the existing <code>VAR</code> declarations, I add this query-scoped measure:</p>
<pre><code class="language-dax">MEASURE Sales[Rounded Sales - Slow] =
    SUMX (
        Sales,
        Sales[Quantity] * ROUND ( Sales[NetPrice], 1 )
    )
</code></pre>
<p>If there is no <code>DEFINE</code> section, I prepend <code>DEFINE</code> followed by that definition. If the query already defines the same measure, I replace its definition rather than adding a duplicate.</p>
<p>I leave everything else unchanged: filters, grouping, totals, <code>TOPN</code>, <code>EVALUATE</code>, and ordering.</p>
<p>The name stays <code>Rounded Sales - Slow</code> because I am temporarily substituting the calculation used by the original request. <strong>This override applies only to the query; it does not save a change to the model.</strong></p>
<h3>Check the answers</h3>
<p>With both saved measures available, this is a quick grand-total comparison:</p>
<pre><code class="language-dax">EVALUATE
ROW (
    "Original", [Rounded Sales - Slow],
    "Numeric", [Rounded Sales - Fast],
    "Difference",
        [Rounded Sales - Slow] - [Rounded Sales - Fast]
)
</code></pre>
<p>A matching grand total is only the first check. I also compare detail cells, category and month subtotals, slicer combinations, blank results, and rounding edge cases. Any tolerance needs to match the business requirement.</p>
<h3>Check the timing fairly</h3>
<p>I compare cold-cache runs with cold-cache runs and warm-cache runs with warm-cache runs. I keep filters and query shape consistent and use several executions rather than selecting the best single result.</p>
<p>In DAX Studio, <strong>Advanced &gt; Run Benchmark</strong> can automate repeated cold and warm runs. Its <a href="https://daxstudio.org/docs/features/run-benchmark/">benchmark documentation</a> explains how cache clearing works. I use that functionality in a controlled environment, not casually against a shared production model.</p>
<h2>Step 7: Read the before-and-after result</h2>
<p>Here is the capture for the numeric calculation:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b10805678273057da6f3236/43513595-2321-4dd4-8183-3c0f7e55752e.png" alt="DAX Studio numeric calculation showing 250 ms total duration, 10 ms FE, 240 ms SE, 1,141 ms SE CPU, and one SE query." style="display:block;margin:0 auto" />

<p>My recorded executions show:</p>
<table>
<thead>
<tr>
<th>Metric</th>
<th align="right">Text-conversion calculation</th>
<th align="right">Numeric calculation</th>
</tr>
</thead>
<tbody><tr>
<td>Total duration</td>
<td align="right">5,668 ms</td>
<td align="right">250 ms</td>
</tr>
<tr>
<td>FE duration</td>
<td align="right">6 ms</td>
<td align="right">10 ms</td>
</tr>
<tr>
<td>SE duration</td>
<td align="right">5,662 ms</td>
<td align="right">240 ms</td>
</tr>
<tr>
<td>SE CPU</td>
<td align="right">26,453 ms</td>
<td align="right">1,141 ms</td>
</tr>
<tr>
<td>SE queries</td>
<td align="right">4</td>
<td align="right">1</td>
</tr>
</tbody></table>
<p>The total duration drops by approximately <strong>95.6%</strong>.</p>
<p>FE duration increases slightly, but the overall query is much faster. That is the outcome I care about: the same required result with less elapsed execution time.</p>
<p>I also notice that <code>CallbackDataID</code> still appears in the numeric calculation's scan text, now involving <code>ROUND</code>. I am not claiming that every callback disappeared; the expensive text-formatting round trip is what I removed.</p>
<p>These are individual recorded executions, not a guaranteed speedup for every model. I use repeated, cache-matched runs to judge repeatability rather than treating two screenshots as a complete benchmark.</p>
<h2>Step 8: Review the model with Tabular Editor BPA</h2>
<p>After investigating the query, I take a broader look at the semantic model. This is where <strong>Best Practice Analyzer</strong> complements DAX Studio.</p>
<p>DAX Studio shows me runtime behavior. BPA checks model metadata against rules.</p>
<h3>Load the rules and open BPA</h3>
<p>With Tabular Editor connected to my Desktop model:</p>
<ol>
<li>Select <strong>Tools &gt; Manage BPA Rules</strong>.</li>
<li>Review the effective rule collections.</li>
<li>If Microsoft's rule collection is not already included, select <strong>Add &gt; Include Rule File from URL</strong>.</li>
<li>Add the <a href="https://raw.githubusercontent.com/microsoft/Analysis-Services/master/BestPracticeRules/BPARules.json">Microsoft Best Practice Rules JSON</a>.</li>
<li>Close the rules dialog and press <strong>F10</strong>, or click the issue count, to open BPA.</li>
<li>Expand a rule and double-click a flagged object to inspect it.</li>
</ol>
<p>I use a trusted rule source and review it before applying suggested fixes. The <a href="https://github.com/microsoft/Analysis-Services/tree/master/BestPracticeRules">Microsoft rule repository</a> explains the collection.</p>
<p>For interface details, I refer to <a href="https://docs.tabulareditor.com/en/features/using-bpa.html">Using the Best Practice Analyzer</a>. The <a href="https://docs.tabulareditor.com/en/features/built-in-bpa-rules.html">built-in rules documentation</a> describes Tabular Editor 3's included collection; I do not assume that collection ships identically with Tabular Editor 2.</p>
<h3>What I see in this model</h3>
<img src="https://cdn.hashnode.com/uploads/covers/6b10805678273057da6f3236/54b70013-64d7-47af-add4-8e5e697864ec.png" alt="Tabular Editor 2 Best Practice Analyzer showing 29 flagged entries across eight rules, including performance, maintenance, and formatting recommendations." style="display:block;margin:0 auto" />

<p>My screenshot shows <strong>29 flagged entries across eight best-practice rules</strong>. The visible findings include recommendations about MDX availability, Power Query transformations, unnecessary columns, missing descriptions, and formatting.</p>
<p>I treat that list as a review queue, not a list of changes to apply blindly.</p>
<p>For example, I check whether a flagged column is actually unused before removing it, including sort-by and other dependencies. I review MDX-related settings against client requirements. I also check whether a formatting recommendation makes sense for the measure: a rounded sales amount should retain the precision the business expects.</p>
<p>Missing descriptions are useful maintenance findings, but adding them does not prove a query will run faster. Likewise, a Power Query recommendation needs to be assessed against the actual source and transformation design.</p>
<p>I investigate relevant findings, make targeted changes, and rerun the affected report or query. <strong>The issue count is not a performance benchmark, and BPA did not diagnose the expensive</strong> <code>FORMAT</code> <strong>expression for me.</strong></p>
<h2>Step 9: Return to the report and reassess capacity</h2>
<p>Once the calculation is validated, I use the saved numeric measure in the report. In this project, it is already used on <strong>02 - Optimized overview</strong>.</p>
<p>I then:</p>
<ol>
<li>Match the Year and Region selections to the baseline.</li>
<li>Rerun Performance Analyzer for the matrix.</li>
<li>Check both query time and the visible report experience.</li>
<li>Publish through the normal deployment process.</li>
<li>Repeat representative interactions in the service.</li>
<li>Return to Capacity Metrics and compare the relevant operations, utilization, and throttling under comparable workload conditions.</li>
</ol>
<p>A faster Desktop query does not automatically mean an equivalent percentage reduction in Fabric CU consumption or cost. I need service-side measurements, including concurrency and other workloads, before making that claim.</p>
<p>If sustained pressure remains after the relevant workload improvements, capacity sizing becomes a better-informed discussion. Optimization and scaling are not competing goals; the investigation helps me decide which is needed.</p>
<h2>My takeaway</h2>
<p>I do not start a slow-report investigation by rewriting every measure or increasing capacity.</p>
<p>I follow the evidence:</p>
<p><strong>Capacity Metrics -&gt; Timepoint -&gt; Item -&gt; Performance Analyzer -&gt; DAX Studio -&gt; Model review -&gt; Reassess capacity</strong></p>
<p>In this example, the important change was simple: keep a numeric calculation numeric. The larger lesson is to identify the work, preserve the business result, and measure whether the change actually helps.</p>
<h2>Links I use alongside this walkthrough</h2>
<h3>DAX Studio setup and query analysis</h3>
<ul>
<li><a href="https://daxstudio.org/downloads/">Download DAX Studio</a></li>
<li><a href="https://daxstudio.org/docs/installation/index/">Installation options</a></li>
<li><a href="https://daxstudio.org/docs/tutorials/getting-connected/">Connecting to Power BI Desktop</a></li>
<li><a href="https://www.youtube.com/watch?v=jScicVBrr0s">External Tools missing in Power BI Desktop</a></li>
<li><a href="https://www.youtube.com/watch?v=7riWWVMMegE">How to compare Server Timings using DAX Studio</a></li>
<li><a href="https://www.youtube.com/watch?v=C5HBhlLUFsE&amp;t=631s">Analyzing a slow report query in DAX Studio</a></li>
<li><a href="https://www.youtube.com/watch?v=eABg872TAJU">Debugging a slow Power BI report with Phil Seamark</a></li>
<li><a href="https://daxstudio.org/docs/features/traces/server-timings-trace/">Server Timing Trace reference</a></li>
<li><a href="https://daxstudio.org/docs/features/run-benchmark/">Run Benchmark</a></li>
</ul>
<h3>Tabular Editor and model practices</h3>
<ul>
<li><a href="https://docs.tabulareditor.com/en/getting-started/Getting-Started-te2.html">Getting started with Tabular Editor 2</a></li>
<li><a href="https://docs.tabulareditor.com/en/features/using-bpa.html">Using the Best Practice Analyzer</a></li>
<li><a href="https://docs.tabulareditor.com/en/features/built-in-bpa-rules.html">Built-in BPA rules for Tabular Editor 3</a></li>
<li><a href="https://github.com/microsoft/Analysis-Services/tree/master/BestPracticeRules">Microsoft Best Practice Rules</a></li>
<li><a href="https://www.youtube.com/watch?v=1Qan0_VmZRw">Best Practice Analyzer walkthrough</a></li>
</ul>
<h3>DAX function references</h3>
<ul>
<li><a href="https://learn.microsoft.com/en-us/dax/format-function-dax">FORMAT</a></li>
<li><a href="https://learn.microsoft.com/en-us/dax/round-function-dax">ROUND</a></li>
</ul>
]]></content:encoded></item><item><title><![CDATA[My DAX Studio Notes: Server Timings and VertiPaq Analyzer]]></title><description><![CDATA[Finding out what's really slowing down a Power BI report]]></description><link>https://thepracticalarchitect.hashnode.dev/my-dax-studio-notes-server-timings-and-vertipaq-analyzer</link><guid isPermaLink="true">https://thepracticalarchitect.hashnode.dev/my-dax-studio-notes-server-timings-and-vertipaq-analyzer</guid><category><![CDATA[dax studio]]></category><category><![CDATA[best practice]]></category><category><![CDATA[Power BI]]></category><category><![CDATA[microsoft fabric]]></category><category><![CDATA[power bi report]]></category><category><![CDATA[Server Timings]]></category><category><![CDATA[vertipaq-analyzer]]></category><category><![CDATA[PERFormance analyzer]]></category><dc:creator><![CDATA[Damilola Oyetunji]]></dc:creator><pubDate>Wed, 02 Dec 2026 22:42:42 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6b10805678273057da6f3236/126c6ab7-fd3e-4993-989b-5620f31eb576.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When a Power BI report is slow, it's tempting to start rewriting measures and hope something sticks. DAX Studio takes the guesswork out. It's a free tool (<a href="https://daxstudio.org/">daxstudio.org</a>) that shows you exactly what the engine is doing when a visual runs, and two of its features do most of the heavy lifting for me: <strong>Server Timings</strong> and <strong>VertiPaq Analyzer</strong>.</p>
<p>This is the first post in my DAX Studio Notes series. It covers both features: what to look at, what the numbers mean and what to do about them. Much of this I picked up from two videos worth watching alongside this post: SQLBI's <a href="https://www.youtube.com/watch?v=C5HBhlLUFsE&amp;t=631s">Analyzing a slow report query in DAX Studio</a> and Guy in a Cube's <a href="https://www.youtube.com/watch?v=eABg872TAJU">Debugging a slow Power BI report with Phil Seamark</a>.</p>
<h2>Before you start: capture the slow query</h2>
<ol>
<li>In Power BI Desktop, open <strong>Performance Analyzer</strong>, start recording and refresh the slow visual.</li>
<li>Select <strong>Copy query</strong> for that visual.</li>
<li>Open DAX Studio, connect to the model and paste the query.</li>
<li>Turn on <strong>Server Timings</strong> in the ribbon, select <strong>Clear Cache</strong>, then <strong>Run</strong>.</li>
</ol>
<p>Clearing the cache first means you're measuring what a user experiences on their first click, not a result the engine already had in memory.</p>
<h2>Part 1: Server Timings</h2>
<img src="https://cdn.hashnode.com/uploads/covers/6b10805678273057da6f3236/476c82be-9d3c-4681-9634-bf5ddfbce160.png" alt="" style="display:block;margin:0 auto" />

<img src="https://cdn.hashnode.com/uploads/covers/6b10805678273057da6f3236/7dd8ad29-6612-444d-81fe-217d40d0f71f.png" alt="" style="display:block;margin:0 auto" />

<p>Every DAX query is handled by two engines working together:</p>
<ul>
<li><strong>Storage Engine (SE)</strong> retrieves the data. It scans the compressed columns in memory and it's multi-threaded, so it can do a lot of work in parallel.</li>
<li><strong>Formula Engine (FE)</strong> does the thinking. It sends requests to the storage engine, then applies whatever logic the storage engine can't, working through those results in memory. It's single-threaded.</li>
</ul>
<p>That's why the <a href="https://daxstudio.org/docs/features/traces/server-timings-trace/">DAX Studio documentation</a> suggests, as a rough rule, getting your queries to spend more of their time in the storage engine.</p>
<h3>What to look at, in order</h3>
<blockquote>
<p><strong>A note on the numbers.</strong> The thresholds in this post (fewer than 20 SE queries, 120 ms of FE time, 5,000 rows) are my personal rules of thumb, not official limits. I've seen reports go well past them and perform perfectly fine because the queries behind them are genuinely complex. Use the numbers as flags that tell you where to look, not as pass/fail tests. As long as you know you've put in the work to optimize the report, they aren't a hard rule.</p>
</blockquote>
<p><strong>1. Total time and the FE/SE split.</strong> In the example above, the query took 214,624 ms (about 3.6 minutes), and 65.5% of that was spent in the single-threaded formula engine. That's the first clue.</p>
<p><strong>2. SE Queries: the number of trips.</strong> Each storage engine query is a trip to go and get data, so the fewer trips you make, the more efficient the query. My personal rule of thumb is to aim for fewer than 20. This example made 2,731. The SE Cache figure (1,715 hits, or 62.8%) tells the rest of the story: scroll through the scans and you'll see the same query returned over and over again.</p>
<p><strong>3. Formula engine duration.</strong> My personal rule of thumb is that once FE time goes past 120 ms, it deserves a closer look. The example above spent 140,485 ms there. There's no official "good" number for FE or SE time, so beyond that I judge it by the split and the pattern: if most of the time sits in the single-threaded formula engine, or the same scans keep repeating, that's where I dig in. For DirectQuery reports, Microsoft's <a href="https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-directquery-about">DirectQuery guidance</a> aims for common visual refresh times under 5 seconds.</p>
<p><strong>4. Rows: the 5,000-row flag.</strong> Sort by the Rows column and focus on anything above 5,000. Big row counts mean the storage engine is handing a large intermediate table to the formula engine, which then has to work through it on a single thread.</p>
<blockquote>
<p><strong>Why 5,000?</strong> Power BI runs an Analysis Services engine (VertiPaq) behind the scenes, not the SQL Server database engine, so for an import model this is a practical threshold rather than a hard engine limit. It does echo a real SQL Server behavior, though: once a single statement holds roughly 5,000 locks on one table, SQL Server tries to <a href="https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/performance/resolve-blocking-problems-caused-lock-escalation">escalate them to a single table lock</a>, which can block other users. That matters whenever the work is pushed down to SQL Server: DirectQuery at report time, or folded Power Query steps at refresh time.</p>
</blockquote>
<p><strong>5. The longest-running query.</strong> Sort by Duration and click the slowest query. The text you see is xmSQL, a readable version of what the formula engine asked the storage engine for. A few patterns to watch for:</p>
<ul>
<li><strong>Joins.</strong> The query in my example has three left joins. Each side of a join has to be built first, and only then joined.</li>
<li><strong>Exclusions.</strong> Every exclusion adds an extra scan. In effect, the engine is saying "scan everything, then exclude this, then exclude that."</li>
<li><strong>Temp tables.</strong> Lines like <code>DEFINE TABLE '$TTable3' := ...</code> mean the engine is building temporary tables on the fly and then joining them together.</li>
</ul>
<h3>What to do about it</h3>
<p>Once you can see what the query is doing, ask one question: <strong>could this run in the backend instead, so Power BI only gets the result?</strong> If the heavy lifting is joins, exclusions and temp tables built at query time, moving that logic upstream (into the source, a view or a pre-aggregated table) often beats tweaking the DAX. You can't run the xmSQL itself; the goal is to move the logic, not copy the query.</p>
<h2>Part 2: VertiPaq Analyzer</h2>
<p>Server Timings tells you how a query ran. VertiPaq Analyzer tells you why the model behaves the way it does: table and column sizes, cardinality, encoding and relationship health. In DAX Studio, go to <strong>Advanced &gt; View Metrics</strong>.</p>
<h3>RI violations</h3>
<img src="https://cdn.hashnode.com/uploads/covers/6b10805678273057da6f3236/eadb1056-4ddf-4d9c-984d-aa6f6d1ef812.png" alt="" style="display:block;margin:0 auto" />

<p><strong>RI Violations</strong> on the Tables tab counts the relationships with referential integrity problems: rows on the "many" side whose key doesn't exist in this table. When that happens, the engine adds an extra blank row to the table so those orphaned rows have somewhere to land. In my model the top table shows 3, which means three relationships where the keys don't line up and three places the engine has to account for that blank row.</p>
<p>The most visible symptom is (Blank) showing up in your visuals. Treat these as data quality issues first; how much they cost you in performance depends on the model.</p>
<h3>Missing keys</h3>
<img src="https://cdn.hashnode.com/uploads/covers/6b10805678273057da6f3236/d9d2f53a-3c66-454c-a044-35c124efc207.png" alt="" style="display:block;margin:0 auto" />

<p>The <strong>Relationships</strong> tab shows where those problems come from:</p>
<ul>
<li><strong>Missing Keys</strong>: distinct key values on the "many" side with no match on the "one" side.</li>
<li><strong>Invalid Rows</strong>: how many rows carry those unmatched keys.</li>
</ul>
<p>Missing keys cause bad joins (rows end up under (Blank) instead of the right item) and can make the engine do more work than it should. Expand a row to see the individual relationships.</p>
<h3>Cardinality and compression</h3>
<p>Cardinality is the number of unique values in a column, and it drives almost everything in VertiPaq: the higher the cardinality, the harder the column is to compress. If you're running DISTINCTCOUNT over columns like these, BI Gorilla's <a href="https://gorilla.bi/dax/optimize-distinctcount/#distinct-count-versions">Optimizing the Performance of DISTINCTCOUNT in DAX</a> is a great next read.</p>
<h3>Encoding: how VertiPaq compresses your data</h3>
<img src="https://cdn.hashnode.com/uploads/covers/6b10805678273057da6f3236/67a63550-5b24-4cdd-99f4-64430f67d89d.png" alt="" style="display:block;margin:0 auto" />

<p><strong>Encoding tells you how VertiPaq decided to represent the values in a column internally.</strong> You'll commonly see two values in the Encoding column of VertiPaq Analyzer:</p>
<ul>
<li><strong>VALUE</strong> encoding is available for numeric data when VertiPaq can efficiently encode the values based on their numeric characteristics.</li>
<li><strong>HASH</strong> encoding uses dictionary-based encoding. VertiPaq stores the distinct values in a dictionary and uses encoded references internally. This makes <strong>cardinality and dictionary size</strong> particularly important when investigating HASH-encoded columns.</li>
</ul>
<p>HASH isn't inherently bad. The thing to investigate is a HASH-encoded column with <strong>very high cardinality and a large dictionary</strong>, because that's where model size can become expensive.</p>
<p><strong>Further reading:</strong> <a href="https://docs.sqlbi.com/vertipaq-analyzer/excel-metrics/column">VertiPaq Analyzer column metrics</a> | <a href="https://www.sqlbi.com/articles/optimizing-high-cardinality-columns-in-vertipaq/">Optimizing High Cardinality Columns in VertiPaq</a></p>
<p>Here's how each one works, along with run-length encoding (RLE), which VertiPaq applies on top.</p>
<p><strong>Value encoding</strong> is for numeric columns. Instead of storing each number in full, VertiPaq stores it as an offset from a base value, so each value needs fewer bits and there's no dictionary to maintain. Less storage, and faster.</p>
<table>
<thead>
<tr>
<th>Original value</th>
<th>Base value</th>
<th>Stored as</th>
</tr>
</thead>
<tbody><tr>
<td>1001</td>
<td>1000</td>
<td>1</td>
</tr>
<tr>
<td>1003</td>
<td>1000</td>
<td>3</td>
</tr>
<tr>
<td>1004</td>
<td>1000</td>
<td>4</td>
</tr>
</tbody></table>
<p><strong>Dictionary (hash) encoding</strong> shows up as HASH. VertiPaq builds a dictionary of the distinct values and stores a small integer for each row instead of the value itself.</p>
<table>
<thead>
<tr>
<th>Dictionary</th>
<th>Column stores</th>
</tr>
</thead>
<tbody><tr>
<td>1 = Open, 2 = Closed, 3 = Pending</td>
<td>1, 2, 1, 3, 1</td>
</tr>
</tbody></table>
<p>It's powerful when a column has few unique values, like a Status column, and poor for near-unique columns like transaction IDs, where the dictionary ends up almost as big as the column itself. You can see the difference in my screenshot: the VALUE-encoded column at the top has a 136-byte dictionary, while the HASH-encoded columns below it carry dictionaries of roughly 21.7 to 71.5 million bytes. Notice that one of those HASH columns is an Int64, too: numbers aren't guaranteed value encoding, and columns used in relationships are hash encoded.</p>
<p><strong>Run-length encoding (RLE)</strong> stores each value once, along with how many times it repeats in a row.</p>
<table>
<thead>
<tr>
<th>Column values</th>
<th>Stored as</th>
</tr>
</thead>
<tbody><tr>
<td>East, East, East, East, West, West, West</td>
<td>(East, 4), (West, 3)</td>
</tr>
</tbody></table>
<p>This is where sort order matters. RLE works best when data is sorted well and has few unique values. VertiPaq picks the sort order itself during processing, so you can't control it directly, but fewer columns and lower cardinality give it more to work with.</p>
<h2>Quick checklist</h2>
<p>Use these as prompts, not pass/fail tests:</p>
<ul>
<li><strong>FE/SE split:</strong> is most of the time in the single-threaded formula engine? Is FE time over 120 ms?</li>
<li><strong>SE Queries:</strong> under 20? Is the same scan repeating?</li>
<li><strong>Rows:</strong> any scans returning more than 5,000 rows?</li>
<li><strong>Slowest query:</strong> joins, exclusions or temp tables? Could this logic run in the backend?</li>
<li><strong>VertiPaq Analyzer:</strong> any RI violations or missing keys?</li>
<li><strong>Columns:</strong> which high-cardinality columns are taking up the most space, and how are they encoded?</li>
</ul>
<p>Start with Server Timings to find where the time goes, then use VertiPaq Analyzer to understand why. Between the two, you'll spend a lot less time guessing.</p>
]]></content:encoded></item></channel></rss>