<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Behnia Zarei: Azure, Fabric and Power BI</title>
  <subtitle>Patterns with their code, the Microsoft data exams and the terms they use.</subtitle>
  <link href="https://data.benibix.com/blog/"/>
  <link rel="self" href="https://data.benibix.com/blog/feed.xml"/>
  <id>https://data.benibix.com/blog/</id>
  <updated>2026-11-23T12:00:00Z</updated>
  <author><name>Behnia Zarei</name><uri>https://data.benibix.com/about/</uri></author>
  <entry>
    <title>ALLSELECTED in DAX: percent of what is selected</title>
    <link href="https://data.benibix.com/blog/allselected-dax/"/>
    <id>https://data.benibix.com/blog/allselected-dax/</id>
    <published>2026-11-23T12:00:00Z</published>
    <updated>2026-11-23T12:00:00Z</updated>
    <summary>How ALLSELECTED works in DAX, removing the filters of the visual's rows and columns while keeping slicers and page filters, percent of visible total, running totals and ranks over the selection, ALL against ALLSELECTED side by side, and where ALLSELECTED surprises.</summary>
    <category term="DAX"/>
    <category term="Filter functions"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;code&gt;ALLSELECTED&lt;/code&gt; removes the filters that come from the &lt;strong&gt;rows and columns of the visual&lt;/strong&gt; but keeps the filters from &lt;strong&gt;outside&lt;/strong&gt;: slicers, page and report filters, cross-filtering from other visuals. Inside &lt;code&gt;CALCULATE&lt;/code&gt; it gives &amp;quot;the total of what the reader selected&amp;quot;, so a share adds to 100% within the visual. With a column (&lt;code&gt;ALLSELECTED ( 'Product'[Product] )&lt;/code&gt;) it also returns the selected values as a table, for ranks and averages over the selection.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ALL&lt;/code&gt; gives the share of everything that exists. Readers who pick three products in a slicer expect the three shares to add up to 100%. That is &lt;code&gt;ALLSELECTED&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;how-do-all-and-allselected-differ&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-all-and-allselected-differ&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do ALL and ALLSELECTED differ?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;% of All = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt; ) ) )

% of Selected = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt; ) ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Product&lt;/th&gt;&lt;th&gt;Revenue&lt;/th&gt;&lt;th&gt;% of All&lt;/th&gt;&lt;th&gt;% of Selected&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Mountain-200&lt;/td&gt;&lt;td&gt;900&lt;/td&gt;&lt;td&gt;31%&lt;/td&gt;&lt;td&gt;37%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Road-150&lt;/td&gt;&lt;td&gt;1,200&lt;/td&gt;&lt;td&gt;41%&lt;/td&gt;&lt;td&gt;50%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bottle&lt;/td&gt;&lt;td&gt;320&lt;/td&gt;&lt;td&gt;11%&lt;/td&gt;&lt;td&gt;13%&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;2,420&lt;/td&gt;&lt;td&gt;83%&lt;/td&gt;&lt;td&gt;100%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;A slicer selects three products; a table shows them&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;All products together make 2,920. &lt;code&gt;% of All&lt;/code&gt; divides by 2,920; &lt;code&gt;% of Selected&lt;/code&gt; by the 2,420 the slicer left.&lt;/p&gt;
&lt;h2 id=&quot;what-does-microsoft-say-it-keeps&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-microsoft-say-it-keeps&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does Microsoft say it keeps?&lt;/h2&gt;
&lt;p&gt;From the reference: &lt;code&gt;ALLSELECTED&lt;/code&gt; &amp;quot;retains all filters explicitly set within the query, and it retains all context filters other than row and column filters&amp;quot;. With one argument it takes a table or a column; with more, columns of the same table. Without arguments, &lt;code&gt;ALLSELECTED ( )&lt;/code&gt; removes the row and column filters of every table, for the grand total of the visual.&lt;/p&gt;
&lt;h2 id=&quot;which-other-measures-use-the-selection&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-other-measures-use-the-selection&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which other measures use the selection?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- rank among the selected products&lt;/i&gt;
Rank in Selection = &lt;i class=&quot;f&quot;&gt;RANKX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- average of the selected months&lt;/i&gt;
Avg Selected Month = &lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- running total over the selected dates&lt;/i&gt;
Running Revenue =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ),
        &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; &amp;lt;= &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
    )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The running total starts at the first date in the date slicer, not at the first date in the model.&lt;/p&gt;
&lt;h2 id=&quot;where-does-allselected-surprise&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-does-allselected-surprise&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where does ALLSELECTED surprise?&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;ALLSELECTED&lt;/code&gt; restores the filter context that was active outside the visual's iteration (the &amp;quot;shadow&amp;quot; filter context). Microsoft's reference describes it as above, and it behaves predictably in measures placed directly in visuals. It gets hard to reason about when:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;it is used inside an &lt;strong&gt;iterator&lt;/strong&gt; (&lt;code&gt;SUMX&lt;/code&gt; with &lt;code&gt;ALLSELECTED&lt;/code&gt; inside the expression), or&lt;/li&gt;&lt;li&gt;a measure with &lt;code&gt;ALLSELECTED&lt;/code&gt; is &lt;strong&gt;called from another measure&lt;/strong&gt; that iterates.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;In those cases the &amp;quot;outer&amp;quot; context may be the iterator's, not the slicers'. Keep &lt;code&gt;ALLSELECTED&lt;/code&gt; in top-level measures, and for complex cases use &lt;a href=&quot;/blog/visual-calculations-power-bi/&quot;&gt;visual calculations&lt;/a&gt; (&lt;code&gt;COLLAPSEALL&lt;/code&gt;), which refer to the visual's structure directly.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Using it in calculated columns.&lt;/strong&gt; There is no visual or slicer at refresh; and in DirectQuery it is not supported in calculated columns or RLS rules.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;ALLSELECTED on the wrong table.&lt;/strong&gt; &lt;code&gt;ALLSELECTED ( 'Product' )&lt;/code&gt; restores product filters only; a region on the rows still filters.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Nesting in iterators.&lt;/strong&gt; Results change in ways that are hard to follow; restructure.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Expecting slicers to be removed.&lt;/strong&gt; They stay; use &lt;code&gt;ALL&lt;/code&gt; or &lt;code&gt;REMOVEFILTERS&lt;/code&gt; to ignore them.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/allselected-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: ALLSELECTED function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/all-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: ALL function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/rankx-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: RANKX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Put &lt;code&gt;% of All&lt;/code&gt; and &lt;code&gt;% of Selected&lt;/code&gt; side by side in a table with a product slicer, and select a few products. &lt;a href=&quot;/blog/all-allexcept-removefilters-dax/&quot;&gt;ALL, ALLEXCEPT and REMOVEFILTERS&lt;/a&gt; covers removing every filter.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Budget variance analysis in Power BI with DAX</title>
    <link href="https://data.benibix.com/blog/budget-variance-kpi/"/>
    <id>https://data.benibix.com/blog/budget-variance-kpi/</id>
    <published>2026-11-23T12:00:00Z</published>
    <updated>2026-11-23T12:00:00Z</updated>
    <summary>How to build budget against actual reports in Power BI, a budget table at month and account grain, variance and variance % with the right sign for revenue and costs, favourable and unfavourable, year to date and full-year forecast, a variance waterfall by cost centre, and the DAX with TREATAS.</summary>
    <category term="KPIs"/>
    <category term="Finance"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;budget variance&lt;/strong&gt; = actual - budget, per account and period. Load the budget as its own table (Year Month, Account, Cost Centre, Amount), connect it to the report with &lt;code&gt;TREATAS&lt;/code&gt; or shared dimensions, and add &lt;strong&gt;Variance&lt;/strong&gt;, &lt;strong&gt;Variance %&lt;/strong&gt; and a &lt;strong&gt;favourable&lt;/strong&gt; flag that knows the account type: more revenue than budget is favourable, more cost is unfavourable. Show year to date against budget, and a &lt;strong&gt;forecast&lt;/strong&gt; (actual to date + budget for the remaining months) against the full-year budget.&lt;/p&gt;
&lt;p&gt;Finance teams spend days on this in spreadsheets each month. In a model with one budget table and five measures, it updates with every refresh.&lt;/p&gt;
&lt;h2 id=&quot;how-does-a-budget-report-look&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-a-budget-report-look&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does a budget report look?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Line&lt;/th&gt;&lt;th&gt;Actual&lt;/th&gt;&lt;th&gt;Budget&lt;/th&gt;&lt;th&gt;Variance&lt;/th&gt;&lt;th&gt;Variance %&lt;/th&gt;&lt;th&gt;Favourable&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Revenue&lt;/td&gt;&lt;td&gt;9,150&lt;/td&gt;&lt;td&gt;9,000&lt;/td&gt;&lt;td&gt;+150&lt;/td&gt;&lt;td&gt;+1.7%&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Cost of goods sold&lt;/td&gt;&lt;td&gt;5,580&lt;/td&gt;&lt;td&gt;5,400&lt;/td&gt;&lt;td&gt;+180&lt;/td&gt;&lt;td&gt;+3.3%&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Staff&lt;/td&gt;&lt;td&gt;1,420&lt;/td&gt;&lt;td&gt;1,450&lt;/td&gt;&lt;td&gt;-30&lt;/td&gt;&lt;td&gt;-2.1%&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Marketing&lt;/td&gt;&lt;td&gt;610&lt;/td&gt;&lt;td&gt;540&lt;/td&gt;&lt;td&gt;+70&lt;/td&gt;&lt;td&gt;+13.0%&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Rent and other&lt;/td&gt;&lt;td&gt;330&lt;/td&gt;&lt;td&gt;330&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;0.0%&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Operating profit&lt;/td&gt;&lt;td&gt;1,210&lt;/td&gt;&lt;td&gt;1,280&lt;/td&gt;&lt;td&gt;-70&lt;/td&gt;&lt;td&gt;-5.5%&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;September year to date (k)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;waterfall&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;waterfall chart: Budget 1,280; Revenue 150; Cost of goods sold -180; Staff 30; Marketing -70; Actual total&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;182&quot; x2=&quot;628&quot; y2=&quot;182&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;186&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;500&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;98&quot; x2=&quot;628&quot; y2=&quot;98&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;102&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;1,000&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;628&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;1,500&lt;/text&gt;&lt;rect x=&quot;69.3&quot; y=&quot;51&quot; width=&quot;61.4&quot; height=&quot;215&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;100&quot; y=&quot;45&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;1,280&lt;/text&gt;&lt;line x1=&quot;130.7&quot; y1=&quot;51&quot; x2=&quot;165.3&quot; y2=&quot;51&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;100&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Budget&lt;/text&gt;&lt;rect x=&quot;165.3&quot; y=&quot;25.8&quot; width=&quot;61.4&quot; height=&quot;25.2&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;196&quot; y=&quot;19.8&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;+150&lt;/text&gt;&lt;line x1=&quot;226.7&quot; y1=&quot;25.8&quot; x2=&quot;261.3&quot; y2=&quot;25.8&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;196&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Revenue&lt;/text&gt;&lt;rect x=&quot;261.3&quot; y=&quot;25.8&quot; width=&quot;61.4&quot; height=&quot;30.2&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;292&quot; y=&quot;19.8&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;-180&lt;/text&gt;&lt;line x1=&quot;322.7&quot; y1=&quot;56&quot; x2=&quot;357.3&quot; y2=&quot;56&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;292&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Cost of goods sold&lt;/text&gt;&lt;rect x=&quot;357.3&quot; y=&quot;51&quot; width=&quot;61.4&quot; height=&quot;5&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;388&quot; y=&quot;45&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;+30&lt;/text&gt;&lt;line x1=&quot;418.7&quot; y1=&quot;51&quot; x2=&quot;453.3&quot; y2=&quot;51&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;388&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Staff&lt;/text&gt;&lt;rect x=&quot;453.3&quot; y=&quot;51&quot; width=&quot;61.4&quot; height=&quot;11.8&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;484&quot; y=&quot;45&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;-70&lt;/text&gt;&lt;line x1=&quot;514.7&quot; y1=&quot;62.7&quot; x2=&quot;549.3&quot; y2=&quot;62.7&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;484&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Marketing&lt;/text&gt;&lt;rect x=&quot;549.3&quot; y=&quot;62.7&quot; width=&quot;61.4&quot; height=&quot;203.3&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;580&quot; y=&quot;56.7&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;1,210&lt;/text&gt;&lt;text x=&quot;580&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Actual&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Operating profit, budget to actual (k)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The waterfall shows each line's effect on profit: favourable variances go up, unfavourable go down.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;Accounts has a Type column (Revenue or Cost). Actuals come from the ledger, the budget from its own table.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Actual = &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( GL, GL&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; * &lt;i class=&quot;f&quot;&gt;RELATED&lt;/i&gt; ( Accounts&lt;i class=&quot;m&quot;&gt;[Sign]&lt;/i&gt; ) )

Budget =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Budget&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;TREATAS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; ), Budget&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; )
)

Variance = &lt;i class=&quot;m&quot;&gt;[Actual]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Budget]&lt;/i&gt;

Variance % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Variance]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Budget]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- positive when good for profit, for colours and the waterfall&lt;/i&gt;
Profit Impact =
&lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Accounts&lt;i class=&quot;m&quot;&gt;[Type]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( Accounts&lt;i class=&quot;m&quot;&gt;[Type]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Revenue&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Variance]&lt;/i&gt;, - &lt;i class=&quot;m&quot;&gt;[Variance]&lt;/i&gt; )
)

Favourable = &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Profit Impact]&lt;/i&gt; &amp;gt;= &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;yes&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;no&amp;quot;&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Budget[Account] and Budget[Cost Centre] relate to the Accounts and Cost Centre dimensions directly (the budget's grain matches them); only the date grain differs, which is what the &lt;code&gt;TREATAS&lt;/code&gt; on Year Month handles. See &lt;a href=&quot;/blog/kpi-actual-target-variance-dax/&quot;&gt;actual vs target&lt;/a&gt; for the general pattern.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-add-year-to-date-and-a-forecast&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-add-year-to-date-and-a-forecast&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you add year to date and a forecast?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Actual YTD = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Actual]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DATESYTD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
Budget YTD = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Budget]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DATESYTD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )

Last Closed Month = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( GL&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( GL ) )

Forecast FY =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Closed = &lt;i class=&quot;f&quot;&gt;EOMONTH&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Last Closed Month]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Yr = &lt;i class=&quot;f&quot;&gt;YEAR&lt;/i&gt; ( Closed )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; ActualPart = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Actual]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt; = Yr, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; &amp;lt;= Closed )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; BudgetRest = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Budget]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt; = Yr, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; &amp;gt; Closed )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; ActualPart + BudgetRest

Budget FY = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Budget]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt; ), &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt; = &lt;i class=&quot;f&quot;&gt;YEAR&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Last Closed Month]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Forecast against Budget FY answers &amp;quot;where will we land if the rest of the year goes to plan?&amp;quot;. Replace the budget part with a re-forecast table when finance updates it.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Signs.&lt;/strong&gt; Revenue and cost variances need opposite colours; use Profit Impact for formatting.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Budgets at a different grain.&lt;/strong&gt; A yearly budget on a monthly report needs phasing (by month weights), not a twelfth each, if the business is seasonal.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Budget versions.&lt;/strong&gt; Keep a Version column (Budget, Forecast 1, Forecast 2) and select one, or totals add versions together.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Open months.&lt;/strong&gt; Comparing the current, unfinished month to its full budget always looks bad; stop actuals at the last closed month.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/treatas-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: TREATAS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-waterfall-charts&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Waterfall charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/datesytd-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DATESYTD function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Load next year's budget as a table at month, account and cost centre, then build the five measures and the waterfall. &lt;a href=&quot;/blog/profit-margin-kpis/&quot;&gt;Profit margins&lt;/a&gt; shows the P&amp;amp;L structure to put them on.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Goals and scorecards in Power BI</title>
    <link href="https://data.benibix.com/blog/goals-scorecards-power-bi/"/>
    <id>https://data.benibix.com/blog/goals-scorecards-power-bi/</id>
    <published>2026-11-23T12:00:00Z</published>
    <updated>2026-11-23T12:00:00Z</updated>
    <summary>What goals and scorecards in the Power BI service are, manual and connected goals, subgoals, tracking cycles, check-ins, status rules and goal-level permissions, the license they need, and how they differ from a KPI visual in a report.</summary>
    <category term="Visuals"/>
    <category term="Cards and KPIs"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;scorecard&lt;/strong&gt; in the Power BI service is a list of &lt;strong&gt;goals&lt;/strong&gt;, each with a current value, a target, an owner, a status and a history. A goal is &lt;strong&gt;connected&lt;/strong&gt; when its value comes from a report visual and refreshes with the semantic model, or &lt;strong&gt;manual&lt;/strong&gt; when people type the value in with &lt;strong&gt;check-ins&lt;/strong&gt;. Goals can have &lt;strong&gt;subgoals&lt;/strong&gt; that roll up, a &lt;strong&gt;tracking cycle&lt;/strong&gt; (daily by default), notes and status rules. Goals are a Pro feature, and a scorecard keeps its data in a semantic model of its own, saved in the workspace next to it.&lt;/p&gt;
&lt;p&gt;A KPI visual sits in one report and shows a number against a target. A scorecard collects the targets the team is measured on from many reports in one place, says who owns each, and keeps the history of check-ins and comments: the difference between a chart and a management routine.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-scorecard-hold&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-scorecard-hold&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a scorecard hold?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Goal&lt;/th&gt;&lt;th&gt;Owner&lt;/th&gt;&lt;th&gt;Current&lt;/th&gt;&lt;th&gt;Target&lt;/th&gt;&lt;th&gt;Status&lt;/th&gt;&lt;th&gt;Due&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Revenue 2026&lt;/td&gt;&lt;td&gt;Head of sales&lt;/td&gt;&lt;td&gt;8.4 M&lt;/td&gt;&lt;td&gt;10.0 M&lt;/td&gt;&lt;td&gt;On track&lt;/td&gt;&lt;td&gt;31 Dec&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Revenue DACH&lt;/td&gt;&lt;td&gt;Sales lead DACH&lt;/td&gt;&lt;td&gt;3.1 M&lt;/td&gt;&lt;td&gt;3.5 M&lt;/td&gt;&lt;td&gt;On track&lt;/td&gt;&lt;td&gt;31 Dec&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Revenue Nordics&lt;/td&gt;&lt;td&gt;Sales lead Nordics&lt;/td&gt;&lt;td&gt;1.2 M&lt;/td&gt;&lt;td&gt;1.8 M&lt;/td&gt;&lt;td&gt;Behind&lt;/td&gt;&lt;td&gt;31 Dec&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;New customers&lt;/td&gt;&lt;td&gt;Head of marketing&lt;/td&gt;&lt;td&gt;1,280&lt;/td&gt;&lt;td&gt;1,500&lt;/td&gt;&lt;td&gt;At risk&lt;/td&gt;&lt;td&gt;31 Dec&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;Ticket backlog under 50&lt;/td&gt;&lt;td&gt;Support lead&lt;/td&gt;&lt;td&gt;64&lt;/td&gt;&lt;td&gt;50&lt;/td&gt;&lt;td&gt;Overdue&lt;/td&gt;&lt;td&gt;30 Sep&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;A sales team's scorecard&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The first line is the parent goal; the two regional lines are subgoals. The last goal's due date has passed without reaching its target.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-create-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-create-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you create one?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;In the Power BI service, open the &lt;strong&gt;Scorecards&lt;/strong&gt; hub and select &lt;strong&gt;New scorecard&lt;/strong&gt;. Name it with the pencil next to the title.&lt;/li&gt;&lt;li&gt;The scorecard is saved to My workspace; move it with &lt;strong&gt;File, Move scorecard&lt;/strong&gt; to a team workspace. The workspace then holds the scorecard and the semantic model with all its goal data.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;New goal&lt;/strong&gt;: name, owner, current value, target, status and due date. To use a goal that exists on another scorecard, link to it instead of creating a copy.&lt;/li&gt;&lt;li&gt;For a &lt;strong&gt;connected&lt;/strong&gt; goal, pick the current value (and target) from a report: choose the report, then the visual and the data point. It refreshes with the report's semantic model.&lt;/li&gt;&lt;li&gt;Optional: add &lt;strong&gt;subgoals&lt;/strong&gt; under a goal, and change the &lt;strong&gt;tracking cycle&lt;/strong&gt; from daily to weekly, monthly or quarterly.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Share&lt;/strong&gt; the scorecard, and use &lt;strong&gt;goal-level permissions&lt;/strong&gt; to restrict which people see or update which goals.&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;manual-or-connected&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#manual-or-connected&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Manual or connected?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;Manual goal&lt;/th&gt;&lt;th&gt;Connected goal&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Value comes from&lt;/td&gt;&lt;td&gt;check-ins typed by people&lt;/td&gt;&lt;td&gt;a report visual&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Updates&lt;/td&gt;&lt;td&gt;at each check-in&lt;/td&gt;&lt;td&gt;with the semantic model's refresh&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;History&lt;/td&gt;&lt;td&gt;the check-ins&lt;/td&gt;&lt;td&gt;collected per tracking cycle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Use for&lt;/td&gt;&lt;td&gt;things not in data yet: project milestones, survey results&lt;/td&gt;&lt;td&gt;anything already in a report&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;Microsoft's notes: only manual goals can be updated by hand, and a manual goal only has a history if people check in regularly. People need edit permission on the scorecard to add check-ins.&lt;/p&gt;
&lt;h2 id=&quot;what-makes-the-value-right&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-makes-the-value-right&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What makes the value right?&lt;/h2&gt;
&lt;p&gt;A connected goal takes its value from a visual, so the measure behind it decides what the goal says. A target that is reached by year end needs a year-to-date value, not this month's:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue YTD = &lt;i class=&quot;f&quot;&gt;TOTALYTD&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )

New Customers YTD =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Customer ID]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;DATESYTD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;KEEPFILTERS&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[First Purchase Year]&lt;/i&gt; = &lt;i class=&quot;f&quot;&gt;YEAR&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;TODAY&lt;/i&gt; () ) )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The same measure in the report and in the goal means the scorecard and the report never disagree. &lt;a href=&quot;/blog/ytd-qtd-mtd-dax/&quot;&gt;YTD, QTD and MTD in DAX&lt;/a&gt; covers the year-to-date measures.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Goals typed in by hand that exist in data.&lt;/strong&gt; Manual goals drift from the reports; connect them.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;No owner.&lt;/strong&gt; A goal nobody checks in on has no history and no notes; name an owner per goal.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The wrong tracking cycle.&lt;/strong&gt; A monthly target tracked daily shows noisy ups and downs; set the cycle to the target's rhythm.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Viewers expected to check in.&lt;/strong&gt; Check-ins need edit permission; plan who updates what.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A scorecard nobody opens.&lt;/strong&gt; Goals work as a routine: review them in the team meeting, from the scorecard.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/service-goals-introduction&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Get started with goals in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/service-goals-create&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create scorecards and manual goals in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/totalytd-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: TOTALYTD function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Pick the five to ten targets the team is measured on, connect each to the report measure that already shows it, give each an owner, and review the scorecard in a regular meeting. &lt;a href=&quot;/blog/what-makes-a-good-kpi/&quot;&gt;What makes a good KPI&lt;/a&gt; helps choose them, and the &lt;a href=&quot;/blog/kpi-visual-power-bi/&quot;&gt;KPI visual&lt;/a&gt; shows a single goal inside a report.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>How do you renew a Microsoft certification for free?</title>
    <link href="https://data.benibix.com/blog/renew-microsoft-certification/"/>
    <id>https://data.benibix.com/blog/renew-microsoft-certification/</id>
    <published>2026-11-23T12:00:00Z</published>
    <updated>2026-11-23T12:00:00Z</updated>
    <summary>How Microsoft certification renewal works in 2026, which certifications expire, the six-month window, the free unproctored open-book assessment, unlimited retakes, what happens if it lapses, and how expert and associate renewals relate.</summary>
    <category term="Exams"/>
    <category term="Exam tips"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; associate, expert and specialty certifications expire after &lt;strong&gt;one year&lt;/strong&gt;. In the &lt;strong&gt;six months&lt;/strong&gt; before expiry, a free, unproctored, open-book &lt;strong&gt;renewal assessment&lt;/strong&gt; opens on Microsoft Learn (about 45 minutes). Pass it and the certification runs one more year from the old expiry date. Retakes are unlimited until it expires. &lt;strong&gt;Fundamentals never expire.&lt;/strong&gt; If you miss the date, you must pass the full exam again.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-timeline&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-timeline&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the timeline?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Pass the exam&lt;/b&gt;&lt;span&gt;the certification starts, valid one year&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Month 6&lt;/b&gt;&lt;span&gt;the renewal window opens, Learn emails you&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Renew&lt;/b&gt;&lt;span&gt;pass the free assessment, any time in the window&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;New expiry&lt;/b&gt;&lt;span&gt;one year after the old expiry date&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One year of an associate certification&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Renewing early costs nothing: the new date counts from the old expiry, not from the day you renew.&lt;/p&gt;
&lt;h2 id=&quot;how-does-the-assessment-differ-from-the-exam&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-the-assessment-differ-from-the-exam&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does the assessment differ from the exam?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;Certification exam&lt;/th&gt;&lt;th&gt;Renewal assessment&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Price&lt;/td&gt;&lt;td&gt;paid&lt;/td&gt;&lt;td&gt;free&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Proctored&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Open book&lt;/td&gt;&lt;td&gt;Learn only, on associate and expert&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Length&lt;/td&gt;&lt;td&gt;100 to 120 minutes&lt;/td&gt;&lt;td&gt;about 45 minutes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Content&lt;/td&gt;&lt;td&gt;the whole skills list&lt;/td&gt;&lt;td&gt;recent changes to the technology&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Retakes&lt;/td&gt;&lt;td&gt;24 hours, then 14 days, five a year&lt;/td&gt;&lt;td&gt;unlimited; then 24 hours between tries after the second&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Exam against renewal assessment&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Prepare with the free modules on your certification's renewal page.&lt;/p&gt;
&lt;h2 id=&quot;which-questions-come-up-most&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-questions-come-up-most&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which questions come up most?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Do expert certifications lapse with their associate?&lt;/strong&gt; No. Each is renewed separately, and an expert does not expire because its prerequisite did.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Can a new exam or a beta renew it?&lt;/strong&gt; No. The renewal assessment is the only way.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;What if the certification is retiring?&lt;/strong&gt; Learn tells you to renew before the retirement date if it comes first.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;GitHub certifications?&lt;/strong&gt; They are valid for two years and are moving to Microsoft's renewal process; GitHub Foundations needs no renewal.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/renew-your-microsoft-certification&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Renew your Microsoft Certification&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/renew-your-microsoft-certification-faq&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Renewal FAQ&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/support/retake-policy&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Exam retake policy&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Open your Learn profile, Certifications, and look for the blue Renew button. Put each expiry date in your calendar six months early.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Managed identity in Azure, explained with Data Factory</title>
    <link href="https://data.benibix.com/blog/managed-identity-azure-data-factory/"/>
    <id>https://data.benibix.com/blog/managed-identity-azure-data-factory/</id>
    <published>2026-11-23T12:00:00Z</published>
    <updated>2026-11-23T12:00:00Z</updated>
    <summary>What a managed identity is, system-assigned or user-assigned, and how Azure Data Factory signs in to storage, Azure SQL and Key Vault with no password.</summary>
    <category term="Azure"/>
    <category term="Storage and access"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;managed identity&lt;/strong&gt; is an identity in Microsoft Entra ID that Azure creates and looks after for a resource, such as a data factory. The resource signs in as itself, so there is no password or key to store, rotate or leak. You give the identity a role on the storage account, a user in the database or access to Key Vault, and the linked service uses it.&lt;/p&gt;
&lt;p&gt;Every key in a connection string is a secret someone can copy. A managed identity removes the secret: Azure hands the factory a short-lived token whenever it needs one.&lt;/p&gt;
&lt;h2 id=&quot;system-assigned-or-user-assigned&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#system-assigned-or-user-assigned&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;System-assigned or user-assigned?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;System-assigned&lt;/b&gt;&lt;ul&gt;&lt;li&gt;created with the resource and deleted with it&lt;/li&gt;&lt;li&gt;one per resource&lt;/li&gt;&lt;li&gt;a data factory has one, named like the factory&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;User-assigned&lt;/b&gt;&lt;ul&gt;&lt;li&gt;a resource of its own&lt;/li&gt;&lt;li&gt;several services can share it&lt;/li&gt;&lt;li&gt;survives when a service is deleted&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Two kinds of managed identity&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;For one data factory, the system-assigned identity is simplest. A user-assigned identity helps when several services need the same access, or when the access must be granted before the service exists.&lt;/p&gt;
&lt;h2 id=&quot;how-does-the-factory-get-access&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-the-factory-get-access&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does the factory get access?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Data factory&lt;/b&gt;&lt;span&gt;signs in as its managed identity&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Storage&lt;/b&gt;&lt;span&gt;a role such as Storage Blob Data Contributor&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Azure SQL&lt;/b&gt;&lt;span&gt;a database user made from the identity&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Key Vault&lt;/b&gt;&lt;span&gt;a role such as Key Vault Secrets User&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One identity, three kinds of access&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In Azure SQL Database, an Entra admin creates a user for the factory and gives it roles:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;CREATE&lt;/i&gt; USER &lt;i class=&quot;m&quot;&gt;[adf-sales-prod]&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; EXTERNAL PROVIDER;
&lt;i class=&quot;k&quot;&gt;ALTER&lt;/i&gt; ROLE db_datareader ADD MEMBER &lt;i class=&quot;m&quot;&gt;[adf-sales-prod]&lt;/i&gt;;
&lt;i class=&quot;k&quot;&gt;ALTER&lt;/i&gt; ROLE db_datawriter ADD MEMBER &lt;i class=&quot;m&quot;&gt;[adf-sales-prod]&lt;/i&gt;;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The linked service then names no password: its authentication type is &lt;strong&gt;System-assigned managed identity&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;The role is granted on the wrong level.&lt;/strong&gt; &lt;em&gt;Owner&lt;/em&gt; or &lt;em&gt;Contributor&lt;/em&gt; on a storage account manages the account but does not read the data. Data access needs a &lt;em&gt;Storage Blob Data&lt;/em&gt; role.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The role takes a while.&lt;/strong&gt; A new role assignment can take a few minutes to apply. A test right after granting can fail and then pass.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too much access.&lt;/strong&gt; Give the identity the narrowest role on the narrowest scope: a container, not the subscription.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Development and production share one identity.&lt;/strong&gt; Each factory has its own; grant each one only its own environment.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What are managed identities for Azure resources?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/data-factory/data-factory-service-identity&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Managed identity for Azure Data Factory&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/data-factory/connector-azure-sql-database&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Copy data to and from Azure SQL Database (managed identity authentication)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/blog/azure-data-factory-git-ci-cd/&quot;&gt;Release Data Factory pipelines like code&lt;/a&gt; keeps the remaining secrets in Key Vault, and the open course &lt;a href=&quot;/courses/upserts-into-azure-sql/&quot;&gt;Upserts into Azure SQL&lt;/a&gt; loads a database the factory can sign in to this way.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Open a .pbix in OneDrive or SharePoint, no Desktop</title>
    <link href="https://data.benibix.com/blog/open-pbix-in-onedrive-sharepoint/"/>
    <id>https://data.benibix.com/blog/open-pbix-in-onedrive-sharepoint/</id>
    <published>2026-11-23T12:00:00Z</published>
    <updated>2026-11-23T12:00:00Z</updated>
    <summary>Power BI files in OneDrive and SharePoint open in the browser, and Power BI Desktop opens, saves and shares them straight from there; both are generally available since November 2026. Who can view what by licence, which files open and which must be downloaded, version history, labels, the system workspaces behind it, and how a team should store shared reports.</summary>
    <category term="Power BI"/>
    <category term="Getting started"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;.pbix&lt;/strong&gt; file stored in OneDrive for work or a SharePoint library opens in the &lt;strong&gt;browser&lt;/strong&gt; when you select it: no Power BI Desktop, no download, with visuals you can click, bookmarks, page view and high contrast colours. From &lt;strong&gt;Power BI Desktop&lt;/strong&gt;, &lt;strong&gt;File, Open&lt;/strong&gt; and &lt;strong&gt;Save as&lt;/strong&gt; go straight to OneDrive and SharePoint, and &lt;strong&gt;Share&lt;/strong&gt; sends a normal Microsoft 365 link. Both are &lt;strong&gt;generally available&lt;/strong&gt; since the November 2026 update and &lt;strong&gt;on by default&lt;/strong&gt;. Viewing in the browser needs a &lt;strong&gt;Power BI Pro, Premium Per User or E5&lt;/strong&gt; licence; files up to &lt;strong&gt;1 GB&lt;/strong&gt; in &lt;strong&gt;import&lt;/strong&gt; mode (or live connected to a published semantic model) open, and files with row-level security must still be downloaded.&lt;/p&gt;
&lt;p&gt;The draft report that lives in a team folder is the most common Power BI file in many companies. Until now, a colleague asked to &amp;quot;have a quick look&amp;quot; had to download it, install Desktop and hope the version matched. Now the same link that opens a Word document opens the report, and the file keeps its version history like any other document.&lt;/p&gt;
&lt;h2 id=&quot;who-can-open-what&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#who-can-open-what&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Who can open what?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Person who selects the link&lt;/th&gt;&lt;th&gt;In the browser&lt;/th&gt;&lt;th&gt;Otherwise&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Power BI Pro, Premium Per User or E5&lt;/td&gt;&lt;td&gt;views the report and the preview&lt;/td&gt;&lt;td&gt;can still download&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Free licence or no Power BI licence&lt;/td&gt;&lt;td&gt;no browser view&lt;/td&gt;&lt;td&gt;downloads and opens in Power BI Desktop&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Guest (B2B) or anonymous user&lt;/td&gt;&lt;td&gt;no browser view&lt;/td&gt;&lt;td&gt;downloads and opens in Power BI Desktop&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;What happens when someone selects the link, by their licence&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The person sharing does not need any Power BI licence for the recipient to view it; what counts is the licence of whoever opens the link. Personal OneDrive accounts and sovereign cloud tenants are not supported, and viewing inside Microsoft Teams is not supported yet.&lt;/p&gt;
&lt;h2 id=&quot;which-files-open-in-the-browser&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-files-open-in-the-browser&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which files open in the browser?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Opens in the browser&lt;/b&gt;&lt;ul&gt;&lt;li&gt;import mode, or live connected to a semantic model in the Power BI service&lt;/li&gt;&lt;li&gt;up to 1 GB&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;red&quot;&gt;&lt;b&gt;Must be downloaded&lt;/b&gt;&lt;ul&gt;&lt;li&gt;DirectQuery and other modes&lt;/li&gt;&lt;li&gt;files with row-level security&lt;/li&gt;&lt;li&gt;files larger than 1 GB&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Opens only for some&lt;/b&gt;&lt;span&gt;encrypted files: only people with full control or export usage rights can open them&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Before you send the link, check the file&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The first time anyone opens a file in the browser, Power BI publishes it behind the scenes into a &lt;strong&gt;system workspace&lt;/strong&gt; on shared capacity, so the first load is slower; after that it is much faster. Admins see these workspaces in the admin portal with &lt;strong&gt;OneDrive&lt;/strong&gt; at the end of the name, and cannot change or delete them there. The data stays in the home tenant region until the file is deleted or has not been opened for a few days.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-save-and-share-from-desktop&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-save-and-share-from-desktop&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you save and share from Desktop?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;&lt;strong&gt;File, Save as, OneDrive&lt;/strong&gt;, pick the folder or SharePoint library from the list of recent places (or &lt;strong&gt;More options&lt;/strong&gt;), set a sensitivity label if your organisation requires one, and save.&lt;/li&gt;&lt;li&gt;Later saves upload in the background; the title bar shows the upload state. For a large file you can choose &lt;strong&gt;Upload later&lt;/strong&gt;, and the upload finishes when you close Desktop.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Share&lt;/strong&gt; (top right) opens the Microsoft 365 share dialog: add people or groups, or &lt;strong&gt;Copy link&lt;/strong&gt;. &lt;strong&gt;Manage access&lt;/strong&gt; shows who has it.&lt;/li&gt;&lt;li&gt;To get back to an older version, select the file name in the title bar, then &lt;strong&gt;Version history&lt;/strong&gt;, or use &lt;strong&gt;Version history&lt;/strong&gt; in the document library.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Only .pbix files can be saved this way, not .pbip projects. Keep Power BI Desktop current: versions from March 2026 or earlier no longer save and share to OneDrive and SharePoint since October 2026.&lt;/p&gt;
&lt;h2 id=&quot;where-should-a-team-keep-its-reports&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-should-a-team-keep-its-reports&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where should a team keep its reports?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;A report people work on together&lt;/b&gt;&lt;span&gt;the source of the decision&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;SharePoint document library&lt;/b&gt;&lt;span&gt;every co-author can open, edit and save; version history for all&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Own OneDrive&lt;/b&gt;&lt;span&gt;fine for drafts and for sharing to view only; others need edit rights on the folder to save&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Power BI service&lt;/b&gt;&lt;span&gt;the published report people use every day, with refresh, apps and audiences&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Where each kind of Power BI file belongs&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The browser view is for looking and checking, not for running a business on. Reports people rely on daily belong in a workspace in the Power BI service, with scheduled refresh, row-level security and an app. The OneDrive or SharePoint file is the source the author edits and publishes from.&lt;/p&gt;
&lt;h2 id=&quot;what-about-security-and-auditing&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-about-security-and-auditing&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What about security and auditing?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Permissions plus labels.&lt;/strong&gt; OneDrive or SharePoint permissions apply first, then the sensitivity label, and the strictest wins. An unlabelled file falls back to the tenant's default Power BI label policy.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Your sharing rules still apply.&lt;/strong&gt; The share dialog enforces the folder's or library's policies and your organisation's sharing settings.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Audit trail in two places.&lt;/strong&gt; Copy, download, move, share and export land in the Microsoft 365 audit log; view and open report land in the Power BI activity log. File activity shows with Workload or EventSource set to OneDrive.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Admins can turn it off.&lt;/strong&gt; Viewing and sharing each have a tenant setting, on by default. With viewing off, readers are sent to download the file.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;&amp;quot;Download to view&amp;quot; for a colleague.&lt;/strong&gt; They have a free licence, are a guest, or the file uses DirectQuery or row-level security. Check the two tables above.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Saving fails after opening from OneDrive.&lt;/strong&gt; Desktop is signed in with a different account than your local OneDrive. Use the same account in both.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Asked to save before sharing a file that is already in OneDrive.&lt;/strong&gt; It was dragged into the synced folder and has not finished syncing; it still counts as a local file.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A SharePoint library missing from the picker.&lt;/strong&gt; Follow the site in SharePoint and restart Power BI Desktop; adding a site by URL is not supported.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Co-authors overwriting each other in a personal OneDrive.&lt;/strong&gt; Move the file to a SharePoint library the whole team can edit.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/collaborate-share/office-integration/service-sharepoint-viewer&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: View Power BI files in OneDrive and SharePoint&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-sharepoint-save-share&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Power BI Desktop OneDrive and SharePoint integration&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/fundamentals/desktop-latest-update&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What's new in Power BI, November 2026&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Move your team's draft reports from personal folders to one SharePoint library, open one in the browser to check it loads, and send the link instead of the file. &lt;a href=&quot;/blog/power-bi-desktop-service-mobile/&quot;&gt;Power BI Desktop, service and mobile&lt;/a&gt; explains which part of Power BI does what, and &lt;a href=&quot;/blog/version-control-power-bi-pbip/&quot;&gt;version control with PBIP&lt;/a&gt; is the next step when a report needs real source control.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Vector search and embeddings in SQL, explained</title>
    <link href="https://data.benibix.com/blog/vector-search-sql-embeddings-explained/"/>
    <id>https://data.benibix.com/blog/vector-search-sql-embeddings-explained/</id>
    <published>2026-11-23T12:00:00Z</published>
    <updated>2026-11-23T12:00:00Z</updated>
    <summary>What embeddings and vector search are, the vector type and VECTOR_DISTANCE in SQL Server 2025, Azure SQL and Fabric, and when exact search is enough.</summary>
    <category term="SQL"/>
    <category term="AI in SQL"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; an &lt;strong&gt;embedding&lt;/strong&gt; is a list of numbers a model makes from a text (or an image) so that similar meanings get similar numbers. &lt;strong&gt;Vector search&lt;/strong&gt; finds the rows whose embeddings are closest to a question's embedding. SQL Server 2025, Azure SQL Database, Azure SQL Managed Instance and SQL database in Fabric have a &lt;code&gt;vector&lt;/code&gt; type and &lt;code&gt;VECTOR_DISTANCE&lt;/code&gt;, so this runs in the database, next to the rows it describes.&lt;/p&gt;
&lt;p&gt;Keyword search finds &amp;quot;bike&amp;quot; only where the word is. Vector search also finds &amp;quot;bicycle&amp;quot; and &amp;quot;e-bike&amp;quot;, because their embeddings sit close together.&lt;/p&gt;
&lt;h2 id=&quot;how-does-a-search-run&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-a-search-run&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does a search run?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Question&lt;/b&gt;&lt;span&gt;&amp;quot;waterproof jacket for cycling&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Embedding&lt;/b&gt;&lt;span&gt;the same model turns it into a vector&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Distance&lt;/b&gt;&lt;span&gt;to every product's stored vector&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Closest rows&lt;/b&gt;&lt;span&gt;the products nearest in meaning&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From a question to the closest rows&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The products' embeddings are made once and stored in a column; only the question is embedded at search time. Both must come from the same model.&lt;/p&gt;
&lt;h2 id=&quot;what-does-it-look-like-in-t-sql&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-it-look-like-in-t-sql&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does it look like in T-SQL?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;ALTER&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;TABLE&lt;/i&gt; dbo.Product ADD DescriptionVector &lt;i class=&quot;f&quot;&gt;vector&lt;/i&gt;(&lt;i class=&quot;n&quot;&gt;1536&lt;/i&gt;);

&lt;i class=&quot;k&quot;&gt;DECLARE&lt;/i&gt; @q &lt;i class=&quot;f&quot;&gt;vector&lt;/i&gt;(&lt;i class=&quot;n&quot;&gt;1536&lt;/i&gt;) = &lt;i class=&quot;f&quot;&gt;AI_GENERATE_EMBEDDINGS&lt;/i&gt;(N&lt;i class=&quot;s&quot;&gt;'waterproof jacket for cycling'&lt;/i&gt; USE MODEL MyEmbeddingModel);

&lt;i class=&quot;k&quot;&gt;SELECT&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;TOP&lt;/i&gt; (&lt;i class=&quot;n&quot;&gt;10&lt;/i&gt;) ProductID, Name,
       &lt;i class=&quot;f&quot;&gt;VECTOR_DISTANCE&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;'cosine'&lt;/i&gt;, @q, DescriptionVector) &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; Distance
&lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; dbo.Product
&lt;i class=&quot;k&quot;&gt;ORDER&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;BY&lt;/i&gt; Distance;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;AI_GENERATE_EMBEDDINGS&lt;/code&gt; calls a model you registered in the database with &lt;code&gt;CREATE EXTERNAL MODEL&lt;/code&gt;; you can also make the embeddings outside and store them. Vectors are stored compactly and shown as JSON arrays, so &lt;code&gt;CAST('[0.1, -0.2, 0.3]' AS vector(3))&lt;/code&gt; works too.&lt;/p&gt;
&lt;h2 id=&quot;exact-search-or-a-vector-index&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#exact-search-or-a-vector-index&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Exact search or a vector index?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Way&lt;/th&gt;&lt;th&gt;How&lt;/th&gt;&lt;th&gt;When&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Exact (kNN)&lt;/td&gt;&lt;td&gt;VECTOR_DISTANCE on every candidate row&lt;/td&gt;&lt;td&gt;up to about 50,000 vectors after other filters&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Approximate (ANN)&lt;/td&gt;&lt;td&gt;a vector index (DiskANN) and VECTOR_SEARCH&lt;/td&gt;&lt;td&gt;far more vectors, when nearly exact is fine&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Two ways to find the nearest vectors&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Start exact: it is always right, and a &lt;code&gt;WHERE&lt;/code&gt; on category or date often brings the candidates under the limit. Add a vector index when the table outgrows it. The &lt;code&gt;vector&lt;/code&gt; type and functions are generally available in all four products; vector indexes are generally available in Azure SQL Database and SQL database in Fabric, and in preview in SQL Server 2025.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Two models.&lt;/strong&gt; Embeddings from different models cannot be compared. Store the model's name with the vectors, and re-embed when you change it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Stale embeddings.&lt;/strong&gt; When a description changes, its vector must too. Re-embed in the same step that updates the row, or from change tracking.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Whole documents in one vector.&lt;/strong&gt; A long text squeezed into one embedding blurs. Split it into chunks and embed each.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/sql-server/ai/vectors&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Vector search and vector indexes in the SQL Database Engine&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/data-types/vector-data-type&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Vector data type&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/functions/vector-distance-transact-sql&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: VECTOR_DISTANCE (Transact-SQL)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/blog/dp-800-study-guide/&quot;&gt;DP-800 in 2026&lt;/a&gt; shows how vector search leads to answering questions from your own rows, and the open course &lt;a href=&quot;/courses/upserts-into-azure-sql/&quot;&gt;Upserts into Azure SQL&lt;/a&gt; builds the kind of table you would add a vector column to.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>AB-900: Copilot and agent administration fundamentals</title>
    <link href="https://data.benibix.com/blog/ab-900-study-guide/"/>
    <id>https://data.benibix.com/blog/ab-900-study-guide/</id>
    <published>2026-11-22T12:00:00Z</published>
    <updated>2026-11-22T12:00:00Z</updated>
    <summary>What the AB-900 Microsoft 365 Copilot and Agent Administration Fundamentals exam measures since October 2026, how its three areas are weighted, who it suits, and a study plan in a Microsoft 365 test tenant.</summary>
    <category term="Exams"/>
    <category term="AI"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; AB-900 earns the &lt;strong&gt;Copilot and Agent Administration Fundamentals&lt;/strong&gt; certification. It covers Microsoft 365 core features and security (30 to 35%), data protection and governance for Microsoft 365 and Copilot (35 to 40%), and basic administration of Copilot and agents (25 to 30%). It is a 45-minute fundamentals exam, you need 700 out of 1,000, and fundamentals certifications do not expire.&lt;/p&gt;
&lt;p&gt;It is for admins and IT staff who must switch Copilot on safely: licences, who can see what, and how to stop Copilot from surfacing files that were overshared.&lt;/p&gt;
&lt;h2 id=&quot;what-does-ab-900-cover&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-ab-900-cover&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does AB-900 cover?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;Microsoft 365 core features and security&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:87.5%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;30-35%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Data protection and governance with Copilot&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;35-40%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;Basic admin tasks for Copilot and agents&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:75.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;25-30%&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;AB-900 skills, by weight in the exam&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Core and security&lt;/strong&gt;: licences and what they unlock, the admin centres, Zero Trust, authentication, Microsoft Entra ID, Conditional Access and single sign-on.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Data protection&lt;/strong&gt;: Microsoft Purview (sensitivity labels, classification, data loss prevention, insider risk), how Copilot reads data through Microsoft Graph and the user's permissions, and finding oversharing in SharePoint with data access governance reports.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Administration&lt;/strong&gt;: what Copilot and agents can do, licence models (monthly or pay-as-you-go), turning features on or off, assigning licences, and controlling who can use which agents.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;why-does-oversharing-matter-so-much&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-does-oversharing-matter-so-much&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why does oversharing matter so much?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li data-tone=&quot;red&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;A file&lt;/b&gt;&lt;span&gt;shared with &amp;quot;everyone in the organisation&amp;quot; years ago&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Permissions&lt;/b&gt;&lt;span&gt;Copilot answers with what the user may open&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Prompt&lt;/b&gt;&lt;span&gt;&amp;quot;what do people in my team earn?&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;red&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;span&gt;the old file is now easy to find&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Fix&lt;/b&gt;&lt;span&gt;find and remove the oversharing, label sensitive files&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Why Copilot finds the salary sheet&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Copilot does not add access; it makes existing access easy to use. That is why the largest area of the exam is data protection.&lt;/p&gt;
&lt;h2 id=&quot;how-would-you-study-for-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-would-you-study-for-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How would you study for it?&lt;/h2&gt;
&lt;p&gt;Use a Microsoft 365 developer or trial tenant: create users and groups, assign licences, add a sensitivity label, run a SharePoint access report, and switch a Copilot feature off and on. Then take the free practice assessment.&lt;/p&gt;
&lt;h2 id=&quot;what-helps-on-the-day&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-helps-on-the-day&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What helps on the day?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Know which admin centre does what.&lt;/strong&gt; Microsoft 365, Exchange, SharePoint, Entra and Purview each own different settings.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Permissions answer most Copilot security questions.&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;No Microsoft Learn during fundamentals exams.&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/ab-900&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam AB-900&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/exams/ab-900/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Exam AB-900&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/renew-your-microsoft-certification&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Renew your Microsoft Certification&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Run a SharePoint data access governance report in a test tenant and fix what it finds. &lt;a href=&quot;/blog/row-level-security-power-bi-explained/&quot;&gt;Row-level security in Power BI&lt;/a&gt; is the same idea in reports: people see only what their permissions allow.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Burn rate and cash runway: formulas and DAX</title>
    <link href="https://data.benibix.com/blog/burn-rate-and-runway-kpi/"/>
    <id>https://data.benibix.com/blog/burn-rate-and-runway-kpi/</id>
    <published>2026-11-22T12:00:00Z</published>
    <updated>2026-11-22T12:00:00Z</updated>
    <summary>How to calculate gross burn, net burn and cash runway for a company that is not yet profitable, a worked example, a three-month average to smooth lumpy months, runway with growing revenue, the DAX on bank or cash-flow data, and a cash balance chart with the zero date.</summary>
    <category term="KPIs"/>
    <category term="Finance"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;gross burn&lt;/strong&gt; is the cash a company spends per month; &lt;strong&gt;net burn&lt;/strong&gt; = cash out - cash in, the monthly fall in the cash balance. &lt;strong&gt;Runway&lt;/strong&gt; = cash balance / net burn, in months: with 1.8M in the bank and a net burn of 150k a month, runway is &lt;strong&gt;12 months&lt;/strong&gt;. Use a &lt;strong&gt;three-month average&lt;/strong&gt; of net burn, because single months are lumpy (annual licences, a big customer payment). When revenue grows each month, simple runway understates the real one; project the cash balance month by month instead.&lt;/p&gt;
&lt;p&gt;For a start-up or a new business unit, runway is the KPI that decides when to raise money or cut costs, and it should be visible every month, not worked out in a spreadsheet once a quarter.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Month&lt;/th&gt;&lt;th&gt;Cash in&lt;/th&gt;&lt;th&gt;Cash out&lt;/th&gt;&lt;th&gt;Net burn&lt;/th&gt;&lt;th&gt;Cash at month end&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Jul&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;td&gt;290&lt;/td&gt;&lt;td&gt;170&lt;/td&gt;&lt;td&gt;2,130&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Aug&lt;/td&gt;&lt;td&gt;140&lt;/td&gt;&lt;td&gt;270&lt;/td&gt;&lt;td&gt;130&lt;/td&gt;&lt;td&gt;2,000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sep&lt;/td&gt;&lt;td&gt;150&lt;/td&gt;&lt;td&gt;350&lt;/td&gt;&lt;td&gt;200&lt;/td&gt;&lt;td&gt;1,800&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;3-month average&lt;/td&gt;&lt;td&gt;137&lt;/td&gt;&lt;td&gt;303&lt;/td&gt;&lt;td&gt;167&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The last three months (k)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;Gross burn (3-month average) = &lt;strong&gt;303k&lt;/strong&gt; a month&lt;/li&gt;&lt;li&gt;Net burn (3-month average) = &lt;strong&gt;167k&lt;/strong&gt; a month&lt;/li&gt;&lt;li&gt;Runway = 1,800 / 167 = &lt;strong&gt;10.8 months&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;On September alone (200k), runway would read 9.0 months; on August alone, 13.8. The average is steadier.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;line&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;line chart: Sep 1,800; Dec 1,300; Mar 800; Jun 300; Aug 0&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;203&quot; x2=&quot;626&quot; y2=&quot;203&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;207&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;500&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;140&quot; x2=&quot;626&quot; y2=&quot;140&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;144&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;1,000&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;77&quot; x2=&quot;626&quot; y2=&quot;77&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;81&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;1,500&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;626&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;2,000&lt;/text&gt;&lt;polyline points=&quot;52,39.2 195.5,102.2 339,165.2 482.5,228.2 626,266&quot; class=&quot;ln ka&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;39.2&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;195.5&quot; cy=&quot;102.2&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;339&quot; cy=&quot;165.2&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;482.5&quot; cy=&quot;228.2&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;266&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;text x=&quot;52&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Sep&lt;/text&gt;&lt;text x=&quot;195.5&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Dec&lt;/text&gt;&lt;text x=&quot;339&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Mar&lt;/text&gt;&lt;text x=&quot;482.5&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jun&lt;/text&gt;&lt;text x=&quot;626&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Aug&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Projected cash balance at the current net burn (k)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;From a cash transactions table (bank lines, with Amount positive in and negative out) related to the Date table:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Cash In = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Cash&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ), Cash&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; )
Cash Out = - &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Cash&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ), Cash&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; &amp;lt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; )

Gross Burn = &lt;i class=&quot;m&quot;&gt;[Cash Out]&lt;/i&gt;
Net Burn = &lt;i class=&quot;m&quot;&gt;[Cash Out]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Cash In]&lt;/i&gt;

Net Burn 3M Avg =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Net Burn]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; ) ),
    &lt;i class=&quot;f&quot;&gt;DATESINPERIOD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), -&lt;i class=&quot;n&quot;&gt;3&lt;/i&gt;, MONTH )
)

Cash Balance =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Cash&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt; ), &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; &amp;lt;= &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) ) )

Runway Months = &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Net Burn 3M Avg]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Cash Balance]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Net Burn 3M Avg]&lt;/i&gt; ) )

Zero Cash Date = &lt;i class=&quot;f&quot;&gt;EDATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;INT&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Runway Months]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;Cash Balance&lt;/code&gt; is a running total from the first transaction (add an opening balance row if the data starts later). &lt;code&gt;Runway Months&lt;/code&gt; is blank when the company is cash-positive: the runway is unlimited.&lt;/p&gt;
&lt;h2 id=&quot;what-if-revenue-is-growing&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-if-revenue-is-growing&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What if revenue is growing?&lt;/h2&gt;
&lt;p&gt;Simple runway assumes this month's burn forever. With revenue growing 5% a month and costs flat, burn shrinks and the real runway is longer. Project month by month in a small table (36 months, revenue growing 5% a month, costs flat):&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Projection =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Start = &lt;i class=&quot;m&quot;&gt;[Cash Balance]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; In0 = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Cash In]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DATESINPERIOD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), -&lt;i class=&quot;n&quot;&gt;3&lt;/i&gt;, MONTH ) ) / &lt;i class=&quot;n&quot;&gt;3&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Out0 = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Cash Out]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DATESINPERIOD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), -&lt;i class=&quot;n&quot;&gt;3&lt;/i&gt;, MONTH ) ) / &lt;i class=&quot;n&quot;&gt;3&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;ADDCOLUMNS&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;GENERATESERIES&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;36&lt;/i&gt; ),
        &lt;i class=&quot;s&quot;&gt;&amp;quot;Cash&amp;quot;&lt;/i&gt;,
            Start
                + &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;GENERATESERIES&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Value]&lt;/i&gt; ), In0 * &lt;i class=&quot;f&quot;&gt;POWER&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;1.05&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Value]&lt;/i&gt; ) - Out0 )
    )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;This is a table expression: create it as a calculated table, or run it with &lt;code&gt;EVALUATE&lt;/code&gt; in &lt;a href=&quot;/blog/dax-query-view-evaluate/&quot;&gt;DAX query view&lt;/a&gt;. The first month where Cash falls below zero is the projected runway. Replace 1.05 with a &lt;a href=&quot;/blog/generateseries-datatable-row-dax/&quot;&gt;what-if parameter&lt;/a&gt; to test other growth rates.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Profit instead of cash.&lt;/strong&gt; Burn is cash: invoices not yet paid and annual prepayments move cash differently from the P&amp;amp;L.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;One-off items.&lt;/strong&gt; An investment round or a tax refund in &amp;quot;cash in&amp;quot; hides the burn; tag financing flows and leave them out of net burn.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A single month.&lt;/strong&gt; Use the three-month average and show the range.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Committed spend.&lt;/strong&gt; Signed contracts (new hires, a lease) raise next months' burn before they show in the data; add them to the projection.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/datesinperiod-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DATESINPERIOD function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/generateseries-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: GENERATESERIES function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/edate-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: EDATE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Load the bank transactions, tag financing flows, and put Net Burn 3M Avg and Runway Months on a card. &lt;a href=&quot;/blog/mrr-arr-kpi/&quot;&gt;MRR and ARR&lt;/a&gt; are the revenue side for subscription businesses.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>CONCATENATEX in DAX: lists of selected values as text</title>
    <link href="https://data.benibix.com/blog/concatenatex-dax/"/>
    <id>https://data.benibix.com/blog/concatenatex-dax/</id>
    <published>2026-11-22T12:00:00Z</published>
    <updated>2026-11-22T12:00:00Z</updated>
    <summary>How CONCATENATEX joins values from a table into one text in DAX, the selected slicer values in a title, top products as a sentence, delimiters and line breaks, sort order (descending by default), limits for long lists, and CONCATENATE and the &amp; operator.</summary>
    <category term="DAX"/>
    <category term="Text and formatting"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;code&gt;CONCATENATEX ( table, expression [, delimiter [, orderBy, order ]] )&lt;/code&gt; evaluates the expression for each row of a table and joins the results into one text: &lt;code&gt;CONCATENATEX ( VALUES ( Customer[Country] ), Customer[Country], &amp;quot;, &amp;quot; )&lt;/code&gt; returns &amp;quot;Austria, Germany, Switzerland&amp;quot;. It is the way to show &lt;strong&gt;which values are selected&lt;/strong&gt; in a title, to list the &lt;strong&gt;top products&lt;/strong&gt; in a sentence, or to build a tooltip line. For two pieces of text, use the &lt;code&gt;&amp;amp;&lt;/code&gt; operator.&lt;/p&gt;
&lt;p&gt;A slicer shows its selection only while it is on the page. Exported, printed or in a subscription email, the reader no longer knows what was filtered. A line built with &lt;code&gt;CONCATENATEX&lt;/code&gt; carries the selection into the title.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-show-the-selected-values&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-show-the-selected-values&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you show the selected values?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Selected Countries =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; N = &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Country]&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Total = &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Country]&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;SWITCH&lt;/i&gt; (
        &lt;i class=&quot;k&quot;&gt;TRUE&lt;/i&gt; (),
        NOT &lt;i class=&quot;f&quot;&gt;ISFILTERED&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Country]&lt;/i&gt; ), &lt;i class=&quot;s&quot;&gt;&amp;quot;All countries&amp;quot;&lt;/i&gt;,
        N &amp;gt; &lt;i class=&quot;n&quot;&gt;3&lt;/i&gt;, N &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot; of &amp;quot;&lt;/i&gt; &amp;amp; Total &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot; countries&amp;quot;&lt;/i&gt;,
        &lt;i class=&quot;f&quot;&gt;CONCATENATEX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Country]&lt;/i&gt; ), Customer&lt;i class=&quot;m&quot;&gt;[Country]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;, &amp;quot;&lt;/i&gt;, Customer&lt;i class=&quot;m&quot;&gt;[Country]&lt;/i&gt;, ASC )
    )

Title = &lt;i class=&quot;s&quot;&gt;&amp;quot;Revenue by month, &amp;quot;&lt;/i&gt; &amp;amp; &lt;i class=&quot;m&quot;&gt;[Selected Countries]&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Slicer selection&lt;/th&gt;&lt;th&gt;Title&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;nothing&lt;/td&gt;&lt;td&gt;Revenue by month, All countries&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Austria, Germany&lt;/td&gt;&lt;td&gt;Revenue by month, Austria, Germany&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;7 countries&lt;/td&gt;&lt;td&gt;Revenue by month, 7 of 24 countries&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;What the title shows&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Use it as a visual's title with &lt;strong&gt;Format, Title, fx&lt;/strong&gt;, field value &lt;code&gt;Title&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-list-the-top-products&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-list-the-top-products&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you list the top products?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Top &lt;i class=&quot;n&quot;&gt;3&lt;/i&gt; Products =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; T = &lt;i class=&quot;f&quot;&gt;TOPN&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;3&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, DESC )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;CONCATENATEX&lt;/i&gt; (
        T,
        &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot; (&amp;quot;&lt;/i&gt; &amp;amp; &lt;i class=&quot;f&quot;&gt;FORMAT&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#,0&amp;quot;&lt;/i&gt; ) &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot;)&amp;quot;&lt;/i&gt;,
        &lt;i class=&quot;s&quot;&gt;&amp;quot;, &amp;quot;&lt;/i&gt;,
        &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, DESC
    )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Result: &amp;quot;Road-150 (1,200), Mountain-200 (900), Helmet (500)&amp;quot;. &lt;a href=&quot;/blog/topn-dax/&quot;&gt;TOPN&lt;/a&gt; picks the rows, &lt;code&gt;CONCATENATEX&lt;/code&gt; writes them, and the &lt;code&gt;orderBy&lt;/code&gt; keeps them in revenue order.&lt;/p&gt;
&lt;h2 id=&quot;how-do-delimiters-and-order-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-delimiters-and-order-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do delimiters and order work?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Argument&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;th&gt;Note&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;delimiter&lt;/td&gt;&lt;td&gt;&amp;quot;, &amp;quot; or &amp;quot; | &amp;quot;&lt;/td&gt;&lt;td&gt;between items, not after the last&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;line break&lt;/td&gt;&lt;td&gt;UNICHAR ( 10 )&lt;/td&gt;&lt;td&gt;each item on a new line in tooltips and cards with word wrap&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;orderBy&lt;/td&gt;&lt;td&gt;Customer[Country] or [Revenue]&lt;/td&gt;&lt;td&gt;evaluated per row&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;order&lt;/td&gt;&lt;td&gt;ASC or DESC&lt;/td&gt;&lt;td&gt;Microsoft's default is DESC when omitted&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;CONCATENATEX arguments&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Without an &lt;code&gt;orderBy&lt;/code&gt;, the order is not defined; always give one if the order matters.&lt;/p&gt;
&lt;h2 id=&quot;concatenatex-concatenate-or&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#concatenatex-concatenate-or&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;CONCATENATEX, CONCATENATE or &amp;amp;?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Use&lt;/th&gt;&lt;th&gt;When&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;&amp;quot;a&amp;quot; &amp;amp; &amp;quot;b&amp;quot; &amp;amp; &amp;quot;c&amp;quot;&lt;/code&gt;&lt;/td&gt;&lt;td&gt;joining a few known texts&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;CONCATENATE ( &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot; )&lt;/code&gt;&lt;/td&gt;&lt;td&gt;exactly two texts; &lt;code&gt;&amp;amp;&lt;/code&gt; is simpler&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;CONCATENATEX ( table, ... )&lt;/code&gt;&lt;/td&gt;&lt;td&gt;a list from a table, any number of rows&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Very long lists.&lt;/strong&gt; Hundreds of values make unreadable titles and slow measures; show a count above a threshold, as above.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Duplicates.&lt;/strong&gt; Iterating a fact table repeats values; iterate &lt;code&gt;VALUES ( column )&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Missing order.&lt;/strong&gt; Results come in an undefined order; pass &lt;code&gt;orderBy&lt;/code&gt; and &lt;code&gt;ASC&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Numbers without format.&lt;/strong&gt; &lt;code&gt;[Revenue]&lt;/code&gt; inside the text shows all decimals; wrap it in &lt;a href=&quot;/blog/format-function-dax/&quot;&gt;FORMAT&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/concatenatex-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: CONCATENATEX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/concatenate-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: CONCATENATE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-format-visual-titles&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Expression-based formatting in Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add &lt;code&gt;Selected Countries&lt;/code&gt; to the title of your main chart so exports and emails keep the filter. &lt;a href=&quot;/blog/text-functions-dax-reference/&quot;&gt;Text functions&lt;/a&gt; cover the rest of text work in DAX.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Release Data Factory pipelines like code</title>
    <link href="https://data.benibix.com/blog/azure-data-factory-git-ci-cd/"/>
    <id>https://data.benibix.com/blog/azure-data-factory-git-ci-cd/</id>
    <published>2026-11-22T12:00:00Z</published>
    <updated>2026-11-22T12:00:00Z</updated>
    <summary>Azure Data Factory connected to Git, with every change in a pull request, one build released to test and then production, and every secret in Key Vault.</summary>
    <category term="Azure"/>
    <category term="Data Factory"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; connect only the development Data Factory to Git, work on branches and merge through pull requests, and let a build turn the main branch into an ARM template. A release pipeline deploys that same template to test and then to production, each with its own parameter file, and every password lives in Key Vault, not in a linked service.&lt;/p&gt;
&lt;p&gt;Changing pipelines straight in the production factory works until the day a change breaks the nightly load and nobody can say what changed, or put it back. Treating the factory like code gives you the answers: the history is in Git, the review is in the pull request, and test runs exactly what production will run.&lt;/p&gt;
&lt;h2 id=&quot;what-does-the-release-path-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-the-release-path-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does the release path look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Branch&lt;/b&gt;&lt;span&gt;a feature branch in the dev factory's studio&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Pull request&lt;/b&gt;&lt;span&gt;a review, then a merge into main&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Build&lt;/b&gt;&lt;span&gt;main exported as an ARM template&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Test&lt;/b&gt;&lt;span&gt;the template deployed with test's parameters&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Production&lt;/b&gt;&lt;span&gt;the same template, production's parameters&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One change, from a branch to production&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Only the development factory is connected to Git. Test and production are never edited by hand: they only ever receive a deployment. That one rule is what makes &amp;quot;it worked in test&amp;quot; mean something.&lt;/p&gt;
&lt;h2 id=&quot;which-settings-change-per-environment&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-settings-change-per-environment&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which settings change per environment?&lt;/h2&gt;
&lt;p&gt;Everything that names a place: the server a linked service connects to, the storage account, the Key Vault's address, a trigger's start time. Data Factory turns these into ARM template parameters, and each environment gets its own value.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Development&lt;/b&gt;&lt;ul&gt;&lt;li&gt;sql-dev.database.windows.net&lt;/li&gt;&lt;li&gt;kv-data-dev&lt;/li&gt;&lt;li&gt;triggers off&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Test&lt;/b&gt;&lt;ul&gt;&lt;li&gt;sql-test.database.windows.net&lt;/li&gt;&lt;li&gt;kv-data-test&lt;/li&gt;&lt;li&gt;triggers on&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Production&lt;/b&gt;&lt;ul&gt;&lt;li&gt;sql-prod.database.windows.net&lt;/li&gt;&lt;li&gt;kv-data-prod&lt;/li&gt;&lt;li&gt;triggers on&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;The same pipeline, three sets of settings&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;A parameter file per environment holds those values. Keep it in the same repository, so a new setting is reviewed like any other change.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-build-the-template-automatically&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-the-template-automatically&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build the template automatically?&lt;/h2&gt;
&lt;p&gt;The classic way is the &lt;strong&gt;Publish&lt;/strong&gt; button, which writes the template to an &lt;code&gt;adf_publish&lt;/code&gt; branch. The better way is the npm package &lt;code&gt;@microsoft/azure-data-factory-utilities&lt;/code&gt;: your build pipeline validates every resource in the main branch and exports the ARM template itself, so nobody has to press Publish and the template always matches the merged code.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;yaml&quot;&gt;&lt;code&gt;- task: Npm@1
  displayName: Validate and export the ARM template
  inputs:
    command: custom
    workingDir: $(Build.Repository.LocalPath)/build
    customCommand: run build export $(Build.Repository.LocalPath) /subscriptions/$(SubscriptionId)/resourceGroups/$(ResourceGroup)/providers/Microsoft.DataFactory/factories/$(FactoryName) ArmTemplate&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;build&lt;/code&gt; folder holds a small &lt;code&gt;package.json&lt;/code&gt; that depends on the package and defines a &lt;code&gt;build&lt;/code&gt; script running &lt;code&gt;node node_modules/@microsoft/azure-data-factory-utilities/lib/index&lt;/code&gt;. The release then deploys the exported template with an ARM deployment task.&lt;/p&gt;
&lt;h2 id=&quot;where-do-the-passwords-go&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-the-passwords-go&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do the passwords go?&lt;/h2&gt;
&lt;p&gt;In Key Vault. A linked service that holds a password or a connection string carries it into Git and into every template. Instead, give the factory's managed identity read access to secrets in the environment's Key Vault, and point the linked service at the secret's name. The template then holds only the vault's address and the secret's name, both of which are safe to review.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A deployment while triggers run.&lt;/strong&gt; Deploying over a running trigger fails or leaves it half changed. Stop the triggers before the deployment and start them after; Microsoft's sample pre- and post-deployment script does exactly that.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Someone edits test by hand.&lt;/strong&gt; The next release overwrites it, and the fix is gone. Lock test and production down to the deployment's identity.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A parameter missing in one file.&lt;/strong&gt; The deployment uses the development value, and production quietly reads from the development server. Review the parameter files with the change that added the parameter.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/data-factory/source-control&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Source control in Azure Data Factory&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/data-factory/continuous-integration-delivery&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Continuous integration and delivery in Azure Data Factory&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/data-factory/continuous-integration-delivery-improvements&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Automated publishing for continuous integration and delivery&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/data-factory/store-credentials-in-key-vault&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Store credentials in Azure Key Vault&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Connect your development factory to a repository first, even before the build: the history and the pull requests are worth it on their own. The pipelines from &lt;a href=&quot;/courses/metadata-driven-pipeline/&quot;&gt;Your first metadata-driven pipeline&lt;/a&gt; make a good first thing to release this way, and the pattern sits on &lt;a href=&quot;/work/#pipelines-like-code&quot;&gt;the map of my work&lt;/a&gt; next to the others.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Revenue per employee and profit per employee in DAX</title>
    <link href="https://data.benibix.com/blog/revenue-per-employee-kpi/"/>
    <id>https://data.benibix.com/blog/revenue-per-employee-kpi/</id>
    <published>2026-11-22T12:00:00Z</published>
    <updated>2026-11-22T12:00:00Z</updated>
    <summary>How to calculate revenue per employee with average FTE as the base, annualising part-year figures, profit per employee, personnel cost ratio, the trend as a company grows, comparing with peers, the DAX combining finance and HR data, and a combo chart of revenue and headcount.</summary>
    <category term="KPIs"/>
    <category term="People"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;revenue per employee&lt;/strong&gt; = revenue in a period / &lt;strong&gt;average FTE&lt;/strong&gt; (full-time equivalents) in that period, annualised when the period is shorter than a year. With 24M revenue and an average of 160 FTE, it is &lt;strong&gt;150k per FTE&lt;/strong&gt;. Use FTE, not heads, so part-time staff count by their hours. &lt;strong&gt;Profit per employee&lt;/strong&gt; (operating profit / average FTE) and the &lt;strong&gt;personnel cost ratio&lt;/strong&gt; (personnel costs / revenue) complete the picture: revenue per FTE can rise while each person costs more.&lt;/p&gt;
&lt;p&gt;It is a rough efficiency measure: useful for the company's own trend and against companies in the same business, misleading across industries.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Year&lt;/th&gt;&lt;th&gt;Revenue (M)&lt;/th&gt;&lt;th&gt;Average FTE&lt;/th&gt;&lt;th&gt;Revenue per FTE (k)&lt;/th&gt;&lt;th&gt;Personnel cost (M)&lt;/th&gt;&lt;th&gt;Personnel cost ratio&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;2024&lt;/td&gt;&lt;td&gt;15.0&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;td&gt;125&lt;/td&gt;&lt;td&gt;7.8&lt;/td&gt;&lt;td&gt;52.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2025&lt;/td&gt;&lt;td&gt;19.5&lt;/td&gt;&lt;td&gt;145&lt;/td&gt;&lt;td&gt;134&lt;/td&gt;&lt;td&gt;9.6&lt;/td&gt;&lt;td&gt;49.2%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2026&lt;/td&gt;&lt;td&gt;24.0&lt;/td&gt;&lt;td&gt;160&lt;/td&gt;&lt;td&gt;150&lt;/td&gt;&lt;td&gt;11.0&lt;/td&gt;&lt;td&gt;45.8%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Revenue and FTE by year&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;combo&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;Revenue&lt;/li&gt;&lt;li class=&quot;ln-key k1&quot;&gt;Revenue per FTE&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;combo chart: 2024 15, 125; 2025 19.5, 134; 2026 24, 150&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;588&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;588&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;5&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;588&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;10&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;588&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;15&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;588&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;20&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;588&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;25&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;0&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;186&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;50&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;102&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;100&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;150&lt;/text&gt;&lt;rect x=&quot;85.9&quot; y=&quot;114.8&quot; width=&quot;110.8&quot; height=&quot;151.2&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;141.3&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;2024&lt;/text&gt;&lt;rect x=&quot;264.6&quot; y=&quot;69.4&quot; width=&quot;110.8&quot; height=&quot;196.6&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;320&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;2025&lt;/text&gt;&lt;rect x=&quot;443.3&quot; y=&quot;24.1&quot; width=&quot;110.8&quot; height=&quot;241.9&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;498.7&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;2026&lt;/text&gt;&lt;polyline points=&quot;141.3,56 320,40.9 498.7,14&quot; class=&quot;ln k1&quot;/&gt;&lt;circle cx=&quot;141.3&quot; cy=&quot;56&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;320&quot; cy=&quot;40.9&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;498.7&quot; cy=&quot;14&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;588&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Revenue (M) and revenue per FTE (k)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Revenue grew faster than headcount, so each FTE produces more and personnel costs take a smaller share.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;Revenue from the finance model, FTE from HR (an FTE table with a monthly snapshot per employee: Employee ID, Month, FTE from 0 to 1):&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( GL&lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )

Average FTE =
&lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( FTE&lt;i class=&quot;m&quot;&gt;[FTE]&lt;/i&gt; ) ) )

Months in Period = &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; )

Revenue per &lt;i class=&quot;f&quot;&gt;FTE&lt;/i&gt; (annualised) =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Average FTE]&lt;/i&gt; ) * &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;12&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Months in Period]&lt;/i&gt; )

Profit per &lt;i class=&quot;f&quot;&gt;FTE&lt;/i&gt; (annualised) =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Operating Profit]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Average FTE]&lt;/i&gt; ) * &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;12&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Months in Period]&lt;/i&gt; )

Personnel Cost Ratio = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Personnel Cost]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Both sources relate to the shared Date table (and Department or Cost Centre, if both carry it), so one slicer filters both. See &lt;a href=&quot;/blog/headcount-and-fte-kpi/&quot;&gt;headcount and FTE&lt;/a&gt; for building the FTE table.&lt;/p&gt;
&lt;h2 id=&quot;how-should-it-be-compared&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-should-it-be-compared&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How should it be compared?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Over time&lt;/strong&gt;: the most reliable use; watch the trend after big hiring waves.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;By business unit&lt;/strong&gt;: only if revenue is assigned cleanly; shared staff distort it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Against peers&lt;/strong&gt;: only within one industry and business model. A software company and a logistics company have very different normal values.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Heads instead of FTE.&lt;/strong&gt; Part-time staff inflate the base.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Contractors left out.&lt;/strong&gt; Outsourcing work raises revenue per employee without any change in efficiency; add contractor FTE or report it beside.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Quarter revenue on yearly FTE.&lt;/strong&gt; Annualise, or compare equal periods.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Year-end headcount.&lt;/strong&gt; A company hiring all year has a lower average than its year-end count; use the average.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/averagex-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: AVERAGEX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-relationships-understand&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Model relationships in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-combo-chart&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Combo charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Connect finance and HR to one Date table and show annualised revenue per FTE by year with the personnel cost ratio. &lt;a href=&quot;/blog/headcount-and-fte-kpi/&quot;&gt;Headcount and FTE&lt;/a&gt; explains the base.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Slowly changing dimensions: type 1 and type 2</title>
    <link href="https://data.benibix.com/blog/slowly-changing-dimensions-type-1-type-2/"/>
    <id>https://data.benibix.com/blog/slowly-changing-dimensions-type-1-type-2/</id>
    <published>2026-11-22T12:00:00Z</published>
    <updated>2026-11-22T12:00:00Z</updated>
    <summary>What a slowly changing dimension is, when to overwrite a value (type 1) and when to keep its history in a new row (type 2), with the SQL for both.</summary>
    <category term="SQL"/>
    <category term="Change and history"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;slowly changing dimension&lt;/strong&gt; is a dimension whose attributes change now and then: a customer moves, a product changes category. &lt;strong&gt;Type 1&lt;/strong&gt; overwrites the old value, so every report shows the new one. &lt;strong&gt;Type 2&lt;/strong&gt; closes the old row and adds a new one with dates, so last year's sales stay with last year's city. Choose per column, not per table.&lt;/p&gt;
&lt;p&gt;The question is always the same: when a customer moves from Graz to Vienna, should last year's sales move with them? For a corrected typo, yes. For a sales region, usually not.&lt;/p&gt;
&lt;h2 id=&quot;what-does-type-2-keep&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-type-2-keep&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does type 2 keep?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;CustomerKey&lt;/th&gt;&lt;th&gt;CustomerID&lt;/th&gt;&lt;th&gt;City&lt;/th&gt;&lt;th&gt;ValidFrom&lt;/th&gt;&lt;th&gt;ValidTo&lt;/th&gt;&lt;th&gt;IsCurrent&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;88&lt;/td&gt;&lt;td&gt;1042&lt;/td&gt;&lt;td&gt;Graz&lt;/td&gt;&lt;td&gt;2023-05-14&lt;/td&gt;&lt;td&gt;2026-02-28&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;731&lt;/td&gt;&lt;td&gt;1042&lt;/td&gt;&lt;td&gt;Vienna&lt;/td&gt;&lt;td&gt;2026-03-01&lt;/td&gt;&lt;td&gt;9999-12-31&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Customer 1042 moves from Graz to Vienna on 1 March 2026&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Two keys do two jobs. &lt;code&gt;CustomerID&lt;/code&gt; is the &lt;strong&gt;business key&lt;/strong&gt; from the source and stays the same. &lt;code&gt;CustomerKey&lt;/code&gt; is the &lt;strong&gt;surrogate key&lt;/strong&gt;: a new one per version, and the fact table stores it, so each sale points at the version that was true when it happened.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:4&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Type 0&lt;/b&gt;&lt;span&gt;never changes: a date of birth&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Type 1&lt;/b&gt;&lt;span&gt;overwrite: corrections, and values nobody reports history on&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Type 2&lt;/b&gt;&lt;span&gt;new row with dates: values reports should see as they were&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Type 3&lt;/b&gt;&lt;span&gt;a column for the previous value: rare&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;The types you meet&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-load-type-2&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-load-type-2&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you load type 2?&lt;/h2&gt;
&lt;p&gt;Two steps: close the rows whose tracked columns changed, then insert a new version for every changed or new customer.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;UPDATE&lt;/i&gt; d
&lt;i class=&quot;k&quot;&gt;SET&lt;/i&gt; ValidTo = &lt;i class=&quot;f&quot;&gt;DATEADD&lt;/i&gt;(day, -&lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CAST&lt;/i&gt;(&lt;i class=&quot;f&quot;&gt;GETDATE&lt;/i&gt;() &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; date)), IsCurrent = &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; dim.Customer &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; d
&lt;i class=&quot;k&quot;&gt;JOIN&lt;/i&gt; stage.Customer &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; s &lt;i class=&quot;k&quot;&gt;ON&lt;/i&gt; s.CustomerID = d.CustomerID
&lt;i class=&quot;k&quot;&gt;WHERE&lt;/i&gt; d.IsCurrent = &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;AND&lt;/i&gt; s.City &amp;lt;&amp;gt; d.City;

&lt;i class=&quot;k&quot;&gt;INSERT&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;INTO&lt;/i&gt; dim.&lt;i class=&quot;f&quot;&gt;Customer&lt;/i&gt; (CustomerID, Name, City, ValidFrom, ValidTo, IsCurrent)
&lt;i class=&quot;k&quot;&gt;SELECT&lt;/i&gt; s.CustomerID, s.Name, s.City, &lt;i class=&quot;f&quot;&gt;CAST&lt;/i&gt;(&lt;i class=&quot;f&quot;&gt;GETDATE&lt;/i&gt;() &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; date), &lt;i class=&quot;s&quot;&gt;'9999-12-31'&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; stage.Customer &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; s
LEFT &lt;i class=&quot;k&quot;&gt;JOIN&lt;/i&gt; dim.Customer &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; d &lt;i class=&quot;k&quot;&gt;ON&lt;/i&gt; d.CustomerID = s.CustomerID &lt;i class=&quot;k&quot;&gt;AND&lt;/i&gt; d.IsCurrent = &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;WHERE&lt;/i&gt; d.CustomerID &lt;i class=&quot;k&quot;&gt;IS&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;NULL&lt;/i&gt;;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;After the update, a changed customer has no current row, so the insert adds its new version along with brand-new customers. Type 1 columns, like a corrected name, are a plain &lt;code&gt;UPDATE&lt;/code&gt; on all rows of the customer.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Facts joined on the business key.&lt;/strong&gt; Join facts to the dimension by &lt;code&gt;CustomerKey&lt;/code&gt; when they load, or every sale shows the current city and type 2 did nothing.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Every column tracked.&lt;/strong&gt; A type 2 change on a phone number makes a new row for nothing. Track only the columns reports group by.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Nulls in the comparison.&lt;/strong&gt; &lt;code&gt;s.City &amp;lt;&amp;gt; d.City&lt;/code&gt; is not true when one side is null. Compare with &lt;code&gt;ISNULL&lt;/code&gt; or &lt;code&gt;IS DISTINCT FROM&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://www.kimballgroup.com/data-warehouse-business-intelligence-resources/kimball-techniques/dimensional-modeling-techniques/type-2/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Kimball Group: Type 2, add new row&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/data-warehouse/dimensional-modeling-dimension-tables&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Dimensional modeling in Fabric Data Warehouse: dimension tables&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;The open course &lt;a href=&quot;/courses/upserts-into-azure-sql/&quot;&gt;Upserts into Azure SQL&lt;/a&gt; builds the staging table and the merge by key that type 1 needs; type 2 adds the two steps above. In Fabric, the gold layer of &lt;a href=&quot;/blog/medallion-architecture-fabric-lakehouse/&quot;&gt;bronze, silver and gold&lt;/a&gt; is where these dimensions live.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Text boxes, images and shapes in Power BI reports</title>
    <link href="https://data.benibix.com/blog/text-box-image-shapes-power-bi/"/>
    <id>https://data.benibix.com/blog/text-box-image-shapes-power-bi/</id>
    <published>2026-11-22T12:00:00Z</published>
    <updated>2026-11-22T12:00:00Z</updated>
    <summary>How text boxes with dynamic values, lists and links, the image visual with images from data and hover states, and shapes as frames and buttons make a Power BI report readable, with DAX for titles and image URLs.</summary>
    <category term="Visuals"/>
    <category term="More visuals"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;text boxes&lt;/strong&gt;, the &lt;strong&gt;image&lt;/strong&gt; visual and &lt;strong&gt;shapes&lt;/strong&gt; carry no data by default, yet they decide whether a report reads well. A text box holds headings, explanations, numbered or bulleted lists and links, and &lt;strong&gt;dynamic values&lt;/strong&gt; from measures that follow the filters. The image visual shows a logo, a product photo or an icon, from a file, a web address or a column in the model, with its own hover state. Shapes frame sections and can act as buttons. All three are under &lt;strong&gt;Insert&lt;/strong&gt; in Power BI Desktop.&lt;/p&gt;
&lt;p&gt;A page of charts with no words leaves readers guessing what to look at first. One heading, one sentence of context and a clear visual grouping are often the difference between a dashboard people use and one they skip.&lt;/p&gt;
&lt;h2 id=&quot;what-does-each-one-do&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-each-one-do&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does each one do?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Text box&lt;/b&gt;&lt;ul&gt;&lt;li&gt;headings and notes&lt;/li&gt;&lt;li&gt;lists&lt;/li&gt;&lt;li&gt;links&lt;/li&gt;&lt;li&gt;dynamic values from measures, with display units and decimals&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Image&lt;/b&gt;&lt;ul&gt;&lt;li&gt;logo, product photo, icon&lt;/li&gt;&lt;li&gt;from a file, a URL or a data column&lt;/li&gt;&lt;li&gt;states for hover&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Shapes&lt;/b&gt;&lt;ul&gt;&lt;li&gt;rectangles, lines, arrows, shapes to group visuals&lt;/li&gt;&lt;li&gt;can carry a button action&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Three non-data elements of a page&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-put-live-numbers-into-a-text-box&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-put-live-numbers-into-a-text-box&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you put live numbers into a text box?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Insert, Text box&lt;/strong&gt;, and type the text.&lt;/li&gt;&lt;li&gt;With the text box selected, in &lt;strong&gt;Format&lt;/strong&gt; (paint roller), &lt;strong&gt;General&lt;/strong&gt;, &lt;strong&gt;Values&lt;/strong&gt;, select &lt;strong&gt;fx&lt;/strong&gt; and choose a measure.&lt;/li&gt;&lt;li&gt;Format the value: &lt;strong&gt;Display units&lt;/strong&gt; (none, thousands, millions, billions, trillions) and &lt;strong&gt;Value decimal places&lt;/strong&gt; (0 to 15).&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;The value updates with filters and slicers like any visual. Text boxes support ordered and unordered lists, including nested lists, and hyperlinks.&lt;/p&gt;
&lt;p&gt;For a whole sentence that changes with the data, a measure can write it and a card or the text box can show it:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Page Subtitle =
&lt;i class=&quot;s&quot;&gt;&amp;quot;Revenue &amp;quot;&lt;/i&gt; &amp;amp; &lt;i class=&quot;f&quot;&gt;FORMAT&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#,0&amp;quot;&lt;/i&gt; ) &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot; in &amp;quot;&lt;/i&gt; &amp;amp; &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;all years&amp;quot;&lt;/i&gt; )
    &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot;, &amp;quot;&lt;/i&gt; &amp;amp; &lt;i class=&quot;f&quot;&gt;FORMAT&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue vs LY %]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;+0.0%;-0.0%&amp;quot;&lt;/i&gt; ) &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot; against last year&amp;quot;&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;It reads &amp;quot;Revenue 1,240,000 in 2026, +8.1% against last year&amp;quot;.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-show-images-from-the-data&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-show-images-from-the-data&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you show images from the data?&lt;/h2&gt;
&lt;p&gt;The image visual takes a local file, a web address, or an image URL from the model. For product pictures:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Add a column with each product's image URL to the product table.&lt;/li&gt;&lt;li&gt;In the model, set its &lt;strong&gt;Data category&lt;/strong&gt; to &lt;strong&gt;Image URL&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Bind the image visual to a measure that returns the URL for the selected product:&lt;/li&gt;&lt;/ol&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Selected Product Image =
&lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;HASONEVALUE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Image URL]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;On a &lt;a href=&quot;/blog/drill-down-drill-through-power-bi/&quot;&gt;drillthrough&lt;/a&gt; page for one product, the image shows that product. Image URL columns also show pictures in tables, matrices and slicers.&lt;/p&gt;
&lt;p&gt;The image visual supports states (default, hover) with their own styling, so an image can react when the pointer is over it, for example as a clickable tile with an action.&lt;/p&gt;
&lt;h2 id=&quot;how-should-shapes-be-used&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-should-shapes-be-used&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How should shapes be used?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;As &lt;strong&gt;section frames&lt;/strong&gt;: a light rectangle behind a group of visuals that belong together, with the visuals on top (&lt;strong&gt;Arrange, Send to back&lt;/strong&gt;).&lt;/li&gt;&lt;li&gt;As &lt;strong&gt;dividers&lt;/strong&gt;: a thin line between the header and the body of a page.&lt;/li&gt;&lt;li&gt;As &lt;strong&gt;buttons&lt;/strong&gt;: shapes can carry an action (page navigation, bookmark), but a real button has hover and press states readers expect.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;A &lt;a href=&quot;/blog/report-theme-json-power-bi/&quot;&gt;report theme&lt;/a&gt; can set a default style for text boxes and shapes, so they look the same on every page.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Numbers typed into text.&lt;/strong&gt; A typed &amp;quot;Revenue grew 8%&amp;quot; is wrong after the next refresh; use a dynamic value or a measure.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Heavy images.&lt;/strong&gt; Large photos slow the page; size them for the screen.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;External image URLs.&lt;/strong&gt; Images loaded from the web need the reader's browser to reach that address; internal file shares do not work in the service.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Decoration that competes.&lt;/strong&gt; Background pictures and many shapes pull the eye away from the data.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Text boxes as tables.&lt;/strong&gt; Columns of numbers typed into text boxes cannot be filtered or exported; use a table.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-reports-add-text-and-shapes&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Add text boxes, shapes, and smart narrative visuals to Power BI reports&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-image-visual&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create an image visual in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/format-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: FORMAT function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Give every page a heading text box with one dynamic value, group related visuals with a light shape behind them, and show product images from an Image URL column. The &lt;a href=&quot;/blog/narrative-visual-power-bi/&quot;&gt;narrative visual&lt;/a&gt; writes longer text that updates itself.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Average order value (AOV): formula, DAX and drivers</title>
    <link href="https://data.benibix.com/blog/average-order-value-kpi/"/>
    <id>https://data.benibix.com/blog/average-order-value-kpi/</id>
    <published>2026-11-21T12:00:00Z</published>
    <updated>2026-11-21T12:00:00Z</updated>
    <summary>How to calculate average order value, revenue divided by orders, why order lines must not be averaged, items per order and average item price as its two drivers, median order value, AOV by channel and customer type, the DAX, and how to raise it.</summary>
    <category term="KPIs"/>
    <category term="Sales"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;average order value (AOV)&lt;/strong&gt; = revenue / number of orders. In DAX: &lt;code&gt;DIVIDE ( [Revenue], DISTINCTCOUNT ( Sales[Order ID] ) )&lt;/code&gt;, never &lt;code&gt;AVERAGE ( Sales[Amount] )&lt;/code&gt;, which averages order &lt;strong&gt;lines&lt;/strong&gt;. AOV has two drivers: &lt;strong&gt;items per order&lt;/strong&gt; × &lt;strong&gt;average item price&lt;/strong&gt;, so a change in AOV says either baskets got bigger or items got dearer. Check the &lt;strong&gt;median&lt;/strong&gt; too: a few large orders lift the mean without changing the typical basket.&lt;/p&gt;
&lt;p&gt;AOV is one of three levers of revenue (customers × orders per customer × AOV). It is the one that bundles, free-shipping thresholds and recommendations move.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Order&lt;/th&gt;&lt;th&gt;Lines&lt;/th&gt;&lt;th&gt;Items&lt;/th&gt;&lt;th&gt;Revenue&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1001&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;60&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1002&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;25&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1003&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;150&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1004&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;45&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1005&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;520&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;11&lt;/td&gt;&lt;td&gt;16&lt;/td&gt;&lt;td&gt;800&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Five orders, eleven order lines&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;AOV = 800 / 5 orders = &lt;strong&gt;160&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;Average line value = 800 / 11 lines = 72.7 (wrong for AOV)&lt;/li&gt;&lt;li&gt;Items per order = 16 / 5 = 3.2; average item price = 800 / 16 = 50; 3.2 × 50 = 160&lt;/li&gt;&lt;li&gt;Median order value = &lt;strong&gt;60&lt;/strong&gt; (order 1005 pulls the mean up)&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Orders = &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Order ID]&lt;/i&gt; )

AOV = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Orders]&lt;/i&gt; )

Items per Order = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Quantity]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Orders]&lt;/i&gt; )

Avg Item Price = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Quantity]&lt;/i&gt; ) )

Median Order Value =
&lt;i class=&quot;f&quot;&gt;MEDIANX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Order ID]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )

AOV LY = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[AOV]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
AOV Growth % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[AOV]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[AOV LY]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[AOV LY]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;MEDIANX&lt;/code&gt; over order IDs evaluates revenue per order through context transition.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-read-changes-in-aov&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-read-changes-in-aov&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you read changes in AOV?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;combo&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;AOV&lt;/li&gt;&lt;li class=&quot;ln-key k1&quot;&gt;Items per order&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;combo chart: Jul 148, 3; Aug 151, 3; Sep 155, 3.1; Oct 162, 3.4&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;588&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;203&quot; x2=&quot;588&quot; y2=&quot;203&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;207&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;50&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;140&quot; x2=&quot;588&quot; y2=&quot;140&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;144&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;77&quot; x2=&quot;588&quot; y2=&quot;77&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;81&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;150&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;588&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;200&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;0&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;207&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;1&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;144&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;2&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;81&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;3&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;4&lt;/text&gt;&lt;rect x=&quot;77.5&quot; y=&quot;79.5&quot; width=&quot;83.1&quot; height=&quot;186.5&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;119&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jul&lt;/text&gt;&lt;rect x=&quot;211.5&quot; y=&quot;75.7&quot; width=&quot;83.1&quot; height=&quot;190.3&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;253&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Aug&lt;/text&gt;&lt;rect x=&quot;345.5&quot; y=&quot;70.7&quot; width=&quot;83.1&quot; height=&quot;195.3&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;387&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Sep&lt;/text&gt;&lt;rect x=&quot;479.5&quot; y=&quot;61.9&quot; width=&quot;83.1&quot; height=&quot;204.1&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;521&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Oct&lt;/text&gt;&lt;polyline points=&quot;119,77 253,77 387,70.7 521,51.8&quot; class=&quot;ln k1&quot;/&gt;&lt;circle cx=&quot;119&quot; cy=&quot;77&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;253&quot; cy=&quot;77&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;387&quot; cy=&quot;70.7&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;521&quot; cy=&quot;51.8&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;588&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;AOV and items per order by month&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Here AOV rose with items per order, so baskets grew (bundles or a free-shipping threshold working), not prices. Split AOV by &lt;strong&gt;channel&lt;/strong&gt; (web, app, store) and &lt;strong&gt;customer type&lt;/strong&gt; (new, returning): new customers often buy smaller first orders, so a campaign that brings many new customers can lower AOV while growing revenue.&lt;/p&gt;
&lt;h2 id=&quot;how-can-aov-be-raised&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-can-aov-be-raised&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How can AOV be raised?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;Free-shipping threshold just above the current AOV.&lt;/li&gt;&lt;li&gt;Bundles and &amp;quot;frequently bought together&amp;quot;.&lt;/li&gt;&lt;li&gt;Volume discounts (watch margin: see &lt;a href=&quot;/blog/profit-margin-kpis/&quot;&gt;profit margin&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;Upselling to a higher tier.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Track AOV together with &lt;a href=&quot;/blog/conversion-rate-kpi/&quot;&gt;conversion rate&lt;/a&gt;: a high threshold can raise AOV and lose orders.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Averaging order lines.&lt;/strong&gt; Use revenue / distinct orders.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Returns and cancellations.&lt;/strong&gt; Decide whether AOV is gross or net, and keep it the same everywhere.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Tax and shipping.&lt;/strong&gt; Include or exclude consistently; mixing them between channels makes comparisons wrong.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Outliers.&lt;/strong&gt; One wholesale order changes a month's AOV; show the median, or exclude B2B orders.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/distinctcount-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DISTINCTCOUNT function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/medianx-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: MEDIANX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/divide-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DIVIDE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Put AOV, items per order and median order value side by side by month. &lt;a href=&quot;/blog/repeat-purchase-rate-kpi/&quot;&gt;Repeat purchase rate&lt;/a&gt; covers the other lever, orders per customer.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Business events in Fabric: publish a signal, let others act</title>
    <link href="https://data.benibix.com/blog/business-events-fabric/"/>
    <id>https://data.benibix.com/blog/business-events-fabric/</id>
    <published>2026-11-21T12:00:00Z</published>
    <updated>2026-11-21T12:00:00Z</updated>
    <summary>Business events in Fabric Real-Time Intelligence turn &quot;a payment failed&quot; or &quot;stock fell below the minimum&quot; into a typed event with a shared schema, published once by a notebook, user data function, Activator or eventstream, and consumed by alerts, functions, notebooks and Eventhouse. What separates a business event from telemetry, the schema registry, a worked payment example with notebook code, the limits and the traps.</summary>
    <category term="Fabric"/>
    <category term="Ingest and real time"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;business event&lt;/strong&gt; is a named, meaningful occurrence such as &lt;code&gt;PaymentFailed&lt;/code&gt; or &lt;code&gt;StockBelowMinimum&lt;/code&gt;, with a &lt;strong&gt;schema&lt;/strong&gt; kept in the &lt;strong&gt;Real-Time hub&lt;/strong&gt; schema registry (grouped in an &lt;strong&gt;event schema set&lt;/strong&gt;). &lt;strong&gt;Publishers&lt;/strong&gt; send it: Spark &lt;strong&gt;notebooks&lt;/strong&gt;, &lt;strong&gt;user data functions&lt;/strong&gt;, &lt;strong&gt;Activator&lt;/strong&gt; (from reports, dashboards, KQL or warehouse SQL queries) and &lt;strong&gt;eventstreams&lt;/strong&gt; (publishing from an eventstream became generally available in November 2026). &lt;strong&gt;Consumers&lt;/strong&gt; subscribe without the publisher knowing: Activator alerts in email or Teams, user data functions, notebooks, Dataflow Gen2, Power Automate, and &lt;strong&gt;Eventhouse&lt;/strong&gt;, which stores every published event for KQL and real-time dashboards. Events use the &lt;strong&gt;CloudEvents 1.0&lt;/strong&gt; envelope, can be up to &lt;strong&gt;1 MB&lt;/strong&gt;, and failed deliveries are retried for up to &lt;strong&gt;24 hours&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;A data team builds a notebook that spots failed payments every hour. Finance wants an email, the account managers want a Teams message for big customers, and the risk team wants a history to analyse. Without events, the notebook grows three outputs and three sets of credentials, and every new request means editing it. With a business event, the notebook says one thing, &amp;quot;this payment failed&amp;quot;, and each team subscribes on its own.&lt;/p&gt;
&lt;h2 id=&quot;what-counts-as-a-business-event&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-counts-as-a-business-event&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What counts as a business event?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:1&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Business events&lt;/b&gt;&lt;span&gt;PaymentFailed, RefundIssued, ShipmentDelayed, ThresholdExceeded, DemandForecastDeviationDetected&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Not business events&lt;/b&gt;&lt;span&gt;CurrentTemperature readings, DiskReadError logs, MemoryUsagePercent metrics&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Business event or not&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The test: would someone in the business act on it? A temperature reading every second is telemetry and belongs in an &lt;a href=&quot;/blog/eventhouse-and-kql-fabric/&quot;&gt;eventstream into an eventhouse&lt;/a&gt;. &amp;quot;Freezer above minus 15 for ten minutes&amp;quot; is a business event.&lt;/p&gt;
&lt;h2 id=&quot;how-do-publisher-and-consumers-connect&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-publisher-and-consumers-connect&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do publisher and consumers connect?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Notebook publishes&lt;/b&gt;&lt;span&gt;checks the last hour of payments, sends one event per failure&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Schema registry&lt;/b&gt;&lt;span&gt;PaymentFailed v1: orderId, customerId, amount, reason&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Activator&lt;/b&gt;&lt;span&gt;amount over 300: Teams message to the account manager&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Eventhouse&lt;/b&gt;&lt;span&gt;stores every event for KQL and a live dashboard&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;User data function&lt;/b&gt;&lt;span&gt;opens a ticket in the support system&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One PaymentFailed event, several independent consumers&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Adding a fourth consumer next month changes nothing in the notebook. That decoupling is the point.&lt;/p&gt;
&lt;h2 id=&quot;what-does-publishing-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-publishing-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does publishing look like?&lt;/h2&gt;
&lt;p&gt;First, in Real-Time hub, &lt;strong&gt;Business events&lt;/strong&gt;, create the event type with its fields and pick the workspace and schema set that hold it. Give the notebook's identity the &lt;strong&gt;Publish&lt;/strong&gt; permission. Then, in a Python or PySpark notebook:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;python&quot;&gt;&lt;code&gt;failed = [
    {&lt;i class=&quot;s&quot;&gt;&amp;quot;orderId&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;ORD-1001&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;customerId&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;C-17&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;amount&amp;quot;&lt;/i&gt;: &lt;i class=&quot;n&quot;&gt;125.50&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;reason&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;card expired&amp;quot;&lt;/i&gt;},
    {&lt;i class=&quot;s&quot;&gt;&amp;quot;orderId&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;ORD-1002&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;customerId&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;C-42&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;amount&amp;quot;&lt;/i&gt;: &lt;i class=&quot;n&quot;&gt;89.00&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;reason&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;insufficient funds&amp;quot;&lt;/i&gt;},
    {&lt;i class=&quot;s&quot;&gt;&amp;quot;orderId&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;ORD-1003&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;customerId&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;C-08&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;amount&amp;quot;&lt;/i&gt;: &lt;i class=&quot;n&quot;&gt;410.00&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;reason&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;card blocked&amp;quot;&lt;/i&gt;},
]

notebookutils.businessEvents.&lt;i class=&quot;f&quot;&gt;publish&lt;/i&gt;(
    eventSchemaSetWorkspace=&lt;i class=&quot;s&quot;&gt;&amp;quot;&amp;lt;workspace-id&amp;gt;&amp;quot;&lt;/i&gt;,
    eventSchemaSet=&lt;i class=&quot;s&quot;&gt;&amp;quot;&amp;lt;event-schema-set-id&amp;gt;&amp;quot;&lt;/i&gt;,
    eventTypeName=&lt;i class=&quot;s&quot;&gt;&amp;quot;PaymentFailed&amp;quot;&lt;/i&gt;,
    eventData=failed,
    dataVersion=&lt;i class=&quot;s&quot;&gt;&amp;quot;v1&amp;quot;&lt;/i&gt;,
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;eventData&lt;/code&gt; takes one dictionary or a list, and every field must match the schema version. The call returns &lt;code&gt;True&lt;/code&gt; on success and raises an error otherwise.&lt;/p&gt;
&lt;h2 id=&quot;do-the-numbers-add-up&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#do-the-numbers-add-up&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Do the numbers add up?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Consumer&lt;/th&gt;&lt;th&gt;Rule&lt;/th&gt;&lt;th&gt;Events&lt;/th&gt;&lt;th&gt;Amount&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Eventhouse&lt;/td&gt;&lt;td&gt;all events&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;624.50&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Activator, Teams to account manager&lt;/td&gt;&lt;td&gt;amount &amp;gt; 300&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;410.00&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;User data function, support ticket&lt;/td&gt;&lt;td&gt;all events&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;624.50&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;What each consumer receives from that one hourly run&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Three failures: 125.50 + 89.00 + 410.00 = 624.50, and only ORD-1003 is above 300. When the Eventhouse total and the notebook's own count agree each hour, the flow is healthy.&lt;/p&gt;
&lt;h2 id=&quot;can-an-eventstream-publish-them-too&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#can-an-eventstream-publish-them-too&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Can an eventstream publish them too?&lt;/h2&gt;
&lt;p&gt;Yes. In an eventstream's edit mode, &lt;strong&gt;Add destination&lt;/strong&gt;, &lt;strong&gt;Business events&lt;/strong&gt;, then pick an existing event type or define a new schema. If the stream's fields differ from the schema, add a &lt;strong&gt;mapper&lt;/strong&gt; (and a Manage fields operator for computed fields), then &lt;strong&gt;Publish&lt;/strong&gt;. Input must be JSON. This turns a raw stream into business events without code, for example &amp;quot;order status changed to delayed&amp;quot; out of an order feed.&lt;/p&gt;
&lt;h2 id=&quot;what-are-the-limits&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-limits&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the limits?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Limit&lt;/th&gt;&lt;th&gt;Value&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Event size&lt;/td&gt;&lt;td&gt;up to 1 MB&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Retries after a failed delivery&lt;/td&gt;&lt;td&gt;for up to 24 hours&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Filters per event listener&lt;/td&gt;&lt;td&gt;up to 25&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Event types per listener&lt;/td&gt;&lt;td&gt;up to 25&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Preview&lt;/td&gt;&lt;td&gt;the 30 most recent events of the last 24 hours, per publisher or consumer&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Business events limits&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Telemetry as business events.&lt;/strong&gt; A reading every second floods consumers; publish the meaningful change, not every value.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Schema drift.&lt;/strong&gt; A publisher that adds a field without a new schema version breaks consumers. Change the schema in the registry first, then publish under the new version.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Missing Publish permission.&lt;/strong&gt; The notebook or function runs, and the call fails. Data access security on the event must grant the identity Publish.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Big payloads.&lt;/strong&gt; Over 1 MB fails; send IDs and let consumers look up details.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Private workspaces.&lt;/strong&gt; If the workspace with the event schema set blocks public access, publishers and consumers in other workspaces need a private link to it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Counting on retries forever.&lt;/strong&gt; After 24 hours of failed delivery an event is dropped; monitor consumers.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/real-time-hub/business-events/business-events-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Business events overview&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/real-time-hub/publish-business-events&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Publish business events with APIs&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/real-time-intelligence/event-streams/add-destination-business-events&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Add a business events destination to an eventstream&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/real-time-hub/business-events/business-events-limits&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Business events limits&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/fundamentals/whats-new&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What's new in Microsoft Fabric&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Find one alert your team sends by email from a scheduled notebook or report. Define it as a business event, publish it from the same notebook, and move the email into an Activator rule. The next team that wants the same signal just subscribes. &lt;a href=&quot;/blog/eventhouse-and-kql-fabric/&quot;&gt;Eventhouse and KQL&lt;/a&gt; covers where the history lands.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Card visual in Power BI: many numbers, one visual</title>
    <link href="https://data.benibix.com/blog/card-visual-power-bi/"/>
    <id>https://data.benibix.com/blog/card-visual-power-bi/</id>
    <published>2026-11-21T12:00:00Z</published>
    <updated>2026-11-21T12:00:00Z</updated>
    <summary>How the card visual in Power BI shows one or many measures with reference labels, categories, images and conditional formatting, why several values in one card load faster than several cards, the DAX for reference labels, and the legacy cards.</summary>
    <category term="Visuals"/>
    <category term="Cards and KPIs"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; the &lt;strong&gt;card visual&lt;/strong&gt; shows a number big and clear. Drop several measures into &lt;strong&gt;Values&lt;/strong&gt; and it draws a card for each, in one visual. Each card has up to three parts: the &lt;strong&gt;callout&lt;/strong&gt; (the number), an &lt;strong&gt;image&lt;/strong&gt;, and &lt;strong&gt;reference labels&lt;/strong&gt; (smaller numbers that give context, such as &amp;quot;vs last year +8%&amp;quot;). A field in &lt;strong&gt;Categories&lt;/strong&gt; repeats the cards per value (one row of cards per country). One card visual with five values loads faster than five separate cards, because it sends fewer queries to the model.&lt;/p&gt;
&lt;p&gt;The top row of most reports is a line of numbers: revenue, orders, customers, margin. Built as separate visuals they line up badly, load one by one and each needs its own format. One card visual with all of them avoids all three.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-row-of-cards-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-row-of-cards-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a row of cards look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:4&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Revenue&lt;/b&gt;&lt;ul&gt;&lt;li&gt;1.24 M&lt;/li&gt;&lt;li&gt;vs last year +8.1%&lt;/li&gt;&lt;li&gt;vs target 97%&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Orders&lt;/b&gt;&lt;ul&gt;&lt;li&gt;18,420&lt;/li&gt;&lt;li&gt;vs last year +3.4%&lt;/li&gt;&lt;li&gt;average 67.3&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Customers&lt;/b&gt;&lt;ul&gt;&lt;li&gt;6,110&lt;/li&gt;&lt;li&gt;new 1,280&lt;/li&gt;&lt;li&gt;returning 79%&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Margin&lt;/b&gt;&lt;ul&gt;&lt;li&gt;31.2%&lt;/li&gt;&lt;li&gt;vs last year -1.4 pts&lt;/li&gt;&lt;li&gt;target 33%&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;One card visual with four values, each with reference labels&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-build-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build one?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;In &lt;strong&gt;Visualizations&lt;/strong&gt;, &lt;strong&gt;Build visual&lt;/strong&gt;, pick &lt;strong&gt;Card&lt;/strong&gt;. Since the new card became generally available, the visual called Card is the new one; reports built with the legacy card keep it.&lt;/li&gt;&lt;li&gt;Add measures to &lt;strong&gt;Values&lt;/strong&gt;. Each one becomes a card in the same visual.&lt;/li&gt;&lt;li&gt;Add measures to &lt;strong&gt;Reference labels&lt;/strong&gt; for the small context lines under each callout.&lt;/li&gt;&lt;li&gt;Optional: a field in &lt;strong&gt;Categories&lt;/strong&gt;, for example &lt;code&gt;Customer[Country]&lt;/code&gt;, repeats the cards for each country; selecting a category header filters the other visuals on the page (Ctrl to pick several).&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;how-do-you-lay-it-out&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-lay-it-out&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you lay it out?&lt;/h2&gt;
&lt;p&gt;In &lt;strong&gt;Format visual&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Cards, Layout&lt;/strong&gt;: the order of callout, image and reference labels inside each card, with a collage layout that gives one section more room.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Callout&lt;/strong&gt;: size, alignment, display units (show the full number or K, M, B) and decimals.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Multi-card layout&lt;/strong&gt;: how the cards share the visual, with &lt;strong&gt;Fixed size&lt;/strong&gt; (exact pixel size, scroll bars when they do not fit) or &lt;strong&gt;Fit to space&lt;/strong&gt; (cards grow and shrink). The two exclude each other.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Image&lt;/strong&gt; and &lt;strong&gt;Callout image&lt;/strong&gt;: a large image or a small one in the callout, from a file, a URL (also files in OneLake) or a data column, with a separate &lt;strong&gt;Hover&lt;/strong&gt; state.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Apply settings to&lt;/strong&gt;: format all cards at once, or one card from the &lt;strong&gt;Cards&lt;/strong&gt; drop-down.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-dax-feeds-the-reference-labels&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-dax-feeds-the-reference-labels&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What DAX feeds the reference labels?&lt;/h2&gt;
&lt;p&gt;Reference labels are measures too. The four cards above use measures like these:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )

Revenue LY =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )

Revenue vs LY % =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt; )

Revenue vs Target % =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue Target]&lt;/i&gt; )

Margin vs LY pts =
( &lt;i class=&quot;m&quot;&gt;[Margin %]&lt;/i&gt; - &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Margin %]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) ) ) * &lt;i class=&quot;n&quot;&gt;100&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;A label that is text and number at once needs a format string, not a text measure, so it can still be formatted and coloured. Give &lt;code&gt;Revenue vs LY %&lt;/code&gt; the custom format &lt;code&gt;+0.0%;-0.0%;0.0%&lt;/code&gt; and it shows &amp;quot;+8.1%&amp;quot; or &amp;quot;-2.3%&amp;quot;. A text measure built with &lt;code&gt;FORMAT&lt;/code&gt; also works, but turns the number into text: it can no longer drive a colour rule.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-colour-a-card-by-its-value&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-colour-a-card-by-its-value&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you colour a card by its value?&lt;/h2&gt;
&lt;p&gt;Use &lt;strong&gt;conditional formatting&lt;/strong&gt; (the &lt;strong&gt;fx&lt;/strong&gt; button) on the callout or reference label colour. A rule on &lt;code&gt;Revenue vs LY %&lt;/code&gt;: red below 0, green from 0. Or a measure that returns a colour:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Trend Colour =
&lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue vs LY %]&lt;/i&gt; &amp;gt;= &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#1A9E75&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#D64550&amp;quot;&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Then &lt;strong&gt;Field value&lt;/strong&gt; with &lt;code&gt;Trend Colour&lt;/code&gt;. The same rule applied to all cards works only where the measure fits each card; set colours per card with &lt;strong&gt;Apply settings to&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Five separate cards.&lt;/strong&gt; Slower to load and hard to align; put the values in one card visual.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A number with no context.&lt;/strong&gt; A callout alone answers &amp;quot;how much?&amp;quot; but not &amp;quot;is that good?&amp;quot;. Add a reference label with the comparison, or use the &lt;a href=&quot;/blog/kpi-visual-power-bi/&quot;&gt;KPI visual&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Text measures for numbers.&lt;/strong&gt; &lt;code&gt;FORMAT&lt;/code&gt; returns text: no display units, no conditional colours, slower in big models. Use format strings.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Display units that hide differences.&lt;/strong&gt; 1.2 M and 1.2 M can be 1,150,000 and 1,249,000. Show a decimal more, or the full number, when the difference matters.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Categories with many values.&lt;/strong&gt; Fifty countries make fifty card rows; filter to the top ones.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-card&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create a card visual in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/sameperiodlastyear-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SAMEPERIODLASTYEAR function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Apply conditional formatting in tables and matrixes&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Put the page's headline measures into one card visual, add one reference label each with the comparison that matters, and colour that label by direction. &lt;a href=&quot;/blog/kpi-actual-target-variance-dax/&quot;&gt;Actual, target and variance in DAX&lt;/a&gt; builds the comparison measures, and &lt;a href=&quot;/blog/format-function-dax/&quot;&gt;FORMAT and format strings&lt;/a&gt; shows the &amp;quot;+8.1%&amp;quot; formats.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Change data capture in SQL Server, explained</title>
    <link href="https://data.benibix.com/blog/change-data-capture-sql-server-explained/"/>
    <id>https://data.benibix.com/blog/change-data-capture-sql-server-explained/</id>
    <published>2026-11-21T12:00:00Z</published>
    <updated>2026-11-21T12:00:00Z</updated>
    <summary>What change data capture records, how it differs from a watermark and from change tracking, and how to read the inserts, updates and deletes it keeps.</summary>
    <category term="SQL"/>
    <category term="Change and history"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;change data capture&lt;/strong&gt; (CDC) reads the transaction log of a SQL Server or Azure SQL database and writes every insert, update and delete on the tables you choose into change tables. A load then asks for the changes between two log positions and gets each row with what happened to it, including deletes, which a watermark on a modified date never sees.&lt;/p&gt;
&lt;p&gt;A watermark works until someone deletes a row or updates a table without touching its date column. CDC does not depend on the table's columns; it reads what the database itself recorded.&lt;/p&gt;
&lt;h2 id=&quot;how-does-it-compare&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-it-compare&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does it compare?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Way&lt;/th&gt;&lt;th&gt;Finds deletes&lt;/th&gt;&lt;th&gt;Keeps the values&lt;/th&gt;&lt;th&gt;Needs a column in the table&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Watermark on a date&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;current row only&lt;/td&gt;&lt;td&gt;yes, a reliable modified date&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Change tracking&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;keys only, read the row yourself&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Change data capture&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;every change, before and after&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Three ways to find what changed&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-turn-it-on-and-read-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-turn-it-on-and-read-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you turn it on and read it?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;EXEC&lt;/i&gt; sys.sp_cdc_enable_db;

&lt;i class=&quot;k&quot;&gt;EXEC&lt;/i&gt; sys.sp_cdc_enable_table
    @source_schema = N&lt;i class=&quot;s&quot;&gt;'dbo'&lt;/i&gt;,
    @source_name   = N&lt;i class=&quot;s&quot;&gt;'Orders'&lt;/i&gt;,
    @role_name     = &lt;i class=&quot;k&quot;&gt;NULL&lt;/i&gt;;

&lt;i class=&quot;k&quot;&gt;DECLARE&lt;/i&gt; @from &lt;i class=&quot;f&quot;&gt;binary&lt;/i&gt;(&lt;i class=&quot;n&quot;&gt;10&lt;/i&gt;) = sys.&lt;i class=&quot;f&quot;&gt;fn_cdc_get_min_lsn&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;'dbo_Orders'&lt;/i&gt;),
        @to   &lt;i class=&quot;f&quot;&gt;binary&lt;/i&gt;(&lt;i class=&quot;n&quot;&gt;10&lt;/i&gt;) = sys.&lt;i class=&quot;f&quot;&gt;fn_cdc_get_max_lsn&lt;/i&gt;();

&lt;i class=&quot;k&quot;&gt;SELECT&lt;/i&gt; __$operation, OrderID, Status, Amount
&lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; cdc.&lt;i class=&quot;f&quot;&gt;fn_cdc_get_all_changes_dbo_Orders&lt;/i&gt;(@from, @to, N&lt;i class=&quot;s&quot;&gt;'all'&lt;/i&gt;);&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;__$operation&lt;/th&gt;&lt;th&gt;Change&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;delete&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;insert&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;update, the row before&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;update, the row after&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;What __$operation means&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;With &lt;code&gt;N'all'&lt;/code&gt;, an update comes back once, as operation 4; &lt;code&gt;N'all update old'&lt;/code&gt; returns the before row as well.&lt;/p&gt;
&lt;h2 id=&quot;how-does-a-load-use-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-a-load-use-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does a load use it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Last position&lt;/b&gt;&lt;span&gt;the log position the last run reached&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Read changes&lt;/b&gt;&lt;span&gt;from that position to the newest&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Apply&lt;/b&gt;&lt;span&gt;delete, insert or update by key&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Save position&lt;/b&gt;&lt;span&gt;only when the apply succeeded&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;An incremental load with CDC&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;It is the watermark pattern again, with a log position instead of a date. Save the position only after the target has the changes, and a failed run picks them up next time.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Changes expire.&lt;/strong&gt; A cleanup job removes change rows after a retention period (three days by default). A load that stops for longer misses changes and needs a full reload.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The table's columns change.&lt;/strong&gt; A new column is not captured until a new capture instance is made for the table.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;SQL Server Agent is off.&lt;/strong&gt; On SQL Server, capture and cleanup run as Agent jobs. Azure SQL Database runs them with its own scheduler.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/track-changes/about-change-data-capture-sql-server&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What is change data capture (CDC)?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/track-changes/enable-and-disable-change-data-capture-sql-server&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Enable and disable change data capture&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/system-functions/cdc-fn-cdc-get-all-changes-capture-instance-transact-sql&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: cdc.fn_cdc_get_all_changes&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/blog/incremental-load-watermark-azure-data-factory/&quot;&gt;Load only the rows that changed, with a watermark&lt;/a&gt; is the same load with a date, and says when that is enough. The open course &lt;a href=&quot;/courses/upserts-into-azure-sql/&quot;&gt;Upserts into Azure SQL&lt;/a&gt; builds the merge by key the changes are applied with.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Composite models in Power BI, explained</title>
    <link href="https://data.benibix.com/blog/composite-models-power-bi-explained/"/>
    <id>https://data.benibix.com/blog/composite-models-power-bi-explained/</id>
    <published>2026-11-21T12:00:00Z</published>
    <updated>2026-11-21T12:00:00Z</updated>
    <summary>What a composite model is in Power BI, mixing Import and DirectQuery or extending a published semantic model, and what limited relationships mean for it.</summary>
    <category term="Power BI"/>
    <category term="Modelling"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;composite model&lt;/strong&gt; is a semantic model with more than one &lt;strong&gt;source group&lt;/strong&gt;: tables in Import mode next to tables in DirectQuery, or a published semantic model you connect to with DirectQuery and extend with your own tables. It lets a model keep history imported and today live, or lets a team add its budget to the company's sales model without copying it.&lt;/p&gt;
&lt;p&gt;The first kind trades speed for freshness table by table. The second kind lets one shared model serve many teams, each adding what only it needs.&lt;/p&gt;
&lt;h2 id=&quot;what-are-the-two-kinds&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-two-kinds&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the two kinds?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Import and DirectQuery&lt;/b&gt;&lt;ul&gt;&lt;li&gt;big history imported, a live DirectQuery table for today&lt;/li&gt;&lt;li&gt;dimensions in Dual&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Extend a published model&lt;/b&gt;&lt;span&gt;DirectQuery to the company's semantic model, plus your own imported table&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Composite models, two common uses&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-does-an-extended-model-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-an-extended-model-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does an extended model look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Your model&lt;/b&gt;&lt;span&gt;one report, one semantic model&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Company sales model&lt;/b&gt;&lt;span&gt;DirectQuery to the published model: facts, dimensions, measures&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Budget table&lt;/b&gt;&lt;span&gt;your own Excel budget, imported&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;A team's report on the company model&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;You connect to the published model, choose &lt;strong&gt;Make changes to this model&lt;/strong&gt;, and add the budget table with a relationship to the shared Date dimension. Your measures can then use both:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue vs budget = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; - &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Budget&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Budget&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The company model stays as it is; your additions live only in your model.&lt;/p&gt;
&lt;h2 id=&quot;what-are-limited-relationships&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-limited-relationships&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are limited relationships?&lt;/h2&gt;
&lt;p&gt;A relationship between tables in &lt;strong&gt;different source groups&lt;/strong&gt; is a &lt;strong&gt;limited relationship&lt;/strong&gt;. Power BI cannot join the two sides in one engine, so it fetches from each and combines them, and a few things behave differently: the &amp;quot;blank&amp;quot; row for missing keys is not added, and totals can be slower. Relationships inside one source group stay regular.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Relationship between&lt;/th&gt;&lt;th&gt;Kind&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;two Import tables&lt;/td&gt;&lt;td&gt;regular&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;two tables in one DirectQuery source&lt;/td&gt;&lt;td&gt;regular&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;an Import table and a DirectQuery table&lt;/td&gt;&lt;td&gt;limited&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;your table and a table in the published model&lt;/td&gt;&lt;td&gt;limited&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Where a relationship sits, and what it is&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Slicers that query the source.&lt;/strong&gt; An Import dimension filtering a DirectQuery fact sends its values with every query. Set such dimensions to &lt;strong&gt;Dual&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Long chains.&lt;/strong&gt; A model on a model on a model works, up to a chain length limit, but every hop adds time. Keep chains short.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Security on the source.&lt;/strong&gt; Row-level security in the published model still applies to you; your own tables are not covered by it.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-composite-models&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Use composite models in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-relationships-understand&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Model relationships: regular and limited relationships&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/guidance/composite-model-guidance&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Composite model guidance in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/blog/power-bi-storage-modes-import-directquery-dual/&quot;&gt;Power BI storage modes&lt;/a&gt; explains Import, DirectQuery and Dual one at a time, and &lt;a href=&quot;/blog/calculation-groups-power-bi-time-intelligence/&quot;&gt;Every KPI once&lt;/a&gt; is why a shared model is worth extending instead of copying.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Dataflow Gen2 in Fabric, explained</title>
    <link href="https://data.benibix.com/blog/dataflow-gen2-fabric-explained/"/>
    <id>https://data.benibix.com/blog/dataflow-gen2-fabric-explained/</id>
    <published>2026-11-21T12:00:00Z</published>
    <updated>2026-11-21T12:00:00Z</updated>
    <summary>What a Dataflow Gen2 is in Microsoft Fabric, how Power Query, staging and data destinations fit together, and when to use a pipeline or a notebook instead.</summary>
    <category term="Fabric"/>
    <category term="Ingest and real time"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;Dataflow Gen2&lt;/strong&gt; is Power Query in Microsoft Fabric: you connect to a source, shape the data in a visual editor (or in M), and write the result to a &lt;strong&gt;data destination&lt;/strong&gt; such as a lakehouse or warehouse table. It suits people who know Power Query from Excel and Power BI, and transformations a few clicks can describe. For copying large volumes, a pipeline is cheaper; for complex logic, a notebook is clearer.&lt;/p&gt;
&lt;p&gt;Fabric gives you three ways to move and shape data, and the right one depends less on the data than on the work and the person doing it.&lt;/p&gt;
&lt;h2 id=&quot;how-does-a-dataflow-run&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-a-dataflow-run&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does a dataflow run?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Source&lt;/b&gt;&lt;span&gt;a database, files, SharePoint, an API&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Power Query steps&lt;/b&gt;&lt;span&gt;filter, merge, pivot, change types&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Staging&lt;/b&gt;&lt;span&gt;an optional lakehouse that big steps run on&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Destination&lt;/b&gt;&lt;span&gt;a lakehouse, warehouse or SQL database table&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One query in a Dataflow Gen2&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Each query in the dataflow has its own destination, and for each you choose whether a refresh &lt;strong&gt;replaces&lt;/strong&gt; the table or &lt;strong&gt;appends&lt;/strong&gt; to it. A pipeline can run the dataflow as one of its steps, so it fits into a nightly sequence like any other activity.&lt;/p&gt;
&lt;p&gt;The steps are M code underneath. A filter and a typed column look like this:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;text&quot;&gt;&lt;code&gt;let
    Source  = Sql.Database(&amp;quot;sql01.database.windows.net&amp;quot;, &amp;quot;Sales&amp;quot;),
    Orders  = Source{[Schema = &amp;quot;dbo&amp;quot;, Item = &amp;quot;Orders&amp;quot;]}[Data],
    Recent  = Table.SelectRows(Orders, each [OrderDate] &amp;gt;= #date(2026, 1, 1)),
    Typed   = Table.TransformColumnTypes(Recent, {{&amp;quot;Amount&amp;quot;, type number}})
in
    Typed&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;dataflow-pipeline-or-notebook&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#dataflow-pipeline-or-notebook&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Dataflow, pipeline or notebook?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Need&lt;/th&gt;&lt;th&gt;Dataflow Gen2&lt;/th&gt;&lt;th&gt;Pipeline Copy&lt;/th&gt;&lt;th&gt;Notebook&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Who builds it&lt;/td&gt;&lt;td&gt;Power Query users&lt;/td&gt;&lt;td&gt;anyone, few settings&lt;/td&gt;&lt;td&gt;Python or Spark users&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Shaping data&lt;/td&gt;&lt;td&gt;many visual steps&lt;/td&gt;&lt;td&gt;almost none&lt;/td&gt;&lt;td&gt;any code&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Large volumes&lt;/td&gt;&lt;td&gt;fine with staging&lt;/td&gt;&lt;td&gt;best&lt;/td&gt;&lt;td&gt;best&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Logic you test and review&lt;/td&gt;&lt;td&gt;hard&lt;/td&gt;&lt;td&gt;not needed&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Three tools for one job each&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;A common split: a &lt;strong&gt;pipeline&lt;/strong&gt; copies raw tables into bronze, a &lt;strong&gt;notebook&lt;/strong&gt; cleans them into silver, and a &lt;strong&gt;dataflow&lt;/strong&gt; serves the analyst who adds a lookup from a SharePoint list to gold.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Steps that stop folding.&lt;/strong&gt; When a step cannot be sent to the source as a query, the dataflow pulls every row and works through them itself. Keep filters early; see &lt;a href=&quot;/blog/query-folding-power-query-explained/&quot;&gt;query folding&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Replace on a big table.&lt;/strong&gt; Rewriting a whole table each refresh is slow. Append new rows, or use the dataflow's incremental refresh.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Logic only one person can read.&lt;/strong&gt; Long chains of clicked steps are hard to review. Name steps, and move logic that grows into a notebook.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/data-factory/dataflows-gen2-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What is Dataflow Gen2?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/data-factory/dataflow-gen2-data-destinations-and-managed-settings&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Dataflow Gen2 data destinations and managed settings&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/fundamentals/decision-guide-pipeline-dataflow-spark&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Fabric decision guide: copy activity, dataflow, Eventstream or Spark&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;The open course &lt;a href=&quot;/courses/lakehouse-in-three-layers/&quot;&gt;A lakehouse in three layers&lt;/a&gt; uses notebooks for the cleaning; the &lt;a href=&quot;/blog/medallion-architecture-fabric-lakehouse/&quot;&gt;bronze, silver and gold&lt;/a&gt; post shows where a dataflow fits beside them.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>DP-420 in 2026: what the exam covers and how to study</title>
    <link href="https://data.benibix.com/blog/dp-420-study-guide/"/>
    <id>https://data.benibix.com/blog/dp-420-study-guide/</id>
    <published>2026-11-21T12:00:00Z</published>
    <updated>2026-11-21T12:00:00Z</updated>
    <summary>What the DP-420 Azure Cosmos DB AI Developer exam measures since October 2026, how its three areas are weighted, why partition keys carry so much of it, and a study plan built on one AI app with Cosmos DB as its memory.</summary>
    <category term="Exams"/>
    <category term="Data and BI"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; DP-420 earns &lt;strong&gt;Microsoft Certified: Azure Cosmos DB AI Developer Associate&lt;/strong&gt; (the certification was renamed from the Cosmos DB developer specialty). It weighs designing and developing database solutions at 40 to 45%, securing, optimizing and deploying them at 30 to 35%, and AI and analytics at 20 to 25%. It runs 100 minutes, you need 700 out of 1,000, and you renew it each year for free. You should develop in C# or Python.&lt;/p&gt;
&lt;p&gt;The new version treats Cosmos DB as the store behind AI apps: agent memory, conversation state, vector and hybrid search, and grounding data, on top of the classic skills of modelling, partitioning and request units.&lt;/p&gt;
&lt;h2 id=&quot;what-does-dp-420-cover&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-dp-420-cover&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does DP-420 cover?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Design and develop database solutions&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;40-45%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Secure, optimize and deploy&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:77.8%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;30-35%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;AI and analytics capabilities&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:55.6%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;20-25%&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;DP-420 skills, by weight in the exam&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Design and develop&lt;/strong&gt;: resource models and SDKs, database operations, consistency levels, request unit (RU) needs, data models and partition keys (hierarchical and synthetic keys too), and the change feed.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Secure, optimize and deploy&lt;/strong&gt;: security controls, backup and restore, multi-region reads and writes, partition failover, index performance, and managing many accounts as a fleet.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;AI and analytics&lt;/strong&gt;: vector data and indexes, vector and hybrid search, agent memory stores, and analytics through mirroring into Microsoft Fabric.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;why-does-the-partition-key-matter-so-much&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-does-the-partition-key-matter-so-much&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why does the partition key matter so much?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Candidate key&lt;/th&gt;&lt;th&gt;Cardinality&lt;/th&gt;&lt;th&gt;Writes spread&lt;/th&gt;&lt;th&gt;Verdict&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;/country&lt;/td&gt;&lt;td&gt;low&lt;/td&gt;&lt;td&gt;a few hot partitions&lt;/td&gt;&lt;td&gt;poor&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;/customerId&lt;/td&gt;&lt;td&gt;high&lt;/td&gt;&lt;td&gt;even&lt;/td&gt;&lt;td&gt;good for per-customer reads&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;/tenantId then /userId&lt;/td&gt;&lt;td&gt;high&lt;/td&gt;&lt;td&gt;even&lt;/td&gt;&lt;td&gt;hierarchical key for multi-tenant apps&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;/date&lt;/td&gt;&lt;td&gt;medium&lt;/td&gt;&lt;td&gt;today is always hot&lt;/td&gt;&lt;td&gt;poor for writes&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Choosing a partition key&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The skills list asks you to choose keys by cardinality, access pattern and write distribution, and to spot anti-patterns. Most performance and cost questions trace back to this choice and to RU consumption.&lt;/p&gt;
&lt;h2 id=&quot;how-would-you-study-for-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-would-you-study-for-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How would you study for it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Model&lt;/b&gt;&lt;span&gt;containers, documents and a partition key for a chat app&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Build&lt;/b&gt;&lt;span&gt;read, write and query with the SDK, watch the RU charge&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Change feed&lt;/b&gt;&lt;span&gt;react to new messages with the change feed processor&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;AI&lt;/b&gt;&lt;span&gt;store embeddings, add vector and hybrid search, keep agent memory&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Operate&lt;/b&gt;&lt;span&gt;multi-region, backup, mirroring into Fabric&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One AI app with Cosmos DB as its store&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Print the RU charge of every query while you build; it makes the cost questions intuitive. The free tier or the emulator covers most of it.&lt;/p&gt;
&lt;h2 id=&quot;what-helps-on-the-day&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-helps-on-the-day&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What helps on the day?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Know the five consistency levels&lt;/strong&gt; and what each trades between latency and freshness.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Change feed modes.&lt;/strong&gt; Know the processor against pull mode, and latest version against all versions and deletes.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Use Microsoft Learn sparingly.&lt;/strong&gt; It is open in the exam but the clock keeps running.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-keep-the-certification&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-keep-the-certification&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you keep the certification?&lt;/h2&gt;
&lt;p&gt;It expires after a year; renew it with the free online assessment on Microsoft Learn in the six months before.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/dp-420&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam DP-420&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/exams/dp-420/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Microsoft Certified: Azure Cosmos DB AI Developer Associate&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/renew-your-microsoft-certification&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Renew your Microsoft Certification&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Pick the partition key for a small chat app and build it. &lt;a href=&quot;/blog/vector-search-sql-embeddings-explained/&quot;&gt;Vector search with SQL embeddings&lt;/a&gt; explains embeddings and vector search, which work the same way here; &lt;a href=&quot;/blog/dp-800-study-guide/&quot;&gt;DP-800&lt;/a&gt; is the SQL counterpart for AI apps.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>ALL, ALLEXCEPT and REMOVEFILTERS in DAX</title>
    <link href="https://data.benibix.com/blog/all-allexcept-removefilters-dax/"/>
    <id>https://data.benibix.com/blog/all-allexcept-removefilters-dax/</id>
    <published>2026-11-20T12:00:00Z</published>
    <updated>2026-11-20T12:00:00Z</updated>
    <summary>How ALL, ALLEXCEPT, REMOVEFILTERS and ALLNOBLANKROW remove filters in DAX, the difference between using them as CALCULATE modifiers and as table functions, percent of total and percent of parent examples, and the traps of ALLEXCEPT with columns from other tables.</summary>
    <category term="DAX"/>
    <category term="Filter functions"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; these functions remove filters. &lt;strong&gt;&lt;code&gt;REMOVEFILTERS&lt;/code&gt;&lt;/strong&gt; only removes filters, inside &lt;code&gt;CALCULATE&lt;/code&gt;: from a table, from columns, or from everything. &lt;strong&gt;&lt;code&gt;ALL&lt;/code&gt;&lt;/strong&gt; does the same as a &lt;code&gt;CALCULATE&lt;/code&gt; modifier, and can also &lt;strong&gt;return a table&lt;/strong&gt; of all rows or all distinct values, ignoring filters, which you can iterate or count. &lt;strong&gt;&lt;code&gt;ALLEXCEPT ( table, col1, ... )&lt;/code&gt;&lt;/strong&gt; removes all filters from a table except those on the listed columns. &lt;strong&gt;&lt;code&gt;ALLNOBLANKROW&lt;/code&gt;&lt;/strong&gt; is like &lt;code&gt;ALL&lt;/code&gt; without the blank row that unmatched keys add. Microsoft recommends &lt;code&gt;REMOVEFILTERS&lt;/code&gt; when you only want to remove filters.&lt;/p&gt;
&lt;p&gt;&amp;quot;Percent of total&amp;quot; is the first measure most people write after a sum, and it needs one of these: the total is the same revenue with the filters removed.&lt;/p&gt;
&lt;h2 id=&quot;what-does-each-function-do&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-each-function-do&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does each function do?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;As CALCULATE modifier&lt;/th&gt;&lt;th&gt;As table function&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;REMOVEFILTERS ( table or columns )&lt;/td&gt;&lt;td&gt;removes those filters&lt;/td&gt;&lt;td&gt;not available&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;REMOVEFILTERS ( )&lt;/td&gt;&lt;td&gt;removes all filters&lt;/td&gt;&lt;td&gt;not available&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ALL ( table )&lt;/td&gt;&lt;td&gt;removes all filters on the table&lt;/td&gt;&lt;td&gt;all rows of the table&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ALL ( col1, col2 )&lt;/td&gt;&lt;td&gt;removes filters on these columns&lt;/td&gt;&lt;td&gt;distinct combinations of these columns&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ALLEXCEPT ( table, cols )&lt;/td&gt;&lt;td&gt;removes all filters on the table except on cols&lt;/td&gt;&lt;td&gt;all rows, keeping those filters&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ALLNOBLANKROW ( table or cols )&lt;/td&gt;&lt;td&gt;as ALL, without the blank row&lt;/td&gt;&lt;td&gt;rows without the blank row&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Removing filters in DAX&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-calculate-shares&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-calculate-shares&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you calculate shares?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- percent of all products, whatever is filtered on Product&lt;/i&gt;
% of All Products =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;REMOVEFILTERS&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt; ) ) )

&lt;i class=&quot;c&quot;&gt;-- percent of the category (parent): remove the product filter, keep category&lt;/i&gt;
% of Category =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; (
    &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;REMOVEFILTERS&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ) )
)

&lt;i class=&quot;c&quot;&gt;-- the same with ALLEXCEPT&lt;/i&gt;
% of Category &lt;i class=&quot;n&quot;&gt;2&lt;/i&gt; =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; (
    &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;ALLEXCEPT&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; ) )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Category, Product&lt;/th&gt;&lt;th&gt;Revenue&lt;/th&gt;&lt;th&gt;% of All Products&lt;/th&gt;&lt;th&gt;% of Category&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Bikes, Mountain-200&lt;/td&gt;&lt;td&gt;900&lt;/td&gt;&lt;td&gt;31%&lt;/td&gt;&lt;td&gt;43%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bikes, Road-150&lt;/td&gt;&lt;td&gt;1,200&lt;/td&gt;&lt;td&gt;41%&lt;/td&gt;&lt;td&gt;57%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Accessories, Helmet&lt;/td&gt;&lt;td&gt;500&lt;/td&gt;&lt;td&gt;17%&lt;/td&gt;&lt;td&gt;61%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Accessories, Bottle&lt;/td&gt;&lt;td&gt;320&lt;/td&gt;&lt;td&gt;11%&lt;/td&gt;&lt;td&gt;39%&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;2,920&lt;/td&gt;&lt;td&gt;100%&lt;/td&gt;&lt;td&gt;100%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;A matrix of category and product with the three shares&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Filters from other tables (year, region) stay in place in all three measures. &lt;code&gt;REMOVEFILTERS ( 'Product'[Product] )&lt;/code&gt; keeps other Product columns, such as a Color slicer, while &lt;code&gt;ALLEXCEPT ( 'Product', 'Product'[Category] )&lt;/code&gt; removes the Color filter too.&lt;/p&gt;
&lt;h2 id=&quot;when-do-you-need-all-as-a-table&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-do-you-need-all-as-a-table&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When do you need ALL as a table?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- number of products, whatever is filtered&lt;/i&gt;
Product Count All = &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt; ) )

&lt;i class=&quot;c&quot;&gt;-- rank among all products, not just the visible ones&lt;/i&gt;
Product Rank = &lt;i class=&quot;f&quot;&gt;RANKX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- average monthly revenue across all months of the year in context&lt;/i&gt;
Avg Month = &lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;REMOVEFILTERS&lt;/code&gt; cannot be used here: it does not return a table.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-blank-row&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-blank-row&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the blank row?&lt;/h2&gt;
&lt;p&gt;When a fact table holds keys missing from a dimension, the dimension gets a virtual &lt;strong&gt;blank row&lt;/strong&gt; that collects them. &lt;code&gt;ALL ( 'Product' )&lt;/code&gt; includes it; &lt;code&gt;ALLNOBLANKROW ( 'Product' )&lt;/code&gt; does not. &lt;code&gt;COUNTROWS ( ALL ( 'Product' ) )&lt;/code&gt; can therefore be one more than the real number of products.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;ALLEXCEPT on the fact table.&lt;/strong&gt; &lt;code&gt;ALLEXCEPT ( Sales, 'Product'[Category] )&lt;/code&gt; removes the filters of every table that filters Sales (dates, customers, regions) except the listed column, which is rarely the intent; use &lt;code&gt;REMOVEFILTERS&lt;/code&gt; on the dimension columns you want gone.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;ALLEXCEPT removes more than expected.&lt;/strong&gt; It also removes filters on columns you forgot to list, such as Color.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;ALL ( Sales ) in a measure.&lt;/strong&gt; Removing filters from the fact table removes the effect of all dimension filters for that calculation; usually you want &lt;code&gt;REMOVEFILTERS&lt;/code&gt; on one dimension.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Ignoring slicers.&lt;/strong&gt; &lt;code&gt;% of All Products&lt;/code&gt; ignores a product slicer too; use &lt;a href=&quot;/blog/allselected-dax/&quot;&gt;ALLSELECTED&lt;/a&gt; for &amp;quot;of what the reader selected&amp;quot;.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/all-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: ALL function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/allexcept-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: ALLEXCEPT function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/removefilters-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: REMOVEFILTERS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Write &lt;code&gt;% of All Products&lt;/code&gt; and &lt;code&gt;% of Category&lt;/code&gt; and put them in a matrix by category and product. &lt;a href=&quot;/blog/allselected-dax/&quot;&gt;ALLSELECTED&lt;/a&gt; covers the share of what the reader selected.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Anomaly detection in Power BI line charts</title>
    <link href="https://data.benibix.com/blog/anomaly-detection-power-bi/"/>
    <id>https://data.benibix.com/blog/anomaly-detection-power-bi/</id>
    <published>2026-11-20T12:00:00Z</published>
    <updated>2026-11-20T12:00:00Z</updated>
    <summary>How anomaly detection in Power BI finds unusual points in a line chart's time series, the expected range and sensitivity, explanations with Explain by fields, the requirements (time axis, one value, four points), and a DAX check for the same idea.</summary>
    <category term="Visuals"/>
    <category term="AI visuals"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;anomaly detection&lt;/strong&gt; marks the points of a line chart that fall outside an &lt;strong&gt;expected range&lt;/strong&gt; the algorithm learns from the series itself, and draws that range as a band. Turn it on in the &lt;strong&gt;Analytics&lt;/strong&gt; pane of a line chart with a time axis. The &lt;strong&gt;sensitivity&lt;/strong&gt; decides how wide the band is: higher sensitivity flags more points. Select an anomaly and Power BI looks for &lt;strong&gt;explanations&lt;/strong&gt; across the fields of the model, or only those you put in &lt;strong&gt;Explain by&lt;/strong&gt;. It needs one measure, no legend, and at least four points.&lt;/p&gt;
&lt;p&gt;A spike in daily revenue might be a campaign, a pricing error or a bot. Spotting it in a 365-point line is easy when it is huge and hard when it is merely unusual for a Tuesday in March. Anomaly detection judges each point against the pattern of the series, including its seasonality.&lt;/p&gt;
&lt;h2 id=&quot;what-does-it-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-it-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does it look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;line&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;line chart: 1 452; 2 468; 3 441; 4 470; 5 489; 6 462; 7 455; 8 471; 9 318; 10 466; 11 480; 12 474&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;626&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;626&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;200&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;626&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;300&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;626&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;400&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;626&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;500&lt;/text&gt;&lt;polyline points=&quot;52,38.2 104.2,30.1 156.4,43.7 208.5,29.1 260.7,19.5 312.9,33.2 365.1,36.7 417.3,28.6 469.5,105.7 521.6,31.1 573.8,24.1 626,27.1&quot; class=&quot;ln ka&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;38.2&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;104.2&quot; cy=&quot;30.1&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;156.4&quot; cy=&quot;43.7&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;208.5&quot; cy=&quot;29.1&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;260.7&quot; cy=&quot;19.5&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;312.9&quot; cy=&quot;33.2&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;365.1&quot; cy=&quot;36.7&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;417.3&quot; cy=&quot;28.6&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;469.5&quot; cy=&quot;105.7&quot; r=&quot;3.5&quot; class=&quot;dt t-red&quot;/&gt;&lt;circle cx=&quot;521.6&quot; cy=&quot;31.1&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;573.8&quot; cy=&quot;24.1&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;27.1&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;text x=&quot;52&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;1&lt;/text&gt;&lt;text x=&quot;104.2&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;2&lt;/text&gt;&lt;text x=&quot;156.4&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;3&lt;/text&gt;&lt;text x=&quot;208.5&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;4&lt;/text&gt;&lt;text x=&quot;260.7&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;5&lt;/text&gt;&lt;text x=&quot;312.9&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;6&lt;/text&gt;&lt;text x=&quot;365.1&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;7&lt;/text&gt;&lt;text x=&quot;417.3&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;8&lt;/text&gt;&lt;text x=&quot;469.5&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;9&lt;/text&gt;&lt;text x=&quot;521.6&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;10&lt;/text&gt;&lt;text x=&quot;573.8&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;11&lt;/text&gt;&lt;text x=&quot;626&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;12&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Daily orders; day 9 falls far below the range of the other days&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In Power BI the band is shaded around the line and the anomaly is a marker. Hover it to see the value, the expected value and the range; select it for explanations.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-turn-it-on&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-turn-it-on&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you turn it on?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;Build a &lt;strong&gt;line chart&lt;/strong&gt; with a date on the &lt;strong&gt;X-axis&lt;/strong&gt; and one measure on the &lt;strong&gt;Y-axis&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Open the &lt;strong&gt;Analytics&lt;/strong&gt; pane (the magnifier icon) and &lt;strong&gt;Find anomalies&lt;/strong&gt;, &lt;strong&gt;Add&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Set the &lt;strong&gt;Sensitivity&lt;/strong&gt;: a higher value narrows the expected range, so more points count as anomalies.&lt;/li&gt;&lt;li&gt;Format the anomaly marker (shape, size, colour) and the &lt;strong&gt;expected range&lt;/strong&gt; (colour, style, transparency).&lt;/li&gt;&lt;li&gt;For explanations, drag fields such as &lt;code&gt;Store[City]&lt;/code&gt; or &lt;code&gt;Product[Seller]&lt;/code&gt; into &lt;strong&gt;Explain by&lt;/strong&gt;; select an anomaly and the pane lists the factors that best explain the jump or dip, with a chart for each.&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;what-are-the-requirements&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-requirements&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the requirements?&lt;/h2&gt;
&lt;p&gt;Microsoft lists them:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Only line charts with time series data on the axis.&lt;/li&gt;&lt;li&gt;No legend, no multiple values, no secondary values in the chart.&lt;/li&gt;&lt;li&gt;At least four data points.&lt;/li&gt;&lt;li&gt;Forecast, Min, Max, Average, Median and Percentile lines do not work together with anomaly detection.&lt;/li&gt;&lt;li&gt;Not supported for DirectQuery over SAP, Power BI Report Server, or live connections to Azure Analysis Services or SQL Server Analysis Services.&lt;/li&gt;&lt;li&gt;Explanations do not work with &amp;quot;Show value as&amp;quot; options, and drilling down to the next hierarchy level is not supported.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;can-you-flag-anomalies-with-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#can-you-flag-anomalies-with-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Can you flag anomalies with DAX?&lt;/h2&gt;
&lt;p&gt;For a rule people can read (and use in tables, alerts and tooltips), a simple version compares each day with the average and spread of the previous four weeks:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Orders = &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Order ID]&lt;/i&gt; )

Orders Expected =
&lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;DATESINPERIOD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) - &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, -&lt;i class=&quot;n&quot;&gt;28&lt;/i&gt;, DAY ),
    &lt;i class=&quot;m&quot;&gt;[Orders]&lt;/i&gt;
)

Orders Spread =
STDEVX.&lt;i class=&quot;f&quot;&gt;S&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;DATESINPERIOD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) - &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, -&lt;i class=&quot;n&quot;&gt;28&lt;/i&gt;, DAY ),
    &lt;i class=&quot;m&quot;&gt;[Orders]&lt;/i&gt;
)

Orders Unusual =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Z = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Orders]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Orders Expected]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Orders Spread]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ABS&lt;/i&gt; ( Z ) &amp;gt; &lt;i class=&quot;n&quot;&gt;3&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Unusual&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Normal&amp;quot;&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;A day more than three standard deviations from the last four weeks' average is flagged. It ignores weekly patterns (Saturday is always lower); compare with the same weekday instead when the week shapes the data. The built-in detection handles seasonality for you; the DAX rule is transparent and works anywhere.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A legend on the chart.&lt;/strong&gt; The Find anomalies option disappears; one measure, no legend.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too sensitive.&lt;/strong&gt; Every third point flagged teaches people to ignore the markers. Lower the sensitivity until flags are rare.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Explanations taken as causes.&lt;/strong&gt; &amp;quot;City is Graz&amp;quot; explains the dip statistically; the cause still needs a person to look.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Incomplete last day.&lt;/strong&gt; Today's partial data is always &amp;quot;low&amp;quot;. Stop the series at yesterday.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-anomaly-detection&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Anomaly detection tutorial for Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/stdevx-s-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: STDEVX.S function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/datesinperiod-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DATESINPERIOD function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Turn on Find anomalies on one daily line chart, lower the sensitivity until only real surprises show, and add three or four Explain by fields. &lt;a href=&quot;/blog/line-chart-power-bi/&quot;&gt;Line charts&lt;/a&gt; cover the chart itself, and the &lt;a href=&quot;/blog/analytics-pane-power-bi/&quot;&gt;Analytics pane&lt;/a&gt; its other lines.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Bronze, silver and gold in a Fabric lakehouse</title>
    <link href="https://data.benibix.com/blog/medallion-architecture-fabric-lakehouse/"/>
    <id>https://data.benibix.com/blog/medallion-architecture-fabric-lakehouse/</id>
    <published>2026-11-20T12:00:00Z</published>
    <updated>2026-11-20T12:00:00Z</updated>
    <summary>The medallion architecture in Microsoft Fabric: data lands in bronze as it arrived, is cleaned in silver and shaped for reports in gold, all as Delta tables in OneLake.</summary>
    <category term="Fabric"/>
    <category term="Lakehouse"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; load every source into &lt;strong&gt;bronze&lt;/strong&gt; exactly as it arrived, clean, type and join it into &lt;strong&gt;silver&lt;/strong&gt;, and shape &lt;strong&gt;gold&lt;/strong&gt; tables for one subject each, the way the reports need them. In Fabric every layer is a Delta table in OneLake, so a notebook, the SQL analytics endpoint and a Direct Lake semantic model can all read any of them.&lt;/p&gt;
&lt;p&gt;Without layers, the code that cleans the data and the code that shapes it for a report end up in the same notebook, and the raw file is overwritten on the way. When a number looks wrong, there is nothing to go back to. Three layers give every step one job and keep the original.&lt;/p&gt;
&lt;h2 id=&quot;what-does-each-layer-hold&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-each-layer-hold&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does each layer hold?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;layers&quot;&gt;&lt;ol class=&quot;dfig-stack&quot;&gt;&lt;li data-tone=&quot;bronze&quot;&gt;&lt;b&gt;Bronze&lt;/b&gt;&lt;span&gt;the source as it arrived, plus when and from where it was loaded&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;Silver&lt;/b&gt;&lt;span&gt;typed, trimmed, one row per key, bad rows set aside&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Gold&lt;/b&gt;&lt;span&gt;facts and dimensions for one subject: sales, finance, customers&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Three layers, one job each&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;strong&gt;Bronze&lt;/strong&gt; is the record of what you received. Nothing is fixed here, so you can always rebuild silver from it. &lt;strong&gt;Silver&lt;/strong&gt; is the cleaned truth: the right types, one row per business key, joined where it makes sense. &lt;strong&gt;Gold&lt;/strong&gt; is shaped for the question: a star schema the semantic model reads, at the grain the reports need.&lt;/p&gt;
&lt;h2 id=&quot;how-does-data-move-between-the-layers&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-data-move-between-the-layers&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does data move between the layers?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;bronze&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Pipeline&lt;/b&gt;&lt;span&gt;copies each source into bronze, untouched&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Notebook&lt;/b&gt;&lt;span&gt;cleans and merges bronze into silver&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Notebook or SQL&lt;/b&gt;&lt;span&gt;builds the gold star schema&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Semantic model&lt;/b&gt;&lt;span&gt;reads gold in Direct Lake&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From a source to a report&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Landing in bronze, a notebook adds two columns and appends:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;python&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;from&lt;/i&gt; pyspark.sql &lt;i class=&quot;k&quot;&gt;import&lt;/i&gt; functions &lt;i class=&quot;k&quot;&gt;as&lt;/i&gt; F

raw = spark.read.&lt;i class=&quot;f&quot;&gt;option&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;header&amp;quot;&lt;/i&gt;, &lt;i class=&quot;k&quot;&gt;True&lt;/i&gt;).&lt;i class=&quot;f&quot;&gt;csv&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;Files/landing/orders/2026-10-28.csv&amp;quot;&lt;/i&gt;)
(raw.&lt;i class=&quot;f&quot;&gt;withColumn&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;_loaded_at&amp;quot;&lt;/i&gt;, F.&lt;i class=&quot;f&quot;&gt;current_timestamp&lt;/i&gt;())
    .&lt;i class=&quot;f&quot;&gt;withColumn&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;_source_file&amp;quot;&lt;/i&gt;, F.&lt;i class=&quot;f&quot;&gt;input_file_name&lt;/i&gt;())
    .write.&lt;i class=&quot;f&quot;&gt;mode&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;append&amp;quot;&lt;/i&gt;).&lt;i class=&quot;f&quot;&gt;saveAsTable&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;bronze_orders&amp;quot;&lt;/i&gt;))&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Silver takes the right types, drops exact duplicates and merges by key, so a run that is repeated changes nothing:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;python&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;from&lt;/i&gt; delta.tables &lt;i class=&quot;k&quot;&gt;import&lt;/i&gt; DeltaTable

latest = (spark.&lt;i class=&quot;f&quot;&gt;table&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;bronze_orders&amp;quot;&lt;/i&gt;)
    .&lt;i class=&quot;f&quot;&gt;select&lt;/i&gt;(F.&lt;i class=&quot;f&quot;&gt;col&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;order_id&amp;quot;&lt;/i&gt;).&lt;i class=&quot;f&quot;&gt;cast&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;int&amp;quot;&lt;/i&gt;), F.&lt;i class=&quot;f&quot;&gt;trim&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;customer&amp;quot;&lt;/i&gt;).&lt;i class=&quot;f&quot;&gt;alias&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;customer&amp;quot;&lt;/i&gt;),
            F.&lt;i class=&quot;f&quot;&gt;col&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;amount&amp;quot;&lt;/i&gt;).&lt;i class=&quot;f&quot;&gt;cast&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;decimal(18,2)&amp;quot;&lt;/i&gt;), F.&lt;i class=&quot;f&quot;&gt;to_date&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;order_date&amp;quot;&lt;/i&gt;).&lt;i class=&quot;f&quot;&gt;alias&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;order_date&amp;quot;&lt;/i&gt;))
    .&lt;i class=&quot;f&quot;&gt;dropDuplicates&lt;/i&gt;([&lt;i class=&quot;s&quot;&gt;&amp;quot;order_id&amp;quot;&lt;/i&gt;]))

(DeltaTable.&lt;i class=&quot;f&quot;&gt;forName&lt;/i&gt;(spark, &lt;i class=&quot;s&quot;&gt;&amp;quot;silver_orders&amp;quot;&lt;/i&gt;).&lt;i class=&quot;f&quot;&gt;alias&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;t&amp;quot;&lt;/i&gt;)
    .&lt;i class=&quot;f&quot;&gt;merge&lt;/i&gt;(latest.&lt;i class=&quot;f&quot;&gt;alias&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;s&amp;quot;&lt;/i&gt;), &lt;i class=&quot;s&quot;&gt;&amp;quot;t.order_id = s.order_id&amp;quot;&lt;/i&gt;)
    .&lt;i class=&quot;f&quot;&gt;whenMatchedUpdateAll&lt;/i&gt;().&lt;i class=&quot;f&quot;&gt;whenNotMatchedInsertAll&lt;/i&gt;().&lt;i class=&quot;f&quot;&gt;execute&lt;/i&gt;())&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;one-lakehouse-or-one-per-layer&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#one-lakehouse-or-one-per-layer&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;One lakehouse or one per layer?&lt;/h2&gt;
&lt;p&gt;Both work. One lakehouse per layer, often in one workspace per layer, gives each its own permissions: analysts can read gold without ever seeing bronze. One lakehouse with a prefix per table (&lt;code&gt;bronze_&lt;/code&gt;, &lt;code&gt;silver_&lt;/code&gt;, &lt;code&gt;gold_&lt;/code&gt;) is simpler to start with and fine while one team owns everything. Start with what your access rules need; moving later is a copy, not a rewrite.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Fixing data in bronze.&lt;/strong&gt; The moment bronze is cleaned, you have lost the original. Keep every rule in the silver step.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Gold built from bronze.&lt;/strong&gt; It skips the cleaning, and two gold tables disagree about the same order. Gold reads only silver.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A layer nobody owns.&lt;/strong&gt; Silver without a key and a rule list turns into a second bronze. Write down each silver table's key and its checks; the checks are the next pattern, &lt;a href=&quot;/blog/data-quality-quarantine-fabric-notebook/&quot;&gt;bad rows stop at bronze&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/onelake/onelake-medallion-lakehouse-architecture&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Implement medallion lakehouse architecture in Microsoft Fabric&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What is a lakehouse in Microsoft Fabric?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://docs.delta.io/latest/delta-update.html#upsert-into-a-table-using-merge&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Delta Lake docs: Upsert into a table using merge&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;The open course &lt;a href=&quot;/courses/lakehouse-in-three-layers/&quot;&gt;A lakehouse in three layers&lt;/a&gt; builds bronze, silver and gold in your own Fabric workspace, from a CSV file to a Direct Lake semantic model. This pattern is the one drawn at the top of &lt;a href=&quot;/&quot;&gt;the home page&lt;/a&gt;, and it sits with the others on &lt;a href=&quot;/work/#bronze-silver-gold&quot;&gt;the map of my work&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Columnstore indexes in SQL Server, explained</title>
    <link href="https://data.benibix.com/blog/columnstore-index-explained/"/>
    <id>https://data.benibix.com/blog/columnstore-index-explained/</id>
    <published>2026-11-20T12:00:00Z</published>
    <updated>2026-11-20T12:00:00Z</updated>
    <summary>What a columnstore index is, how rowgroups and segments store data by column, why fact tables and reports love it, and how to load it well.</summary>
    <category term="SQL"/>
    <category term="T-SQL"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;columnstore index&lt;/strong&gt; stores a table by column instead of by row, in &lt;strong&gt;rowgroups&lt;/strong&gt; of up to about a million rows, each column compressed on its own. A query that sums one column over millions of rows reads only that column, compressed many times over, and runs in &lt;strong&gt;batch mode&lt;/strong&gt;. Use a &lt;strong&gt;clustered columnstore&lt;/strong&gt; for large fact tables and reports; keep rowstore indexes for tables you look up or update row by row.&lt;/p&gt;
&lt;p&gt;Analytics queries touch few columns and many rows; order entry touches all columns of few rows. The two storage layouts each suit one of those.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-stored&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-stored&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it stored?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;layers&quot;&gt;&lt;ol class=&quot;dfig-stack&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Rowgroups&lt;/b&gt;&lt;span&gt;up to 1,048,576 rows each&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Segments&lt;/b&gt;&lt;span&gt;one per column per rowgroup, compressed on its own&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Delta store&lt;/b&gt;&lt;span&gt;new rows wait here in rowstore until a rowgroup is full&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;b&gt;Delete bitmap&lt;/b&gt;&lt;span&gt;marks deleted rows until the rowgroup is rebuilt&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;A clustered columnstore table&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Each segment also keeps the minimum and maximum of its values, so a filter on a date range can skip whole rowgroups without opening them.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;The query&lt;/b&gt;&lt;span&gt;what does it touch?&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Columnstore&lt;/b&gt;&lt;span&gt;many rows, few columns: sums and counts for reports&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Rowstore (B-tree)&lt;/b&gt;&lt;span&gt;few rows, all columns: look up an order, update a row&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Which index for which work&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-create-and-load-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-create-and-load-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you create and load one?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;CREATE&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;TABLE&lt;/i&gt; dbo.&lt;i class=&quot;f&quot;&gt;FactSales&lt;/i&gt; (
    DateKey     int &lt;i class=&quot;k&quot;&gt;NOT&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;NULL&lt;/i&gt;,
    CustomerKey int &lt;i class=&quot;k&quot;&gt;NOT&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;NULL&lt;/i&gt;,
    ProductKey  int &lt;i class=&quot;k&quot;&gt;NOT&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;NULL&lt;/i&gt;,
    Quantity    int &lt;i class=&quot;k&quot;&gt;NOT&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;NULL&lt;/i&gt;,
    Amount      &lt;i class=&quot;f&quot;&gt;decimal&lt;/i&gt;(&lt;i class=&quot;n&quot;&gt;18&lt;/i&gt;,&lt;i class=&quot;n&quot;&gt;2&lt;/i&gt;) &lt;i class=&quot;k&quot;&gt;NOT&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;NULL&lt;/i&gt;,
    INDEX cci_FactSales CLUSTERED COLUMNSTORE
);&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Load in large batches. A bulk insert of 102,400 rows or more goes straight into compressed rowgroups; smaller inserts land in the delta store and are compressed later by a background task. Thousands of single-row inserts keep rows in the delta store, uncompressed, and every read scans them row by row.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;SELECT&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;OBJECT_NAME&lt;/i&gt;(object_id) &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; TableName, state_desc, total_rows, deleted_rows
&lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; sys.dm_db_column_store_row_group_physical_stats
&lt;i class=&quot;k&quot;&gt;WHERE&lt;/i&gt; object_id = &lt;i class=&quot;f&quot;&gt;OBJECT_ID&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;'dbo.FactSales'&lt;/i&gt;);&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Small rowgroups.&lt;/strong&gt; Many rowgroups well below a million rows compress poorly. Rebuild or reorganise the index after many small loads.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Heavy updates and deletes.&lt;/strong&gt; An update is a delete plus an insert; deleted rows stay in the bitmap until a rebuild. Columnstore suits tables that mostly grow.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Lookups by key.&lt;/strong&gt; Finding one order by its ID scans segments. Add a nonclustered rowstore index for such queries, or keep the table rowstore.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/indexes/columnstore-indexes-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Columnstore indexes: overview&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/indexes/columnstore-indexes-data-loading-guidance&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Columnstore indexes: data loading guidance&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/blog/star-schema-power-bi-explained/&quot;&gt;Star schema in Power BI&lt;/a&gt; explains the fact tables that suit this index, and DirectQuery models in &lt;a href=&quot;/blog/power-bi-storage-modes-import-directquery-dual/&quot;&gt;Power BI storage modes&lt;/a&gt; are fastest on a source built this way.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Export to Excel or Analyze in Excel: which one in Power BI?</title>
    <link href="https://data.benibix.com/blog/export-to-excel-power-bi/"/>
    <id>https://data.benibix.com/blog/export-to-excel-power-bi/</id>
    <published>2026-11-20T12:00:00Z</published>
    <updated>2026-11-20T12:00:00Z</updated>
    <summary>Power BI offers a static export (.xlsx up to 150,000 rows, .csv up to 30,000) and live options (Analyze in Excel, export with live connection up to 500,000 rows, the Excel add-in). What each keeps and loses, who may use them, a worked matrix example of the 150,000 data-intersection limit, how security and sensitivity labels travel, and how designers and admins steer people to the live options.</summary>
    <category term="Power BI"/>
    <category term="Getting started"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;Export data&lt;/strong&gt; copies numbers out of a visual into a file: &lt;strong&gt;.xlsx up to 150,000 rows&lt;/strong&gt; (a matrix: 150,000 data intersections) or &lt;strong&gt;.csv up to 30,000&lt;/strong&gt;. The file is a snapshot; it never refreshes, and once it is emailed, Power BI security no longer decides who reads it. &lt;strong&gt;Analyze in Excel&lt;/strong&gt;, &lt;strong&gt;export with live connection&lt;/strong&gt; (.xlsx up to &lt;strong&gt;500,000 rows&lt;/strong&gt;) and the &lt;strong&gt;Excel add-in&lt;/strong&gt;'s connected PivotTables keep a &lt;strong&gt;live connection&lt;/strong&gt; to the semantic model: they refresh, apply &lt;strong&gt;row-level and object-level security&lt;/strong&gt; to whoever opens them, and carry the model's &lt;strong&gt;sensitivity label&lt;/strong&gt;. They need &lt;strong&gt;Build&lt;/strong&gt; permission (or Contributor in the workspace) and a tenant setting. For anything people keep or share, prefer the live options.&lt;/p&gt;
&lt;p&gt;Every Power BI rollout meets the same pattern: a beautiful report, and three weeks later the usage numbers show that most &amp;quot;views&amp;quot; are people clicking Export data and working in a spreadsheet. The spreadsheet then lives on, unrefreshed, forwarded to people who were never meant to see it. Excel is not the problem; disconnected copies are.&lt;/p&gt;
&lt;h2 id=&quot;what-does-each-option-give-you&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-each-option-give-you&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does each option give you?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Option&lt;/th&gt;&lt;th&gt;Rows&lt;/th&gt;&lt;th&gt;Refreshes&lt;/th&gt;&lt;th&gt;Security when reopened&lt;/th&gt;&lt;th&gt;Label&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Export, .csv&lt;/td&gt;&lt;td&gt;30,000&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;none, it is a plain file&lt;/td&gt;&lt;td&gt;none&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Export, .xlsx&lt;/td&gt;&lt;td&gt;150,000&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;none beyond a protected label&lt;/td&gt;&lt;td&gt;the report's label&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Export, .xlsx with live connection&lt;/td&gt;&lt;td&gt;500,000&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;RLS and OLS for whoever refreshes&lt;/td&gt;&lt;td&gt;the model's label&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Analyze in Excel&lt;/td&gt;&lt;td&gt;whole model, as a PivotTable&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;RLS and OLS for whoever refreshes&lt;/td&gt;&lt;td&gt;the model's label&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Excel add-in, connected PivotTable or table&lt;/td&gt;&lt;td&gt;whole model&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;RLS and OLS for whoever refreshes&lt;/td&gt;&lt;td&gt;the model's label&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Power BI data in Excel, side by side&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;All exports respect your own security at the moment you export: with row-level security you only get your rows. The difference is what happens after: a static file shows the same numbers to anyone who opens it.&lt;/p&gt;
&lt;h2 id=&quot;how-does-the-matrix-limit-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-the-matrix-limit-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does the matrix limit work?&lt;/h2&gt;
&lt;p&gt;For a matrix exported &amp;quot;with current layout&amp;quot;, the 150,000 limit counts &lt;strong&gt;data intersections&lt;/strong&gt;: rows times value columns.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Rows (products)&lt;/th&gt;&lt;th&gt;Columns (months)&lt;/th&gt;&lt;th&gt;Measures&lt;/th&gt;&lt;th&gt;Data intersections&lt;/th&gt;&lt;th&gt;Within 150,000?&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;4,000&lt;/td&gt;&lt;td&gt;12&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;144,000&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;4,000&lt;/td&gt;&lt;td&gt;12&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;192,000&lt;/td&gt;&lt;td&gt;no, data is omitted&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;3,125&lt;/td&gt;&lt;td&gt;12&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;150,000&lt;/td&gt;&lt;td&gt;exactly at the limit&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;When a matrix export gets cut off&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The sums: 4,000 × 12 × 3 = 144,000; adding a fourth measure gives 4,000 × 12 × 4 = 192,000. When the limit is hit, Excel shows the footer &amp;quot;Exported data exceeded the allowed volume. Some data might have been omitted.&amp;quot; Easy to miss, and the totals in the file are then wrong. A live connection does not have this problem, because the PivotTable asks the model for what it needs.&lt;/p&gt;
&lt;h2 id=&quot;what-is-summarized-versus-underlying-data&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-summarized-versus-underlying-data&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is summarized versus underlying data?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Summarized data:&lt;/strong&gt; what the visual shows, with its filters and aggregation, including all levels of any hierarchy. Desktop offers only this, and only as .csv.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Underlying data:&lt;/strong&gt; the rows behind the visual, without aggregation, plus related columns. It needs &lt;strong&gt;Build&lt;/strong&gt; permission and can be switched off by the designer. It leaves out date and time variation columns, numeric columns that are aggregated, and visual calculation results.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;who-can-use-the-live-options&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#who-can-use-the-live-options&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Who can use the live options?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;The tenant setting &lt;strong&gt;Users can work with Power BI semantic models in Excel using a live connection&lt;/strong&gt; must be on.&lt;/li&gt;&lt;li&gt;You need &lt;strong&gt;Build&lt;/strong&gt; on the semantic model, or &lt;strong&gt;Contributor&lt;/strong&gt; or higher in its workspace.&lt;/li&gt;&lt;li&gt;A Fabric Free, Pro or PPU licence; free users only for models in My workspace or on Premium or F64 and larger capacity.&lt;/li&gt;&lt;li&gt;Not available for models that connect live to Azure or SQL Server Analysis Services, for Report Server, for app-owns-data embedding, or for users outside the tenant.&lt;/li&gt;&lt;li&gt;Hierarchies show up in the PivotTable only for &lt;strong&gt;Import&lt;/strong&gt; models; Direct Lake, DirectQuery and composite models lose them.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-steer-people-to-the-live-options&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-steer-people-to-the-live-options&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you steer people to the live options?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Measure it&lt;/b&gt;&lt;span&gt;usage metrics and the activity log show who exports what&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Offer the better path&lt;/b&gt;&lt;span&gt;show Analyze in Excel to the top exporters; give Build on the shared model&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Narrow the export&lt;/b&gt;&lt;span&gt;Report settings, Export data: summarized only, or none, per report&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Set tenant rules&lt;/b&gt;&lt;span&gt;admins can limit export formats; admin settings beat report settings&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From exported copies to live workbooks&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In &lt;strong&gt;Power BI Desktop&lt;/strong&gt;, &lt;strong&gt;File, Options and settings, Options, Report settings, Export data&lt;/strong&gt; sets what viewers may export for that report; the same choice is in the service. Revisit old reports, since this is set per report.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Silent truncation.&lt;/strong&gt; Exports past the limit drop data with only a footer note. Check row counts.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Forwarded snapshots.&lt;/strong&gt; A static file has no row-level security for its next reader. Use live connections or protected sensitivity labels for sensitive data.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;CSV and labels.&lt;/strong&gt; .csv exports carry no sensitivity label at all.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;No totals in CSV.&lt;/strong&gt; Subtotal and total rows are not included; totals rebuilt in Excel may differ from the report's measure logic.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Measures added on a live-connected report.&lt;/strong&gt; Report-level measures on a live connection are not included in a live-connection export.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-export-data&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Export data from a Power BI visualization&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-analyze-in-excel&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create Excel workbooks with refreshable Power BI data&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Find the report with the most exports, ask its top three exporters what they do with the file, and show each of them a connected PivotTable on the same model. Then set that report to summarized export only. &lt;a href=&quot;/blog/row-level-security-power-bi-explained/&quot;&gt;Row-level security&lt;/a&gt; is what the live options keep and the static files lose.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>How to book a Microsoft certification exam, step by step</title>
    <link href="https://data.benibix.com/blog/how-to-book-a-microsoft-exam/"/>
    <id>https://data.benibix.com/blog/how-to-book-a-microsoft-exam/</id>
    <published>2026-11-20T12:00:00Z</published>
    <updated>2026-11-20T12:00:00Z</updated>
    <summary>How to schedule a Microsoft certification exam in 2026, from your Learn profile to Pearson VUE, online or at a test centre, the legal name rule, the two-exam and 90-day limits, student pricing, and what to do before you pay.</summary>
    <category term="Exams"/>
    <category term="Exam tips"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; open the exam's page on Microsoft Learn, choose &lt;strong&gt;Schedule with Pearson VUE&lt;/strong&gt;, sign in with your personal Microsoft account, make sure the &lt;strong&gt;legal name&lt;/strong&gt; on your profile matches your ID exactly, then pick online or a test centre, a date and pay. You can hold at most &lt;strong&gt;two&lt;/strong&gt; exams at a time and book at most &lt;strong&gt;90 days&lt;/strong&gt; ahead. Request accommodations (extra time, assistive technology) &lt;strong&gt;before&lt;/strong&gt; you book.&lt;/p&gt;
&lt;h2 id=&quot;what-are-the-steps&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-steps&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the steps?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Exam page&lt;/b&gt;&lt;span&gt;Microsoft Learn, &amp;quot;Schedule exam&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Sign in&lt;/b&gt;&lt;span&gt;your personal Microsoft account (MSA) and Learn profile&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;red&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Legal name&lt;/b&gt;&lt;span&gt;as on your ID, or you cannot sit the exam&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Details&lt;/b&gt;&lt;span&gt;address, phone and email for Pearson VUE&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Pearson VUE&lt;/b&gt;&lt;span&gt;online or test centre, date and time, pay&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From exam page to booked&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Use a &lt;strong&gt;personal&lt;/strong&gt; Microsoft account, not a work one: the certification is yours, and it stays with you if you change jobs.&lt;/p&gt;
&lt;h2 id=&quot;online-or-test-centre&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#online-or-test-centre&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Online or test centre?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:1&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Test centre&lt;/b&gt;&lt;span&gt;quiet, prepared room, no software to install, no room scan&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Online (OnVUE)&lt;/b&gt;&lt;span&gt;from home or office, but your computer, network and room must pass the checks&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Where to take it&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;For an online exam, run Pearson VUE's system test on the same computer and network before you book. Work laptops often block the exam software. See &lt;a href=&quot;/blog/online-exam-at-home-checklist/&quot;&gt;Taking a Microsoft exam online at home&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;which-limits-apply&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-limits-apply&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which limits apply?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Rule&lt;/th&gt;&lt;th&gt;Detail&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Exams booked at once&lt;/td&gt;&lt;td&gt;at most two through Pearson VUE&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;How far ahead&lt;/td&gt;&lt;td&gt;at most 90 days&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Name&lt;/td&gt;&lt;td&gt;the legal name on your profile must match your government ID exactly&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Accommodations&lt;/td&gt;&lt;td&gt;request and confirm them before scheduling; it can take up to 20 days&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Price&lt;/td&gt;&lt;td&gt;set by the country or region where the exam is proctored&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Booking rules worth knowing&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;can-you-pay-less&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#can-you-pay-less&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Can you pay less?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Students and educators&lt;/strong&gt; get academic pricing in most countries (not India or China): mark yourself as a student in your Learn profile and verify your status. The verification lasts 12 months.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Beta exams&lt;/strong&gt; are sometimes offered at a discount in a short window when a new exam launches; see &lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/beta-exams&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Beta exams&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Renewals&lt;/strong&gt; of associate and expert certifications are always free.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-change-or-cancel-a-booking&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-change-or-cancel-a-booking&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you change or cancel a booking?&lt;/h2&gt;
&lt;p&gt;Your Learn profile shows your appointments: from there you can reschedule, cancel, or start an online exam. Pearson VUE's own rules decide the deadlines, so check them in the confirmation email when you book.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/register-schedule-exam&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Register and schedule an exam&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/request-accommodations&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Request exam accommodations&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/student-discounts&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Certifications for students&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/frequently-asked-questions&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Frequently asked questions&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Check your legal name in your Learn profile today; it is the step that stops people on exam day. Then pick a date and work back with &lt;a href=&quot;/blog/study-plan-for-any-microsoft-exam/&quot;&gt;a study plan for any Microsoft exam&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Sales dashboard KPIs: the six numbers that matter</title>
    <link href="https://data.benibix.com/blog/sales-dashboard-kpis/"/>
    <id>https://data.benibix.com/blog/sales-dashboard-kpis/</id>
    <published>2026-11-20T12:00:00Z</published>
    <updated>2026-11-20T12:00:00Z</updated>
    <summary>A sales dashboard needs six numbers, not sixty. Revenue, revenue growth, win rate, average deal size, sales cycle length and quota attainment, each next to its target and in the chart that fits it. With a worked month, the DAX starting points, Microsoft's own Opportunity Analysis sample and the layout.</summary>
    <category term="KPIs"/>
    <category term="Sales"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; Six numbers: &lt;strong&gt;revenue&lt;/strong&gt;, &lt;strong&gt;revenue growth&lt;/strong&gt;, &lt;strong&gt;win rate&lt;/strong&gt;, &lt;strong&gt;average deal size&lt;/strong&gt;, &lt;strong&gt;sales cycle length&lt;/strong&gt; and &lt;strong&gt;quota attainment&lt;/strong&gt;. Show each &lt;strong&gt;next to its target&lt;/strong&gt;, in the chart that fits it, and put everything else on a second page. Revenue tells you where you are; the other five tell you why, and what happens next quarter.&lt;/p&gt;
&lt;p&gt;Most sales dashboards start as a CRM export with every field turned into a visual. Nobody reads them, because a sales manager has one question each morning: are we on track, and if not, where is it slipping?&lt;/p&gt;
&lt;h2 id=&quot;which-six-kpis-and-what-does-each-answer&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-six-kpis-and-what-does-each-answer&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which six KPIs, and what does each answer?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:4&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Revenue&lt;/b&gt;&lt;span&gt;Are we on track this month?&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Revenue growth&lt;/b&gt;&lt;span&gt;Faster or slower than last year?&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Win rate&lt;/b&gt;&lt;span&gt;How often do we win what we close?&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Average deal size&lt;/b&gt;&lt;span&gt;Are deals getting bigger or smaller?&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Sales cycle&lt;/b&gt;&lt;span&gt;How long from created to won?&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Quota attainment&lt;/b&gt;&lt;span&gt;Who is on track, who needs help?&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;The six sales KPIs&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;They fit together: revenue = number of deals won × average deal size, and the number of deals won comes from pipeline × win rate. If revenue drops, the other numbers show which part broke.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-month-look-like-with-targets&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-month-look-like-with-targets&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a month look like with targets?&lt;/h2&gt;
&lt;p&gt;A worked month for a team of five reps:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;KPI&lt;/th&gt;&lt;th&gt;Actual&lt;/th&gt;&lt;th&gt;Target&lt;/th&gt;&lt;th&gt;Status&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Revenue&lt;/td&gt;&lt;td&gt;1,120k&lt;/td&gt;&lt;td&gt;1,250k&lt;/td&gt;&lt;td&gt;90% of target&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Revenue growth (vs October last year)&lt;/td&gt;&lt;td&gt;+8%&lt;/td&gt;&lt;td&gt;+10%&lt;/td&gt;&lt;td&gt;Behind&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Win rate (by count)&lt;/td&gt;&lt;td&gt;27%&lt;/td&gt;&lt;td&gt;30%&lt;/td&gt;&lt;td&gt;Behind&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Average deal size&lt;/td&gt;&lt;td&gt;41.5k&lt;/td&gt;&lt;td&gt;40k&lt;/td&gt;&lt;td&gt;Ahead&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sales cycle (won deals)&lt;/td&gt;&lt;td&gt;52 days&lt;/td&gt;&lt;td&gt;45 days&lt;/td&gt;&lt;td&gt;Behind&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Quota attainment (team)&lt;/td&gt;&lt;td&gt;90%&lt;/td&gt;&lt;td&gt;100%&lt;/td&gt;&lt;td&gt;Behind&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;October, sales team of five&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Is a 27% win rate good? Only the target can say. On its own the number means nothing; next to 30% it says the team loses a few more deals than planned, while bigger deals (41.5k against 40k) partly make up for it. Revenue of 1,120k against 1,250k is 89.6%, shown as 90%, and with quota set equal to the revenue target the team's quota attainment is the same 90%.&lt;/p&gt;
&lt;h2 id=&quot;which-chart-fits-each-kpi&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-chart-fits-each-kpi&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which chart fits each KPI?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Revenue:&lt;/strong&gt; a card with the target, plus a line or column chart by month against the target line.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Revenue growth:&lt;/strong&gt; the same months this year and last year, two lines, or a column chart of the growth %.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Win rate:&lt;/strong&gt; a line by month (it moves slowly), with the number of closed deals next to it so small months do not mislead.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Average deal size:&lt;/strong&gt; a card, and a histogram of deal sizes when a few big deals pull the average.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Sales cycle:&lt;/strong&gt; a bar chart by stage or by deal size band: where do deals wait?&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Quota attainment:&lt;/strong&gt; a bar per rep, sorted, with a line at 100%.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-does-microsoft-s-sales-sample-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-microsoft-s-sales-sample-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does Microsoft's sales sample start?&lt;/h2&gt;
&lt;p&gt;Microsoft's &lt;strong&gt;Opportunity Analysis&lt;/strong&gt; sample for Power BI, a software company with two sales channels, starts with the same building blocks: revenue, the number of opportunities and the pipeline by &lt;strong&gt;sales stage&lt;/strong&gt;. It also shows a useful refinement: &lt;strong&gt;factored revenue&lt;/strong&gt; = revenue × the stage's probability (Lead 10%, Qualify 20%, Solution 40%, Proposal 60%, Finalize 80%), which Microsoft calls a more accurate predictor of actual sales than the reps' raw estimates. In the sample, revenue is $2 billion and factored revenue $461 million, and opportunity count and revenue fall stage by stage like a funnel.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-dax-to-start-with&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax-to-start-with&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX to start with?&lt;/h2&gt;
&lt;p&gt;On an Opportunities table with Status, Amount, Created Date and Close Date, related to a Date table by Close Date:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Opportunities&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ), Opportunities&lt;i class=&quot;m&quot;&gt;[Status]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Won&amp;quot;&lt;/i&gt; )

Revenue LY = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
Revenue Growth % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt; )

Won Deals = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Opportunities ), Opportunities&lt;i class=&quot;m&quot;&gt;[Status]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Won&amp;quot;&lt;/i&gt; )
Lost Deals = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Opportunities ), Opportunities&lt;i class=&quot;m&quot;&gt;[Status]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Lost&amp;quot;&lt;/i&gt; )
Win Rate = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Won Deals]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Won Deals]&lt;/i&gt; + &lt;i class=&quot;m&quot;&gt;[Lost Deals]&lt;/i&gt; )

Avg Deal Size = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Won Deals]&lt;/i&gt; )

Sales Cycle Days =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; ( Opportunities, Opportunities&lt;i class=&quot;m&quot;&gt;[Close Date]&lt;/i&gt; - Opportunities&lt;i class=&quot;m&quot;&gt;[Created Date]&lt;/i&gt; ),
    Opportunities&lt;i class=&quot;m&quot;&gt;[Status]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Won&amp;quot;&lt;/i&gt;
)

Quota Attainment = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Quota&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The posts on &lt;a href=&quot;/blog/win-rate-kpi/&quot;&gt;win rate&lt;/a&gt;, &lt;a href=&quot;/blog/revenue-growth-kpi/&quot;&gt;revenue growth&lt;/a&gt; and &lt;a href=&quot;/blog/quota-attainment-kpi/&quot;&gt;quota attainment&lt;/a&gt; go deeper into each one.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Sixty numbers.&lt;/strong&gt; Every extra card makes the six harder to find. Put the detail on a drill-through page.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;No targets.&lt;/strong&gt; A KPI without a target is a fact, not a signal.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Created date instead of close date.&lt;/strong&gt; Revenue, win rate and quota belong to the month a deal closed.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Averages from a handful of deals.&lt;/strong&gt; One rep with three closed deals and a 67% win rate is luck. Show the count.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Pipeline counted as revenue.&lt;/strong&gt; Open deals are a forecast; weight them by stage, as in the sample.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/sample-opportunity-analysis&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Opportunity Analysis sample for Power BI&lt;/a&gt;, revenue, factored revenue, the stage probabilities and the pipeline funnel&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-kpi&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: KPI visuals in Power BI&lt;/a&gt;, showing a value against its target&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://tools.benibix.com/data/kpi-atlas/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;KPI Atlas&lt;/a&gt; has a Sales area with every one of these KPIs, its formula in DAX, SQL and Excel, a benchmark and the charts that show it best, and its starter dashboard puts the six on one page. For the page itself, &lt;a href=&quot;/blog/kpi-dashboard-power-bi/&quot;&gt;KPI dashboards in Power BI&lt;/a&gt; covers the layout, and &lt;a href=&quot;/blog/pipeline-coverage-kpi/&quot;&gt;pipeline coverage&lt;/a&gt; is the seventh number once the six are in place.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Actual vs target in DAX: variance, % and status</title>
    <link href="https://data.benibix.com/blog/kpi-actual-target-variance-dax/"/>
    <id>https://data.benibix.com/blog/kpi-actual-target-variance-dax/</id>
    <published>2026-11-19T12:00:00Z</published>
    <updated>2026-11-19T12:00:00Z</updated>
    <summary>The DAX pattern behind every KPI, actual, target, variance, variance %, attainment and status, targets stored per month and region with TREATAS, targets at a daily grain, year to date against target, KPIs where lower is better, and showing it with conditional formatting and the KPI visual.</summary>
    <category term="KPIs"/>
    <category term="Basics"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; every KPI needs five measures: &lt;strong&gt;Actual&lt;/strong&gt;, &lt;strong&gt;Target&lt;/strong&gt;, &lt;strong&gt;Variance&lt;/strong&gt; (&lt;code&gt;Actual - Target&lt;/code&gt;), &lt;strong&gt;Variance %&lt;/strong&gt; (&lt;code&gt;DIVIDE ( Variance, Target )&lt;/code&gt;) and &lt;strong&gt;Status&lt;/strong&gt; (on target or not, aware of whether higher or lower is better). Targets usually come per &lt;strong&gt;month and region&lt;/strong&gt;, coarser than the facts: keep them in their own table and apply the report's filters to it with &lt;code&gt;TREATAS&lt;/code&gt;, so the target follows slicers without a many-to-many relationship. Year to date works the same with &lt;code&gt;DATESYTD&lt;/code&gt; on both.&lt;/p&gt;
&lt;p&gt;Get this pattern right once and every KPI page (sales, costs, OTIF, churn) reuses it.&lt;/p&gt;
&lt;h2 id=&quot;what-do-the-measures-return&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-do-the-measures-return&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What do the measures return?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Month&lt;/th&gt;&lt;th&gt;Actual&lt;/th&gt;&lt;th&gt;Target&lt;/th&gt;&lt;th&gt;Variance&lt;/th&gt;&lt;th&gt;Variance %&lt;/th&gt;&lt;th&gt;Status&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Jan&lt;/td&gt;&lt;td&gt;212&lt;/td&gt;&lt;td&gt;200&lt;/td&gt;&lt;td&gt;+12&lt;/td&gt;&lt;td&gt;+6.0%&lt;/td&gt;&lt;td&gt;On target&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Feb&lt;/td&gt;&lt;td&gt;188&lt;/td&gt;&lt;td&gt;200&lt;/td&gt;&lt;td&gt;-12&lt;/td&gt;&lt;td&gt;-6.0%&lt;/td&gt;&lt;td&gt;Below&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Mar&lt;/td&gt;&lt;td&gt;236&lt;/td&gt;&lt;td&gt;220&lt;/td&gt;&lt;td&gt;+16&lt;/td&gt;&lt;td&gt;+7.3%&lt;/td&gt;&lt;td&gt;On target&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Apr&lt;/td&gt;&lt;td&gt;205&lt;/td&gt;&lt;td&gt;220&lt;/td&gt;&lt;td&gt;-15&lt;/td&gt;&lt;td&gt;-6.8%&lt;/td&gt;&lt;td&gt;Below&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;841&lt;/td&gt;&lt;td&gt;840&lt;/td&gt;&lt;td&gt;+1&lt;/td&gt;&lt;td&gt;+0.1%&lt;/td&gt;&lt;td&gt;On target&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Revenue against target, by month&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;combo&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;Actual&lt;/li&gt;&lt;li class=&quot;ln-key k1&quot;&gt;Target&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;combo chart: Jan 212, 200; Feb 188, 200; Mar 236, 220; Apr 205, 220&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;588&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;588&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;50&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;588&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;588&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;150&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;588&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;200&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;588&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;250&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;0&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;50&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;100&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;150&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;200&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;250&lt;/text&gt;&lt;rect x=&quot;77.5&quot; y=&quot;52.3&quot; width=&quot;83.1&quot; height=&quot;213.7&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;119&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jan&lt;/text&gt;&lt;rect x=&quot;211.5&quot; y=&quot;76.5&quot; width=&quot;83.1&quot; height=&quot;189.5&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;253&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Feb&lt;/text&gt;&lt;rect x=&quot;345.5&quot; y=&quot;28.1&quot; width=&quot;83.1&quot; height=&quot;237.9&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;387&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Mar&lt;/text&gt;&lt;rect x=&quot;479.5&quot; y=&quot;59.4&quot; width=&quot;83.1&quot; height=&quot;206.6&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;521&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Apr&lt;/text&gt;&lt;polyline points=&quot;119,64.4 253,64.4 387,44.2 521,44.2&quot; class=&quot;ln k1&quot;/&gt;&lt;circle cx=&quot;119&quot; cy=&quot;64.4&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;253&quot; cy=&quot;64.4&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;387&quot; cy=&quot;44.2&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;521&quot; cy=&quot;44.2&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;588&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Actual and target (thousands)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-write-them&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-write-them&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you write them?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Actual = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )

Target =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Targets&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;TREATAS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; ), Targets&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;TREATAS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Region&lt;i class=&quot;m&quot;&gt;[Region]&lt;/i&gt; ), Targets&lt;i class=&quot;m&quot;&gt;[Region]&lt;/i&gt; )
)

Variance = &lt;i class=&quot;m&quot;&gt;[Actual]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Target]&lt;/i&gt;

Variance % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Variance]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Target]&lt;/i&gt; )

Attainment % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Actual]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Target]&lt;/i&gt; )

Status =
&lt;i class=&quot;f&quot;&gt;SWITCH&lt;/i&gt; (
    &lt;i class=&quot;k&quot;&gt;TRUE&lt;/i&gt; (),
    &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Target]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;BLANK&lt;/i&gt; (),
    &lt;i class=&quot;m&quot;&gt;[Actual]&lt;/i&gt; &amp;gt;= &lt;i class=&quot;m&quot;&gt;[Target]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;On target&amp;quot;&lt;/i&gt;,
    &lt;i class=&quot;m&quot;&gt;[Attainment %]&lt;/i&gt; &amp;gt;= &lt;i class=&quot;n&quot;&gt;0.95&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Close&amp;quot;&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Below&amp;quot;&lt;/i&gt;
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The Targets table has one row per Year Month and Region. &lt;a href=&quot;/blog/treatas-dax/&quot;&gt;TREATAS&lt;/a&gt; passes the selected months and regions from the report to it. If targets have a column the facts do not (a product line, say), add a third &lt;code&gt;TREATAS&lt;/code&gt; from that dimension.&lt;/p&gt;
&lt;h2 id=&quot;what-if-the-report-shows-days-or-weeks&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-if-the-report-shows-days-or-weeks&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What if the report shows days or weeks?&lt;/h2&gt;
&lt;p&gt;A monthly target shown per day must be split. The simplest is even by day:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;f&quot;&gt;Target&lt;/i&gt; (daily) =
&lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ),
    &lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; M = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; ) )
    &lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; DaysInMonth = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt; ), &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; = M )
    &lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Target]&lt;/i&gt; ), DaysInMonth )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;For seasonal businesses, weight by working days or by last year's daily share instead of even days.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-compare-year-to-date&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-compare-year-to-date&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you compare year to date?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Actual YTD = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Actual]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DATESYTD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
Target YTD = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Target]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DATESYTD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
Variance YTD % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Actual YTD]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Target YTD]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Target YTD]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- the full-year target, for &amp;quot;how far are we&amp;quot;&lt;/i&gt;
Target FY = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Target]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Mid-year, compare YTD actual with YTD target, not with the full-year target. See &lt;a href=&quot;/blog/ytd-qtd-mtd-dax/&quot;&gt;YTD, QTD and MTD&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-if-lower-is-better&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-if-lower-is-better&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What if lower is better?&lt;/h2&gt;
&lt;p&gt;For costs, defects, churn or delivery days, below target is good. Put the direction in one place:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Cost Variance % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Cost]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Cost Target]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Cost Target]&lt;/i&gt; )

Cost Status = &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Cost]&lt;/i&gt; &amp;lt;= &lt;i class=&quot;m&quot;&gt;[Cost Target]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;On target&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Over&amp;quot;&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- a &amp;quot;good is positive&amp;quot; variance for colouring all KPIs alike&lt;/i&gt;
Cost Variance Good = -&lt;i class=&quot;m&quot;&gt;[Cost Variance %]&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The &lt;a href=&quot;/blog/kpi-visual-power-bi/&quot;&gt;KPI visual&lt;/a&gt; has a direction under &lt;strong&gt;Trend axis&lt;/strong&gt; (high is good or low is good) for the same reason.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-show-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-show-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you show it?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Table or matrix&lt;/strong&gt;: Variance % with &lt;a href=&quot;/blog/conditional-formatting-power-bi/&quot;&gt;conditional formatting&lt;/a&gt; (green above 0, red below), or an icon from Status.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;KPI visual&lt;/strong&gt;: Actual as value, Month as trend axis, Target as target.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Combo chart&lt;/strong&gt;: Actual as columns, Target as a line (above).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Bullet-style bar&lt;/strong&gt;: bars of Actual with a target marker, as a custom visual.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A relationship from Targets to Date by month.&lt;/strong&gt; The Date table has many rows per month, so it becomes many-to-many; &lt;code&gt;TREATAS&lt;/code&gt; or a Month dimension avoids it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Target totals by summing the wrong grain.&lt;/strong&gt; If targets repeat per product, &lt;code&gt;SUM&lt;/code&gt; doubles them; store targets at one grain.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Variance % on tiny targets.&lt;/strong&gt; +400% on a target of 1 dominates the colours; show variance in amounts too.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Mixed directions.&lt;/strong&gt; Green for &amp;quot;up&amp;quot; on costs is red in reality; handle direction per KPI.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/treatas-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: TREATAS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-kpi&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create key performance indicator (KPI) visualizations&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/divide-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DIVIDE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Load your targets as a table at month and region grain and add the five measures. Then &lt;a href=&quot;/blog/budget-variance-kpi/&quot;&gt;budget variance&lt;/a&gt; applies the same pattern to costs.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>AI-200 in 2026: what the exam covers and how to study</title>
    <link href="https://data.benibix.com/blog/ai-200-study-guide/"/>
    <id>https://data.benibix.com/blog/ai-200-study-guide/</id>
    <published>2026-11-19T12:00:00Z</published>
    <updated>2026-11-19T12:00:00Z</updated>
    <summary>What the AI-200 Azure AI Cloud Developer exam measures since October 2026, how its four areas are weighted, why it is a back-end developer exam more than an AI exam, and a study plan built on one containerised AI service.</summary>
    <category term="Exams"/>
    <category term="AI"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; AI-200 earns &lt;strong&gt;Microsoft Certified: Azure AI Cloud Developer Associate&lt;/strong&gt;. It is about the back end of AI apps: containers (20 to 25%), data services for AI such as Cosmos DB, PostgreSQL and Redis (30 to 35% in the summary, 25 to 30% in the detailed list), messaging, events and Functions (20 to 25%), and security, monitoring and troubleshooting (20 to 25%). It runs 120 minutes, needs 700 out of 1,000, expects Python, and is renewed yearly for free.&lt;/p&gt;
&lt;p&gt;If AI-103 builds the agent, AI-200 builds everything around it: where it runs, where its data and vectors live, how work is queued, and how you trace it when it breaks. Developers who knew AZ-204, which retired on 31 July 2026, will recognise much of it.&lt;/p&gt;
&lt;h2 id=&quot;what-does-ai-200-cover&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-ai-200-cover&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does AI-200 cover?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;Containerised solutions&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:71.4%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;20-25%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;AI solutions on Azure data services&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;30-35%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;Connect to and consume Azure services&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:71.4%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;20-25%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;Secure, monitor and troubleshoot&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:71.4%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;20-25%&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;AI-200 skills, by weight in the exam (summary figures)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Containers&lt;/strong&gt;: building, storing and versioning images in Azure Container Registry (with ACR Tasks), Azure Container Apps with revisions and event-driven scaling (KEDA).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Data for AI&lt;/strong&gt;: Cosmos DB for NoSQL (queries, indexing, RUs, consistency), Azure Database for PostgreSQL (schemas, indexes, SDK), and Azure Managed Redis (caching, expiry, vector indexes for similarity search).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Services&lt;/strong&gt;: Service Bus queues and topics with dead-letter handling, Event Grid events with filters and retries, and Azure Functions with triggers and bindings.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Secure and monitor&lt;/strong&gt;: Key Vault secrets and rotation, App Configuration, OpenTelemetry tracing, and KQL queries over logs and metrics.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-would-you-study-for-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-would-you-study-for-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How would you study for it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:6&quot;&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Container&lt;/b&gt;&lt;span&gt;a Python API in a container, pushed to ACR, run on Container Apps&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Data&lt;/b&gt;&lt;span&gt;chat history in Cosmos DB, embeddings in PostgreSQL or Redis&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Queue&lt;/b&gt;&lt;span&gt;long jobs through Service Bus, events through Event Grid&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Function&lt;/b&gt;&lt;span&gt;a trigger that processes new documents&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Secure&lt;/b&gt;&lt;span&gt;secrets in Key Vault, settings in App Configuration&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;6&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Trace&lt;/b&gt;&lt;span&gt;OpenTelemetry into Application Insights, one KQL query per problem&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One AI back end&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-helps-on-the-day&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-helps-on-the-day&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What helps on the day?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Queue or event?&lt;/strong&gt; Know when Service Bus fits (commands that must be processed) and when Event Grid fits (something happened).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Cost of a query.&lt;/strong&gt; Cosmos DB questions often turn on request units, indexing and the partition key.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Read KQL.&lt;/strong&gt; You will meet short log queries; know &lt;code&gt;where&lt;/code&gt;, &lt;code&gt;summarize&lt;/code&gt; and &lt;code&gt;project&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-keep-the-certification&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-keep-the-certification&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you keep the certification?&lt;/h2&gt;
&lt;p&gt;It expires after a year; renew it with the free online assessment on Microsoft Learn in the six months before.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/ai-200&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam AI-200&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/exams/ai-200/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Microsoft Certified: Azure AI Cloud Developer Associate&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/az-204&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam AZ-204 (retired)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Containerise one small Python API and grow it step by step. &lt;a href=&quot;/blog/eventhouse-and-kql-fabric/&quot;&gt;Eventhouse and KQL in Fabric&lt;/a&gt; is a gentle start on KQL, and &lt;a href=&quot;/blog/dp-420-study-guide/&quot;&gt;DP-420&lt;/a&gt; goes deeper on Cosmos DB.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Azure Data Lake Storage Gen2, explained</title>
    <link href="https://data.benibix.com/blog/azure-data-lake-storage-gen2-explained/"/>
    <id>https://data.benibix.com/blog/azure-data-lake-storage-gen2-explained/</id>
    <published>2026-11-19T12:00:00Z</published>
    <updated>2026-11-19T12:00:00Z</updated>
    <summary>What Azure Data Lake Storage Gen2 is, what the hierarchical namespace changes, how to address files with abfss, and how to lay out folders and access.</summary>
    <category term="Azure"/>
    <category term="Storage and access"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;Azure Data Lake Storage Gen2&lt;/strong&gt; is an Azure storage account with the &lt;strong&gt;hierarchical namespace&lt;/strong&gt; turned on. Folders become real directories, so renaming or deleting a folder is one quick operation, and you can set access on folders and files with POSIX-style ACLs. Spark, Data Factory, Synapse and Fabric shortcuts all read it through the &lt;code&gt;abfss://&lt;/code&gt; address.&lt;/p&gt;
&lt;p&gt;Without the namespace, a &amp;quot;folder&amp;quot; in Blob Storage is only a prefix in file names: renaming one means copying every file in it. For a data lake that rewrites folders daily, that difference matters.&lt;/p&gt;
&lt;h2 id=&quot;what-does-the-hierarchical-namespace-change&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-the-hierarchical-namespace-change&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does the hierarchical namespace change?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Task&lt;/th&gt;&lt;th&gt;Flat Blob Storage&lt;/th&gt;&lt;th&gt;Data Lake Storage Gen2&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Rename a folder&lt;/td&gt;&lt;td&gt;copy and delete every file&lt;/td&gt;&lt;td&gt;one operation&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Delete a folder&lt;/td&gt;&lt;td&gt;delete every file&lt;/td&gt;&lt;td&gt;one operation&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Access per folder&lt;/td&gt;&lt;td&gt;not possible&lt;/td&gt;&lt;td&gt;ACLs on folders and files&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Address for Spark&lt;/td&gt;&lt;td&gt;wasbs://&lt;/td&gt;&lt;td&gt;abfss://&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The same storage account, with and without it&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The namespace is chosen when the account is created, or an existing account can be upgraded to it. The upgrade is one-way.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-address-a-file&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-address-a-file&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you address a file?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;text&quot;&gt;&lt;code&gt;abfss://&amp;lt;container&amp;gt;@&amp;lt;account&amp;gt;.dfs.core.windows.net/&amp;lt;folder&amp;gt;/&amp;lt;file&amp;gt;
abfss://raw@contosolake.dfs.core.windows.net/sales/orders/2026/10/28/orders.parquet&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Note &lt;code&gt;dfs&lt;/code&gt;, not &lt;code&gt;blob&lt;/code&gt;: the Data Lake endpoint is the one that knows about directories.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;python&quot;&gt;&lt;code&gt;df = spark.read.&lt;i class=&quot;f&quot;&gt;parquet&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;abfss://raw@contosolake.dfs.core.windows.net/sales/orders/2026/10/&amp;quot;&lt;/i&gt;)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-do-you-lay-out-the-folders&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-lay-out-the-folders&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you lay out the folders?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;layers&quot;&gt;&lt;ol class=&quot;dfig-stack&quot;&gt;&lt;li data-tone=&quot;bronze&quot;&gt;&lt;b&gt;raw&lt;/b&gt;&lt;span&gt;sales/orders/2026/10/28/ as the source sent it&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;curated&lt;/b&gt;&lt;span&gt;sales/orders/ as cleaned Delta tables&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;serving&lt;/b&gt;&lt;span&gt;sales_mart/ shaped for reports&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One container per stage, folders by source and date&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;A folder per source and a date path in the raw layer make a reload of one day a matter of one folder, and let access follow the layout: the team that owns sales gets the &lt;code&gt;sales&lt;/code&gt; folders.&lt;/p&gt;
&lt;h2 id=&quot;who-gets-access-and-how&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#who-gets-access-and-how&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Who gets access, and how?&lt;/h2&gt;
&lt;p&gt;Two layers decide it. &lt;strong&gt;Azure roles&lt;/strong&gt; (RBAC) such as &lt;em&gt;Storage Blob Data Reader&lt;/em&gt; apply to the whole account or container. &lt;strong&gt;ACLs&lt;/strong&gt; apply to folders and files below that. Give services roles through their &lt;strong&gt;managed identity&lt;/strong&gt;, and keep ACLs for the cases where one container holds data for several teams.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Millions of tiny files.&lt;/strong&gt; Every engine reads many small files slowly. Land in batches, and compact Delta tables with &lt;code&gt;OPTIMIZE&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;ACLs set after the files exist.&lt;/strong&gt; A default ACL on a folder applies only to new children. Set defaults first, or apply ACLs recursively.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Keys in code.&lt;/strong&gt; An account key opens everything. Use managed identities or a short-lived SAS instead.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-introduction&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Introduction to Azure Data Lake Storage&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-namespace&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Azure Data Lake Storage hierarchical namespace&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-access-control&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Access control lists in Azure Data Lake Storage&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;A Fabric lakehouse can read these folders where they are with a shortcut: &lt;a href=&quot;/blog/onelake-shortcuts-explained/&quot;&gt;OneLake shortcuts: use data without copying it&lt;/a&gt;. The layers above are the &lt;a href=&quot;/blog/medallion-architecture-fabric-lakehouse/&quot;&gt;bronze, silver and gold&lt;/a&gt; pattern in folder form.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Azure Maps visual in Power BI: layers, fields, geocoding</title>
    <link href="https://data.benibix.com/blog/azure-maps-visual-power-bi/"/>
    <id>https://data.benibix.com/blog/azure-maps-visual-power-bi/</id>
    <published>2026-11-19T12:00:00Z</published>
    <updated>2026-11-19T12:00:00Z</updated>
    <summary>How the Azure Maps visual in Power BI shows location data, its Location, Latitude, Longitude, Legend, Size and Tooltips fields, the bubble, heat map, 3D column, filled, marker, path and reference layers, what is sent to Azure, and why it replaces Bing maps.</summary>
    <category term="Visuals"/>
    <category term="Maps"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; the &lt;strong&gt;Azure Maps visual&lt;/strong&gt; draws location data on a map in layers: &lt;strong&gt;bubbles&lt;/strong&gt; sized by a measure, a &lt;strong&gt;heat map&lt;/strong&gt; of density, &lt;strong&gt;3D columns&lt;/strong&gt;, &lt;strong&gt;filled&lt;/strong&gt; regions, &lt;strong&gt;markers&lt;/strong&gt; with custom icons, &lt;strong&gt;paths&lt;/strong&gt; between points, and &lt;strong&gt;reference layers&lt;/strong&gt; from your own files. Put an address, city or postcode in &lt;strong&gt;Location&lt;/strong&gt;, or coordinates in &lt;strong&gt;Latitude&lt;/strong&gt; and &lt;strong&gt;Longitude&lt;/strong&gt;, a category in &lt;strong&gt;Legend&lt;/strong&gt; and a measure in &lt;strong&gt;Size&lt;/strong&gt;. It is the map to use for new reports: Microsoft has scheduled the Bing-based map and filled map visuals for deprecation. An admin must enable it in the admin portal.&lt;/p&gt;
&lt;p&gt;A table of 300 stores with their revenue hides what a map shows at once: that the good stores cluster in the cities and the weak ones sit along one motorway. Location is a dimension like any other, and a map is its natural chart.&lt;/p&gt;
&lt;h2 id=&quot;what-can-the-azure-maps-visual-draw&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-can-the-azure-maps-visual-draw&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What can the Azure Maps visual draw?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:4&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Bubble layer&lt;/b&gt;&lt;ul&gt;&lt;li&gt;a circle per location, sized and coloured by measures&lt;/li&gt;&lt;li&gt;clusters bubbles when zoomed out&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Heat map layer&lt;/b&gt;&lt;span&gt;density of points, for many points where single bubbles overlap&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;3D column layer&lt;/b&gt;&lt;ul&gt;&lt;li&gt;a column per location, its height a measure&lt;/li&gt;&lt;li&gt;tilt the map to read it&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Filled map layer&lt;/b&gt;&lt;span&gt;regions (countries, states, postcodes) shaded by a measure&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Marker layer&lt;/b&gt;&lt;span&gt;custom icons and images per category, sized by a measure&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Path layer&lt;/b&gt;&lt;span&gt;lines between points, for routes and journeys&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Pie chart layer&lt;/b&gt;&lt;span&gt;a small pie per location instead of a bubble&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Reference layer&lt;/b&gt;&lt;span&gt;your own GeoJSON shapes (sales territories, delivery zones) under the data&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;The layers of the Azure Maps visual&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;which-fields-does-it-take&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-fields-does-it-take&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which fields does it take?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Bucket&lt;/th&gt;&lt;th&gt;What goes in&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Location&lt;/td&gt;&lt;td&gt;an address, city, postcode, state or country/region as text; geocoded by Azure&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Latitude, Longitude&lt;/td&gt;&lt;td&gt;coordinates in decimal degrees: exact and no geocoding needed&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Legend&lt;/td&gt;&lt;td&gt;a category: each value gets its own colour&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Size&lt;/td&gt;&lt;td&gt;a measure that scales the bubbles or markers&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Tooltips&lt;/td&gt;&lt;td&gt;more measures shown on hover&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;Coordinates beat addresses. They are exact, they are not sent anywhere to be looked up, and they do not fail on ambiguous names (&amp;quot;Paris&amp;quot; in France or Texas).&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-build-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build one?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;Check that the visual is enabled: an admin turns on the Azure Maps visual in the Power BI admin portal under the integration settings.&lt;/li&gt;&lt;li&gt;In &lt;strong&gt;Visualizations&lt;/strong&gt; pick &lt;strong&gt;Azure Maps&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Drag &lt;code&gt;Store[Latitude]&lt;/code&gt; and &lt;code&gt;Store[Longitude]&lt;/code&gt; to their buckets (or &lt;code&gt;Store[City]&lt;/code&gt; to &lt;strong&gt;Location&lt;/strong&gt;), a measure to &lt;strong&gt;Size&lt;/strong&gt; and a category to &lt;strong&gt;Legend&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;In &lt;strong&gt;Format visual&lt;/strong&gt;, pick the layers (bubble is on by default), the map &lt;strong&gt;Style&lt;/strong&gt; (road, satellite, grayscale, dark), and the &lt;strong&gt;View&lt;/strong&gt;: a fixed centre and zoom, or &lt;strong&gt;Auto zoom&lt;/strong&gt; to fit the data.&lt;/li&gt;&lt;li&gt;In the model, set each geographic column's &lt;strong&gt;Data category&lt;/strong&gt; (City, Postal code, Latitude, Longitude, ...), so Power BI and Azure know what the column holds.&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;what-data-leaves-your-model&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-data-leaves-your-model&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What data leaves your model?&lt;/h2&gt;
&lt;p&gt;Microsoft states it plainly: the visual calls a cloud service in Azure for map images and coordinates, and values in the &lt;strong&gt;Location&lt;/strong&gt; bucket may be sent to Azure to be geocoded. Latitude and longitude values do not need geocoding. If customer addresses must not leave your tenant's boundaries, geocode them in your own data pipeline and pass only coordinates.&lt;/p&gt;
&lt;h2 id=&quot;what-dax-goes-with-a-map&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-dax-goes-with-a-map&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What DAX goes with a map?&lt;/h2&gt;
&lt;p&gt;A measure for size, and often one for colour. Revenue per store, coloured by growth:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )

Revenue Growth % =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt; )

Growth Colour =
&lt;i class=&quot;f&quot;&gt;SWITCH&lt;/i&gt; (
    &lt;i class=&quot;k&quot;&gt;TRUE&lt;/i&gt; (),
    &lt;i class=&quot;m&quot;&gt;[Revenue Growth %]&lt;/i&gt; &amp;lt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#D64550&amp;quot;&lt;/i&gt;,
    &lt;i class=&quot;m&quot;&gt;[Revenue Growth %]&lt;/i&gt; &amp;lt; &lt;i class=&quot;n&quot;&gt;0.05&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#FFC72C&amp;quot;&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;#1A9E75&amp;quot;&lt;/i&gt;
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Use &lt;code&gt;Growth Colour&lt;/code&gt; in the bubble layer's &lt;strong&gt;Fill color&lt;/strong&gt; with &lt;strong&gt;fx, Field value&lt;/strong&gt;: big red bubbles are big stores that shrink. For a filled map of regions, a ratio (revenue per inhabitant, share of customers) is fairer than a total, because big regions are big anyway.&lt;/p&gt;
&lt;h2 id=&quot;should-you-move-from-the-bing-maps&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#should-you-move-from-the-bing-maps&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Should you move from the Bing maps?&lt;/h2&gt;
&lt;p&gt;The basic &lt;strong&gt;Map&lt;/strong&gt; and &lt;strong&gt;Filled map&lt;/strong&gt; visuals use Bing Maps and are scheduled for deprecation, with the timeline still being planned; existing ones keep working. Microsoft recommends moving to Azure Maps now, unless report users are in China or Korea or in a government cloud, where Azure Maps is not yet supported. Power BI can convert a Bing map to Azure Maps (see the conversion page below).&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Wrong places.&lt;/strong&gt; &amp;quot;Springfield&amp;quot; or &amp;quot;Paris&amp;quot; geocoded to the wrong country. Add the country, combine address parts into one column, or use coordinates.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Totals of big regions.&lt;/strong&gt; A filled map of revenue by country mostly shows which countries are large. Map a rate.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too many bubbles.&lt;/strong&gt; Ten thousand points overlap into a blob; use the heat map layer or bubble clustering.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Visual not available.&lt;/strong&gt; The Azure Maps visual is off until an admin enables it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Privacy.&lt;/strong&gt; Customer addresses in the Location bucket are sent for geocoding; use coordinates if that matters.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-map-visualizations-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Map visualizations in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-maps/power-bi-visual-get-started&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Get started with Azure Maps Power BI visual&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-maps/power-bi-visual-conversion&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Convert map and filled map visuals to Azure Maps&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-map-tips-and-tricks&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Tips and tricks for Power BI map visualizations&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add latitude and longitude to your location table, set their data categories, and start with the bubble layer sized by one measure. For regions without exact points, a &lt;a href=&quot;/blog/filled-map-shape-map-power-bi/&quot;&gt;filled map or shape map&lt;/a&gt; colours areas instead.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>ISINSCOPE in DAX: different logic for totals and levels</title>
    <link href="https://data.benibix.com/blog/isinscope-dax/"/>
    <id>https://data.benibix.com/blog/isinscope-dax/</id>
    <published>2026-11-19T12:00:00Z</published>
    <updated>2026-11-19T12:00:00Z</updated>
    <summary>How ISINSCOPE tells which hierarchy level a matrix cell is on in DAX, blanking totals, percent of parent at each level, different calculations per level, ISINSCOPE against HASONEVALUE and ISFILTERED, and ISATLEVEL in visual calculations.</summary>
    <category term="DAX"/>
    <category term="Logic and information"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;code&gt;ISINSCOPE ( column )&lt;/code&gt; returns TRUE when the visual is &lt;strong&gt;grouping by that column&lt;/strong&gt; at the current cell, that is, on the rows of that level and below, and FALSE on subtotals and totals above it. Use it to blank totals that make no sense (a rank, an average price), to show percent of parent at each level of a matrix, and to switch the calculation by level. Unlike &lt;code&gt;HASONEVALUE&lt;/code&gt;, it is not fooled by a slicer that selects one value.&lt;/p&gt;
&lt;p&gt;A matrix with Category, Product and a &amp;quot;rank&amp;quot; measure shows a rank on the total row, which means nothing. &lt;code&gt;ISINSCOPE&lt;/code&gt; says &amp;quot;only show this at product level&amp;quot;.&lt;/p&gt;
&lt;h2 id=&quot;how-does-it-differ-from-hasonevalue&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-it-differ-from-hasonevalue&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does it differ from HASONEVALUE?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Row&lt;/th&gt;&lt;th&gt;ISINSCOPE ( Product )&lt;/th&gt;&lt;th&gt;ISINSCOPE ( Category )&lt;/th&gt;&lt;th&gt;HASONEVALUE ( Category )&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Bikes, Mountain-200&lt;/td&gt;&lt;td&gt;TRUE&lt;/td&gt;&lt;td&gt;TRUE&lt;/td&gt;&lt;td&gt;TRUE&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bikes (subtotal)&lt;/td&gt;&lt;td&gt;FALSE&lt;/td&gt;&lt;td&gt;TRUE&lt;/td&gt;&lt;td&gt;TRUE&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;FALSE&lt;/td&gt;&lt;td&gt;FALSE&lt;/td&gt;&lt;td&gt;TRUE&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;A matrix with Category and Product on rows, slicer on Category = Bikes&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;On the grand total, &lt;code&gt;HASONEVALUE ( Category )&lt;/code&gt; is TRUE because the slicer leaves one category; &lt;code&gt;ISINSCOPE ( Category )&lt;/code&gt; is FALSE because the total does not group by category. That is why &lt;code&gt;ISINSCOPE&lt;/code&gt; is the right test for &amp;quot;am I on a total row?&amp;quot;.&lt;/p&gt;
&lt;h2 id=&quot;which-patterns-use-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-patterns-use-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which patterns use it?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- 1 blank the total of a rank&lt;/i&gt;
Product Rank =
&lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ISINSCOPE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;RANKX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; ) )

&lt;i class=&quot;c&quot;&gt;-- 2 percent of parent at each level&lt;/i&gt;
% of Parent =
&lt;i class=&quot;f&quot;&gt;SWITCH&lt;/i&gt; (
    &lt;i class=&quot;k&quot;&gt;TRUE&lt;/i&gt; (),
    &lt;i class=&quot;f&quot;&gt;ISINSCOPE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ),
        &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ) ) ),
    &lt;i class=&quot;f&quot;&gt;ISINSCOPE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; ),
        &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; ) ) ),
    &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;
)

&lt;i class=&quot;c&quot;&gt;-- 3 sum of per-product values on totals, a formula on rows&lt;/i&gt;
Bonus =
&lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;ISINSCOPE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ),
    &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; * &lt;i class=&quot;n&quot;&gt;0.02&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; * &lt;i class=&quot;n&quot;&gt;0.02&lt;/i&gt; )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Test the &lt;strong&gt;lowest&lt;/strong&gt; level first in &lt;code&gt;SWITCH ( TRUE () )&lt;/code&gt;: at product level both Product and Category are in scope.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Category, Product&lt;/th&gt;&lt;th&gt;Revenue&lt;/th&gt;&lt;th&gt;% of Parent&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Bikes&lt;/td&gt;&lt;td&gt;2,100&lt;/td&gt;&lt;td&gt;72%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Mountain-200&lt;/td&gt;&lt;td&gt;900&lt;/td&gt;&lt;td&gt;43%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Road-150&lt;/td&gt;&lt;td&gt;1,200&lt;/td&gt;&lt;td&gt;57%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Accessories&lt;/td&gt;&lt;td&gt;820&lt;/td&gt;&lt;td&gt;28%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Helmet&lt;/td&gt;&lt;td&gt;500&lt;/td&gt;&lt;td&gt;61%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bottle&lt;/td&gt;&lt;td&gt;320&lt;/td&gt;&lt;td&gt;39%&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;2,920&lt;/td&gt;&lt;td&gt;100%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;% of Parent in a matrix&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-about-visual-calculations&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-about-visual-calculations&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What about visual calculations?&lt;/h2&gt;
&lt;p&gt;In &lt;a href=&quot;/blog/visual-calculation-functions-dax/&quot;&gt;visual calculations&lt;/a&gt;, &lt;code&gt;ISATLEVEL ( [Field] )&lt;/code&gt; reports whether a field is present at the current level, and &lt;code&gt;COLLAPSE&lt;/code&gt; gives the parent's value directly: &lt;code&gt;DIVIDE ( [Revenue], COLLAPSE ( [Revenue], ROWS ) )&lt;/code&gt; is percent of parent without any &lt;code&gt;ISINSCOPE&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Testing the higher level first.&lt;/strong&gt; At product level Category is also in scope; test Product first.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;HASONEVALUE for totals.&lt;/strong&gt; Fooled by slicers; use &lt;code&gt;ISINSCOPE&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Columns not on the visual.&lt;/strong&gt; &lt;code&gt;ISINSCOPE&lt;/code&gt; is FALSE for a column that is not grouped, even if filtered.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;DirectQuery.&lt;/strong&gt; Not supported in calculated columns or RLS rules in DirectQuery mode.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/isinscope-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: ISINSCOPE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/hasonevalue-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: HASONEVALUE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/isatlevel-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: ISATLEVEL function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Wrap every rank and per-unit measure in &lt;code&gt;IF ( ISINSCOPE ( ... ) )&lt;/code&gt; so totals stop showing meaningless numbers. &lt;a href=&quot;/blog/rankx-dax/&quot;&gt;RANKX&lt;/a&gt; uses it for the total row.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>What is OneLake in Microsoft Fabric?</title>
    <link href="https://data.benibix.com/blog/what-is-onelake/"/>
    <id>https://data.benibix.com/blog/what-is-onelake/</id>
    <published>2026-11-19T12:00:00Z</published>
    <updated>2026-11-19T12:00:00Z</updated>
    <summary>OneLake is the one data lake every Fabric tenant has. What it holds, how workspaces and items sit in it, and how tools outside Fabric read it.</summary>
    <category term="Fabric"/>
    <category term="Platform"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;OneLake&lt;/strong&gt; is the single data lake that comes with every Microsoft Fabric tenant. Every lakehouse, warehouse, KQL database and mirrored database keeps its data there, as open Delta and Parquet files. It is built on Azure Data Lake Storage Gen2, so tools that read ADLS can read OneLake with a different address.&lt;/p&gt;
&lt;p&gt;Before Fabric, each team created storage accounts, and the same table ended up copied into several. In Fabric there is one lake per tenant, and the question becomes who may see which part of it, not where the copy is.&lt;/p&gt;
&lt;h2 id=&quot;how-is-onelake-organised&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-onelake-organised&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is OneLake organised?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;layers&quot;&gt;&lt;ol class=&quot;dfig-stack&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Tenant&lt;/b&gt;&lt;span&gt;one OneLake for the whole organisation&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Workspace&lt;/b&gt;&lt;span&gt;a container with its own access and capacity&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Item&lt;/b&gt;&lt;span&gt;a lakehouse, warehouse or KQL database&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;Tables and Files&lt;/b&gt;&lt;span&gt;Delta tables, and any other files&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From the tenant down to a table&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Every Fabric engine reads the same copy: Spark in a notebook, T-SQL in a warehouse or SQL analytics endpoint, and a Direct Lake semantic model in Power BI. Nobody exports a table so another engine can use it.&lt;/p&gt;
&lt;h2 id=&quot;how-do-tools-outside-fabric-reach-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-tools-outside-fabric-reach-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do tools outside Fabric reach it?&lt;/h2&gt;
&lt;p&gt;Through the ADLS Gen2 API, with the workspace and item in the path:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;text&quot;&gt;&lt;code&gt;https://onelake.dfs.fabric.microsoft.com/&amp;lt;workspace&amp;gt;/&amp;lt;item&amp;gt;.&amp;lt;itemtype&amp;gt;/Tables/&amp;lt;table&amp;gt;
abfss://Sales@onelake.dfs.fabric.microsoft.com/Orders.Lakehouse/Tables/fact_sales&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Azure Storage Explorer, Azure Databricks and anything using the ADLS SDKs can read and write there with an Entra sign-in. On Windows, the &lt;strong&gt;OneLake file explorer&lt;/strong&gt; shows it like OneDrive.&lt;/p&gt;
&lt;h2 id=&quot;how-does-data-get-in-without-a-copy&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-data-get-in-without-a-copy&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does data get in without a copy?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Load it&lt;/b&gt;&lt;span&gt;pipelines, dataflows, notebooks write new Delta tables&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Shortcut&lt;/b&gt;&lt;ul&gt;&lt;li&gt;a pointer to data in ADLS, S3 or another workspace&lt;/li&gt;&lt;li&gt;no copy&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Mirroring&lt;/b&gt;&lt;span&gt;a replica of a database, kept in sync for you&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Three ways in, and what each one costs&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Workspaces used as folders.&lt;/strong&gt; Access and capacity are set per workspace, so split workspaces by who owns and who may see the data, not by topic.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Files that are not Delta.&lt;/strong&gt; Only Delta tables in the Tables area show up for SQL and Direct Lake. A CSV in Files is still only a file.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A paused capacity.&lt;/strong&gt; OneLake data stays stored, but reading it needs the workspace's capacity to be running.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/onelake/onelake-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: OneLake, the OneDrive for data&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/onelake/onelake-access-api&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: How do I connect to OneLake?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/mirroring/overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Mirroring in Microsoft Fabric&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/blog/onelake-shortcuts-explained/&quot;&gt;OneLake shortcuts: use data without copying it&lt;/a&gt; is the way in without a copy, and the open course &lt;a href=&quot;/courses/lakehouse-in-three-layers/&quot;&gt;A lakehouse in three layers&lt;/a&gt; builds your first tables in OneLake.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Your first Power BI report from Excel, in four steps</title>
    <link href="https://data.benibix.com/blog/first-power-bi-report-from-excel/"/>
    <id>https://data.benibix.com/blog/first-power-bi-report-from-excel/</id>
    <published>2026-11-19T12:00:00Z</published>
    <updated>2026-11-19T12:00:00Z</updated>
    <summary>The path from Microsoft's own Power BI Desktop tutorial, with a worked example. Get Data from Excel, load the sheet from the Navigator, tick fields so Power BI draws a visual, and publish from the Home tab. Plus Transform Data for messy sheets, switching the chart type, and the mistakes beginners make.</summary>
    <category term="Power BI"/>
    <category term="Getting started"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; In Power BI Desktop: &lt;strong&gt;Home, Get Data, Excel&lt;/strong&gt;, pick your sheet or table in the &lt;strong&gt;Navigator&lt;/strong&gt; and select &lt;strong&gt;Load&lt;/strong&gt;. Tick the fields you want in the &lt;strong&gt;Fields&lt;/strong&gt; pane and Power BI draws a visual; change its type in the &lt;strong&gt;Visualizations&lt;/strong&gt; pane. Then &lt;strong&gt;Publish&lt;/strong&gt; from the Home tab to share it in the Power BI service. Messy data goes through &lt;strong&gt;Transform Data&lt;/strong&gt; (Power Query) first, then &lt;strong&gt;Close &amp;amp; Apply&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Power BI looks like a big program the first time you open it: a ribbon, three panes, a blank canvas. You need about five buttons of it for a first report, and Microsoft's own beginner tutorial uses exactly those.&lt;/p&gt;
&lt;h2 id=&quot;what-do-you-need-before-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-do-you-need-before-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What do you need before you start?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Power BI Desktop&lt;/strong&gt;, the free Windows app. Microsoft recommends installing it from the Microsoft Store, which keeps it updated.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;An Excel file&lt;/strong&gt; with a header row and one row per record. A small sales sheet is enough:&lt;/li&gt;&lt;/ul&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Order date&lt;/th&gt;&lt;th&gt;Region&lt;/th&gt;&lt;th&gt;Product&lt;/th&gt;&lt;th&gt;Units&lt;/th&gt;&lt;th&gt;Revenue&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;2026-10-01&lt;/td&gt;&lt;td&gt;North&lt;/td&gt;&lt;td&gt;Desk lamp&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;196&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2026-10-01&lt;/td&gt;&lt;td&gt;South&lt;/td&gt;&lt;td&gt;Office chair&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;398&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2026-10-02&lt;/td&gt;&lt;td&gt;North&lt;/td&gt;&lt;td&gt;Office chair&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;199&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2026-10-02&lt;/td&gt;&lt;td&gt;West&lt;/td&gt;&lt;td&gt;Desk lamp&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;294&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Sales.xlsx, sheet Orders (first rows)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A work or school account&lt;/strong&gt; only for the last step, publishing. Building the report needs no account.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;step-1-how-do-you-get-the-data-in&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#step-1-how-do-you-get-the-data-in&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Step 1: how do you get the data in?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Get Data&lt;/b&gt;&lt;span&gt;Home, Get Data, Excel&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Load&lt;/b&gt;&lt;span&gt;Pick the sheet in the Navigator&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Visual&lt;/b&gt;&lt;span&gt;Tick fields in the Fields pane&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;bronze&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Publish&lt;/b&gt;&lt;span&gt;Home, Publish, pick a workspace&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;The four steps of a first report&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Open Power BI Desktop and select &lt;strong&gt;Home, Get Data, Excel&lt;/strong&gt;. Browse to your file and select &lt;strong&gt;Open&lt;/strong&gt;. The &lt;strong&gt;Navigator&lt;/strong&gt; lists every sheet and every Excel table in the file. Tick the one you want (an Excel table is better than a sheet: it has a clear edge) and select &lt;strong&gt;Load&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Power BI copies the data into the report. Your Excel file stays as it is; to pick up later changes in it you select &lt;strong&gt;Refresh&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&quot;step-2-what-if-the-data-is-messy&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#step-2-what-if-the-data-is-messy&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Step 2: what if the data is messy?&lt;/h2&gt;
&lt;p&gt;Select &lt;strong&gt;Transform Data&lt;/strong&gt; instead of Load (or later from the Home tab). That opens the &lt;strong&gt;Power Query Editor&lt;/strong&gt;, where each fix becomes a recorded step that runs again on every refresh. The three you need most, from Microsoft's tutorial:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Remove Columns&lt;/strong&gt; for notes and helper columns you will not chart.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Filter Rows&lt;/strong&gt; to drop totals rows and blanks at the bottom of the sheet.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Change Data Type&lt;/strong&gt; so dates are dates and amounts are numbers (a date stored as text cannot go on a time axis).&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Then &lt;strong&gt;Close &amp;amp; Apply&lt;/strong&gt; returns you to the report.&lt;/p&gt;
&lt;h2 id=&quot;step-3-how-do-you-make-the-first-visual&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#step-3-how-do-you-make-the-first-visual&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Step 3: how do you make the first visual?&lt;/h2&gt;
&lt;p&gt;In the &lt;strong&gt;Fields&lt;/strong&gt; pane on the right, tick &lt;strong&gt;Region&lt;/strong&gt; and then &lt;strong&gt;Revenue&lt;/strong&gt;. Power BI picks a visual for you, usually a clustered column chart of revenue by region. With the sample rows above that gives North 395, South 398, West 294.&lt;/p&gt;
&lt;p&gt;Not the chart you wanted? With the visual selected, pick another type in the &lt;strong&gt;Visualizations&lt;/strong&gt; pane: one click turns columns into bars, a line or a table. Drag fields into the visual's wells (Values, Axis, Legend) to change what it shows. Click an empty spot on the canvas before ticking the next fields, or Power BI adds them to the visual you have selected.&lt;/p&gt;
&lt;p&gt;Three visuals make a good first page: a &lt;strong&gt;card&lt;/strong&gt; with total revenue, &lt;strong&gt;bars&lt;/strong&gt; by region, a &lt;strong&gt;line&lt;/strong&gt; by order date.&lt;/p&gt;
&lt;h2 id=&quot;step-4-how-do-you-share-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#step-4-how-do-you-share-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Step 4: how do you share it?&lt;/h2&gt;
&lt;p&gt;Save the file (&lt;strong&gt;File, Save&lt;/strong&gt;, a &lt;code&gt;.pbix&lt;/code&gt;). Then &lt;strong&gt;Home, Publish&lt;/strong&gt;, sign in, and pick a workspace; &amp;quot;My workspace&amp;quot; is fine for a first try. The report opens in the Power BI service in your browser, where you can share it, pin it to a dashboard or schedule a refresh. Sharing with colleagues needs a Power BI licence, see &lt;a href=&quot;/blog/power-bi-desktop-service-mobile/&quot;&gt;Power BI Desktop, service and mobile&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Loading the whole workbook.&lt;/strong&gt; Tick only the table you need in the Navigator; extra sheets make extra tables to confuse you.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Numbers loaded as text.&lt;/strong&gt; The visual shows a count instead of a sum. Fix the type in Power Query, not in Excel.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Merged cells and a title row above the headers.&lt;/strong&gt; Power Query reads the title as the header. Use Remove Top Rows and Use First Row as Headers, or clean the sheet once.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Adding fields to the wrong visual.&lt;/strong&gt; Deselect before you tick.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/fundamentals/desktop-getting-started&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Get started with Power BI Desktop&lt;/a&gt;, the interface, Get Data from Excel, Transform Data, the first visuals and Publish&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/fundamentals/desktop-get-the-desktop&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Get Power BI Desktop&lt;/a&gt;, installing from the Microsoft Store or the Download Center&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Once the first page works, make it look like a report rather than a test: one palette, one font, the same layout on every page. &lt;a href=&quot;https://tools.benibix.com/data/report-design-studio/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Report Design Studio&lt;/a&gt; builds a Power BI theme and a page layout on a live preview, and &lt;a href=&quot;/blog/how-many-visuals-per-power-bi-page/&quot;&gt;How many visuals per Power BI page?&lt;/a&gt; helps you decide what goes on the page.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Accessible Power BI reports: a checklist that works</title>
    <link href="https://data.benibix.com/blog/accessible-power-bi-report-checklist/"/>
    <id>https://data.benibix.com/blog/accessible-power-bi-report-checklist/</id>
    <published>2026-11-18T12:00:00Z</published>
    <updated>2026-11-23T12:00:00Z</updated>
    <summary>A practical accessibility checklist for Power BI reports, built on Microsoft's own list: contrast you can measure (with worked ratios), colour never alone, alt text, tab order, titles without jargon, markers, sort order, tooltips, high contrast mode and what changed for conditional formatting icons in November 2026, and how to test with a keyboard and a screen reader.</summary>
    <category term="Visuals"/>
    <category term="Report design"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; Power BI does part of the work by itself: every visual can be used with a &lt;strong&gt;keyboard&lt;/strong&gt;, &lt;strong&gt;screen readers&lt;/strong&gt; read each visual's title and type, &lt;strong&gt;high contrast&lt;/strong&gt; themes from Windows carry into the report, and &lt;strong&gt;Alt+Shift+F11&lt;/strong&gt; opens any visual as a table a screen reader can read. The rest is the author's job: text with a contrast of at least &lt;strong&gt;4.5:1&lt;/strong&gt;, &lt;strong&gt;colour never the only signal&lt;/strong&gt;, &lt;strong&gt;alt text&lt;/strong&gt; on every visual that carries meaning, a &lt;strong&gt;tab order&lt;/strong&gt; that follows the page and leaves decoration out, plain titles and a deliberate &lt;strong&gt;sort order&lt;/strong&gt;. Since November 2026, &lt;strong&gt;conditional formatting icons&lt;/strong&gt; also adapt to high contrast mode, so icon rules stay readable there.&lt;/p&gt;
&lt;p&gt;Accessible reports are not only for readers with a disability. A sales manager reading on a phone in sunlight, a director with tired eyes at 7 pm and a colleague who uses only the keyboard all hit the same walls: grey text on white, red and green that look alike, and a chart whose message sits only in a tooltip.&lt;/p&gt;
&lt;h2 id=&quot;what-does-power-bi-already-do-for-you&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-power-bi-already-do-for-you&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does Power BI already do for you?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:4&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Keyboard&lt;/b&gt;&lt;ul&gt;&lt;li&gt;every visual, data point, page tab and slicer works with the keyboard&lt;/li&gt;&lt;li&gt;Shift+? shows the shortcuts&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Screen readers&lt;/b&gt;&lt;span&gt;anything you can reach with the keyboard is read out: title, visual type, alt text&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;High contrast&lt;/b&gt;&lt;ul&gt;&lt;li&gt;a Windows high contrast theme is detected and applied&lt;/li&gt;&lt;li&gt;it follows the report when published&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Show data table&lt;/b&gt;&lt;span&gt;Alt+Shift+F11 shows the visual as a table a screen reader can walk&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Built in, no setup needed&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;These only work as well as the report allows. The keyboard follows your tab order, the screen reader reads your titles and alt text, and the data table follows your sort order.&lt;/p&gt;
&lt;h2 id=&quot;is-your-text-readable-enough&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#is-your-text-readable-enough&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Is your text readable enough?&lt;/h2&gt;
&lt;p&gt;Microsoft's checklist asks for a contrast ratio of at least &lt;strong&gt;4.5:1&lt;/strong&gt; between text and its background (WCAG 2.1, criterion 1.4.3). Light grey is the usual offender. Measured against a white background:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Text colour&lt;/th&gt;&lt;th&gt;Ratio on white&lt;/th&gt;&lt;th&gt;Passes 4.5:1&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;#999999 light grey&lt;/td&gt;&lt;td&gt;2.85 : 1&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;#767676 mid grey&lt;/td&gt;&lt;td&gt;4.54 : 1&lt;/td&gt;&lt;td&gt;yes, just&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;#605E5C warm grey&lt;/td&gt;&lt;td&gt;6.46 : 1&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;#252423 near black&lt;/td&gt;&lt;td&gt;15.49 : 1&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;White on #118DFF bright blue&lt;/td&gt;&lt;td&gt;3.35 : 1&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;White on #0B5CAD dark blue&lt;/td&gt;&lt;td&gt;6.67 : 1&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Contrast of common text colours on white, 4.5:1 or more passes&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The last two rows matter for buttons and card backgrounds: white text on a bright blue looks crisp to most people and still fails. Check titles, axis labels, data labels and text boxes, each against the background it really sits on.&lt;/p&gt;
&lt;h2 id=&quot;what-should-you-check-on-every-page&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-should-you-check-on-every-page&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What should you check on every page?&lt;/h2&gt;
&lt;p&gt;Work through it page by page before you publish. It follows Microsoft's report accessibility checklist, grouped by what you touch.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Every visual&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Text contrast 4.5:1 or more for titles, axis labels and data labels.&lt;/li&gt;&lt;li&gt;Colour is never the only signal. Add text, an icon, a marker shape or a pattern. A status column that is only red or green fails readers who cannot tell the two apart.&lt;/li&gt;&lt;li&gt;No jargon or unexplained acronyms in titles. &amp;quot;NRR by cohort&amp;quot; means nothing to a new reader; &amp;quot;Net revenue retention by sign-up month&amp;quot; does.&lt;/li&gt;&lt;li&gt;Alt text on every visual that carries meaning. Say what to see, not &amp;quot;bar chart of sales&amp;quot;. A &lt;a href=&quot;/blog/alt-text-for-power-bi-visuals/&quot;&gt;measure can write it&lt;/a&gt; so it changes with the data.&lt;/li&gt;&lt;li&gt;A deliberate sort order. The Show data table uses it, so a screen reader hears the largest value first only if you sorted it that way.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Lines, areas and scatter charts&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Turn on &lt;strong&gt;markers&lt;/strong&gt; and give each series its own &lt;strong&gt;shape&lt;/strong&gt; (Format, Shapes, Show markers, Customize series). Two lines then differ by circle and square, not only by colour.&lt;/li&gt;&lt;li&gt;Avoid colour pairs that are hard to tell apart on the same page: green and red, green and brown, blue and purple, green and blue, light green and yellow, blue and grey, green and grey, green and black.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;The page&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Tab order&lt;/strong&gt; (View, Selection, Tab order) runs the way the eye does: title, slicers, headline numbers, then detail. Decorative shapes and images are hidden from the tab order by selecting their number.&lt;/li&gt;&lt;li&gt;Slicers sit in the same place, with the same fonts and colours, on every page.&lt;/li&gt;&lt;li&gt;Nothing important lives only in a &lt;strong&gt;tooltip&lt;/strong&gt;. Readers using a keyboard or with motor difficulties struggle to open them, and report page tooltips are not read by screen readers.&lt;/li&gt;&lt;li&gt;Nothing important appears only after a click. If the conclusion needs an interaction, pre-filter the page so it is visible at once.&lt;/li&gt;&lt;li&gt;Text boxes have their text in the alt text box too, and video or audio never starts by itself and has captions or a transcript.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Conditional formatting&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Icon sets are fine as long as the icon shape differs, not only its colour. Since November 2026 these icons adjust to high contrast mode, so test the report there once.&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;how-do-you-test-it-in-ten-minutes&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-test-it-in-ten-minutes&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you test it in ten minutes?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Keyboard only&lt;/b&gt;&lt;span&gt;unplug the mouse: reach every slicer and visual with Tab, use Ctrl+Right arrow to enter a visual&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Screen reader&lt;/b&gt;&lt;span&gt;turn off scan or browse mode; listen to the first page from the top&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;High contrast&lt;/b&gt;&lt;span&gt;switch Windows to a high contrast theme, or View, High contrast colors in the service editor&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Squint&lt;/b&gt;&lt;span&gt;dim the screen or squint: if labels shout louder than the data, remove some labels&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;A short test before every publish&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In Power BI Desktop, open the screen reader before you open the file; Microsoft notes that this order gives the best experience.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Alt text that repeats the title.&lt;/strong&gt; The screen reader already reads the title and type. Alt text should add the takeaway.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Data labels and markers everywhere.&lt;/strong&gt; Turning everything on makes a busy chart harder, not easier. Keep labels where the exact number matters.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Decoration in the tab order.&lt;/strong&gt; Every background shape announced by a screen reader is noise. Hide it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Bookmark navigation never tried with a keyboard.&lt;/strong&gt; Test that every navigation button can be reached and pressed with the keyboard.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;One test, months ago.&lt;/strong&gt; Each new page needs the same ten minutes.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-accessibility-creating-reports&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Design Power BI reports for accessibility&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/fundamentals/desktop-latest-update&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What's new in Power BI, November 2026 (high contrast icons)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-accessibility-keyboard-shortcuts&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Keyboard shortcuts in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Take your most used report and do the ten-minute test before changing anything; the problems it finds are the ones readers already hit. Then fix contrast and colour-only signals first, alt text second. &lt;a href=&quot;/blog/alt-text-for-power-bi-visuals/&quot;&gt;Alt text for Power BI visuals&lt;/a&gt; writes alt text with DAX, and &lt;a href=&quot;/blog/visual-style-presets-power-bi/&quot;&gt;style presets&lt;/a&gt; make the fixed colours and fonts the default for every new visual.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Database Hub in Fabric: one view of every database you run</title>
    <link href="https://data.benibix.com/blog/fabric-database-hub/"/>
    <id>https://data.benibix.com/blog/fabric-database-hub/</id>
    <published>2026-11-18T12:00:00Z</published>
    <updated>2026-11-18T12:00:00Z</updated>
    <summary>Database Hub in Microsoft Fabric lists the Azure SQL, SQL Server (through Azure Arc), PostgreSQL, Cosmos DB and Fabric databases you already have permission to see, ranks their issues and suggestions, and lets you drill into performance telemetry, without moving any database and without a Fabric capacity. What it shows, what it costs, permissions, a worked estate example, database agents and the limits.</summary>
    <category term="Fabric"/>
    <category term="Platform"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;Database Hub&lt;/strong&gt; is a page in Fabric that shows the database estate you can already access, across &lt;strong&gt;Azure, Fabric, on-premises&lt;/strong&gt; (SQL Server through &lt;strong&gt;Azure Arc&lt;/strong&gt;) and supported multicloud resources, in one list. &lt;strong&gt;Overview&lt;/strong&gt; ranks &lt;strong&gt;issues&lt;/strong&gt; (needs attention now) and &lt;strong&gt;suggestions&lt;/strong&gt; (improve over time); &lt;strong&gt;Estate&lt;/strong&gt; is the inventory with filters, saved and shared views; &lt;strong&gt;Performance&lt;/strong&gt; shows real-time and historical health. It uses your &lt;strong&gt;existing Entra ID and Azure RBAC&lt;/strong&gt; permissions, so each person sees only what they could see before. Your databases stay where they are, and you need &lt;strong&gt;no Fabric capacity&lt;/strong&gt; and no separate licence: a free Fabric licence is enough. Database Hub was listed among Fabric's generally available features in November 2026.&lt;/p&gt;
&lt;p&gt;A typical estate grows by accident: a few Azure SQL databases for apps, PostgreSQL for a newer service, two SQL Servers on site that nobody wants to touch, Cosmos DB for one product, and now SQL databases in Fabric. Each has its own portal and its own alerts. The question &amp;quot;which of our databases needs attention today?&amp;quot; takes an afternoon. Database Hub answers it on one page.&lt;/p&gt;
&lt;h2 id=&quot;what-are-its-pages-for&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-its-pages-for&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are its pages for?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:4&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;red&quot;&gt;&lt;b&gt;Overview&lt;/b&gt;&lt;span&gt;issues and suggestions across the estate, the most urgent first&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Estate&lt;/b&gt;&lt;span&gt;every database you can access, filtered, saved as views and shared&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Performance&lt;/b&gt;&lt;span&gt;estate-level health over time, then drill into one database&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Telemetry&lt;/b&gt;&lt;span&gt;query performance data you can query directly, for SQL databases&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;The Database Hub pages&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Estate sorts resources by their number of open issues, so the first rows are the ones to look at. A &lt;strong&gt;shared view&lt;/strong&gt; shares its filters, not access: a colleague who opens your &amp;quot;production with open issues&amp;quot; view sees only the databases their own permissions allow.&lt;/p&gt;
&lt;h2 id=&quot;how-does-a-real-estate-look-in-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-a-real-estate-look-in-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does a real estate look in it?&lt;/h2&gt;
&lt;p&gt;A company with 40 databases, as Database Hub would group them:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Kind&lt;/th&gt;&lt;th&gt;Where it runs&lt;/th&gt;&lt;th&gt;Count&lt;/th&gt;&lt;th&gt;With open issues&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Azure SQL Database&lt;/td&gt;&lt;td&gt;Azure&lt;/td&gt;&lt;td&gt;18&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Azure Database for PostgreSQL flexible server&lt;/td&gt;&lt;td&gt;Azure&lt;/td&gt;&lt;td&gt;9&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SQL Server through Azure Arc&lt;/td&gt;&lt;td&gt;on-premises&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Azure Cosmos DB&lt;/td&gt;&lt;td&gt;Azure&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SQL database in Fabric&lt;/td&gt;&lt;td&gt;Fabric&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;An example estate of 40 databases in one list&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The sums: 18 + 9 + 6 + 4 + 3 = 40 databases, and 3 + 1 + 2 = 6 with open issues. Six rows to look at first instead of five portals. A saved view per team (&amp;quot;payments service&amp;quot;, &amp;quot;on-premises&amp;quot;, &amp;quot;security findings&amp;quot;) keeps everyone in the same list without everyone owning all 40.&lt;/p&gt;
&lt;h2 id=&quot;what-does-it-need-and-what-does-it-cost&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-it-need-and-what-does-it-cost&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does it need, and what does it cost?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Licence:&lt;/strong&gt; a free Fabric licence at least. No capacity, no Database Hub licence; the FAQ calls it entirely free.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Permissions:&lt;/strong&gt; at least &lt;strong&gt;Reader&lt;/strong&gt; on each Azure subscription you want to monitor for performance experiences. Database Hub never grants access by itself.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Setup:&lt;/strong&gt; register the required Azure resource providers; some SQL resources need extra setup before they show telemetry; on-premises SQL Server appears through Azure Arc.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Data:&lt;/strong&gt; it reads operational metadata, configuration posture and health signals, not your table rows. Databases keep their storage and compute in their own region.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-can-you-do-from-a-finding&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-can-you-do-from-a-finding&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What can you do from a finding?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Overview&lt;/b&gt;&lt;span&gt;an issue, for example sustained high CPU on one Azure SQL database&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Estate or Performance&lt;/b&gt;&lt;span&gt;open that database, narrow to the time the issue started&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Telemetry&lt;/b&gt;&lt;span&gt;query the performance data for that window, find the query behind it&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Native tool&lt;/b&gt;&lt;span&gt;fix it in the database's own tools: SSMS, VS Code, the Azure portal&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Save the query&lt;/b&gt;&lt;span&gt;keep it for the next time the same issue comes back&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From an issue to a fix&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;For SQL databases, the telemetry is reachable through an Azure Data Explorer-compatible endpoint, so the same data can feed a Power BI report or a notebook. Actions are deliberately conservative: anything that changes a database needs your explicit approval and your own permission to do it.&lt;/p&gt;
&lt;h2 id=&quot;what-are-database-agents&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-database-agents&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are database agents?&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Database agents&lt;/strong&gt; (preview) detect supported performance conditions, collect evidence and suggest a manual response. For &lt;strong&gt;Azure SQL Database&lt;/strong&gt; they run in Database Hub and do their core investigation without a large language model, so it uses no Copilot capacity; optional AI help on high CPU and long-running queries does. For &lt;strong&gt;PostgreSQL flexible server&lt;/strong&gt; they are a limited preview in VS Code. In both cases you apply any change yourself, through your normal change process.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Expecting a database to appear.&lt;/strong&gt; You see only what your identity can already access, and some SQL resources need setup first.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Sharing a view to grant access.&lt;/strong&gt; It does not; access stays with Azure and Fabric roles.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Treating it as a catalog.&lt;/strong&gt; It is operational, not a data catalog; use Microsoft Purview and the OneLake catalog for data discovery.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Outbound access protection.&lt;/strong&gt; Database Hub is not on the supported list for workspace outbound access protection; treat it as unsupported there.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Letting agents change production.&lt;/strong&gt; Start with investigation and summaries; automate only after permissions, approvals, rollback and audit are defined.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/database/hub/overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Database Hub in Fabric&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/database/hub/database-agents&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What are database agents?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/fundamentals/whats-new&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What's new in Microsoft Fabric&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Open Database Hub with your normal account and look at the Estate count. If it is lower than the number of databases you know you run, the gap is a list of missing permissions, unregistered providers or servers not yet in Azure Arc. Fix those first, then save one view per team. &lt;a href=&quot;/blog/fabric-horizondb-postgresql/&quot;&gt;Fabric HorizonDB&lt;/a&gt; is the PostgreSQL database that now joins that list inside Fabric.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Direct Lake on OneLake in deployment pipelines: M parameters</title>
    <link href="https://data.benibix.com/blog/direct-lake-onelake-deployment-parameters/"/>
    <id>https://data.benibix.com/blog/direct-lake-onelake-deployment-parameters/</id>
    <published>2026-11-18T12:00:00Z</published>
    <updated>2026-11-18T12:00:00Z</updated>
    <summary>Deployment pipelines have no data source rules for Direct Lake on OneLake models, so each stage kept reading the development lakehouse until someone fixed it by hand. Since November 2026 (preview), text M parameters plus parameter rules point development, test and production at their own lakehouse or warehouse. The TMDL to write, the rules per stage, a worked three-stage example and the checks after deploying.</summary>
    <category term="Power BI"/>
    <category term="Modelling"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;Direct Lake on OneLake&lt;/strong&gt; model reads its tables through one shared expression, &lt;code&gt;AzureStorage.DataLake(&amp;quot;https://onelake.dfs.fabric.microsoft.com/&amp;lt;workspace-id&amp;gt;/&amp;lt;lakehouse-id&amp;gt;&amp;quot;, ...)&lt;/code&gt;. Deployment pipelines offer &lt;strong&gt;no data source rule&lt;/strong&gt; for it, so the IDs travel unchanged from stage to stage. The fix, in &lt;strong&gt;preview&lt;/strong&gt; since the November 2026 update: replace the IDs with &lt;strong&gt;text M parameters&lt;/strong&gt; (&lt;code&gt;WorkspaceId&lt;/code&gt;, &lt;code&gt;LakehouseId&lt;/code&gt;) in &lt;strong&gt;TMDL view&lt;/strong&gt;, then add a &lt;strong&gt;parameter rule&lt;/strong&gt; for each in the test and production stages. After the next deploy, each stage's model reads its own lakehouse. Refresh and check the lineage after the first deploy.&lt;/p&gt;
&lt;p&gt;Picture the usual setup: a development workspace with a small lakehouse of sample data, a test workspace with a copy of last month, and production with everything. The semantic model is built once in development and deployed forward. Without parameters, the production model would read the development lakehouse after deployment, and nobody notices until a manager asks why the numbers stopped in March.&lt;/p&gt;
&lt;h2 id=&quot;why-is-there-no-data-source-rule&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-is-there-no-data-source-rule&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why is there no data source rule?&lt;/h2&gt;
&lt;p&gt;Data source rules in deployment pipelines work for a fixed list of sources (SQL Server, Azure SQL, SharePoint, OData and a few more), and only between sources of the same type. A Direct Lake on OneLake model points straight at a OneLake storage path, which is not on that list. For everything else, Microsoft's guidance is the same: &lt;strong&gt;use parameters&lt;/strong&gt;. Direct Lake on SQL models are different again, because their expression points at the SQL analytics endpoint.&lt;/p&gt;
&lt;h2 id=&quot;what-does-the-tmdl-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-the-tmdl-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does the TMDL look like?&lt;/h2&gt;
&lt;p&gt;In web modelling, open &lt;strong&gt;TMDL view&lt;/strong&gt;, find the shared expression that holds the &lt;code&gt;AzureStorage.DataLake&lt;/code&gt; connection, and change it to use two parameters. Keep the expression's existing name (here &lt;code&gt;DirectLake - Sales&lt;/code&gt;) so the partitions still find it:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;text&quot;&gt;&lt;code&gt;createOrReplace
	expression 'DirectLake - Sales' =
			let
			    Source = AzureStorage.DataLake(&amp;quot;https://onelake.dfs.fabric.microsoft.com/&amp;quot; &amp;amp; WorkspaceId &amp;amp; &amp;quot;/&amp;quot; &amp;amp; LakehouseId, [HierarchicalNavigation = true])
			in
			    Source

	expression WorkspaceId = &amp;quot;&amp;lt;dev-workspace-id&amp;gt;&amp;quot; meta [IsParameterQuery = true, IsParameterQueryRequired = true, Type = &amp;quot;Text&amp;quot;]

	expression LakehouseId = &amp;quot;&amp;lt;dev-lakehouse-id&amp;gt;&amp;quot; meta [IsParameterQuery = true, IsParameterQueryRequired = true, Type = &amp;quot;Text&amp;quot;]&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Four rules for this script:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;The parameters must be of type &lt;strong&gt;Text&lt;/strong&gt;, or parameter rules cannot rebind them.&lt;/li&gt;&lt;li&gt;Use the &lt;strong&gt;IDs&lt;/strong&gt;, not full URLs. For a warehouse, name the parameter &lt;code&gt;WarehouseId&lt;/code&gt; and use the warehouse ID, never the SQL analytics endpoint's ID.&lt;/li&gt;&lt;li&gt;Every &lt;code&gt;expression&lt;/code&gt; sits at the &lt;strong&gt;same indentation level&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Keep any other connection options and annotations on the expression as they were.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;If you prefer one value per stage, a single &lt;code&gt;OneLakeSourceUrl&lt;/code&gt; parameter holding the whole URL works too, with &lt;code&gt;AzureStorage.DataLake(OneLakeSourceUrl, [HierarchicalNavigation = true])&lt;/code&gt; and one rule instead of two.&lt;/p&gt;
&lt;h2 id=&quot;which-rule-goes-in-which-stage&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-rule-goes-in-which-stage&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which rule goes in which stage?&lt;/h2&gt;
&lt;p&gt;Rules are set in the &lt;strong&gt;target&lt;/strong&gt; stage, never in development. With three stages:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Stage&lt;/th&gt;&lt;th&gt;WorkspaceId&lt;/th&gt;&lt;th&gt;LakehouseId&lt;/th&gt;&lt;th&gt;Where the value comes from&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Development&lt;/td&gt;&lt;td&gt;dev workspace ID&lt;/td&gt;&lt;td&gt;dev lakehouse ID&lt;/td&gt;&lt;td&gt;the TMDL itself; no rules allowed here&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Test&lt;/td&gt;&lt;td&gt;test workspace ID&lt;/td&gt;&lt;td&gt;test lakehouse ID&lt;/td&gt;&lt;td&gt;parameter rules in the Test stage&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Production&lt;/td&gt;&lt;td&gt;prod workspace ID&lt;/td&gt;&lt;td&gt;prod lakehouse ID&lt;/td&gt;&lt;td&gt;parameter rules in the Production stage&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Parameter values per stage (the IDs are placeholders for your own)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Write parameters&lt;/b&gt;&lt;span&gt;TMDL view in development: WorkspaceId, LakehouseId as Text&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Deploy once&lt;/b&gt;&lt;span&gt;the model must exist in the target stage before you can add rules&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Add rules&lt;/b&gt;&lt;span&gt;Deployment rules, the model, Parameter rules: set both IDs for that stage&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Deploy again&lt;/b&gt;&lt;span&gt;rules only apply on a deployment from the stage before&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Refresh and check&lt;/b&gt;&lt;span&gt;refresh, open lineage, confirm the model reads that stage's lakehouse&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From parameters to a production model on production data&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The same parameters can serve several connections: if a model reads a lakehouse and a warehouse in the same workspace, both expressions share &lt;code&gt;WorkspaceId&lt;/code&gt; and each gets its own item ID parameter.&lt;/p&gt;
&lt;h2 id=&quot;where-do-you-find-the-ids&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-find-the-ids&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you find the IDs?&lt;/h2&gt;
&lt;p&gt;Open the workspace or the lakehouse in the browser. The address shows &lt;code&gt;/groups/&amp;lt;workspace-id&amp;gt;/&lt;/code&gt; and, for a lakehouse, &lt;code&gt;/lakehouses/&amp;lt;lakehouse-id&amp;gt;&lt;/code&gt;. Copy the GUIDs only. For a warehouse, take the ID from the warehouse item's own address, not from its SQL analytics endpoint.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;The production model still reads development.&lt;/strong&gt; The rules were added but nothing was deployed since. Deploy from test to production once more.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Rules you cannot add.&lt;/strong&gt; You are not the owner of the semantic model in that stage; only the item owner can create rules. Rules also cannot exist in the development stage.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&amp;quot;Table not found&amp;quot; after deploying.&lt;/strong&gt; The target lakehouse lacks a table or column the model uses. Parameters change where the model looks, not what is there.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Access denied in test.&lt;/strong&gt; The target model's identity or connection has no access to the test lakehouse. Parameters do not grant access.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Rules gone after reassigning a workspace.&lt;/strong&gt; Unassigning and reassigning a workspace to the pipeline deletes its rules; set them up again.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A composite model.&lt;/strong&gt; Its text parameters can be made in Power Query, but the Direct Lake expression itself is only editable in TMDL view.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Preview.&lt;/strong&gt; The parameter support is in preview; test the whole path once in a copy before relying on it for a release.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/fundamentals/direct-lake-develop&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Develop Direct Lake semantic models (Use M parameters with deployment pipelines)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/cicd/deployment-pipelines/create-rules&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create deployment rules&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/fundamentals/desktop-latest-update&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What's new in Power BI, November 2026&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Open your Direct Lake on OneLake model in TMDL view and check whether the connection holds hard-coded IDs. If it does, add the two parameters in development, deploy once, set the rules in test and production, and deploy again. &lt;a href=&quot;/blog/direct-lake-power-bi-explained/&quot;&gt;Direct Lake in Power BI&lt;/a&gt; covers how the storage mode works, and &lt;a href=&quot;/blog/version-control-power-bi-pbip/&quot;&gt;version control with PBIP&lt;/a&gt; keeps the TMDL change in source control.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Filter button on Power BI tables: filter on the visual</title>
    <link href="https://data.benibix.com/blog/filter-button-table-matrix-power-bi/"/>
    <id>https://data.benibix.com/blog/filter-button-table-matrix-power-bi/</id>
    <published>2026-11-18T12:00:00Z</published>
    <updated>2026-11-18T12:00:00Z</updated>
    <summary>The Filter action button in Power BI (preview since November 2026) puts a table's or matrix's own filters on the visual, so readers change them without the Filters pane. What the count on the button includes, how to turn it on and style it, how to prepare the filters, and when the Filters pane is still the right place.</summary>
    <category term="Visuals"/>
    <category term="Tables"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; the &lt;strong&gt;Filter action button&lt;/strong&gt; adds a &lt;strong&gt;Filter&lt;/strong&gt; button to a table or matrix. Readers select it and an overlay opens with that visual's own filters (the &lt;strong&gt;Filters on this visual&lt;/strong&gt; section of the Filters pane), so they can change them right where they are reading. The button shows how many &lt;strong&gt;visual-level&lt;/strong&gt; filters are active; page filters, report filters and slicers are not counted. You turn it on per visual under &lt;strong&gt;Format visual, General, Action buttons&lt;/strong&gt;. It is in &lt;strong&gt;preview&lt;/strong&gt; since the November 2026 update and works on &lt;strong&gt;table and matrix&lt;/strong&gt; visuals only.&lt;/p&gt;
&lt;p&gt;Readers rarely find the Filters pane. They see an order table on the right of a page, want only the orders above 500, and look for a control on the table itself. Until now the answer was &amp;quot;open the pane on the right, find the section for this visual, expand the right card&amp;quot;. The Filter button puts exactly that section on the table.&lt;/p&gt;
&lt;h2 id=&quot;what-does-the-reader-see&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-the-reader-see&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does the reader see?&lt;/h2&gt;
&lt;p&gt;Take an order table on a page that also has a Year page filter and a Region slicer:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Filter&lt;/th&gt;&lt;th&gt;Set where&lt;/th&gt;&lt;th&gt;Counted on the button&lt;/th&gt;&lt;th&gt;In the overlay&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Status is Open, Late&lt;/td&gt;&lt;td&gt;on the table (visual level)&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Amount is more than 500&lt;/td&gt;&lt;td&gt;on the table (visual level)&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Year is 2026&lt;/td&gt;&lt;td&gt;page level&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;no, a link opens the Filters pane&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Region slicer: West&lt;/td&gt;&lt;td&gt;a slicer on the page&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Which filters the Filter button counts and shows&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;So this button counts the two filters on the table, Status and Amount. The reader changes Status or Amount in the overlay; the Year and the slicer stay where they are, and a link at the bottom of the overlay opens the Filters pane for the rest.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-turn-it-on&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-turn-it-on&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you turn it on?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Add visual filters&lt;/b&gt;&lt;span&gt;drag the fields readers should filter into Filters on this visual&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Lock or hide&lt;/b&gt;&lt;span&gt;lock filters readers must not change; hide the ones they need not see&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Action buttons on&lt;/b&gt;&lt;span&gt;Format visual, General tab, Action buttons&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Style it&lt;/b&gt;&lt;span&gt;position, icon, text and colours under Action buttons&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From a plain table to one readers filter themselves&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ol&gt;&lt;li&gt;Open the report in Power BI Desktop, or in editing mode in the service, and select the table or matrix.&lt;/li&gt;&lt;li&gt;Add the fields readers should filter to &lt;strong&gt;Filters on this visual&lt;/strong&gt; in the Filters pane. The overlay can only show what is there.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Lock&lt;/strong&gt; a filter that must stay as it is (a filter that keeps cancelled orders out, for example) and &lt;strong&gt;hide&lt;/strong&gt; any that would only confuse. Locked and hidden filters are not available in the overlay.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Format visual, General&lt;/strong&gt;, turn on &lt;strong&gt;Action buttons&lt;/strong&gt;. The Filter button appears on the visual.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;The button works whether the Filters pane is shown or hidden from readers, so a report that hides the pane for a cleaner look can still let readers filter one table.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-style-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-style-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you style it?&lt;/h2&gt;
&lt;p&gt;Expand &lt;strong&gt;Action buttons&lt;/strong&gt; on the General tab:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Position&lt;/strong&gt;: &lt;strong&gt;Within title&lt;/strong&gt;, &lt;strong&gt;Above&lt;/strong&gt; or &lt;strong&gt;Below&lt;/strong&gt; the visual, then left or right alignment. Within title keeps the table's height free.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Apply settings to&lt;/strong&gt;: pick the button and its &lt;strong&gt;states&lt;/strong&gt;, or &lt;strong&gt;All&lt;/strong&gt; for every button and state.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Icons&lt;/strong&gt;, &lt;strong&gt;Button text&lt;/strong&gt;, &lt;strong&gt;Background&lt;/strong&gt;, &lt;strong&gt;Fill&lt;/strong&gt;, &lt;strong&gt;Border&lt;/strong&gt;, &lt;strong&gt;Shadow&lt;/strong&gt;, &lt;strong&gt;Glow&lt;/strong&gt; and &lt;strong&gt;Padding&lt;/strong&gt;: the same options as other buttons.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;The filter cards inside the overlay are styled by the &lt;strong&gt;Filters pane&lt;/strong&gt; formatting, not by the button. If the cards look wrong in the overlay, format the Filters pane. The overlay background follows the light or dark mode setting of Power BI.&lt;/p&gt;
&lt;h2 id=&quot;when-is-the-filters-pane-still-better&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-the-filters-pane-still-better&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is the Filters pane still better?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Filter button&lt;/b&gt;&lt;span&gt;filters that only make sense for one table: amount bands, status, a top N&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Slicer&lt;/b&gt;&lt;span&gt;filters readers change all the time and that drive the whole page&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Filters pane&lt;/b&gt;&lt;span&gt;page and report filters, many filters at once, and filters readers rarely touch&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Where a filter belongs&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;A filter that should change the whole page belongs in a slicer or a page filter, not on one table. Readers who change Status on the table and see the chart beside it unchanged will think the report is broken, unless the table's title makes clear the filter is its own.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A button on a chart.&lt;/strong&gt; Action buttons are only for tables and matrices. Charts keep the Filters pane.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;An empty overlay.&lt;/strong&gt; The visual has no editable visual-level filters. Add fields to Filters on this visual, and check they are not all locked or hidden.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A count that seems wrong.&lt;/strong&gt; The number counts visual-level filters only. A slicer selection is never part of it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Preview surprises.&lt;/strong&gt; The feature is in preview, so its behaviour can still change. Test the report after each Power BI Desktop update.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too many filters on one table.&lt;/strong&gt; Ten filter cards in an overlay is the Filters pane again, only smaller. Keep two to four.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualizations-action-buttons&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Add action buttons to Power BI visuals&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/fundamentals/desktop-latest-update&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What's new in Power BI, November 2026&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Pick the table readers ask about most, give it two visual-level filters they really use, lock the rest and turn on the Filter button in the title. &lt;a href=&quot;/blog/table-visual-power-bi/&quot;&gt;The table visual in Power BI&lt;/a&gt; and &lt;a href=&quot;/blog/matrix-visual-power-bi/&quot;&gt;the matrix visual&lt;/a&gt; cover the rest of their formatting, and &lt;a href=&quot;/blog/slicer-power-bi/&quot;&gt;slicers in Power BI&lt;/a&gt; covers the filters that belong to the whole page.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Power BI in SharePoint Online: embed a report, visual or app</title>
    <link href="https://data.benibix.com/blog/embed-power-bi-in-sharepoint/"/>
    <id>https://data.benibix.com/blog/embed-power-bi-in-sharepoint/</id>
    <published>2026-11-18T12:00:00Z</published>
    <updated>2026-11-18T12:00:00Z</updated>
    <summary>The Power BI web part puts a live report, one page or a single visual on a modern SharePoint Online page, with permissions and row-level security intact, and since November 2026 it can also embed a whole workspace app with its navigation. The steps, the web part settings, who needs which licence (a worked 200-viewer example), why people see a blank part, and the limits.</summary>
    <category term="Power BI"/>
    <category term="Apps and sharing"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; on a &lt;strong&gt;modern&lt;/strong&gt; SharePoint Online page, add the &lt;strong&gt;Power BI&lt;/strong&gt; web part (Data analysis section), then either paste the link from &lt;strong&gt;File, Embed report, SharePoint Online&lt;/strong&gt; in the Power BI service or &lt;strong&gt;browse workspaces&lt;/strong&gt; to pick a report, a page, or a &lt;strong&gt;single visual&lt;/strong&gt;. Publish the page. The embed keeps &lt;strong&gt;Power BI permissions and row-level security&lt;/strong&gt;, so nobody sees more than in Power BI, but it also &lt;strong&gt;grants nothing&lt;/strong&gt;: every viewer needs access to the report and to the page. Viewers need &lt;strong&gt;Pro or PPU&lt;/strong&gt;, unless the content sits on &lt;strong&gt;F64 or larger&lt;/strong&gt; (or Premium) capacity. The November 2026 update adds embedding a &lt;strong&gt;whole workspace app&lt;/strong&gt;, with its navigation, sections and audiences, by app URL or workspace picker.&lt;/p&gt;
&lt;p&gt;Teams live in SharePoint: the sales site has the price lists, the process documents and the news. Sending people from there to the Power BI portal for the one number they need loses half of them. Putting the live report on the page where they already are is the simplest way to get it read.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-embed-a-report&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-embed-a-report&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you embed a report?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Modern page&lt;/b&gt;&lt;span&gt;Edit an existing page, or Pages, New, Site Page&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Power BI web part&lt;/b&gt;&lt;span&gt;+ in the page, Data analysis, Power BI, Add content&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Pick the content&lt;/b&gt;&lt;span&gt;paste the embed link, or Browse workspaces: report, page, or one visual&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Set the display&lt;/b&gt;&lt;span&gt;page, fit, navigation pane, filter pane, action bar&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Publish changes&lt;/b&gt;&lt;span&gt;then check access with a viewer's account&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From a report to a SharePoint page&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Browsing lets you pick the &lt;strong&gt;Report Page&lt;/strong&gt; and switch on &lt;strong&gt;Embed a single visual&lt;/strong&gt; to show one chart. URL filters work in the link, but you must add them by hand; they are not appended for you.&lt;/p&gt;
&lt;h2 id=&quot;what-do-the-web-part-settings-do&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-do-the-web-part-settings-do&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What do the web part settings do?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Setting&lt;/th&gt;&lt;th&gt;What it does&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Page name&lt;/td&gt;&lt;td&gt;the page shown first (clear the page from the URL to choose here)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Display&lt;/td&gt;&lt;td&gt;how the report fits the SharePoint column&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Show Nav Pane&lt;/td&gt;&lt;td&gt;shows or hides the page tabs&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Show Filter Pane&lt;/td&gt;&lt;td&gt;shows or hides the filters&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Show Action Bar&lt;/td&gt;&lt;td&gt;shows or hides the menu above the report&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Show in mobile or email view&lt;/td&gt;&lt;td&gt;allows viewing in those views&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Power BI web part settings&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;For a news-style page, one visual with the filter pane and action bar hidden reads best. For a team hub, the full report with its page tabs.&lt;/p&gt;
&lt;h2 id=&quot;who-needs-which-licence&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#who-needs-which-licence&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Who needs which licence?&lt;/h2&gt;
&lt;p&gt;The author needs &lt;strong&gt;Pro or PPU&lt;/strong&gt; to add the web part. Viewers depend on where the content lives:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Report and model stored on&lt;/th&gt;&lt;th&gt;Free users can view?&lt;/th&gt;&lt;th&gt;Licences the viewers need&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Shared capacity (Pro workspace)&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;200 Pro or PPU&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Fabric F32&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;200 Pro or PPU&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Fabric F64 or larger, or Premium&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;none beyond a free licence&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;200 viewers on a SharePoint page, by capacity&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Both the report &lt;strong&gt;and&lt;/strong&gt; its semantic model must be on the qualifying capacity; otherwise free users see a prompt to upgrade their licence. Every viewer must also sign in to the Power BI service once to activate their licence.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-give-access&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-give-access&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you give access?&lt;/h2&gt;
&lt;p&gt;Embedding does not share. Two common ways:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Microsoft 365 group site:&lt;/strong&gt; add the group as a member of the workspace and of the SharePoint site.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Through an app:&lt;/strong&gt; publish an app, install it (or let admins push it), copy the report link &lt;strong&gt;from the app&lt;/strong&gt;, not from the workspace, and use that in the web part. Users need access to the app and the page.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-does-app-embedding-add&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-app-embedding-add&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does app embedding add?&lt;/h2&gt;
&lt;p&gt;With the November 2026 update, the web part can show a &lt;strong&gt;whole workspace app&lt;/strong&gt;, its navigation, sections and content, chosen by the app's URL or the workspace picker. Existing Power BI permissions and &lt;strong&gt;audiences&lt;/strong&gt; keep working, so one page can serve sales reps and managers who each see their own part of the app. It replaces a page full of separate report web parts when the app already has the structure. The detailed steps are still being added to Microsoft Learn; check the web part's own options in your tenant.&lt;/p&gt;
&lt;h2 id=&quot;why-does-the-web-part-stay-blank&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-does-the-web-part-stay-blank&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why does the web part stay blank?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;No access&lt;/strong&gt; to the report (or the app), or the report was &lt;strong&gt;deleted&lt;/strong&gt;: the part shows a &amp;quot;can't load&amp;quot; message.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Guest users&lt;/strong&gt; (Microsoft Entra B2B) are not supported; they see the loading logo and nothing else.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Multifactor sign-in&lt;/strong&gt;: if SharePoint was opened without MFA and Power BI requires it, the user may be asked to verify or see an error. Signing in to SharePoint with MFA usually fixes it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&amp;quot;Missing refresh token&amp;quot;&lt;/strong&gt; error: sign out of SharePoint, close every browser window, sign in again.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Classic SharePoint pages&lt;/strong&gt; do not support the web part; only modern pages do.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Embedding the workspace link instead of the app link&lt;/strong&gt; when sharing through an app. Users without workspace access see nothing.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Model on shared capacity, report on F64.&lt;/strong&gt; Free users still need Pro; the model counts too.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Expecting the page language in the report.&lt;/strong&gt; Power BI does not support every language SharePoint does.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Copilot without capacity.&lt;/strong&gt; The &amp;quot;Enable Copilot&amp;quot; option in the embed dialog needs the Copilot tenant switch and paid Fabric or Premium capacity.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Auto-filters by page.&lt;/strong&gt; Filters are not appended to the URL automatically; build each filtered link yourself.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/collaborate-share/office-integration/service-embed-report-spo&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Embed a report web part in SharePoint Online&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/fundamentals/desktop-latest-update&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What's new in Power BI, November 2026&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-create-distribute-apps&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Publish a workspace app in Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Pick the SharePoint page your team opens most and the one visual they ask about most. Embed just that visual, test it with a colleague's account, and watch whether they stop asking for screenshots. &lt;a href=&quot;/blog/org-app-audiences-power-bi/&quot;&gt;Org app audiences&lt;/a&gt; shows how to shape an app before embedding all of it.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Semantic view or semantic model in Fabric: which to use?</title>
    <link href="https://data.benibix.com/blog/semantic-view-vs-semantic-model/"/>
    <id>https://data.benibix.com/blog/semantic-view-vs-semantic-model/</id>
    <published>2026-11-18T12:00:00Z</published>
    <updated>2026-11-18T12:00:00Z</updated>
    <summary>Semantic views (preview since November 2026) define tables, relationships and DAX metrics as YAML files next to the data in a Fabric lakehouse, and publishing one creates a read-only Direct Lake on OneLake semantic model. How they relate to Power BI semantic models, a worked example whose numbers add up, sharing one definition across lakehouses, permissions, and the preview limits that decide the choice today.</summary>
    <category term="Power BI"/>
    <category term="Modelling"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;semantic view&lt;/strong&gt; is a set of &lt;strong&gt;YAML files&lt;/strong&gt; stored in a lakehouse (under &lt;code&gt;Context/Semantic Views/&amp;lt;name&amp;gt;/&lt;/code&gt;) that describes tables, relationships and &lt;strong&gt;metrics written in DAX&lt;/strong&gt;. Selecting &lt;strong&gt;Publish&lt;/strong&gt; turns it into a &lt;strong&gt;read-only Direct Lake on OneLake semantic model&lt;/strong&gt; with the same name, which reports and agents query. The YAML stays the source of truth: you change the files and publish again. It &lt;strong&gt;complements&lt;/strong&gt; Power BI semantic models rather than replacing them. Use a view when one definition of &amp;quot;revenue&amp;quot; must be shared across lakehouses and teams; author a &lt;strong&gt;semantic model&lt;/strong&gt; directly when you need other storage modes, other sources, Git and deployment pipelines, or the full modelling tools. Semantic views are in &lt;strong&gt;preview&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Every company with more than one Power BI model has met this: three models, three slightly different &amp;quot;net revenue&amp;quot; measures, and a meeting about why the numbers differ. A semantic view puts the definition next to the data, in plain text files that can be shared by shortcut, so every model built from it calculates revenue the same way.&lt;/p&gt;
&lt;h2 id=&quot;how-do-the-two-fit-together&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-the-two-fit-together&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do the two fit together?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;YAML in the lakehouse&lt;/b&gt;&lt;span&gt;Context/Semantic Views/sales: datasets, relationships, metrics; you edit these&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Publish&lt;/b&gt;&lt;span&gt;validates the files and compiles them to TMDL in SystemContext&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Generated semantic model&lt;/b&gt;&lt;span&gt;read-only, Direct Lake on OneLake, same name as the view&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Reports and agents&lt;/b&gt;&lt;span&gt;connect to the model like any other semantic model&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From YAML files to a report&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The generated model is a normal semantic model to its readers, but nobody edits it. You can open it in web modelling to inspect it, and connect to it from Power BI Desktop to build a report; editing it there, XMLA access and building an ontology on it are not supported.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-view-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-view-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a view look like?&lt;/h2&gt;
&lt;p&gt;Take a lakehouse with two tables, &lt;code&gt;dbo.orders&lt;/code&gt; and &lt;code&gt;dbo.customers&lt;/code&gt;. A schema file describes them and the relationship:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;yaml&quot;&gt;&lt;code&gt;version: 0.2.0.dev0
name: sales
description: Orders and customers for revenue reporting.
datasets:
  - name: orders
    source: dbo.orders
    description: One row per order.
  - name: customers
    source: dbo.customers
    description: One row per customer with its segment.
relationships:
  - name: orders_to_customers
    from: orders
    to: customers
    from_columns:
      - CustomerId
    to_columns:
      - CustomerId&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;A second file in the same folder holds the metrics. The DAX uses the &lt;strong&gt;dataset names&lt;/strong&gt; from the YAML (&lt;code&gt;'orders'&lt;/code&gt;), not the source table names:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;yaml&quot;&gt;&lt;code&gt;version: 0.2.0.dev0
name: sales
metrics:
  - name: Gross Sales
    description: Order amount before discounts.
    expression:
      dialects:
        - dialect: DAX
          expression: &amp;quot;SUM('orders'[Amount])&amp;quot;
  - name: Net Sales
    description: Order amount after discounts.
    expression:
      dialects:
        - dialect: DAX
          expression: &amp;quot;SUM('orders'[Amount]) - SUM('orders'[Discount])&amp;quot;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Publishing merges both files into one definition and builds the model.&lt;/p&gt;
&lt;h2 id=&quot;do-the-numbers-add-up&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#do-the-numbers-add-up&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Do the numbers add up?&lt;/h2&gt;
&lt;p&gt;Five orders, two segments:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;OrderId&lt;/th&gt;&lt;th&gt;Customer&lt;/th&gt;&lt;th&gt;Segment&lt;/th&gt;&lt;th&gt;Amount&lt;/th&gt;&lt;th&gt;Discount&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;C1&lt;/td&gt;&lt;td&gt;Retail&lt;/td&gt;&lt;td&gt;200&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;C2&lt;/td&gt;&lt;td&gt;Business&lt;/td&gt;&lt;td&gt;500&lt;/td&gt;&lt;td&gt;50&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;C1&lt;/td&gt;&lt;td&gt;Retail&lt;/td&gt;&lt;td&gt;150&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;C3&lt;/td&gt;&lt;td&gt;Business&lt;/td&gt;&lt;td&gt;300&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;C2&lt;/td&gt;&lt;td&gt;Business&lt;/td&gt;&lt;td&gt;250&lt;/td&gt;&lt;td&gt;25&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;3 customers&lt;/td&gt;&lt;td&gt;2 segments&lt;/td&gt;&lt;td&gt;1,400&lt;/td&gt;&lt;td&gt;125&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The sample orders and what the metrics return&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;So &lt;strong&gt;Gross Sales&lt;/strong&gt; is 1,400 and &lt;strong&gt;Net Sales&lt;/strong&gt; 1,400 - 125 = &lt;strong&gt;1,275&lt;/strong&gt;. By segment, Retail is 350 - 20 = &lt;strong&gt;330&lt;/strong&gt; and Business 1,050 - 105 = &lt;strong&gt;945&lt;/strong&gt;, and 330 + 945 = 1,275. A quick check after publishing, in DAX query view on the generated model:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;EVALUATE
&lt;i class=&quot;f&quot;&gt;SUMMARIZECOLUMNS&lt;/i&gt; (
    &lt;i class=&quot;s&quot;&gt;'customers'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Segment]&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Gross&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Gross Sales]&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Net&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Net Sales]&lt;/i&gt;
)
ORDER BY &lt;i class=&quot;s&quot;&gt;'customers'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Segment]&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;If Business does not show 945, the relationship or a column name in the YAML is wrong.&lt;/p&gt;
&lt;h2 id=&quot;how-do-two-teams-share-one-definition&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-two-teams-share-one-definition&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do two teams share one definition?&lt;/h2&gt;
&lt;p&gt;A view only sees tables in its own lakehouse. To reuse the definition elsewhere, create a &lt;strong&gt;OneLake shortcut&lt;/strong&gt; to the view folder (or a subfolder, such as only the metrics) in the other lakehouse, then publish there. Each lakehouse supplies its own data with the same table and column names, and gets its own generated model:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Shared metrics folder&lt;/b&gt;&lt;span&gt;Gross Sales and Net Sales, written once&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Austria lakehouse&lt;/b&gt;&lt;span&gt;shortcut to the metrics, its own orders; publishes its own model&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Germany lakehouse&lt;/b&gt;&lt;span&gt;shortcut to the metrics, its own orders; publishes its own model&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;One revenue definition, two regional lakehouses&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;When the shared metric changes, republish each consuming view; the models are not combined or updated by themselves.&lt;/p&gt;
&lt;h2 id=&quot;which-one-should-you-choose-today&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-one-should-you-choose-today&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which one should you choose today?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;You need&lt;/th&gt;&lt;th&gt;Semantic view&lt;/th&gt;&lt;th&gt;Semantic model&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Metrics next to lakehouse data, shared by shortcut&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Import, DirectQuery or composite&lt;/td&gt;&lt;td&gt;no, Direct Lake only&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sources outside one lakehouse&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Git and deployment pipelines&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Editing in Desktop or XMLA tools&lt;/td&gt;&lt;td&gt;no, read-only&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Relationships on several columns&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Semantic view or semantic model, by requirement&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Cost is not a deciding factor: a view has no meter of its own; its files use OneLake storage and queries on the generated model use the usual Direct Lake meters. Today, a semantic view suits a team that keeps its data in lakehouses and wants plain-text, shareable metric definitions. A production model with CI/CD, several sources or advanced modelling stays a semantic model.&lt;/p&gt;
&lt;h2 id=&quot;who-can-do-what&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#who-can-do-what&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Who can do what?&lt;/h2&gt;
&lt;p&gt;Creating and publishing needs &lt;strong&gt;Write&lt;/strong&gt; on the lakehouse and &lt;strong&gt;Contributor&lt;/strong&gt; or higher in the workspace. The generated model takes its permissions from the lakehouse: lakehouse Read gives model &lt;strong&gt;Read and Build&lt;/strong&gt;, lakehouse Write gives model &lt;strong&gt;Write&lt;/strong&gt;. The generated model supports OneLake security; the Context folder does not. If a view includes tables or columns hidden by object-level security, the model still enforces it, but people who can read SystemContext can see the names of those objects.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Publishing in a Git-connected workspace.&lt;/strong&gt; Not possible in the preview, nor with deployment pipelines, Power Platform solutions or workspace-level private links.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;DAX that uses the source table name.&lt;/strong&gt; Write &lt;code&gt;'orders'[Amount]&lt;/code&gt;, the dataset name, not &lt;code&gt;dbo.orders&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Editing SystemContext.&lt;/strong&gt; It is generated output. Edit the YAML under Context and publish again.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Renaming the view folder or the model.&lt;/strong&gt; They are not kept in step; a rename can stop later publishes from updating the original model, and republishing after deleting the model creates a new one without the old connections.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Two people publishing at once.&lt;/strong&gt; Publish does not lock the files, and the last one wins.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A name clash.&lt;/strong&gt; Publishing fails if the workspace already has another item with the view's name.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/fundamentals/semantic-views-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Semantic views (preview)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/fundamentals/semantic-views-tutorial&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Tutorial: Build a semantic view&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/fundamentals/semantic-views-yaml-reference&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Semantic view YAML syntax reference&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/fundamentals/desktop-latest-update&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What's new in Power BI, November 2026&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Pick the one metric your teams argue about most, write it as a semantic view in a test lakehouse, publish, and compare its result with each existing model. &lt;a href=&quot;/blog/direct-lake-power-bi-explained/&quot;&gt;Direct Lake in Power BI&lt;/a&gt; explains the storage mode the generated model uses, and &lt;a href=&quot;/blog/star-schema-power-bi-explained/&quot;&gt;the star schema&lt;/a&gt; shows how to shape the tables the view describes.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Show a trend in a Power BI card: built in or SVG</title>
    <link href="https://data.benibix.com/blog/card-visual-trend-power-bi/"/>
    <id>https://data.benibix.com/blog/card-visual-trend-power-bi/</id>
    <published>2026-11-18T12:00:00Z</published>
    <updated>2026-11-18T12:00:00Z</updated>
    <summary>Two ways to put a small trend chart inside the Power BI card visual, the Trend axis in preview since November 2026 and an SVG image measure that works today, with the DAX, a worked six-month example whose points add up, a hover variant, and the mistakes that make a sparkline lie.</summary>
    <category term="Visuals"/>
    <category term="Cards and KPIs"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a number on a card says &amp;quot;how much&amp;quot;, and a small line under it says &amp;quot;and which way is it going&amp;quot;. The &lt;strong&gt;card visual&lt;/strong&gt; can now draw that line itself: the &lt;strong&gt;Trend axis (Preview)&lt;/strong&gt;, added in the November 2026 update, puts a trend chart in a card with its own formatting for labels, markers, axes, legends and tooltips. Until it leaves preview, or when you need full control, a &lt;strong&gt;measure that returns an SVG image&lt;/strong&gt; does the same job: set its data category to &lt;strong&gt;Image URL&lt;/strong&gt; and pick it under &lt;strong&gt;Format visual, Image, Select from data&lt;/strong&gt;. The card's image &lt;strong&gt;States&lt;/strong&gt; let a hover image show more detail.&lt;/p&gt;
&lt;p&gt;A card that says &lt;strong&gt;171 units&lt;/strong&gt; this month is not much use alone. 171 after 120 six months ago is a 42.5% climb; 171 after 240 is a slide. The trend under the number tells the reader which story they are in before they ask.&lt;/p&gt;
&lt;h2 id=&quot;what-should-the-card-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-should-the-card-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What should the card look like?&lt;/h2&gt;
&lt;p&gt;Six months of units for one product line, the numbers this post uses all the way through:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;line&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;line chart: Jun 120; Jul 135; Aug 128; Sep 150; Oct 162; Nov 171&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;203&quot; x2=&quot;626&quot; y2=&quot;203&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;207&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;50&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;140&quot; x2=&quot;626&quot; y2=&quot;140&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;144&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;77&quot; x2=&quot;626&quot; y2=&quot;77&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;81&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;150&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;626&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;200&lt;/text&gt;&lt;polyline points=&quot;52,114.8 166.8,95.9 281.6,104.7 396.4,77 511.2,61.9 626,50.5&quot; class=&quot;ln ka&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;114.8&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;166.8&quot; cy=&quot;95.9&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;281.6&quot; cy=&quot;104.7&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;396.4&quot; cy=&quot;77&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;511.2&quot; cy=&quot;61.9&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;50.5&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;text x=&quot;52&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jun&lt;/text&gt;&lt;text x=&quot;166.8&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jul&lt;/text&gt;&lt;text x=&quot;281.6&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Aug&lt;/text&gt;&lt;text x=&quot;396.4&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Sep&lt;/text&gt;&lt;text x=&quot;511.2&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Oct&lt;/text&gt;&lt;text x=&quot;626&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Nov&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Units by month, the trend the card should show&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;On the card, the callout shows &lt;strong&gt;171&lt;/strong&gt;, a reference label shows &amp;quot;+5.6% vs October&amp;quot; (171 against 162), and the small line underneath shows the climb from 120.&lt;/p&gt;
&lt;h2 id=&quot;which-way-should-you-build-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-way-should-you-build-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which way should you build it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Trend axis (Preview)&lt;/b&gt;&lt;ul&gt;&lt;li&gt;built into the card&lt;/li&gt;&lt;li&gt;format labels, markers, axes, legend and tooltips in the pane&lt;/li&gt;&lt;li&gt;no DAX&lt;/li&gt;&lt;li&gt;preview, so it can still change&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;SVG image measure&lt;/b&gt;&lt;ul&gt;&lt;li&gt;a measure draws the line as an image&lt;/li&gt;&lt;li&gt;any look you can write in SVG&lt;/li&gt;&lt;li&gt;works in reports today&lt;/li&gt;&lt;li&gt;you maintain the DAX&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Two ways to put a trend in a card&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Use the built-in Trend axis when a preview feature is acceptable in that report and its formatting is enough. Use the SVG measure for a production report that must not change under you, or when you want something the pane does not offer, such as a shaded band for the target range.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-write-the-svg-measure&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-write-the-svg-measure&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you write the SVG measure?&lt;/h2&gt;
&lt;p&gt;The measure takes the last six months up to the latest month in the filter, scales each month's value into a 100 by 40 box, and joins the points into one line. It assumes a &lt;code&gt;Date&lt;/code&gt; table with a &lt;code&gt;Month Start&lt;/code&gt; column and a &lt;code&gt;[Units]&lt;/code&gt; measure.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Units Trend SVG =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; LastMonth = &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month Start]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Months =
    &lt;i class=&quot;f&quot;&gt;TOPN&lt;/i&gt; (
        &lt;i class=&quot;n&quot;&gt;6&lt;/i&gt;,
        &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month Start]&lt;/i&gt; ), &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month Start]&lt;/i&gt; &amp;lt;= LastMonth ),
        &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month Start]&lt;/i&gt;, DESC
    )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Points =
    &lt;i class=&quot;f&quot;&gt;ADDCOLUMNS&lt;/i&gt; (
        Months,
        &lt;i class=&quot;s&quot;&gt;&amp;quot;@v&amp;quot;&lt;/i&gt;,
            &lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; M = &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month Start]&lt;/i&gt;
            &lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Units]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;REMOVEFILTERS&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt; ), &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month Start]&lt;/i&gt; = M ) + &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;
    )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Lo = &lt;i class=&quot;f&quot;&gt;MINX&lt;/i&gt; ( Points, [@v] )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Hi = &lt;i class=&quot;f&quot;&gt;MAXX&lt;/i&gt; ( Points, [@v] )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; N = &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Points )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Ranked = &lt;i class=&quot;f&quot;&gt;ADDCOLUMNS&lt;/i&gt; ( Points, &lt;i class=&quot;s&quot;&gt;&amp;quot;@i&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;RANKX&lt;/i&gt; ( Points, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month Start]&lt;/i&gt;, , ASC ) )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Line =
    &lt;i class=&quot;f&quot;&gt;CONCATENATEX&lt;/i&gt; (
        Ranked,
        &lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; X = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( ( [@i] - &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; ) * &lt;i class=&quot;n&quot;&gt;100&lt;/i&gt;, N - &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; )
        &lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Y = &lt;i class=&quot;n&quot;&gt;36&lt;/i&gt; - &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( [@v] - Lo, Hi - Lo ) * &lt;i class=&quot;n&quot;&gt;32&lt;/i&gt;
        &lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;FORMAT&lt;/i&gt; ( X, &lt;i class=&quot;s&quot;&gt;&amp;quot;0.0&amp;quot;&lt;/i&gt; ) &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot;,&amp;quot;&lt;/i&gt; &amp;amp; &lt;i class=&quot;f&quot;&gt;FORMAT&lt;/i&gt; ( Y, &lt;i class=&quot;s&quot;&gt;&amp;quot;0.0&amp;quot;&lt;/i&gt; ),
        &lt;i class=&quot;s&quot;&gt;&amp;quot; &amp;quot;&lt;/i&gt;, [@i], ASC
    )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;s&quot;&gt;&amp;quot;data:image/svg+xml;utf8,&amp;lt;svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 40'&amp;gt;&amp;quot;&lt;/i&gt;
        &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot;&amp;lt;polyline fill='none' stroke='%23118DFF' stroke-width='2' points='&amp;quot;&lt;/i&gt; &amp;amp; Line &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot;'/&amp;gt;&amp;lt;/svg&amp;gt;&amp;quot;&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Three details matter. &lt;code&gt;REMOVEFILTERS ( 'Date' )&lt;/code&gt; lets earlier months in, even when a year slicer would cut them off. &lt;code&gt;+ 0&lt;/code&gt; turns a month with no sales into a zero instead of a gap. And &lt;code&gt;%23&lt;/code&gt; is the &lt;code&gt;#&lt;/code&gt; of the colour, which has to be encoded inside a data URL.&lt;/p&gt;
&lt;h2 id=&quot;do-the-points-add-up&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#do-the-points-add-up&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Do the points add up?&lt;/h2&gt;
&lt;p&gt;The box is 100 wide and 40 high. Six months spread across the width in steps of 100 / 5 = &lt;strong&gt;20&lt;/strong&gt;. The lowest value (120) sits at y = 36 and the highest (171) at y = 4, so each unit is 32 / 51 of a step:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Month&lt;/th&gt;&lt;th&gt;Units&lt;/th&gt;&lt;th&gt;x&lt;/th&gt;&lt;th&gt;y = 36 - (Units - 120) / 51 * 32&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Jun&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;td&gt;0.0&lt;/td&gt;&lt;td&gt;36.0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Jul&lt;/td&gt;&lt;td&gt;135&lt;/td&gt;&lt;td&gt;20.0&lt;/td&gt;&lt;td&gt;26.6&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Aug&lt;/td&gt;&lt;td&gt;128&lt;/td&gt;&lt;td&gt;40.0&lt;/td&gt;&lt;td&gt;31.0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sep&lt;/td&gt;&lt;td&gt;150&lt;/td&gt;&lt;td&gt;60.0&lt;/td&gt;&lt;td&gt;17.2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Oct&lt;/td&gt;&lt;td&gt;162&lt;/td&gt;&lt;td&gt;80.0&lt;/td&gt;&lt;td&gt;9.6&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Nov&lt;/td&gt;&lt;td&gt;171&lt;/td&gt;&lt;td&gt;100.0&lt;/td&gt;&lt;td&gt;4.0&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The six points the measure writes, with Lo = 120 and Hi = 171&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;SVG counts y from the top, so a smaller y is higher on the card: November at 4.0 is the top of the line. If your picture shows the line upside down, the &lt;code&gt;36 -&lt;/code&gt; is missing.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-put-it-on-the-card&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-put-it-on-the-card&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you put it on the card?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;Select the measure, and in &lt;strong&gt;Measure tools&lt;/strong&gt; set &lt;strong&gt;Data category&lt;/strong&gt; to &lt;strong&gt;Image URL&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Select the card, &lt;strong&gt;Format visual, Visual, Image&lt;/strong&gt;. In &lt;strong&gt;Apply settings to&lt;/strong&gt;, pick the card for Units.&lt;/li&gt;&lt;li&gt;Set &lt;strong&gt;States&lt;/strong&gt; to &lt;strong&gt;Default&lt;/strong&gt;, turn &lt;strong&gt;Image&lt;/strong&gt; on, &lt;strong&gt;Image source: Select from data&lt;/strong&gt;, choose &lt;code&gt;Units Trend SVG&lt;/code&gt;, &lt;strong&gt;Image fit: Fit&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;For a richer picture on hover, set &lt;strong&gt;States&lt;/strong&gt; to &lt;strong&gt;Hover&lt;/strong&gt; and pick a second measure, for example the same line with a dot and label on every month.&lt;/li&gt;&lt;li&gt;Repeat per card. With &lt;strong&gt;Apply settings to: All&lt;/strong&gt;, every card gets the same image, which is wrong when each card has its own measure.&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A line that exaggerates.&lt;/strong&gt; Scaling from the lowest to the highest value makes a 3% wobble look like a cliff. When small moves matter less, scale from zero (&lt;code&gt;Lo = 0&lt;/code&gt;) instead.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Every card shows the same line.&lt;/strong&gt; &lt;strong&gt;Apply settings to&lt;/strong&gt; is on All. Choose each card and its own measure.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The line stops early.&lt;/strong&gt; A year slicer filters the Date table; keep &lt;code&gt;REMOVEFILTERS ( 'Date' )&lt;/code&gt; in the measure.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;An empty image with one month of data.&lt;/strong&gt; With N = 1 there is no line to draw. Show the image only when two or more months exist.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Preview in production.&lt;/strong&gt; The built-in Trend axis can still change before general availability; keep the SVG measure where a report must stay exactly as it is.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Commas as decimals.&lt;/strong&gt; &lt;code&gt;FORMAT&lt;/code&gt; follows the model's culture, and a culture that writes 26,6 breaks the SVG. Give it the locale as a third argument: &lt;code&gt;FORMAT ( X, &amp;quot;0.0&amp;quot;, &amp;quot;en-US&amp;quot; )&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-card&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create a card visual in Power BI (images, image states, walkthrough)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/fundamentals/desktop-latest-update&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What's new in Power BI, November 2026 (Trend axis, preview)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/concatenatex-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: CONCATENATEX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Pick the one card readers look at first, add the comparison as a reference label and the six-month line as an image. &lt;a href=&quot;/blog/card-visual-power-bi/&quot;&gt;The card visual in Power BI&lt;/a&gt; covers reference labels and layouts, and &lt;a href=&quot;/blog/sparklines-power-bi/&quot;&gt;sparklines in Power BI&lt;/a&gt; puts the same kind of line into tables and matrices.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>The new Power Query experience in Desktop: switch now?</title>
    <link href="https://data.benibix.com/blog/new-power-query-experience-power-bi/"/>
    <id>https://data.benibix.com/blog/new-power-query-experience-power-bi/</id>
    <published>2026-11-18T12:00:00Z</published>
    <updated>2026-11-18T12:00:00Z</updated>
    <summary>Power BI Desktop has a new Power Query interface in preview, the same one web modelling uses through Power Query Online, and since November 2026 you can switch between new and legacy from Home, Get Data without a restart. What changes, where Microsoft's list of known limitations falls (a worked count by area), which workflows should stay on the legacy editor for now, and a safe way to try it.</summary>
    <category term="Power BI"/>
    <category term="Power Query"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; the &lt;strong&gt;New Power Query experience&lt;/strong&gt; (preview) replaces the Get Data screens and the Power Query Editor in &lt;strong&gt;Power BI Desktop&lt;/strong&gt; with the interface &lt;strong&gt;Power Query Online&lt;/strong&gt; uses, so Desktop and web modelling look the same. Since the November 2026 update you turn it on or off from &lt;strong&gt;Home, Get Data&lt;/strong&gt;, with no restart, and the choice is remembered (it is also under &lt;strong&gt;File, Options and settings, Options, Preview features&lt;/strong&gt;). Your queries are the same M either way; only the screens change. Microsoft keeps a public list of &lt;strong&gt;known limitations&lt;/strong&gt;: on 18 November 2026 it had &lt;strong&gt;117&lt;/strong&gt; entries, almost half of them in Get Data and the Navigator. Switch now if you mostly work with common file and database sources; stay on legacy for Analysis Services live connections, heavy Combine Files from SharePoint, or if you rely on Go to Error and Change source.&lt;/p&gt;
&lt;p&gt;Most people meet the new interface by accident in web modelling and then wonder why Desktop looks different. Having one interface in both places is the goal, and the switch on the Get Data button makes trying it cheap. The real question is whether today's gaps hit your daily work.&lt;/p&gt;
&lt;h2 id=&quot;what-changes-and-what-stays&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-changes-and-what-stays&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What changes and what stays?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:1&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Changes&lt;/b&gt;&lt;span&gt;Get Data screens, connection forms, Navigator, the editor's ribbon, panes and dialogs, the look of the Advanced Editor&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Stays&lt;/b&gt;&lt;span&gt;the M language and your existing queries, refresh, the semantic model, the report&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;The new experience in Desktop&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Some Desktop workflows start in the new interface and finish in the legacy one when the new one lacks a feature, so you can still complete them. Switching back is instant: clear the preview option, or use the Get Data switch.&lt;/p&gt;
&lt;h2 id=&quot;where-do-the-known-limitations-fall&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-the-known-limitations-fall&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do the known limitations fall?&lt;/h2&gt;
&lt;p&gt;Microsoft groups its list by where you meet each limitation. Counting the entries:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Area&lt;/th&gt;&lt;th&gt;Entries&lt;/th&gt;&lt;th&gt;Examples&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Get Data and Navigator&lt;/td&gt;&lt;td&gt;55&lt;/td&gt;&lt;td&gt;Analysis Services opens the legacy flow, some authentication options missing, Combine Files issues&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Dialog boxes&lt;/td&gt;&lt;td&gt;17&lt;/td&gt;&lt;td&gt;no Change source in modern data source settings, no native query permission dialog&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Data preview&lt;/td&gt;&lt;td&gt;11&lt;/td&gt;&lt;td&gt;no Go to Error, column widths always resize&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Editor-wide behaviour&lt;/td&gt;&lt;td&gt;11&lt;/td&gt;&lt;td&gt;editor can freeze while a large project loads, window title lacks the file name&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Formula bar and Advanced Editor&lt;/td&gt;&lt;td&gt;9&lt;/td&gt;&lt;td&gt;no Close or Maximize in the Advanced Editor&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ribbon&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;no Quick Access Toolbar, no Binary tools&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Queries pane&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;right-click selects a query and refreshes its preview&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Query settings and Applied steps&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;XML parsing steps cannot be reopened&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;117&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Known limitations of the new experience by area (Learn page, 18 November 2026)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The sums: 55 + 17 + 11 + 11 + 9 + 6 + 6 + 2 = 117. The list changes with every Desktop release, so read the live page before deciding; the shape (most gaps at the start, in Get Data) is the useful part.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;red&quot;&gt;&lt;b&gt;Get Data and Navigator&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;55&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Dialog boxes&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:30.9%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;17&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Data preview&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:20.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;11&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Editor-wide&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:20.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;11&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Formula bar and editor&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:16.4%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;9&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Ribbon&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:10.9%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;6&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Queries pane&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:10.9%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;6&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;b&gt;Query settings&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:3.6%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;Known limitations by area&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;who-should-switch-now-and-who-should-wait&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#who-should-switch-now-and-who-should-wait&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Who should switch now, and who should wait?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;You mostly&lt;/th&gt;&lt;th&gt;Advice&lt;/th&gt;&lt;th&gt;Why&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Load Excel, CSV and SQL tables and shape them&lt;/td&gt;&lt;td&gt;switch&lt;/td&gt;&lt;td&gt;the common path is covered; you gain the same UI as the web&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Build models in the browser too&lt;/td&gt;&lt;td&gt;switch&lt;/td&gt;&lt;td&gt;one interface to learn&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Connect live to Analysis Services&lt;/td&gt;&lt;td&gt;stay on legacy&lt;/td&gt;&lt;td&gt;the new flow hands these back to the legacy one anyway&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Combine files from SharePoint folders&lt;/td&gt;&lt;td&gt;stay on legacy&lt;/td&gt;&lt;td&gt;Combine Files can fail or show no progress&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Debug long queries step by step&lt;/td&gt;&lt;td&gt;try, with care&lt;/td&gt;&lt;td&gt;Go to Error is missing&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Repoint sources between environments by hand&lt;/td&gt;&lt;td&gt;stay on legacy&lt;/td&gt;&lt;td&gt;Change source is missing in modern data source settings&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Open big projects with dozens of queries&lt;/td&gt;&lt;td&gt;try, with care&lt;/td&gt;&lt;td&gt;the editor can freeze during the first load&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Your typical work, and the advice today&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-try-it-safely&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-try-it-safely&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you try it safely?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;Save a copy of a real report, not a demo file.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Home, Get Data&lt;/strong&gt;, switch on the new experience.&lt;/li&gt;&lt;li&gt;Do your usual morning: add a source, edit three steps, open the Advanced Editor, refresh.&lt;/li&gt;&lt;li&gt;Note every moment you had to search for something. Check each against the limitations page; if it is listed with &amp;quot;return to the legacy experience&amp;quot; as the workaround, that is your answer for now.&lt;/li&gt;&lt;li&gt;Switch back from the same place if it gets in the way. Your M code is untouched.&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Thinking queries changed.&lt;/strong&gt; They did not; the M is the same. A failing refresh after switching has another cause.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Expecting web modelling to follow your switch.&lt;/strong&gt; The setting is Desktop-only; web modelling always uses Power Query Online.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Missing native query review.&lt;/strong&gt; The legacy dialog that showed a native SQL query before it ran is not there; review such queries in the step itself.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Right-to-left languages.&lt;/strong&gt; Several layout gaps affect right-to-left display; stay on legacy if that is your daily setup.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Reporting a gap the wrong way.&lt;/strong&gt; Microsoft asks for feedback in the Power BI community discussion linked from the limitations page; leave out credentials and confidential data.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/power-query-new-experience-limitations&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: New Power Query experience known limitations and workarounds&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-query-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Query overview in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/fundamentals/desktop-latest-update&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What's new in Power BI, November 2026&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Try the new experience on one report this week and keep a list of what you missed. If nothing on the list is in the table's &amp;quot;stay&amp;quot; rows, keep it on. &lt;a href=&quot;/blog/query-folding-power-query-explained/&quot;&gt;Query folding&lt;/a&gt; works the same in both interfaces and matters more than which one you use.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>How to keep up with Power BI's monthly updates</title>
    <link href="https://data.benibix.com/blog/keep-up-with-power-bi-updates/"/>
    <id>https://data.benibix.com/blog/keep-up-with-power-bi-updates/</id>
    <published>2026-11-17T17:00:00Z</published>
    <updated>2026-11-17T17:00:00Z</updated>
    <summary>Power BI changes every month. Where Microsoft publishes each update, how to read one in ten minutes, and how to decide which new features belong in your reports.</summary>
    <category term="Power BI"/>
    <category term="Getting started"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; Power BI Desktop gets a &lt;strong&gt;new version every month&lt;/strong&gt;. Microsoft lists each one on &lt;strong&gt;&amp;quot;What's new in Power BI&amp;quot;&lt;/strong&gt; on Microsoft Learn, with a longer &lt;strong&gt;Feature Summary&lt;/strong&gt; on the Power BI blog and a &lt;strong&gt;change log&lt;/strong&gt; for fixes. Read the monthly page, mark what is &lt;strong&gt;generally available&lt;/strong&gt; and what is &lt;strong&gt;in preview&lt;/strong&gt;, try previews in a copy of a report, and only build on them in shared reports once you have tested them.&lt;/p&gt;
&lt;p&gt;Every month brings new features, and some of them can replace a custom visual or a workaround you built. A short monthly routine tells you which ones are worth it before you rebuild anything.&lt;/p&gt;
&lt;h2 id=&quot;what-does-one-month-bring&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-one-month-bring&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does one month bring?&lt;/h2&gt;
&lt;p&gt;The October 2026 update is a good example of the mix:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Feature&lt;/th&gt;&lt;th&gt;Status&lt;/th&gt;&lt;th&gt;What it can replace&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Gantt chart&lt;/td&gt;&lt;td&gt;Preview&lt;/td&gt;&lt;td&gt;An AppSource Gantt visual or a stacked bar workaround&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;List slicer with dropdown&lt;/td&gt;&lt;td&gt;Preview&lt;/td&gt;&lt;td&gt;A dropdown slicer with fewer formatting options&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Custom visual authoring with agent skills&lt;/td&gt;&lt;td&gt;In the update&lt;/td&gt;&lt;td&gt;Writing custom visuals by hand&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Continuous capacity usage for semantic models&lt;/td&gt;&lt;td&gt;In the update&lt;/td&gt;&lt;td&gt;Manual checks of capacity use&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Part of the October 2026 Power BI update&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-read-an-update-in-ten-minutes&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-read-an-update-in-ten-minutes&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you read an update in ten minutes?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Skim the headings&lt;/strong&gt; on the What's new page: Copilot and AI, reporting, modeling, data connectivity.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Mark previews:&lt;/strong&gt; they need turning on under &lt;strong&gt;Options, Preview features&lt;/strong&gt;, and can change.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Match against your pain points:&lt;/strong&gt; a feature that removes a workaround in a report you maintain is worth an hour; the rest can wait.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Update Desktop&lt;/strong&gt; to the new version before you try anything.&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;how-do-you-adopt-a-new-feature-safely&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-adopt-a-new-feature-safely&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you adopt a new feature safely?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Step&lt;/th&gt;&lt;th&gt;Why&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Try it in a copy of a report&lt;/td&gt;&lt;td&gt;A preview can change or behave differently in the service&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Check it in the Power BI service, not only Desktop&lt;/td&gt;&lt;td&gt;Some features arrive in Desktop first&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Check the mobile app if your readers use it&lt;/td&gt;&lt;td&gt;Not every visual looks the same on a phone&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Tell readers what changed&lt;/td&gt;&lt;td&gt;A new slicer or visual changes how they work&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/fundamentals/desktop-latest-update&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What's new in Power BI&lt;/a&gt;, the current month's update and links to the feature summary and change log&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;The Gantt preview from October is written up in &lt;a href=&quot;/blog/gantt-visual-power-bi/&quot;&gt;Power BI now has a Gantt chart&lt;/a&gt;. For the basics of the three Power BI apps, see &lt;a href=&quot;/blog/power-bi-desktop-service-mobile/&quot;&gt;Desktop, service and mobile&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>List slicer dropdown in Power BI: pills, paste, leaf nodes</title>
    <link href="https://data.benibix.com/blog/list-slicer-dropdown-power-bi/"/>
    <id>https://data.benibix.com/blog/list-slicer-dropdown-power-bi/</id>
    <published>2026-11-17T12:00:00Z</published>
    <updated>2026-11-17T12:00:00Z</updated>
    <summary>The Power BI list slicer in dropdown mode, generally available since November 2026, in detail: selection pills and the count pill, Not pills after Select all, a multi-line selection box, Show selected first, pasting a list from Excel, hierarchies with leaf-only selection, and item sizing.</summary>
    <category term="Visuals"/>
    <category term="Filters and navigation"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; the &lt;strong&gt;list slicer&lt;/strong&gt; in &lt;strong&gt;dropdown mode&lt;/strong&gt; keeps the list in a drawer and shows every choice as a &lt;strong&gt;pill&lt;/strong&gt; in the selection box, each with its own dismiss button, so readers see and remove selections without opening anything. When pills do not fit, a &lt;strong&gt;count pill&lt;/strong&gt; says how many more there are. Turn off &lt;strong&gt;Selection box, Layout, Single line&lt;/strong&gt; and the box grows to show more pills. &lt;strong&gt;Show selected first&lt;/strong&gt; lifts chosen items to the top of the drawer, and &lt;strong&gt;Ctrl+V&lt;/strong&gt; selects every value in a list copied from Excel. These dropdown and selection box features are &lt;strong&gt;generally available&lt;/strong&gt; since the November 2026 update.&lt;/p&gt;
&lt;p&gt;The classic dropdown slicer has one weak spot: once it is closed, the reader sees &amp;quot;Multiple selections&amp;quot; and nothing else. In a store report with 40 stores, a manager who picked 7 has to open the slicer and scroll to remember which 7. The list slicer's selection box answers that on the canvas, and lets them drop one store with a single click.&lt;/p&gt;
&lt;h2 id=&quot;what-does-the-dropdown-show-when-it-is-closed&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-the-dropdown-show-when-it-is-closed&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does the dropdown show when it is closed?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Reader does&lt;/th&gt;&lt;th&gt;Selection box shows&lt;/th&gt;&lt;th&gt;Filter Power BI applies&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Picks 3 of 40 stores&lt;/td&gt;&lt;td&gt;three pills: Graz, Linz, Wien&lt;/td&gt;&lt;td&gt;Store is Graz, Linz, Wien&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Picks 7 of 40, box on one line&lt;/td&gt;&lt;td&gt;the pills that fit, then a count pill for the rest&lt;/td&gt;&lt;td&gt;Store is the 7 stores&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Select all, then clears Linz&lt;/td&gt;&lt;td&gt;one pill: Not (Linz)&lt;/td&gt;&lt;td&gt;Store is not Linz&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Select all and clears nothing&lt;/td&gt;&lt;td&gt;no filter on other visuals&lt;/td&gt;&lt;td&gt;none&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;What the closed selection box shows in three cases&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The last two rows are worth knowing. &lt;strong&gt;Select all&lt;/strong&gt; is not a list of 40 stores; it is &amp;quot;no filter&amp;quot;. Clearing one store after it creates an &lt;strong&gt;is not&lt;/strong&gt; filter, shown as a &lt;strong&gt;Not (item)&lt;/strong&gt; pill. A store opened next month is therefore included automatically, which is what most readers want from &amp;quot;all but Linz&amp;quot;.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-set-it-up&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-set-it-up&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you set it up?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;With nothing selected on the canvas, pick &lt;strong&gt;List slicer&lt;/strong&gt; in &lt;strong&gt;Visualizations&lt;/strong&gt; and drag the field to &lt;strong&gt;Values&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;In &lt;strong&gt;Format visual&lt;/strong&gt;, switch the slicer to dropdown mode and choose single or multi select.&lt;/li&gt;&lt;li&gt;Size the drawer: its height and width are set separately from the visual, so a narrow slicer in a header bar can open a wide list.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Selection box, Layout&lt;/strong&gt;: turn &lt;strong&gt;Single line&lt;/strong&gt; off when the slicer has room to wrap pills onto more lines.&lt;/li&gt;&lt;li&gt;Open the drawer and turn on &lt;strong&gt;Show selected first&lt;/strong&gt; so the chosen items sit at the top.&lt;/li&gt;&lt;li&gt;Format the &lt;strong&gt;search box&lt;/strong&gt; (background, border, text). It shows in the drawer too.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Formatting you give the list items (text, images, conditional formatting) stays in the dropdown, so a store with a red background in list mode is red in the drawer as well.&lt;/p&gt;
&lt;h2 id=&quot;how-do-readers-select-30-values-at-once&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-readers-select-30-values-at-once&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do readers select 30 values at once?&lt;/h2&gt;
&lt;p&gt;Copy them, one value per line, from Excel, Notepad or an email, select the slicer and press &lt;strong&gt;Ctrl+V&lt;/strong&gt; (or use &lt;strong&gt;Paste&lt;/strong&gt; in the slicer's &lt;strong&gt;...&lt;/strong&gt; menu). The slicer selects every value that matches &lt;strong&gt;exactly&lt;/strong&gt;. A list with &amp;quot;Wien &amp;quot; (trailing space) or &amp;quot;wien&amp;quot; may miss; clean the list first.&lt;/p&gt;
&lt;p&gt;For a hierarchy, each line holds the levels separated by tabs, which is what you get when you copy rows of adjacent Excel columns:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Line you paste&lt;/th&gt;&lt;th&gt;What it selects&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;East&lt;/td&gt;&lt;td&gt;the whole East region&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;East (tab) Wien&lt;/td&gt;&lt;td&gt;only the Wien store under East&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;West (tab) Graz&lt;/td&gt;&lt;td&gt;only the Graz store under West&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Pasting into a Region, Store hierarchy&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-hierarchies-and-leaf-nodes-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-hierarchies-and-leaf-nodes-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do hierarchies and leaf nodes work?&lt;/h2&gt;
&lt;p&gt;Drag more fields into &lt;strong&gt;Values&lt;/strong&gt;, highest level first: Region, then Store. Readers expand and collapse groups, or right-click and &lt;strong&gt;Expand, All&lt;/strong&gt;. Turn on &lt;strong&gt;Slicer settings, Restrict to leaf nodes&lt;/strong&gt; when only the lowest level makes sense to pick, such as stores but never a whole region. The groups still open and close, but cannot be selected. Turning the setting on clears the current selections.&lt;/p&gt;
&lt;p&gt;With hierarchies, item size matters. &lt;strong&gt;Multi-button layout, Fixed size&lt;/strong&gt; keeps every item at the pixels you set (height for a vertical list, width for a horizontal one, both for a grid) and adds scroll bars when they do not fit. Without it, expanding a region with 25 stores makes every item shrink. &lt;strong&gt;Fit to space&lt;/strong&gt; (the setting once called Fixed number of buttons) is the other way round: items grow or shrink to fill the visual. The two cannot be on together.&lt;/p&gt;
&lt;h2 id=&quot;when-is-the-list-slicer-the-right-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-the-list-slicer-the-right-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is the list slicer the right one?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:4&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Button slicer&lt;/b&gt;&lt;ul&gt;&lt;li&gt;2 to 8 values people switch often&lt;/li&gt;&lt;li&gt;region, year, channel&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;List slicer, list mode&lt;/b&gt;&lt;span&gt;long lists with pictures or a hierarchy, room on the page&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;List slicer, dropdown&lt;/b&gt;&lt;ul&gt;&lt;li&gt;long lists in a header bar&lt;/li&gt;&lt;li&gt;the pills keep the choice visible&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Input slicer&lt;/b&gt;&lt;span&gt;readers know the exact value: an order number or a SKU&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Which slicer for which list&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Sorting by label.&lt;/strong&gt; The &lt;strong&gt;...&lt;/strong&gt; menu sorts by Value only, not by Label.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Ctrl-click in single select.&lt;/strong&gt; With &lt;strong&gt;Force selection&lt;/strong&gt; off, Ctrl still adds items even when Single select is on. Turn Force selection on to keep exactly one.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A selection hidden by another filter.&lt;/strong&gt; Filters that hide a selected item do not clear it, so the report can be filtered by a store the reader cannot see in the list. With Force selection on, that hidden item stays active until someone picks another.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Paste that selects nothing.&lt;/strong&gt; Paste is exact match only. Check spaces, spelling and case in the copied list.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Expecting Select all to store a list.&lt;/strong&gt; It stores nothing; clearing items after it builds an is not filter.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-list-slicer&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create and use a list slicer&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-slicers&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Slicers overview (Show selected first, Select all, paste, search)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/fundamentals/desktop-latest-update&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What's new in Power BI, November 2026&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Find the slicer in your report with the longest list, switch it to a list slicer in dropdown mode, turn off Single line and turn on Show selected first. &lt;a href=&quot;/blog/slicer-power-bi/&quot;&gt;Slicers in Power BI&lt;/a&gt; covers sync across pages, and &lt;a href=&quot;/blog/button-slicer-power-bi/&quot;&gt;button, list and input slicers&lt;/a&gt; compares the newer slicers side by side.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Org apps in Power BI: audiences, access, and what changed</title>
    <link href="https://data.benibix.com/blog/org-app-audiences-power-bi/"/>
    <id>https://data.benibix.com/blog/org-app-audiences-power-bi/</id>
    <published>2026-11-17T12:00:00Z</published>
    <updated>2026-11-17T12:00:00Z</updated>
    <summary>Org apps are the newer Fabric item for packaging Power BI and Fabric content. How they differ from workspace apps, how audiences decide who sees which item, the access an org app grants and revokes by itself, a worked example with three audiences, the hidden-content switch that opens everything, and the November 2026 additions.</summary>
    <category term="Power BI"/>
    <category term="Apps and sharing"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; an &lt;strong&gt;org app&lt;/strong&gt; is a Fabric item that packages reports, paginated reports, notebooks, maps, real-time dashboards and Fabric Apps for people who have no access to the workspace. Unlike the classic &lt;strong&gt;workspace app&lt;/strong&gt; (one per workspace, published as a versioned copy), you can make &lt;strong&gt;many org apps per workspace&lt;/strong&gt;, and changes are visible as soon as you &lt;strong&gt;Save&lt;/strong&gt;. &lt;strong&gt;Audiences&lt;/strong&gt; inside one org app decide who sees which item, and by default &lt;strong&gt;showing an item to an audience also grants access&lt;/strong&gt; to it and to its semantic model, while hiding it revokes that access. Org apps are &lt;strong&gt;generally available&lt;/strong&gt;; the November 2026 update added drag-and-drop navigation, multitasking with unsaved edits, and a way to convert org apps made before audiences existed.&lt;/p&gt;
&lt;p&gt;Most teams had the same problem with workspace apps: one workspace, one app, so the finance view and the sales view either lived in one crowded app or in two workspaces with copies of the same reports. Org apps let one workspace hold a &amp;quot;Sales&amp;quot; app and a &amp;quot;Finance&amp;quot; app, and audiences let one app show different pages to leaders and to reps.&lt;/p&gt;
&lt;h2 id=&quot;how-is-an-org-app-different-from-a-workspace-app&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-an-org-app-different-from-a-workspace-app&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is an org app different from a workspace app?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Question&lt;/th&gt;&lt;th&gt;Org app&lt;/th&gt;&lt;th&gt;Workspace app&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;How many per workspace&lt;/td&gt;&lt;td&gt;as many as you need&lt;/td&gt;&lt;td&gt;one&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;When readers see changes&lt;/td&gt;&lt;td&gt;right after Save&lt;/td&gt;&lt;td&gt;after you publish an app update&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Content&lt;/td&gt;&lt;td&gt;the original items, not copies&lt;/td&gt;&lt;td&gt;versioned copies inside the app&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Semantic model access&lt;/td&gt;&lt;td&gt;granted and revoked automatically, also across workspaces&lt;/td&gt;&lt;td&gt;managed by hand&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Readers find it&lt;/td&gt;&lt;td&gt;Home Recents, Favorites, OneLake catalog, Apps page; no install&lt;/td&gt;&lt;td&gt;install the app first&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Who can share&lt;/td&gt;&lt;td&gt;anyone with reshare permission on the org app&lt;/td&gt;&lt;td&gt;certain workspace roles&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Org apps and workspace apps side by side&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Workspace apps keep working and are not migrated or renamed. You can run both side by side while you move.&lt;/p&gt;
&lt;h2 id=&quot;how-do-audiences-decide-who-sees-what&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-audiences-decide-who-sees-what&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do audiences decide who sees what?&lt;/h2&gt;
&lt;p&gt;In edit mode, &lt;strong&gt;Manage audiences&lt;/strong&gt; shows a checkbox per item and audience. Take a sales org app with six items and three audiences:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Item&lt;/th&gt;&lt;th&gt;Leadership&lt;/th&gt;&lt;th&gt;Sales reps&lt;/th&gt;&lt;th&gt;Finance&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Overview page&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sales summary report&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Pipeline by rep report&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Margin by product report&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Commission paginated report&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Forecast Fabric App&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;One sales org app, three audiences (yes means the item is in that audience's navigation)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;A sales rep sees four items, finance sees four, leadership sees five. Someone in two audiences gets an &lt;strong&gt;All&lt;/strong&gt; tab plus one tab per audience, and the overview page in each tab lists only that audience's items. Someone in one audience sees no tabs at all. Audience tabs do not show in the Power BI mobile apps yet.&lt;/p&gt;
&lt;p&gt;Adding a seventh item to an app with several audiences asks you which audiences should see it. Duplicating an audience copies its ticks, not its members. An org app always has at least one audience; delete the last and a new one is created.&lt;/p&gt;
&lt;h2 id=&quot;what-access-does-an-org-app-grant-by-itself&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-access-does-an-org-app-grant-by-itself&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What access does an org app grant by itself?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Org app&lt;/b&gt;&lt;span&gt;read access to the org app item&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Included items&lt;/b&gt;&lt;span&gt;read on reports, paginated reports, notebooks, maps, real-time dashboards&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Semantic models&lt;/b&gt;&lt;span&gt;read on the model behind each included report, even in another workspace&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Fabric App&lt;/b&gt;&lt;span&gt;Read and Execute on an included Fabric App, but not on the items it reads or writes&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;What one person gets when you add them to an audience&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Removing the person, removing an item, or deleting the org app takes the org-app-based access away again. Access granted some other way stays. Two dependencies are not handled for you: the items a Fabric App reads from or writes to, and the paginated report behind a paginated report visual in a Power BI report. Grant those by hand.&lt;/p&gt;
&lt;h2 id=&quot;which-switch-opens-everything&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-switch-opens-everything&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which switch opens everything?&lt;/h2&gt;
&lt;p&gt;Each audience has an &lt;strong&gt;Item access setting&lt;/strong&gt; with &lt;strong&gt;Access to hidden content&lt;/strong&gt;. Turn it on for even &lt;strong&gt;one&lt;/strong&gt; audience, and every user who is in &lt;strong&gt;any&lt;/strong&gt; audience can open &lt;strong&gt;every&lt;/strong&gt; item in the org app with a direct link. Hiding then only shapes navigation; it no longer protects anything. In the example above, a sales rep with a link to the commission report could open it. Leave the setting off unless the app holds nothing sensitive.&lt;/p&gt;
&lt;h2 id=&quot;what-did-november-2026-add&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-did-november-2026-add&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What did November 2026 add?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Drag-and-drop navigation:&lt;/strong&gt; reorder items by dragging them in edit mode, instead of Move up and Move down.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Multitasking:&lt;/strong&gt; leave an org app with unsaved edits and come back later; the app shows that changes are unsaved.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Convert to audiences:&lt;/strong&gt; org apps made before audiences existed can be converted, so you can split their content by group without rebuilding the app.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A new Apps page&lt;/strong&gt; (rolling out): org apps, workspace apps and Fabric Apps in one list, labelled &lt;strong&gt;Org app&lt;/strong&gt;, &lt;strong&gt;Workspace app&lt;/strong&gt; and &lt;strong&gt;App&lt;/strong&gt;, in both the Power BI and Fabric experiences, with a toggle back to the old page.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;who-can-build-and-change-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#who-can-build-and-change-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Who can build and change one?&lt;/h2&gt;
&lt;p&gt;The workspace must be &lt;strong&gt;Pro&lt;/strong&gt;, &lt;strong&gt;Fabric trial&lt;/strong&gt;, &lt;strong&gt;Premium capacity&lt;/strong&gt; or &lt;strong&gt;Fabric capacity&lt;/strong&gt;. Admins, members and contributors can create org apps. Any change that affects access (adding or removing items, showing or hiding them for an audience, adding people) needs &lt;strong&gt;write and reshare&lt;/strong&gt; permissions on the included items and their semantic models, which in practice means workspace admins and members. Contributors can rename, rearrange and restyle, but an access change fails for them. The workspace setting that lets contributors update the app applies to workspace apps only.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A report hidden but still open.&lt;/strong&gt; Access to hidden content is on for some audience. Turn it off.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A Fabric App that opens and shows errors.&lt;/strong&gt; The org app granted the app itself, not the lakehouse or database it reads. Grant those directly.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&amp;quot;Can't save, no share permissions.&amp;quot;&lt;/strong&gt; You are a contributor, or lack reshare on a semantic model in another workspace. Ask a workspace admin or the model owner.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Leftover model access after removing a report.&lt;/strong&gt; If you lost permissions on a cross-workspace model, its access records can stay. Ask the model owner to check &lt;strong&gt;Manage permissions, Access via related items&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Missing from My apps.&lt;/strong&gt; My apps on Home does not list org apps; the Apps page does.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Comments and some toolbar features missing.&lt;/strong&gt; Org apps do not support everything workspace apps do, such as comments and single sign-on for custom visuals.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/explore-reports/org-app-items&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Get started with org apps&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/explore-reports/end-user-app-view&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: The new Apps page&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-create-distribute-apps&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Publish a workspace app in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/fundamentals/desktop-latest-update&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What's new in Power BI, November 2026&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Draw the table above for your own app on paper first: items down the side, groups across the top. If two groups need clearly different content, build one org app with audiences next to your existing workspace app, test it with a few readers, then move the rest. &lt;a href=&quot;/blog/power-bi-report-or-fabric-app/&quot;&gt;Report or Fabric app?&lt;/a&gt; helps decide what goes inside it, and &lt;a href=&quot;/blog/row-level-security-power-bi-explained/&quot;&gt;row-level security&lt;/a&gt; controls which rows each reader sees once they are in.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Standalone Power BI Copilot is retiring: what to do now</title>
    <link href="https://data.benibix.com/blog/standalone-power-bi-copilot-retirement/"/>
    <id>https://data.benibix.com/blog/standalone-power-bi-copilot-retirement/</id>
    <published>2026-11-17T12:00:00Z</published>
    <updated>2026-11-17T12:00:00Z</updated>
    <summary>Standalone Power BI Copilot and app-scoped Copilot in workspace apps are planned to end by the end of January 2027, and Microsoft Copilot in Power BI and Fabric takes their place. What stays, what goes, which licence gets Fabric IQ or Work IQ, the four settings admins need, and a step-by-step plan for the move.</summary>
    <category term="Power BI"/>
    <category term="Copilot"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; support for &lt;strong&gt;standalone Power BI Copilot&lt;/strong&gt; (the cross-item Copilot on Power BI Home, in the left navigation, in Teams and in Power BI mobile) is &lt;strong&gt;planned to end by the end of January 2027&lt;/strong&gt;, and &lt;strong&gt;app-scoped Copilot&lt;/strong&gt; in workspace apps is scheduled for removal in &lt;strong&gt;January 2027&lt;/strong&gt;. &lt;strong&gt;Copilot inside reports stays.&lt;/strong&gt; The replacement is &lt;strong&gt;Microsoft Copilot in Power BI and Fabric&lt;/strong&gt; (preview), which answers questions on Power BI data with &lt;strong&gt;Fabric IQ&lt;/strong&gt; for every Copilot licence and adds &lt;strong&gt;Work IQ&lt;/strong&gt; (emails, meetings, chats and documents) for users with a premium Microsoft Copilot licence. A Fabric admin turns it on with &lt;strong&gt;Make Microsoft Copilot available in Power BI and Fabric&lt;/strong&gt;, which is off during the preview.&lt;/p&gt;
&lt;p&gt;Three Copilots in one product confused many teams: one in the report, one on Home that searched everything, one per app. Microsoft is folding the last two into the same Microsoft Copilot people already use in Microsoft 365, so a question can start in Power BI and continue in Teams or Outlook with the same history. For an admin, that means a few settings to change and users to brief before January.&lt;/p&gt;
&lt;h2 id=&quot;what-stays-what-goes&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-stays-what-goes&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What stays, what goes?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Experience&lt;/th&gt;&lt;th&gt;Where people use it&lt;/th&gt;&lt;th&gt;What happens&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Copilot in reports&lt;/td&gt;&lt;td&gt;the Copilot pane inside a report, also in apps&lt;/td&gt;&lt;td&gt;stays&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;Standalone Power BI Copilot&lt;/td&gt;&lt;td&gt;Home, left navigation, Teams, Power BI mobile&lt;/td&gt;&lt;td&gt;support planned to end by the end of January 2027&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;App-scoped Copilot&lt;/td&gt;&lt;td&gt;the Copilot entry in a workspace app's navigation&lt;/td&gt;&lt;td&gt;scheduled for removal in January 2027&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Microsoft Copilot in Power BI and Fabric&lt;/td&gt;&lt;td&gt;left navigation of Power BI and Fabric&lt;/td&gt;&lt;td&gt;the replacement, in preview&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The Copilot experiences in Power BI after the change&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Removing app-scoped Copilot changes nothing else in the app: content, audiences and permissions stay as they are, and Copilot inside eligible reports in the app keeps working.&lt;/p&gt;
&lt;h2 id=&quot;what-does-microsoft-copilot-do-that-the-old-one-did-not&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-microsoft-copilot-do-that-the-old-one-did-not&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does Microsoft Copilot do that the old one did not?&lt;/h2&gt;
&lt;p&gt;From one entry point in Power BI or Fabric, a user can find reports and other Fabric items they have access to, ask questions answered from the report and its semantic model, attach a report or name it, and keep the conversation going in other Microsoft Copilot places. What standalone Copilot never had is the work around the numbers. Microsoft's own example: a sales leader asks which regions are behind plan (Fabric IQ), then pulls in the customer emails, meetings and account plans for those regions (Work IQ), and gets one summary in the same conversation.&lt;/p&gt;
&lt;h2 id=&quot;who-gets-what&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#who-gets-what&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Who gets what?&lt;/h2&gt;
&lt;p&gt;The Power BI licence (Free, Pro, Premium Per User) does &lt;strong&gt;not&lt;/strong&gt; decide which Copilot experience someone gets. The Microsoft Copilot licence does, together with access to the content:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;User has&lt;/th&gt;&lt;th&gt;Fabric IQ on Power BI and Fabric data&lt;/th&gt;&lt;th&gt;Work IQ (Microsoft 365 context)&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Copilot (Premium)&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Copilot Chat (basic)&lt;/td&gt;&lt;td&gt;yes, basic licence limits apply&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Microsoft 365 Copilot (basic)&lt;/td&gt;&lt;td&gt;yes, basic licence limits apply&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;What each Microsoft Copilot licence gets in Power BI and Fabric&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Every user still needs permission and licensed access to the reports and semantic models they ask about. Row-level and object-level security on the model still apply, and Copilot never opens content the user could not open themselves. You do not need an F SKU or Copilot in Fabric for this scenario.&lt;/p&gt;
&lt;h2 id=&quot;which-settings-does-an-admin-need&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-settings-does-an-admin-need&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which settings does an admin need?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Azure OpenAI features&lt;/b&gt;&lt;span&gt;Fabric admin portal: Users can use Copilot and other features powered by Azure OpenAI, on for the intended users&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Microsoft Copilot in Power BI&lt;/b&gt;&lt;span&gt;Fabric admin portal: Make Microsoft Copilot available in Power BI and Fabric, off by default in the preview&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Fabric data in Copilot&lt;/b&gt;&lt;span&gt;Microsoft 365 admin center: Fabric data available in Microsoft Copilot&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Standalone setting&lt;/b&gt;&lt;span&gt;Fabric admin portal: the standalone Power BI Copilot setting, separate from the new one&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Four settings, two admin centres&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The two Power BI settings are independent, which gives a clean transition:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Both on:&lt;/strong&gt; users see both entry points; the standalone experience still shows on Home.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;New on, standalone off:&lt;/strong&gt; users see only Microsoft Copilot. Turning the standalone setting off removes its left navigation entry, Copilot on Home, and the Teams and mobile experiences.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;New off:&lt;/strong&gt; no Microsoft Copilot entry in Power BI or Fabric.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;If the Microsoft 365 setting is off, the entry point can still appear but cannot use Fabric data in its answers. Microsoft has said that in a later phase the Microsoft Copilot setting will be on by default, Microsoft Copilot becomes the main Copilot in Power BI and Fabric, and standalone Copilot is removed, with advance notice to admins. Check your tenant settings when that notice arrives, not after.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-move-a-team-over&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-move-a-team-over&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you move a team over?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;&lt;strong&gt;List who uses what.&lt;/strong&gt; Who opens standalone Copilot on Home, in Teams or on mobile, and which apps have app-scoped Copilot on (it is on by default per app)?&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Turn on the new setting for a pilot group&lt;/strong&gt;, with both experiences on, and let them compare for two weeks.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Check the Microsoft 365 setting&lt;/strong&gt; so the answers can use Fabric data.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Carry over the approved-items rule.&lt;/strong&gt; If you use &lt;strong&gt;Only show approved items in the standalone Copilot&lt;/strong&gt;, the new experience honours it during the preview; mark the semantic models people should ask about as approved.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Brief users&lt;/strong&gt; on the new entry point and on what changes for them: basic users get data answers, premium users also get their Microsoft 365 context.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Turn the standalone setting off&lt;/strong&gt; for the pilot, then for everyone, well before the end of January 2027.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Tell app authors&lt;/strong&gt; that the app Copilot entry disappears, and that report Copilot inside the app stays.&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Expecting the Power BI licence to decide.&lt;/strong&gt; A Pro user with only Copilot Chat (basic) gets Fabric IQ but no Work IQ.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The entry point shows but answers ignore the data.&lt;/strong&gt; The Microsoft 365 setting Fabric data available in Microsoft Copilot is off.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Old answers.&lt;/strong&gt; Copilot answers from the last successful refresh of the semantic model. A failed refresh means yesterday's numbers.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Trusting every answer.&lt;/strong&gt; Microsoft's own guidance: answers can be inaccurate, check important decisions against the source data.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Waiting for the switch.&lt;/strong&gt; Both experiences can run side by side now; a pilot in December is cheaper than a rush in late January.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/iq/connectors/copilot-power-bi-fabric&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Microsoft Copilot in Power BI and Microsoft Fabric (preview)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/iq/connectors/microsoft-365-copilot-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Fabric IQ in Microsoft 365 Copilot Chat&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/copilot-apps-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Copilot for Power BI apps&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/copilot-enable-power-bi&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Enable Fabric Copilot for Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/fundamentals/desktop-latest-update&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What's new in Power BI, November 2026&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Open the Fabric admin portal today and note the state of the four settings above, then start a pilot group. &lt;a href=&quot;/blog/copilot-in-power-bi-one-change-at-a-time/&quot;&gt;Copilot in Power BI, one change at a time&lt;/a&gt; covers working with Copilot inside reports, which stays, and &lt;a href=&quot;/blog/what-is-microsoft-iq/&quot;&gt;Microsoft IQ explained&lt;/a&gt; shows where Fabric IQ and Work IQ come from.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Style presets in Power BI: format one chart, reuse it</title>
    <link href="https://data.benibix.com/blog/visual-style-presets-power-bi/"/>
    <id>https://data.benibix.com/blog/visual-style-presets-power-bi/</id>
    <published>2026-11-17T12:00:00Z</published>
    <updated>2026-11-17T12:00:00Z</updated>
    <summary>How visual style presets in Power BI save a chart's formatting under a name, which formatting wins when four sources disagree, how to make a preset the default, reset a visual without losing conditional formatting, and carry presets to other reports in the theme file.</summary>
    <category term="Visuals"/>
    <category term="Report design"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;style preset&lt;/strong&gt; is a chart's formatting saved under a name, so every visual of the same type can wear it with one click. You format one visual, type a name under &lt;strong&gt;Format visual, Style presets&lt;/strong&gt;, and select &lt;strong&gt;Add style preset&lt;/strong&gt;. Turn on &lt;strong&gt;Set as default&lt;/strong&gt; and every visual of that type that uses the default style changes at once. Presets live in the report's &lt;strong&gt;custom theme&lt;/strong&gt;, so &lt;strong&gt;Download theme&lt;/strong&gt; and &lt;strong&gt;Import theme&lt;/strong&gt; carry them to other reports. Since the November 2026 update, adding presets from the Format pane is &lt;strong&gt;generally available&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Picture a sales report with three pages and four column charts on each. Someone asks for the legend at the bottom, softer gridlines, data labels on, a 12 pt title, no axis titles and rounded corners. That is 6 changes on 12 charts, or &lt;strong&gt;72 edits&lt;/strong&gt;, and the next new chart starts plain again. With a preset it is 6 edits on one chart, one name, one switch for the default, and the other 11 charts follow. The 13th chart someone adds next month follows too.&lt;/p&gt;
&lt;h2 id=&quot;what-is-a-style-preset-made-of&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-a-style-preset-made-of&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is a style preset made of?&lt;/h2&gt;
&lt;p&gt;Every visual type in a theme (column chart, line chart, card, slicer and so on) has two kinds of entries:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;The &lt;strong&gt;base visual style&lt;/strong&gt;, shown as &lt;strong&gt;Base&lt;/strong&gt; in the dropdown and written as &lt;code&gt;&amp;quot;*&amp;quot;&lt;/code&gt; in the theme file. Every named preset of that type inherits from it, so a change to Base can change how all the other presets look.&lt;/li&gt;&lt;li&gt;Any number of &lt;strong&gt;named style presets&lt;/strong&gt;, such as &amp;quot;Clean&amp;quot;, &amp;quot;Dense&amp;quot; or &amp;quot;Print&amp;quot;. A named preset only needs the properties that differ from Base; anything it sets wins over Base.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Reports also arrive with &lt;strong&gt;built-in style presets&lt;/strong&gt; from their base theme. You can change a built-in one; Power BI keeps your version as a local override in the custom theme, and deleting the override brings the original back.&lt;/p&gt;
&lt;h2 id=&quot;which-formatting-wins-when-they-disagree&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-formatting-wins-when-they-disagree&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which formatting wins when they disagree?&lt;/h2&gt;
&lt;p&gt;A visual can get the same property, say the legend position, from four places. Microsoft documents the order, highest first:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;layers&quot;&gt;&lt;ol class=&quot;dfig-stack&quot;&gt;&lt;li data-tone=&quot;red&quot;&gt;&lt;b&gt;Format visual pane&lt;/b&gt;&lt;span&gt;what you set on this one visual by hand&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Named style preset&lt;/b&gt;&lt;span&gt;the preset picked in the Style presets dropdown&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Base visual style&lt;/b&gt;&lt;span&gt;the &amp;quot;*&amp;quot; entry for this visual type&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;b&gt;Base theme&lt;/b&gt;&lt;span&gt;the report's starting theme, used when nothing above sets the property&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Where a visual's formatting comes from, the top one wins&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;This order explains the most common surprise. You update a preset, and one chart does not change. That chart has the property set by hand in the Format pane, and hand formatting beats every preset. The fix is in the next section.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-add-update-and-set-a-default&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-add-update-and-set-a-default&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you add, update and set a default?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;Select a visual and open &lt;strong&gt;Format visual&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Format it the way you want the others to look.&lt;/li&gt;&lt;li&gt;Expand &lt;strong&gt;Style presets&lt;/strong&gt;, type a name in &lt;strong&gt;Save current formatting as&lt;/strong&gt;, and select &lt;strong&gt;Add style preset&lt;/strong&gt;. The preset now appears in the dropdown of every visual of that type in the report.&lt;/li&gt;&lt;li&gt;To change an existing preset, type its exact name. The button changes to &lt;strong&gt;Update style preset&lt;/strong&gt;. To update the Base style, type &lt;code&gt;*&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;To make a named preset the default for the type, pick it in the dropdown and turn on &lt;strong&gt;Set as default&lt;/strong&gt;.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;In the theme file the default is the &lt;code&gt;stylePreset&lt;/code&gt; property inside the Base entry. This is the shape of the file after steps 3 and 5 for column charts:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;json&quot;&gt;&lt;code&gt;&lt;i class=&quot;s&quot;&gt;&amp;quot;visualStyles&amp;quot;&lt;/i&gt;: {
  &lt;i class=&quot;s&quot;&gt;&amp;quot;columnChart&amp;quot;&lt;/i&gt;: {
    &lt;i class=&quot;s&quot;&gt;&amp;quot;*&amp;quot;&lt;/i&gt;: {
      &lt;i class=&quot;s&quot;&gt;&amp;quot;stylePreset&amp;quot;&lt;/i&gt;: [{ &lt;i class=&quot;s&quot;&gt;&amp;quot;name&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;Clean&amp;quot;&lt;/i&gt; }]
    },
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Clean&amp;quot;&lt;/i&gt;: {
      &lt;i class=&quot;s&quot;&gt;&amp;quot;legend&amp;quot;&lt;/i&gt;: [{ &lt;i class=&quot;s&quot;&gt;&amp;quot;position&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;BottomCenter&amp;quot;&lt;/i&gt; }]
    }
  }
}&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-do-you-reset-a-visual-without-losing-your-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-reset-a-visual-without-losing-your-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you reset a visual without losing your work?&lt;/h2&gt;
&lt;p&gt;The Format pane has two resets that sound alike and do very different things:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Option&lt;/th&gt;&lt;th&gt;What it removes&lt;/th&gt;&lt;th&gt;What it keeps&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Reset all style settings to default&lt;/td&gt;&lt;td&gt;hand formatting only&lt;/td&gt;&lt;td&gt;conditional formatting, actions, custom labels, reference labels&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;Reset all settings to default&lt;/td&gt;&lt;td&gt;every change in the Format pane&lt;/td&gt;&lt;td&gt;nothing you added there&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The two resets in the Format visual pane&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;After you add or update a preset, the chart you formatted keeps its hand formatting, so it does not really &amp;quot;use&amp;quot; the preset yet. Select &lt;strong&gt;Reset all style settings to default&lt;/strong&gt; on it, and on any chart that ignores a preset update. Your colour rules and button actions stay.&lt;/p&gt;
&lt;h2 id=&quot;how-do-presets-travel-to-other-reports&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-presets-travel-to-other-reports&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do presets travel to other reports?&lt;/h2&gt;
&lt;p&gt;Presets are part of the custom theme, so the theme file is how they move:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Download theme&lt;/b&gt;&lt;span&gt;Design ribbon, saves the theme as JSON with every preset&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Edit if needed&lt;/b&gt;&lt;span&gt;rename presets in a text editor, keep the default's name in step&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Import theme&lt;/b&gt;&lt;span&gt;Design ribbon in the other report&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Organizational theme&lt;/b&gt;&lt;span&gt;optional: publish it so every author starts from it&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Moving presets from one report to the next&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The same theme can also carry a &lt;strong&gt;slicer mode&lt;/strong&gt; per slicer (date picker, dropdown, list), generally available since the same update, so slicers and charts follow one house style. New in that update too: a date column dropped into a slicer now starts in &lt;strong&gt;Date picker&lt;/strong&gt; mode.&lt;/p&gt;
&lt;p&gt;Renaming happens only in the JSON. Change the name under the visual type, and if it is the default, also in the Base entry's &lt;code&gt;stylePreset&lt;/code&gt;. Visuals that used the old name keep pointing at it until you pick the renamed preset on them.&lt;/p&gt;
&lt;h2 id=&quot;what-about-the-new-plot-area-background&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-about-the-new-plot-area-background&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What about the new plot area background?&lt;/h2&gt;
&lt;p&gt;Also generally available since the November 2026 update: charts can take a &lt;strong&gt;plot area background colour&lt;/strong&gt; with its own &lt;strong&gt;transparency&lt;/strong&gt;, set by &lt;strong&gt;conditional formatting&lt;/strong&gt;, and plot area images can come from a &lt;strong&gt;URL&lt;/strong&gt;. A soft fill behind the bars separates the chart from the axes and title, which helps on busy pages.&lt;/p&gt;
&lt;p&gt;Conditional formatting makes it a signal rather than a decoration. A measure that returns a colour code, picked as &lt;strong&gt;Field value&lt;/strong&gt;:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Plot Area Colour =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Actual = &lt;i class=&quot;m&quot;&gt;[Sales]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Plan = &lt;i class=&quot;m&quot;&gt;[Sales Plan]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( Actual &amp;lt; Plan, &lt;i class=&quot;s&quot;&gt;&amp;quot;#FDECEA&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#EAF6EC&amp;quot;&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;With 440,000 actual against a 500,000 plan, the plot area turns pale red; once actual reaches the plan, pale green. Keep the shades light, so bars and labels stay readable. Set the fill on the chart before you save it as a preset, then check that the other charts of the type pick it up.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A preset update that some charts ignore.&lt;/strong&gt; Those charts have hand formatting for the same property. Reset style settings on them.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Changing Base when you meant one preset.&lt;/strong&gt; Base feeds every named preset of the type. Put shared choices in Base and differences in named presets.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Deleting a preset other charts still name.&lt;/strong&gt; The chart you deleted it from falls back to the default; the others still show the old name until you choose another. Add a preset with the same name and they pick it up again.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Expecting a rename in the Format pane.&lt;/strong&gt; It is not there; edit the theme JSON.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Two people, two themes.&lt;/strong&gt; If authors import different theme files, the presets drift. Keep one file in source control or as an organizational theme.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-visual-style-presets&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Use visual style presets in Power BI reports&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/report-themes-create-custom&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create custom report themes in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/fundamentals/desktop-latest-update&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What's new in Power BI, November 2026&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-customize-title-background-and-legend&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Customize visualization titles, backgrounds and legends&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Open your busiest report, pick the visual type you use most, format one of those visuals properly and save it as a named preset set as default. Reset style settings on the rest, then download the theme. &lt;a href=&quot;/blog/report-theme-json-power-bi/&quot;&gt;Report themes in Power BI&lt;/a&gt; explains the rest of the theme file, and the &lt;a href=&quot;/blog/power-bi-report-design-pattern/&quot;&gt;report design pattern&lt;/a&gt; shows what the house style should look like.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Surge protection in Fabric: one workspace can't take it all</title>
    <link href="https://data.benibix.com/blog/workspace-surge-protection-fabric/"/>
    <id>https://data.benibix.com/blog/workspace-surge-protection-fabric/</id>
    <published>2026-11-17T12:00:00Z</published>
    <updated>2026-11-17T12:00:00Z</updated>
    <summary>Fabric surge protection on two levels, capacity and workspace (generally available since November 2026). How the 24-hour background percentage triggers rejection, how to pick thresholds from the Capacity Metrics app, a worked F64 example of a workspace cap in CU hours, the three workspace states, unblocking and forgiving, and the limits.</summary>
    <category term="Fabric"/>
    <category term="Admin and security"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;surge protection&lt;/strong&gt; keeps a Fabric capacity usable for people opening reports when background jobs (refreshes, pipelines, notebooks) run hot. It works on two levels. &lt;strong&gt;Capacity level:&lt;/strong&gt; when the capacity's &lt;strong&gt;24-hour background percentage&lt;/strong&gt; reaches your &lt;strong&gt;rejection threshold&lt;/strong&gt;, new background operations are rejected until it falls below your &lt;strong&gt;recovery threshold&lt;/strong&gt;. &lt;strong&gt;Workspace level&lt;/strong&gt; (generally available since November 2026): each workspace may use at most a set &lt;strong&gt;percentage of the capacity's CU over a rolling 24 hours&lt;/strong&gt;; a workspace that goes over is &lt;strong&gt;blocked&lt;/strong&gt;. Admins can mark workspaces &lt;strong&gt;Mission critical&lt;/strong&gt; (exempt from the workspace cap) or &lt;strong&gt;Blocked&lt;/strong&gt; by hand, and unblock them with or without &lt;strong&gt;forgiving&lt;/strong&gt; the usage already counted.&lt;/p&gt;
&lt;p&gt;Shared capacities have one classic failure: a team in one workspace starts a heavy reload at 9:00, the capacity's smoothed usage climbs past its limits, and by 10:00 the finance reports in another workspace are slow or refused. Nobody in finance did anything wrong. Surge protection lets an admin decide in advance who gives way.&lt;/p&gt;
&lt;h2 id=&quot;how-do-the-two-levels-differ&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-the-two-levels-differ&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do the two levels differ?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Capacity level&lt;/b&gt;&lt;ul&gt;&lt;li&gt;watches the whole capacity&lt;/li&gt;&lt;li&gt;rejects new background jobs early, before deep throttling hits everyone&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Workspace level&lt;/b&gt;&lt;ul&gt;&lt;li&gt;watches each workspace&lt;/li&gt;&lt;li&gt;blocks the one that used more than its share of the day&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Two levels of surge protection&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Capacity-level protection is a brake for everyone; workspace-level protection points at the workspace that caused the load. Most shared capacities want both.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-size-a-workspace-cap&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-size-a-workspace-cap&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you size a workspace cap?&lt;/h2&gt;
&lt;p&gt;The cap is a percentage of what the capacity provides in 24 hours. An F SKU provides as many &lt;strong&gt;CU seconds per second&lt;/strong&gt; as its number, so a day holds that number times 24 &lt;strong&gt;CU hours&lt;/strong&gt;:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Capacity&lt;/th&gt;&lt;th&gt;CU hours per day&lt;/th&gt;&lt;th&gt;5% cap&lt;/th&gt;&lt;th&gt;10% cap&lt;/th&gt;&lt;th&gt;20% cap&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;F2&lt;/td&gt;&lt;td&gt;48&lt;/td&gt;&lt;td&gt;2.4&lt;/td&gt;&lt;td&gt;4.8&lt;/td&gt;&lt;td&gt;9.6&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;F8&lt;/td&gt;&lt;td&gt;192&lt;/td&gt;&lt;td&gt;9.6&lt;/td&gt;&lt;td&gt;19.2&lt;/td&gt;&lt;td&gt;38.4&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;F64&lt;/td&gt;&lt;td&gt;1,536&lt;/td&gt;&lt;td&gt;76.8&lt;/td&gt;&lt;td&gt;153.6&lt;/td&gt;&lt;td&gt;307.2&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;What a workspace cap means in CU hours per rolling 24 hours&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;On an F64 with a 10% cap, a single workspace may use &lt;strong&gt;153.6 CU hours&lt;/strong&gt; in any 24-hour window (64 × 24 = 1,536; 10% of that). Ten busy workspaces at 10% each could still fill the capacity, so pair the cap with capacity-level thresholds.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-choose-the-capacity-thresholds&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-choose-the-capacity-thresholds&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you choose the capacity thresholds?&lt;/h2&gt;
&lt;p&gt;Open the &lt;strong&gt;Capacity Metrics app&lt;/strong&gt;, &lt;strong&gt;Compute&lt;/strong&gt; page, and read three charts: &lt;strong&gt;Background rejection&lt;/strong&gt; (the 24-hour background percentage), &lt;strong&gt;Interactive rejection&lt;/strong&gt; and &lt;strong&gt;Utilization&lt;/strong&gt;. Microsoft's own starting rules:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;What the charts show&lt;/th&gt;&lt;th&gt;Rejection threshold&lt;/th&gt;&lt;th&gt;Recovery threshold&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Background averages 50%, peaks at 60% and 75%, low 40%; interactive rejection passed 100% at the 75% peak&lt;/td&gt;&lt;td&gt;between 60% and 75%&lt;/td&gt;&lt;td&gt;between 40% and 60%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Background steady around 35% (within 5%), interactive peak 80%&lt;/td&gt;&lt;td&gt;a little above 40%, below 60%&lt;/td&gt;&lt;td&gt;about 35%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;80% to 90% of utilisation is background work&lt;/td&gt;&lt;td&gt;background limits may not help&lt;/td&gt;&lt;td&gt;(isolate workloads instead)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Reading the charts into thresholds&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Then: &lt;strong&gt;admin portal, Capacity settings&lt;/strong&gt;, pick the capacity, &lt;strong&gt;Surge protection&lt;/strong&gt;, set &lt;strong&gt;Background Operations&lt;/strong&gt; on, enter both thresholds and &lt;strong&gt;Apply&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-set-the-workspace-cap&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-set-the-workspace-cap&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you set the workspace cap?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;&lt;strong&gt;OneLake catalog, Govern, Capacities&lt;/strong&gt;, select the capacity.&lt;/li&gt;&lt;li&gt;Under &lt;strong&gt;Surge protection&lt;/strong&gt;, turn &lt;strong&gt;Workspace consumption&lt;/strong&gt; on.&lt;/li&gt;&lt;li&gt;Set the &lt;strong&gt;Rejection Threshold&lt;/strong&gt; (the percentage per workspace) and &lt;strong&gt;Block&lt;/strong&gt; (indefinitely, or for a number of hours).&lt;/li&gt;&lt;li&gt;In the &lt;strong&gt;Workspaces&lt;/strong&gt; table, use the gear in &lt;strong&gt;Actions&lt;/strong&gt; to set any workspace to one of three states:&lt;/li&gt;&lt;/ol&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;State&lt;/th&gt;&lt;th&gt;Cap applies&lt;/th&gt;&lt;th&gt;Auto-block&lt;/th&gt;&lt;th&gt;Use for&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Available&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;most workspaces (the default)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Mission critical&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;the finance close, the executive reports&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Blocked&lt;/td&gt;&lt;td&gt;n/a&lt;/td&gt;&lt;td&gt;n/a&lt;/td&gt;&lt;td&gt;a runaway workspace, or one paused on purpose&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The three workspace states&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;A Blocked workspace rejects all interactive and background operations. Mission critical lifts the workspace cap, not the capacity's own limits: when the whole capacity runs out of CU, throttling still reaches that workspace.&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Turn on &lt;strong&gt;notifications&lt;/strong&gt;: a banner for everyone in the workspace while it is blocked, and email to the workspace contacts. They fire when a workspace approaches its threshold, is blocked, is unblocked or recovers.&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;how-does-a-blocked-workspace-come-back&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-a-blocked-workspace-come-back&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does a blocked workspace come back?&lt;/h2&gt;
&lt;p&gt;By itself, when the block duration ends or when its rolling 24-hour usage drops back under the cap; Fabric checks again at regular intervals. Or an admin selects &lt;strong&gt;Unblock&lt;/strong&gt; in &lt;strong&gt;Capacity settings&lt;/strong&gt;, reviews the usage and confirms. When unblocking by hand, the admin can also &lt;strong&gt;forgive&lt;/strong&gt; recorded usage, which lowers the rolling total so the workspace is not blocked again straight away. Marking it Mission critical unblocks it too.&lt;/p&gt;
&lt;p&gt;Unblocking lets new operations start. It does not cancel, restart or rebill operations that were already running.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Raising the limit and expecting the block to lift.&lt;/strong&gt; It does not. Change the limit first, then unblock.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Blocked again right after the block ended.&lt;/strong&gt; The 24-hour window does not reset when a block ends; without forgiveness, the old usage still counts.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Treating the cap as exact.&lt;/strong&gt; Usage is checked every five minutes, so a workspace can pass its limit before it is stopped.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Some items ignore the workspace cap:&lt;/strong&gt; Dataflow Gen1, paginated reports, scorecards, graph models and Activator are not covered yet, and Dataflow Gen2 editing is not either (its refreshes are).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Autoscale.&lt;/strong&gt; Compute billed through autoscale is not counted toward workspace limits, and capacity-level protection does not block autoscale operations.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Running jobs.&lt;/strong&gt; Capacity-level protection only rejects new background jobs; jobs in progress keep running and keep adding usage.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Other SKUs.&lt;/strong&gt; Surge protection works on Fabric (F) SKUs only.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/enterprise/surge-protection&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Manage surge protection for Fabric capacities&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/enterprise/metrics-app-compute-page&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Capacity Metrics app compute page&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/fundamentals/whats-new&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What's new in Microsoft Fabric&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Open the Capacity Metrics app and look at the last two weeks of the Background rejection chart before changing anything. Mark the two or three workspaces that must never stop as Mission critical, start the workspace cap generously (20% on a shared capacity) and tighten it once you see who hits it. &lt;a href=&quot;/blog/capacity-metrics-find-the-spike/&quot;&gt;Finding the operation behind a capacity spike&lt;/a&gt; shows how to read those charts, and &lt;a href=&quot;/blog/fabric-capacity-units-and-f-skus/&quot;&gt;Fabric capacity units and F SKUs&lt;/a&gt; explains what a CU is.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>How to show photos in a Power BI table</title>
    <link href="https://data.benibix.com/blog/images-in-power-bi-tables/"/>
    <id>https://data.benibix.com/blog/images-in-power-bi-tables/</id>
    <published>2026-11-17T09:00:00Z</published>
    <updated>2026-11-17T09:00:00Z</updated>
    <summary>A photo next to each person's name, a product picture next to each item: Power BI shows images in tables, matrices and slicers from a column of image URLs. The steps, where the images may live, and why some never appear.</summary>
    <category term="Visuals"/>
    <category term="Tables"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; put the image's web address in a column, then in &lt;strong&gt;Table view&lt;/strong&gt; select that column and set &lt;strong&gt;Column tools, Data category&lt;/strong&gt; to &lt;strong&gt;Image URL&lt;/strong&gt;. Add it to a table, matrix or slicer and Power BI shows the picture. The images must be &lt;strong&gt;anonymously accessible&lt;/strong&gt;, with two exceptions: &lt;strong&gt;OneDrive for home&lt;/strong&gt; embed codes and &lt;strong&gt;OneLake&lt;/strong&gt; file links. Images on SharePoint or OneDrive for work or school, which need a sign-in, do not show.&lt;/p&gt;
&lt;p&gt;A team page with each person's photo, a product list with the item next to its sales: a picture turns a list of names into something people recognise at a glance. Power BI can do it without a custom visual.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-set-it-up&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-set-it-up&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you set it up?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;A column of URLs&lt;/b&gt;&lt;span&gt;one image address per row, e.g. https://example.com/team/sam.jpg&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Data category&lt;/b&gt;&lt;span&gt;Table view, Column tools, Data category: Image URL&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Add to a visual&lt;/b&gt;&lt;span&gt;table, matrix or slicer&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Size the images&lt;/b&gt;&lt;span&gt;Format, Image size: height and width&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From a column of links to pictures in a table&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;where-can-the-images-live&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-the-images-live&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can the images live?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Where&lt;/th&gt;&lt;th&gt;Works?&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;A public website or public storage&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;OneDrive for home, with an embed code&lt;/td&gt;&lt;td&gt;Yes in Desktop and the service; not in the mobile apps&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;OneLake file link&lt;/td&gt;&lt;td&gt;Yes, mobile apps included&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SharePoint, OneDrive for work or school&lt;/td&gt;&lt;td&gt;No: they require sign-in&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;why-does-an-image-not-show&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-does-an-image-not-show&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why does an image not show?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;It needs a sign-in.&lt;/strong&gt; Open the URL in a private browser window; if it asks you to log in, Power BI cannot load it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The column is still Text.&lt;/strong&gt; Set the data category to Image URL.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;It is a page, not a picture.&lt;/strong&gt; The address must point to the image file itself, not to a gallery page that contains it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;On a phone it is blank.&lt;/strong&gt; The mobile apps show only anonymous URLs and OneLake links.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;should-you-use-ai-headshots&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#should-you-use-ai-headshots&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Should you use AI headshots?&lt;/h2&gt;
&lt;p&gt;For a demo or a template, AI-made headshots of people who do not exist avoid using real faces. For a real team page, use real photos, with each person's agreement. A photo of an identifiable person is personal data.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-images-tables&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Display images in a table, matrix, or slicer in a report&lt;/a&gt;, the Image URL category and where images may be hosted&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Build the table first: see &lt;a href=&quot;/blog/table-visual-power-bi/&quot;&gt;the table visual&lt;/a&gt; and &lt;a href=&quot;/blog/matrix-visual-power-bi/&quot;&gt;the matrix visual&lt;/a&gt;. For pictures that are not in rows, see &lt;a href=&quot;/blog/text-box-image-shapes-power-bi/&quot;&gt;text boxes, images and shapes&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>From Excel chart to Power BI visual: which is which</title>
    <link href="https://data.benibix.com/blog/excel-charts-in-power-bi/"/>
    <id>https://data.benibix.com/blog/excel-charts-in-power-bi/</id>
    <published>2026-11-17T01:00:00Z</published>
    <updated>2026-11-17T01:00:00Z</updated>
    <summary>Every common Excel chart has a Power BI visual, but not always under the same name. The map from one to the other, the three that need a workaround, and what changes when you rebuild a chart in Power BI.</summary>
    <category term="Visuals"/>
    <category term="More visuals"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; most Excel charts have a Power BI visual with the same job: &lt;strong&gt;Clustered Column&lt;/strong&gt; is the clustered column chart, &lt;strong&gt;Line&lt;/strong&gt; is the line chart, &lt;strong&gt;Pie&lt;/strong&gt; and &lt;strong&gt;Doughnut&lt;/strong&gt; are pie and donut, &lt;strong&gt;Scatter&lt;/strong&gt; is the scatter chart, &lt;strong&gt;Waterfall&lt;/strong&gt; and &lt;strong&gt;Funnel&lt;/strong&gt; have the same names. A few work differently: Excel's &lt;strong&gt;Histogram&lt;/strong&gt; and &lt;strong&gt;Box and Whisker&lt;/strong&gt; charts have no core visual in Power BI, and an Excel &lt;strong&gt;heat map&lt;/strong&gt; made with Color Scales becomes a &lt;strong&gt;matrix with background colour&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Rebuilding an Excel report in Power BI is mostly the same charts with new names. The real change is underneath: in Excel a chart points at cells, in Power BI it points at fields and measures.&lt;/p&gt;
&lt;h2 id=&quot;which-power-bi-visual-replaces-which-excel-chart&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-power-bi-visual-replaces-which-excel-chart&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which Power BI visual replaces which Excel chart?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Excel chart&lt;/th&gt;&lt;th&gt;Power BI visual&lt;/th&gt;&lt;th&gt;Note&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Clustered Column, Clustered Bar&lt;/td&gt;&lt;td&gt;Clustered column chart, clustered bar chart&lt;/td&gt;&lt;td&gt;The same&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Stacked and 100% Stacked&lt;/td&gt;&lt;td&gt;Stacked and 100% stacked column or bar chart&lt;/td&gt;&lt;td&gt;The same&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Line, Area&lt;/td&gt;&lt;td&gt;Line chart, area chart&lt;/td&gt;&lt;td&gt;Put a date on the X-axis&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Combo (column and line)&lt;/td&gt;&lt;td&gt;Line and clustered column chart&lt;/td&gt;&lt;td&gt;A second Y-axis is optional&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Pie, Doughnut&lt;/td&gt;&lt;td&gt;Pie chart, donut chart&lt;/td&gt;&lt;td&gt;Keep it to a few slices&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Scatter, Bubble&lt;/td&gt;&lt;td&gt;Scatter chart (a measure in Size for bubbles)&lt;/td&gt;&lt;td&gt;Put the item in Values&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Waterfall, Funnel&lt;/td&gt;&lt;td&gt;Waterfall chart, funnel chart&lt;/td&gt;&lt;td&gt;The same&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Map&lt;/td&gt;&lt;td&gt;Map, filled map or Azure Maps&lt;/td&gt;&lt;td&gt;Needs a location field&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Table with Color Scales&lt;/td&gt;&lt;td&gt;Matrix with background colour&lt;/td&gt;&lt;td&gt;Conditional formatting&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Histogram&lt;/td&gt;&lt;td&gt;Column chart over bins (Groups)&lt;/td&gt;&lt;td&gt;No core histogram visual&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Box and Whisker&lt;/td&gt;&lt;td&gt;AppSource visual, or Python or R&lt;/td&gt;&lt;td&gt;No core box plot visual&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Excel chart and its Power BI visual&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-changes-when-you-rebuild-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-changes-when-you-rebuild-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What changes when you rebuild it?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Fields, not ranges.&lt;/strong&gt; A Power BI visual reads columns and measures from the model, so it updates with every filter and slicer.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Measures, not cell formulas.&lt;/strong&gt; A margin calculated in column F becomes a DAX measure that every visual can use.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Interaction for free.&lt;/strong&gt; Click a bar and the other visuals on the page filter to it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Formatting moves to a theme.&lt;/strong&gt; Instead of formatting each chart, set colours and fonts once in a report theme.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-types-for-reports-and-q-and-a&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Visualization types in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://support.microsoft.com/en-us/office/create-a-chart-from-start-to-finish-0baf399e-dd61-4e18-8a73-b3fd5d5680c2&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Support: Create a chart from start to finish&lt;/a&gt;, the Excel chart types&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;For the two without a core visual, see &lt;a href=&quot;/blog/histogram-power-bi/&quot;&gt;histogram in Power BI&lt;/a&gt; and &lt;a href=&quot;/blog/python-r-visuals-power-bi/&quot;&gt;Python and R visuals&lt;/a&gt;. To choose the right chart first, see &lt;a href=&quot;/blog/which-power-bi-chart/&quot;&gt;which Power BI chart&lt;/a&gt;, or paste your table into &lt;a href=&quot;https://tools.benibix.com/data/chart-compass/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Chart Compass&lt;/a&gt;, which names each chart in Excel and Power BI side by side.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Claude Code with Jupyter notebooks in VS Code</title>
    <link href="https://data.benibix.com/blog/claude-code-jupyter-notebooks/"/>
    <id>https://data.benibix.com/blog/claude-code-jupyter-notebooks/</id>
    <published>2026-11-16T17:00:00Z</published>
    <updated>2026-11-16T17:00:00Z</updated>
    <summary>Analysts live in notebooks, and Claude Code edits them cell by cell. How it changes a notebook, why an edited cell loses its output, what it cannot do (run the kernel), and a workflow that keeps results trustworthy.</summary>
    <category term="AI"/>
    <category term="Claude Code"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; Claude Code edits a Jupyter notebook &lt;strong&gt;one cell at a time&lt;/strong&gt;, by the cell's id: it can &lt;strong&gt;replace&lt;/strong&gt;, &lt;strong&gt;insert&lt;/strong&gt; or &lt;strong&gt;delete&lt;/strong&gt; a cell. When it &lt;strong&gt;replaces a code cell, that cell's saved output and execution count are cleared&lt;/strong&gt;, so &lt;strong&gt;re-run the cell&lt;/strong&gt;, and the cells that depend on it, to get results back. In VS Code, the Claude Code extension works next to the notebook, and you see each proposed change before it lands.&lt;/p&gt;
&lt;p&gt;Notebooks mix code, output and notes in one file, which makes them hard to edit as plain text. Claude Code has a tool made for them, and knowing how it behaves avoids the classic mistake: trusting an output that came from code that no longer exists.&lt;/p&gt;
&lt;h2 id=&quot;how-does-claude-code-change-a-notebook&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-claude-code-change-a-notebook&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does Claude Code change a notebook?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Replace&lt;/b&gt;&lt;ul&gt;&lt;li&gt;overwrite one cell's source&lt;/li&gt;&lt;li&gt;a code cell loses its saved output&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Insert&lt;/b&gt;&lt;span&gt;add a code or markdown cell after a given cell&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Delete&lt;/b&gt;&lt;span&gt;remove one cell&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;The three notebook edits&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Permission rules use the same path format as file edits: a rule like &lt;code&gt;Edit(notebooks/**)&lt;/code&gt; covers notebook edits in that folder.&lt;/p&gt;
&lt;h2 id=&quot;what-is-a-safe-notebook-workflow&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-a-safe-notebook-workflow&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is a safe notebook workflow?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Save&lt;/b&gt;&lt;span&gt;save the notebook, so Claude reads the current version&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Ask&lt;/b&gt;&lt;span&gt;&amp;quot;Refactor the cleaning cells into one function; keep the outputs' meaning&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Review&lt;/b&gt;&lt;span&gt;read each proposed cell change in VS Code&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Re-run&lt;/b&gt;&lt;span&gt;restart the kernel and run all, top to bottom&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Compare&lt;/b&gt;&lt;span&gt;key numbers match the old run&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Editing a notebook with Claude Code&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Restart and run all matters: after cell edits, the kernel may still hold variables from old code, and a notebook that only works in a running kernel will fail for the next person.&lt;/p&gt;
&lt;h2 id=&quot;what-does-it-not-do&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-it-not-do&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does it not do?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Execute cells.&lt;/strong&gt; Re-running is up to you, in VS Code or Jupyter.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Edit a notebook that is not valid UTF-8.&lt;/strong&gt; The edit is refused and nothing is written.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Keep old outputs on a replaced cell.&lt;/strong&gt; Commit before a big refactor if you need them.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/tools-reference&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Tools reference, NotebookEdit&lt;/a&gt;, cell edits, cleared outputs and permission rules&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/vs-code&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Use Claude Code in VS Code&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;For a first task that produces a script instead of a notebook, see &lt;a href=&quot;/blog/profile-a-csv-with-claude-code/&quot;&gt;profile a CSV with Claude Code&lt;/a&gt;. For the bigger picture, read &lt;a href=&quot;/blog/claude-code-for-data-analysts/&quot;&gt;Claude Code for data analysts&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Azure Data Factory to Fabric: how to upgrade step by step</title>
    <link href="https://data.benibix.com/blog/azure-data-factory-to-fabric-migration/"/>
    <id>https://data.benibix.com/blog/azure-data-factory-to-fabric-migration/</id>
    <published>2026-11-16T12:00:00Z</published>
    <updated>2026-11-16T12:00:00Z</updated>
    <summary>Moving Azure Data Factory pipelines to Fabric Data Factory without a big-bang cutover. View in Fabric, the read-only readiness assessment, mapping linked services to connections, what changes (datasets, global parameters, integration runtimes, triggers, identity), what cannot be upgraded yet, and a worked 40-pipeline plan whose numbers add up.</summary>
    <category term="Azure"/>
    <category term="Data Factory"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; start in the Azure Data Factory studio with &lt;strong&gt;View in Fabric (Preview)&lt;/strong&gt;: it creates a Fabric workspace named after your factory and shows the factory there as an &lt;strong&gt;Azure Data Factory item&lt;/strong&gt;. Nothing is copied, upgraded or billed differently; pipelines keep running and billing in Azure Data Factory. Then open &lt;strong&gt;Assess and Upgrade&lt;/strong&gt;: a read-only report sorts every pipeline into &lt;strong&gt;Ready&lt;/strong&gt; or &lt;strong&gt;Review&lt;/strong&gt;. Map &lt;strong&gt;linked services to Fabric connections&lt;/strong&gt;, select the ready pipelines and &lt;strong&gt;Start upgrade (Preview)&lt;/strong&gt;. Upgraded triggers arrive &lt;strong&gt;disabled&lt;/strong&gt; until you validate. Azure Data Factory stays fully supported, and a partial upgrade is a normal end state.&lt;/p&gt;
&lt;p&gt;The fear behind most delayed migrations is the cutover weekend: two hundred pipelines, one switch, and a Monday full of failed loads. The upgrade path Microsoft built avoids that. You can look first, move the easy pipelines, and leave the hard ones in Azure Data Factory for as long as they need.&lt;/p&gt;
&lt;h2 id=&quot;what-happens-at-each-step&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-happens-at-each-step&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What happens at each step?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;View in Fabric&lt;/b&gt;&lt;span&gt;the factory appears as an item in a new workspace; execution and billing stay in Azure&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Assess and Upgrade&lt;/b&gt;&lt;span&gt;read-only readiness for the whole factory; download the report&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Review connections&lt;/b&gt;&lt;span&gt;linked services mapped to Fabric connections; many are created for you&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Start upgrade&lt;/b&gt;&lt;span&gt;selected pipelines become Fabric pipelines in a folder named after the factory&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;red&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Validate and switch&lt;/b&gt;&lt;span&gt;re-enable triggers, test end to end, then turn off the old pipeline&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From Azure Data Factory to Fabric, at your own pace&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Viewing the factory uses no capacity; capacity is used only by upgraded or new Fabric items. You can add the factory's directly assigned users as &lt;strong&gt;Viewers&lt;/strong&gt; of the new workspace during setup; later role changes in Azure are not synchronised.&lt;/p&gt;
&lt;h2 id=&quot;what-changes-between-the-two&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-changes-between-the-two&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What changes between the two?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Azure Data Factory&lt;/th&gt;&lt;th&gt;Fabric Data Factory&lt;/th&gt;&lt;th&gt;What you do&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Datasets&lt;/td&gt;&lt;td&gt;properties inline in each activity&lt;/td&gt;&lt;td&gt;nothing; the upgrade moves them in&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Linked services&lt;/td&gt;&lt;td&gt;connections, managed at tenant level&lt;/td&gt;&lt;td&gt;map them, or create once and reuse&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Global parameters&lt;/td&gt;&lt;td&gt;variable libraries&lt;/td&gt;&lt;td&gt;convert, with per-stage values&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Self-hosted integration runtime&lt;/td&gt;&lt;td&gt;on-premises data gateway&lt;/td&gt;&lt;td&gt;install and register a gateway&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Managed VNet or VNet IR&lt;/td&gt;&lt;td&gt;virtual network data gateway&lt;/td&gt;&lt;td&gt;set one up&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Managed identity&lt;/td&gt;&lt;td&gt;workspace identity&lt;/td&gt;&lt;td&gt;grant it access to sources&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Execute Pipeline activity&lt;/td&gt;&lt;td&gt;Invoke Pipeline activity&lt;/td&gt;&lt;td&gt;renamed, new connection type&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Triggers shared by pipelines&lt;/td&gt;&lt;td&gt;schedules per pipeline&lt;/td&gt;&lt;td&gt;set schedules on each pipeline&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Mapping data flows&lt;/td&gt;&lt;td&gt;MDF transforms in Dataflow Gen2 (GA)&lt;/td&gt;&lt;td&gt;upgrade eligible ones with the pipeline&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The differences that shape a migration&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Dynamic linked services are the change that hurts most in metadata-driven designs: Fabric connections cannot take parameters, so each combination becomes its own connection, and activities pick one with dynamic content.&lt;/p&gt;
&lt;h2 id=&quot;what-cannot-be-upgraded-yet&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-cannot-be-upgraded-yet&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What cannot be upgraded yet?&lt;/h2&gt;
&lt;p&gt;Pipelines with these features land in &lt;strong&gt;Review&lt;/strong&gt; and need a redesign or stay in Azure Data Factory for now:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Triggers:&lt;/strong&gt; custom event triggers, tumbling window triggers (watermark and backfill logic must be rebuilt), chained trigger dependencies.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Workloads:&lt;/strong&gt; change data capture (use a Copy job instead), workflow orchestration (DAG) assets, U-SQL.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Connectors:&lt;/strong&gt; some ERP and MDX sources and several marketing and finance SaaS connectors with no Fabric equivalent yet.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Security:&lt;/strong&gt; user-assigned managed identities (use workspace identity), certificate authentication in Web activities, customer-managed keys and other advanced setups.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Activities:&lt;/strong&gt; Web and HTTP calls with custom authentication or headers, Copy upsert into lakehouse tables (stage, then &lt;code&gt;MERGE&lt;/code&gt; in a notebook), notebook pool environment settings.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Schedule triggers and storage event triggers do upgrade automatically, disabled.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-real-plan-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-real-plan-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a real plan look like?&lt;/h2&gt;
&lt;p&gt;A factory with 40 pipelines, after the assessment and a manual look at the Review group:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Group&lt;/th&gt;&lt;th&gt;Pipelines&lt;/th&gt;&lt;th&gt;Typical content&lt;/th&gt;&lt;th&gt;Wave&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Ready&lt;/td&gt;&lt;td&gt;24&lt;/td&gt;&lt;td&gt;Copy activities, basic orchestration&lt;/td&gt;&lt;td&gt;wave 1, in the first two weeks&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Review, small fixes&lt;/td&gt;&lt;td&gt;9&lt;/td&gt;&lt;td&gt;global parameters, an Execute Pipeline, a VNet IR&lt;/td&gt;&lt;td&gt;wave 2, after gateway and variable library&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Review, not supported yet&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;tumbling window watermark loads&lt;/td&gt;&lt;td&gt;wave 3, redesign as Copy job loads&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Stays in Azure for now&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;an ERP source without a Fabric connector&lt;/td&gt;&lt;td&gt;keep running; reassess each quarter&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;A 40-pipeline factory, sorted into waves&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The sums: 24 + 9 + 4 + 3 = 40. Wave 1 moves 60% of the factory (24 of 40) with almost no rework, which is the momentum that makes the rest happen. The 3 that stay are a normal, supported outcome.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-validate-an-upgraded-pipeline&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-validate-an-upgraded-pipeline&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you validate an upgraded pipeline?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;Check every activity has a mapped connection. Activities with unmapped connections are &lt;strong&gt;deactivated&lt;/strong&gt;, not failed, so they are easy to miss.&lt;/li&gt;&lt;li&gt;Run the Fabric pipeline against a test destination and compare row counts with the last Azure run.&lt;/li&gt;&lt;li&gt;Re-enable its schedule or event trigger in Fabric.&lt;/li&gt;&lt;li&gt;Disable the Azure trigger for the same pipeline, so the load does not run twice.&lt;/li&gt;&lt;li&gt;Watch a full cycle (a day, a month-end) before deleting anything in Azure.&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Both versions running.&lt;/strong&gt; The Azure trigger is still on after the Fabric one is enabled; every load runs twice.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Deactivated activities.&lt;/strong&gt; An unmapped connection silently switches an activity off; the pipeline &amp;quot;succeeds&amp;quot; without loading.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Gateways last.&lt;/strong&gt; Pipelines reading on-premises data need the on-premises data gateway installed and registered before wave 1, not after.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;One schedule for fifty pipelines.&lt;/strong&gt; Fabric has no shared triggers; plan who sets and owns each schedule.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Treating &amp;quot;Review&amp;quot; as &amp;quot;never&amp;quot;.&lt;/strong&gt; Many review items are a parameter conversion or a renamed activity. Read the reason before deciding.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/data-factory/how-to-upgrade-your-azure-data-factory-pipelines-to-fabric-data-factory&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Upgrade your Azure Data Factory pipelines to Fabric Data Factory&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/data-factory/upgrade-planning-azure-data-factory&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Upgrade planning for Azure Data Factory to Fabric Data Factory&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/data-factory/compare-fabric-data-factory-and-azure-data-factory&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Compare Azure Data Factory and Fabric Data Factory&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Select View in Fabric on your smallest factory, run the assessment and download the report. Count Ready against Review: that ratio is your first honest estimate. &lt;a href=&quot;/blog/integration-runtime-azure-data-factory/&quot;&gt;Integration runtimes&lt;/a&gt; and &lt;a href=&quot;/blog/linked-service-and-dataset-azure-data-factory/&quot;&gt;linked services and datasets&lt;/a&gt; explain the Azure side of what you are mapping, and &lt;a href=&quot;/blog/azure-data-factory-triggers-explained/&quot;&gt;triggers&lt;/a&gt; the schedules you will rebuild.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Fabric capacity spike: find the operation that caused it</title>
    <link href="https://data.benibix.com/blog/capacity-metrics-find-the-spike/"/>
    <id>https://data.benibix.com/blog/capacity-metrics-find-the-spike/</id>
    <published>2026-11-16T12:00:00Z</published>
    <updated>2026-11-16T12:00:00Z</updated>
    <summary>How to go from a red column in the Fabric Capacity Metrics app to the exact report query, refresh or notebook that overloaded the capacity. The compute page, the drill-through to the timepoint page, how background usage is spread over 24 hours, a worked F64 timepoint whose numbers add up, the throttling stages, and the mistakes that send people after the wrong item.</summary>
    <category term="Fabric"/>
    <category term="Admin and security"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; open the &lt;strong&gt;Microsoft Fabric Capacity Metrics app&lt;/strong&gt;, go to the &lt;strong&gt;Compute&lt;/strong&gt; page, select the day in the ribbon chart so the &lt;strong&gt;Utilization&lt;/strong&gt; chart shows every &lt;strong&gt;30-second timepoint&lt;/strong&gt;, select a column that rises above the &lt;strong&gt;CU % Limit&lt;/strong&gt; line, and use &lt;strong&gt;Explore&lt;/strong&gt; to drill through to the &lt;strong&gt;timepoint page&lt;/strong&gt;. There, sort the &lt;strong&gt;interactive&lt;/strong&gt; and &lt;strong&gt;background&lt;/strong&gt; operation tables by &lt;strong&gt;Timepoint CU (s)&lt;/strong&gt;: the top rows name the &lt;strong&gt;workspace, item, operation and user&lt;/strong&gt; that filled that 30 seconds. Remember that a background job is spread over &lt;strong&gt;24 hours&lt;/strong&gt;, so the item at the top may have run at 2:00 in the night.&lt;/p&gt;
&lt;p&gt;The typical call: &amp;quot;Power BI was slow between 9:30 and 10:00.&amp;quot; The capacity is shared by thirty workspaces, and everyone suspects the team with the biggest model. Usually the culprit is something else: a report page that sends one huge query, or a notebook somebody started at 8:00. The app can tell you which, if you read it in the right order.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-get-from-the-spike-to-the-operations&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-get-from-the-spike-to-the-operations&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you get from the spike to the operations?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Compute page&lt;/b&gt;&lt;span&gt;14 days of usage; pick the capacity at the top&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Select the day&lt;/b&gt;&lt;span&gt;the ribbon chart filters the page; Utilization now shows every 30-second timepoint&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;red&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Select the spike&lt;/b&gt;&lt;span&gt;a column above the CU % Limit line&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Explore&lt;/b&gt;&lt;span&gt;drill through to the timepoint page for those 30 seconds&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Sort by Timepoint CU (s)&lt;/b&gt;&lt;span&gt;interactive and background tables; the top rows are the cause&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From a red column to a name&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Without a day selected, the Utilization chart shows only the peak timepoint of every six minutes, which is fine for spotting a bad hour but too coarse to drill into.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-timepoint-actually-contain&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-timepoint-actually-contain&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a timepoint actually contain?&lt;/h2&gt;
&lt;p&gt;A capacity gets its SKU number in &lt;strong&gt;CU seconds per second&lt;/strong&gt;, so an F64 has &lt;strong&gt;64 × 30 = 1,920 CU seconds&lt;/strong&gt; in each 30-second timepoint. Every operation adds its share to the timepoints it touches:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Background&lt;/strong&gt; operations (refreshes, pipelines, notebooks, warehouse queries) are &lt;strong&gt;spread evenly over the next 24 hours&lt;/strong&gt;, 2,880 timepoints. A refresh that used 345,600 CU seconds adds 345,600 / 2,880 = &lt;strong&gt;120 CU seconds&lt;/strong&gt; to every timepoint for a day.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Interactive&lt;/strong&gt; operations (report visuals, queries people trigger) land close to when they ran, so they cause the sharp peaks.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Here is one overloaded timepoint at 09:31:00, as the timepoint page would list it:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Operation&lt;/th&gt;&lt;th&gt;Type&lt;/th&gt;&lt;th&gt;Ran at&lt;/th&gt;&lt;th&gt;Total CU (s)&lt;/th&gt;&lt;th&gt;Timepoint CU (s)&lt;/th&gt;&lt;th&gt;Share of 1,920&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Sales model refresh&lt;/td&gt;&lt;td&gt;background&lt;/td&gt;&lt;td&gt;02:00&lt;/td&gt;&lt;td&gt;345,600&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;td&gt;6.3%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Data science notebook&lt;/td&gt;&lt;td&gt;background&lt;/td&gt;&lt;td&gt;08:00&lt;/td&gt;&lt;td&gt;576,000&lt;/td&gt;&lt;td&gt;200&lt;/td&gt;&lt;td&gt;10.4%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Margin report, matrix visual query&lt;/td&gt;&lt;td&gt;interactive&lt;/td&gt;&lt;td&gt;09:31&lt;/td&gt;&lt;td&gt;1,800&lt;/td&gt;&lt;td&gt;1,800&lt;/td&gt;&lt;td&gt;93.8%&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;2,120&lt;/td&gt;&lt;td&gt;110.4%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;One F64 timepoint at 09:31:00 (allowance 1,920 CU seconds)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The sums: 120 + 200 + 1,800 = 2,120, and 2,120 / 1,920 = 110.4%, so this timepoint is over the limit. The refresh everyone blamed contributes 6%; one matrix visual on one report page contributes 94%. The fix is that visual's measure, not a bigger SKU.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;red&quot;&gt;&lt;b&gt;Matrix visual query&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;1800&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Notebook (spread)&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:11.1%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;200&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Model refresh (spread)&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:6.7%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;120&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;Where the 2,120 CU seconds came from&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;which-columns-matter-on-the-timepoint-page&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-columns-matter-on-the-timepoint-page&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which columns matter on the timepoint page?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Timepoint CU (s):&lt;/strong&gt; the part of an operation's usage that lands in this 30 seconds. Sort by it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Total CU (s):&lt;/strong&gt; the whole operation. A large total with a small timepoint share is a background job doing its smoothed part.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Workspace, Item kind, Item name, Operation, User:&lt;/strong&gt; who and what. Item kind tells a semantic model from a notebook or warehouse.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Status:&lt;/strong&gt; failed and cancelled operations still count toward overload.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Duration (s):&lt;/strong&gt; has &lt;strong&gt;no effect&lt;/strong&gt; on throttling. A slow query is not the same as an expensive one.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Smoothing start / end:&lt;/strong&gt; the window an operation's usage is spread over.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;At the top, the &lt;strong&gt;heartbeat&lt;/strong&gt; chart shows 30 minutes either side of the timepoint, which tells you whether the peak lasted seconds or half an hour. When the background table holds warehouse queries, select one and &lt;strong&gt;Monitor in warehouse&lt;/strong&gt; opens the warehouse's own query monitoring for that time range (you need to be a workspace admin).&lt;/p&gt;
&lt;h2 id=&quot;when-does-a-spike-turn-into-throttling&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-does-a-spike-turn-into-throttling&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When does a spike turn into throttling?&lt;/h2&gt;
&lt;p&gt;One timepoint over 100% is not yet a problem. Fabric lets operations borrow from future capacity and throttles in stages, based on how much future capacity is already used:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Future capacity already used&lt;/th&gt;&lt;th&gt;What happens&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Up to 10 minutes&lt;/td&gt;&lt;td&gt;nothing; overage protection&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;10 to 60 minutes&lt;/td&gt;&lt;td&gt;interactive operations are delayed&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;60 minutes to 24 hours&lt;/td&gt;&lt;td&gt;interactive operations are rejected&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;More than 24 hours&lt;/td&gt;&lt;td&gt;background operations are rejected too&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The throttling stages&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The &lt;strong&gt;Throttling&lt;/strong&gt; tab of the same chart shows each stage as a percentage. 75% on the interactive rejection tab means 75% of the 60-minute allowance is used, about 15 minutes left before interactive requests are refused.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Blaming the job that ran at that time.&lt;/strong&gt; Background usage arrives spread over a day; the 09:30 peak usually comes from an interactive query, while background jobs set the baseline.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Reading the six-minute view.&lt;/strong&gt; Without a day selected, you see the peak of each six minutes, not each timepoint. Select a day first.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Sorting by duration.&lt;/strong&gt; Duration does not count for throttling; sort by CU.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Counting retries once.&lt;/strong&gt; A refresh that retried shows several rows with different activity IDs. Add them up.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Forgetting autoscale and overage.&lt;/strong&gt; With them on, the CU % Limit line moves and throttling starts later; check the line, not 100%.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Fixing it with a bigger SKU first.&lt;/strong&gt; If one visual or one notebook owns the peak, fix that; &lt;a href=&quot;/blog/workspace-surge-protection-fabric/&quot;&gt;surge protection&lt;/a&gt; can then keep one workspace from starving the rest.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/enterprise/metrics-app-compute-page&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Capacity Metrics app compute page&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/enterprise/metrics-app-timepoint-page&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Understand the metrics app timepoint page&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/enterprise/surge-protection&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Manage surge protection for Fabric capacities&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Take the last complaint about a slow morning, find that day in the app, and drill into the highest column of that hour. Write down the top three operations by Timepoint CU. If an interactive query tops the list, Performance Analyzer in Power BI Desktop shows which visual sends it; &lt;a href=&quot;/blog/fabric-capacity-units-and-f-skus/&quot;&gt;Fabric capacity units and F SKUs&lt;/a&gt; explains the CU budget itself.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Fabric HorizonDB: PostgreSQL inside Fabric, explained</title>
    <link href="https://data.benibix.com/blog/fabric-horizondb-postgresql/"/>
    <id>https://data.benibix.com/blog/fabric-horizondb-postgresql/</id>
    <published>2026-11-16T12:00:00Z</published>
    <updated>2026-11-16T12:00:00Z</updated>
    <summary>Fabric HorizonDB (preview) is a managed PostgreSQL database that lives in a Fabric workspace, scales its compute by itself and can pause when idle. How it connects to analytics in three directions (mirroring to OneLake, federated queries into Fabric, Copy job back into PostgreSQL), a worked example with SQL, the preview limits that matter (only the creator can connect), and when to use it.</summary>
    <category term="Fabric"/>
    <category term="Platform"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;Fabric HorizonDB&lt;/strong&gt; (in &lt;strong&gt;public preview&lt;/strong&gt;) is a &lt;strong&gt;managed PostgreSQL&lt;/strong&gt; database created as a Fabric item (&lt;strong&gt;+ New item, HorizonDB database (preview)&lt;/strong&gt;). Applications connect through the normal PostgreSQL protocol; Fabric manages compute, storage and maintenance, &lt;strong&gt;scales compute automatically&lt;/strong&gt;, and can &lt;strong&gt;pause an idle database&lt;/strong&gt; and resume it on the next connection. Its value for data teams is &lt;strong&gt;Federated Analytics&lt;/strong&gt;: &lt;strong&gt;mirroring&lt;/strong&gt; copies eligible tables into &lt;strong&gt;OneLake&lt;/strong&gt; with a read-only SQL analytics endpoint, &lt;strong&gt;federated queries&lt;/strong&gt; let PostgreSQL read Fabric warehouse and lakehouse data through &lt;code&gt;pg_fabric_fdw&lt;/code&gt;, and &lt;strong&gt;Copy jobs&lt;/strong&gt; load analytical results back into PostgreSQL. In the preview, &lt;strong&gt;only the Entra identity that created the database can connect&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The classic split: the app writes orders to PostgreSQL, a nightly job copies them to the warehouse, data science calculates a churn risk per customer, and another job copies the scores back so the app can show them. Two copy pipelines, two schedules, two places that break. HorizonDB puts the operational database inside Fabric so those paths are built in.&lt;/p&gt;
&lt;h2 id=&quot;how-does-data-move-between-the-app-and-analytics&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-data-move-between-the-app-and-analytics&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does data move between the app and analytics?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;App writes&lt;/b&gt;&lt;span&gt;orders and customers in HorizonDB, through the PostgreSQL endpoint&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Mirroring&lt;/b&gt;&lt;span&gt;eligible tables copied to OneLake, changes applied asynchronously&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Analytics&lt;/b&gt;&lt;span&gt;notebooks or the warehouse calculate a risk score per customer&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Federated query or Copy job&lt;/b&gt;&lt;span&gt;the app reads the scores live, or loads them into PostgreSQL&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Three directions between HorizonDB and Fabric&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Path&lt;/th&gt;&lt;th&gt;Direction&lt;/th&gt;&lt;th&gt;Rows live&lt;/th&gt;&lt;th&gt;Use when&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Mirroring&lt;/td&gt;&lt;td&gt;HorizonDB to OneLake&lt;/td&gt;&lt;td&gt;in OneLake, read-only copy&lt;/td&gt;&lt;td&gt;reports and models must not query the app database&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Federated query&lt;/td&gt;&lt;td&gt;Fabric into a PostgreSQL query&lt;/td&gt;&lt;td&gt;stay in Fabric&lt;/td&gt;&lt;td&gt;a selective, current lookup, no local copy needed&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Copy job (data delivery)&lt;/td&gt;&lt;td&gt;Fabric into PostgreSQL tables&lt;/td&gt;&lt;td&gt;in PostgreSQL&lt;/td&gt;&lt;td&gt;the app reads the same result often and needs indexes and fast replies&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Which path for which need&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-does-a-federated-query-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-federated-query-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a federated query look like?&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;pg_fabric_fdw&lt;/code&gt; extension is installed and managed by the service. You import the remote tables as &lt;strong&gt;foreign tables&lt;/strong&gt; (metadata only, no rows copied), then query them like local ones:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;CREATE&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;SCHEMA&lt;/i&gt; IF &lt;i class=&quot;k&quot;&gt;NOT&lt;/i&gt; EXISTS fabric_sales;

IMPORT FOREIGN &lt;i class=&quot;k&quot;&gt;SCHEMA&lt;/i&gt; dbo
    LIMIT &lt;i class=&quot;f&quot;&gt;TO&lt;/i&gt; (customer_signals)
    &lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; SERVER customer_signals_dw
    &lt;i class=&quot;k&quot;&gt;INTO&lt;/i&gt; fabric_sales;

&lt;i class=&quot;k&quot;&gt;SELECT&lt;/i&gt; c.customer_id, c.customer_name, s.risk_score
&lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; app.customers &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; c
&lt;i class=&quot;k&quot;&gt;JOIN&lt;/i&gt; fabric_sales.customer_signals &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; s
  &lt;i class=&quot;k&quot;&gt;ON&lt;/i&gt; s.customer_id = c.customer_id
&lt;i class=&quot;k&quot;&gt;WHERE&lt;/i&gt; s.risk_score &amp;gt;= &lt;i class=&quot;n&quot;&gt;70&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;ORDER&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;BY&lt;/i&gt; s.risk_score DESC
LIMIT &lt;i class=&quot;n&quot;&gt;20&lt;/i&gt;;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Here &lt;code&gt;customer_signals_dw&lt;/code&gt; is a foreign server you registered for the warehouse that holds the scores; the built-in server &lt;code&gt;fabric_dw&lt;/code&gt; points at the database's own mirrored SQL analytics endpoint. Run &lt;code&gt;EXPLAIN (VERBOSE)&lt;/code&gt; and read the &lt;strong&gt;Fabric SQL&lt;/strong&gt; line to see which filters, joins and aggregates run in Fabric instead of pulling rows back.&lt;/p&gt;
&lt;h2 id=&quot;do-the-numbers-add-up&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#do-the-numbers-add-up&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Do the numbers add up?&lt;/h2&gt;
&lt;p&gt;Five customers in the app, risk scores calculated in Fabric:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;customer_id&lt;/th&gt;&lt;th&gt;Local in HorizonDB&lt;/th&gt;&lt;th&gt;risk_score from Fabric&lt;/th&gt;&lt;th&gt;Returned (score 70 or more)&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;C-01&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;82&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;C-02&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;45&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;C-03&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;70&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;C-04&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;91&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;C-05&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;12&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Result&lt;/td&gt;&lt;td&gt;5 customers&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;3 rows: C-04, C-01, C-03&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The join above, row by row&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Three customers pass the filter, sorted by score: 91, 82, 70. If the warehouse is unreachable, this query fails while plain queries on &lt;code&gt;app.customers&lt;/code&gt; keep working; federation adds a runtime dependency.&lt;/p&gt;
&lt;h2 id=&quot;what-are-the-preview-limits-that-matter&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-preview-limits-that-matter&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the preview limits that matter?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;One identity.&lt;/strong&gt; Only the Entra identity that created the database can connect. Other users, groups, service principals and managed identities cannot, and sharing the item does not change that. Plan pilots around one owner.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;No PostgreSQL role management.&lt;/strong&gt; You cannot create users or roles, and per-table permissions are not available.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;No version choice.&lt;/strong&gt; The service picks and maintains the PostgreSQL version; there is no superuser, host or file system access, and only documented extensions.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Pause and resume.&lt;/strong&gt; After an idle pause, the next connection resumes it, with startup delay and no published guarantee. Sessions, temporary tables and prepared statements may not survive; clients should retry with backoff.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Mirroring is asynchronous.&lt;/strong&gt; A committed transaction appears in the app before it appears in OneLake, with no published freshness guarantee. Give reports a &amp;quot;data as of&amp;quot; timestamp.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Use test data.&lt;/strong&gt; Microsoft's own guidance for the preview: a dedicated test workspace and synthetic, nonsensitive data.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;when-should-you-use-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-should-you-use-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When should you use it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:1&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Good fit now&lt;/b&gt;&lt;span&gt;a new app or prototype whose data feeds Fabric reports; one team, one owner, test data&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Not yet&lt;/b&gt;&lt;span&gt;production with many users and service identities, strict role design, or a pinned PostgreSQL version&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Fabric HorizonDB or another PostgreSQL&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Until the preview limits lift, keep production on the PostgreSQL service you run today and use HorizonDB for a pilot, so the move is easy once it is generally available.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Connecting the app to the SQL analytics endpoint.&lt;/strong&gt; It is a read-only analytical copy. Applications use the PostgreSQL endpoint.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Running &lt;code&gt;CREATE EXTENSION&lt;/code&gt;.&lt;/strong&gt; Extensions are service-managed; check &lt;code&gt;pg_extension&lt;/code&gt; instead.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Broad federated scans.&lt;/strong&gt; A query that pulls a whole warehouse table into PostgreSQL is slow and may be rejected by a planning guardrail. Filter first.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Tables without primary keys.&lt;/strong&gt; Mirroring needs a stable key on tables meant for analytics.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Assuming the database's health covers mirroring.&lt;/strong&gt; The database, mirroring, federation and Copy jobs each have their own health.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/database/horizondb/overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What is Fabric HorizonDB?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/database/horizondb/federated-analytics-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Federated Analytics in Fabric HorizonDB&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/database/horizondb/query-fabric-data&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Query Fabric data from a HorizonDB database&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/database/horizondb/limitations&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Limitations for Fabric HorizonDB&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Create a HorizonDB database in a test workspace, load a few thousand synthetic orders, wait for mirroring to finish, and build one Power BI report on the mirrored endpoint. Then score something in a notebook and read it back with a federated query. &lt;a href=&quot;/blog/fabric-database-hub/&quot;&gt;Database Hub&lt;/a&gt; shows the new database next to the rest of your estate, and &lt;a href=&quot;/blog/what-is-onelake/&quot;&gt;What is OneLake?&lt;/a&gt; explains where the mirrored copy lands.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Fabric private links: tenant level or workspace level?</title>
    <link href="https://data.benibix.com/blog/fabric-workspace-private-links/"/>
    <id>https://data.benibix.com/blog/fabric-workspace-private-links/</id>
    <published>2026-11-16T12:00:00Z</published>
    <updated>2026-11-16T12:00:00Z</updated>
    <summary>Private links in Microsoft Fabric at two scopes. What a tenant-level private link with Block Public Internet Access changes for every workspace, what a workspace-level private link closes for one workspace, which items each supports (SQL database in preview, no semantic models or deployment pipelines at workspace level), how to build the workspace address from its ID, the setup steps and the traps.</summary>
    <category term="Fabric"/>
    <category term="Admin and security"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;private link&lt;/strong&gt; sends traffic to Fabric through a &lt;strong&gt;private endpoint&lt;/strong&gt; in your Azure virtual network instead of the public internet. At &lt;strong&gt;tenant level&lt;/strong&gt;, two tenant settings (&lt;strong&gt;Azure Private Links&lt;/strong&gt; and &lt;strong&gt;Block Public Internet Access&lt;/strong&gt;) apply to the whole tenant, and several Power BI features stop working when they are on. At &lt;strong&gt;workspace level&lt;/strong&gt;, one workspace gets its own &lt;strong&gt;private link service&lt;/strong&gt; and can be set to &lt;strong&gt;deny public access&lt;/strong&gt;, while every other workspace stays as it was. Workspace level needs an &lt;strong&gt;F SKU&lt;/strong&gt;, and today it cannot be used on a workspace with &lt;strong&gt;Power BI semantic models&lt;/strong&gt; or one assigned to a &lt;strong&gt;deployment pipeline&lt;/strong&gt;. &lt;strong&gt;SQL database&lt;/strong&gt; in Fabric supports it in preview.&lt;/p&gt;
&lt;p&gt;The usual request from security: &amp;quot;the HR data must not be reachable from the internet.&amp;quot; Turning on Block Public Internet Access for the whole tenant meets it, and also turns off Publish to web, email subscriptions, PDF and PowerPoint export and Copilot for everyone. For one sensitive area, the workspace level is the narrower tool.&lt;/p&gt;
&lt;h2 id=&quot;how-do-the-two-levels-compare&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-the-two-levels-compare&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do the two levels compare?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Question&lt;/th&gt;&lt;th&gt;Tenant level&lt;/th&gt;&lt;th&gt;Workspace level&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;What it protects&lt;/td&gt;&lt;td&gt;every workspace in the tenant&lt;/td&gt;&lt;td&gt;one workspace per private link service&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Turned on by&lt;/td&gt;&lt;td&gt;Fabric admin, two tenant settings&lt;/td&gt;&lt;td&gt;Fabric admin allows it; workspace admin sets it up&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Capacity&lt;/td&gt;&lt;td&gt;any&lt;/td&gt;&lt;td&gt;F SKU only (no P SKU, no trial)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Power BI semantic models&lt;/td&gt;&lt;td&gt;yes, with feature limits&lt;/td&gt;&lt;td&gt;not in a protected workspace&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Deployment pipelines&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;no; a pipeline's workspaces cannot deny public access&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Other workspaces&lt;/td&gt;&lt;td&gt;all affected&lt;/td&gt;&lt;td&gt;unchanged&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Tenant-level and workspace-level private links&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-stops-working-at-tenant-level&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-stops-working-at-tenant-level&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What stops working at tenant level?&lt;/h2&gt;
&lt;p&gt;With &lt;strong&gt;Azure Private Links&lt;/strong&gt; on, or with &lt;strong&gt;Block Public Internet Access&lt;/strong&gt; on, Microsoft lists these Power BI effects:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Publish to web&lt;/strong&gt; is not supported (Private Links on).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Export to PDF or PowerPoint&lt;/strong&gt; is not supported (Private Links on).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Email subscriptions&lt;/strong&gt; are not supported (Block Public Internet Access on).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Copilot&lt;/strong&gt; is not supported in private link or closed network setups.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Usage metrics&lt;/strong&gt; contain only report open events, not page views or performance.&lt;/li&gt;&lt;li&gt;Spark starter pools go away: the first notebook run creates a &lt;strong&gt;managed virtual network&lt;/strong&gt; for the workspace, and jobs then start on custom pools.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Scenarios that do not support private links are blocked by the service once public access is blocked, so test them in a separate tenant or with a pilot before switching the setting.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-workspace-level-link-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-workspace-level-link-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a workspace-level link look like?&lt;/h2&gt;
&lt;p&gt;Each protected workspace has its own private link service, and each service can have several private endpoints (up to 100), one per virtual network that needs access. A virtual network reaches several workspaces through one endpoint per workspace. Clients use the workspace's own address, built from its ID:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;text&quot;&gt;&lt;code&gt;Workspace ID:        4f2a9c1e-8b7d-4e3a-9f60-12ab34cd56ef
Without dashes:      4f2a9c1e8b7d4e3a9f6012ab34cd56ef
First two characters: 4f  -&amp;gt;  z4f

API:      https://4f2a9c1e8b7d4e3a9f6012ab34cd56ef.z4f.w.api.fabric.microsoft.com
OneLake:  https://4f2a9c1e8b7d4e3a9f6012ab34cd56ef.z4f.onelake.fabric.microsoft.com
DFS:      https://4f2a9c1e8b7d4e3a9f6012ab34cd56ef.z4f.dfs.fabric.microsoft.com
Warehouse (SQL tools): &amp;lt;tenant-guid&amp;gt;-&amp;lt;workspace-guid&amp;gt;.z4f.datawarehouse.fabric.microsoft.com&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The &amp;quot;z&amp;quot; is literal; the two characters after it are the start of the workspace ID. A wrong prefix resolves to the wrong place and the connection fails. For a warehouse or SQL analytics endpoint, add &lt;code&gt;z&amp;lt;xy&amp;gt;&lt;/code&gt; to the normal SQL connection string.&lt;/p&gt;
&lt;h2 id=&quot;which-items-can-live-in-a-protected-workspace&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-items-can-live-in-a-protected-workspace&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which items can live in a protected workspace?&lt;/h2&gt;
&lt;p&gt;Lakehouse and its SQL analytics endpoint and shortcuts, notebooks, Spark job definitions and environments, ML experiments and models, pipelines, Copy job, mounted Data Factory, warehouses, Dataflow Gen2 (CI/CD), variable libraries, mirrored databases, Eventstream, Eventhouse, Activator, data agents and &lt;strong&gt;SQL database (preview)&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;For SQL database the preview has an order to respect: the database must &lt;strong&gt;already exist&lt;/strong&gt; before the workspace link is set up, and a new SQL database cannot be created in a workspace that already has one.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-set-it-up&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-set-it-up&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you set it up?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Allow it&lt;/b&gt;&lt;span&gt;Fabric admin enables the tenant setting Configure workspace-level inbound network rules&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Private link service&lt;/b&gt;&lt;span&gt;in Azure, deploy the template for Microsoft.Fabric/privateLinkServicesForFabric with tenant ID and workspace ID&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Private endpoint&lt;/b&gt;&lt;span&gt;in the virtual network that needs access, with the privatelink.fabric.microsoft.com DNS zone&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Test from inside&lt;/b&gt;&lt;span&gt;a machine in that network opens the workspace and its items&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;red&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Deny public access&lt;/b&gt;&lt;span&gt;Workspace settings, Inbound networking, Allow connections from selected networks and workspace level private links&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Workspace-level private link, in order&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The deny step can take up to &lt;strong&gt;30 minutes&lt;/strong&gt; to apply. It is also available as an API call that sets the workspace's inbound &lt;code&gt;publicAccessRules&lt;/code&gt; to &lt;code&gt;&amp;quot;defaultAction&amp;quot;: &amp;quot;Deny&amp;quot;&lt;/code&gt;. Specific public IP addresses can still be allowed with the workspace IP firewall.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A semantic model blocks the setup.&lt;/strong&gt; A workspace with Power BI semantic models cannot enable workspace-level private links. Keep models and reports in a separate workspace that reads the protected data.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The workspace is in a deployment pipeline.&lt;/strong&gt; It cannot deny public access while assigned.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Shared links stop working.&lt;/strong&gt; Item sharing is not supported in a restricted workspace; people with shared links lose access.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A proxy in the way.&lt;/strong&gt; Network proxies that route traffic through other regions can bypass the private endpoint; include every region your tenant and capacities use.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Denying before testing.&lt;/strong&gt; If public access is denied and no private link works, the workspace is unreachable from every network until an admin changes the policy through the API.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Expecting outbound protection.&lt;/strong&gt; Private endpoints secure traffic into Fabric, not Fabric's connections to your sources; those need their own firewall rules or outbound access protection.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/security/security-private-links-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: About private links (tenant level)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/security/security-workspace-level-private-links-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Workspace-level private links overview&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/security/security-workspace-level-private-links-support&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Supported scenarios and limitations for workspace-level private links&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/security/security-workspace-level-private-links-set-up&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Set up and use workspace-level private links&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;List the workspaces that hold data the security team worries about, and check each for semantic models and deployment pipelines. Those without either are candidates for a workspace-level link; set one up in a test workspace first and connect from a machine in the network before you deny public access. &lt;a href=&quot;/blog/what-is-onelake/&quot;&gt;What is OneLake?&lt;/a&gt; explains the storage those workspaces share.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Regex in Fabric Warehouse: clean messy text in T-SQL</title>
    <link href="https://data.benibix.com/blog/regex-in-fabric-warehouse/"/>
    <id>https://data.benibix.com/blog/regex-in-fabric-warehouse/</id>
    <published>2026-11-16T12:00:00Z</published>
    <updated>2026-11-16T12:00:00Z</updated>
    <summary>The five scalar regular expression functions in Fabric Data Warehouse and the SQL analytics endpoint (preview), REGEXP_LIKE, REGEXP_SUBSTR, REGEXP_REPLACE, REGEXP_COUNT and REGEXP_INSTR. What each returns, a worked clean-up of a messy product feed whose counts add up, flags, the limits (2 MB input, no table-valued functions, no collation), and where the same functions work outside Fabric.</summary>
    <category term="SQL"/>
    <category term="T-SQL"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;Fabric Data Warehouse&lt;/strong&gt; and the &lt;strong&gt;SQL analytics endpoint&lt;/strong&gt; support five &lt;strong&gt;scalar&lt;/strong&gt; regex functions in &lt;strong&gt;preview&lt;/strong&gt;: &lt;code&gt;REGEXP_LIKE&lt;/code&gt; (does it match? use in &lt;code&gt;WHERE&lt;/code&gt; or &lt;code&gt;CASE&lt;/code&gt;), &lt;code&gt;REGEXP_SUBSTR&lt;/code&gt; (pull out the match or a capture group), &lt;code&gt;REGEXP_REPLACE&lt;/code&gt; (replace or reformat), &lt;code&gt;REGEXP_COUNT&lt;/code&gt; (how many matches) and &lt;code&gt;REGEXP_INSTR&lt;/code&gt; (where the match starts or ends). Patterns follow the &lt;strong&gt;RE2&lt;/strong&gt; syntax, flags &lt;code&gt;i&lt;/code&gt;, &lt;code&gt;c&lt;/code&gt;, &lt;code&gt;m&lt;/code&gt; and &lt;code&gt;s&lt;/code&gt; control matching, and input can be up to &lt;strong&gt;2 MB&lt;/strong&gt;. The table-valued &lt;code&gt;REGEXP_MATCHES&lt;/code&gt; and &lt;code&gt;REGEXP_SPLIT_TO_TABLE&lt;/code&gt; are &lt;strong&gt;not&lt;/strong&gt; available in the warehouse. The same functions work in Azure SQL Database, SQL database in Fabric and SQL Server 2025.&lt;/p&gt;
&lt;p&gt;Every warehouse has a column like this: a free-text field from an old system where the product code sits somewhere between words, sometimes in lower case, sometimes twice, sometimes missing a digit. Before, cleaning it meant &lt;code&gt;PATINDEX&lt;/code&gt;, &lt;code&gt;SUBSTRING&lt;/code&gt; and &lt;code&gt;CHARINDEX&lt;/code&gt; stacked five deep, or a trip to a notebook. Now one function call does it in the query that loads the table.&lt;/p&gt;
&lt;h2 id=&quot;what-does-each-function-return&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-each-function-return&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does each function return?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Returns&lt;/th&gt;&lt;th&gt;Typical job&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;REGEXP_LIKE&lt;/td&gt;&lt;td&gt;true or false&lt;/td&gt;&lt;td&gt;filter valid values; wrap in CASE to show as a column&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;REGEXP_SUBSTR&lt;/td&gt;&lt;td&gt;the nth match, or one capture group&lt;/td&gt;&lt;td&gt;extract a code, a domain, a number&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;REGEXP_REPLACE&lt;/td&gt;&lt;td&gt;the text with matches replaced&lt;/td&gt;&lt;td&gt;collapse spaces, reformat, mask&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;REGEXP_COUNT&lt;/td&gt;&lt;td&gt;number of matches&lt;/td&gt;&lt;td&gt;find rows holding more than one code&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;REGEXP_INSTR&lt;/td&gt;&lt;td&gt;start or end position of a match&lt;/td&gt;&lt;td&gt;split text around a match&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The five regex functions in Fabric Data Warehouse&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;All five return one value per row, so they work in &lt;code&gt;SELECT&lt;/code&gt;, &lt;code&gt;WHERE&lt;/code&gt;, &lt;code&gt;JOIN&lt;/code&gt;, &lt;code&gt;GROUP BY&lt;/code&gt;, &lt;code&gt;ORDER BY&lt;/code&gt; and &lt;code&gt;CASE&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-clean-a-messy-column&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-clean-a-messy-column&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you clean a messy column?&lt;/h2&gt;
&lt;p&gt;A product feed where codes should look like &lt;code&gt;AB-&lt;/code&gt; plus four digits:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;SELECT&lt;/i&gt;
    Id,
    &lt;i class=&quot;f&quot;&gt;UPPER&lt;/i&gt;(&lt;i class=&quot;f&quot;&gt;REGEXP_SUBSTR&lt;/i&gt;(Raw, &lt;i class=&quot;s&quot;&gt;'AB-\d{4}'&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'i'&lt;/i&gt;))  &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; FirstCode,
    &lt;i class=&quot;f&quot;&gt;REGEXP_COUNT&lt;/i&gt;(Raw, &lt;i class=&quot;s&quot;&gt;'AB-\d{4}'&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'i'&lt;/i&gt;)             &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; CodeCount,
    &lt;i class=&quot;f&quot;&gt;TRIM&lt;/i&gt;(&lt;i class=&quot;f&quot;&gt;REGEXP_REPLACE&lt;/i&gt;(Raw, &lt;i class=&quot;s&quot;&gt;'\s+'&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;' '&lt;/i&gt;))             &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; CleanText,
    &lt;i class=&quot;k&quot;&gt;CASE&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;WHEN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;REGEXP_LIKE&lt;/i&gt;(Raw, &lt;i class=&quot;s&quot;&gt;'AB-\d{4}'&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'i'&lt;/i&gt;)
         &lt;i class=&quot;k&quot;&gt;THEN&lt;/i&gt; &lt;i class=&quot;s&quot;&gt;'ok'&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;ELSE&lt;/i&gt; &lt;i class=&quot;s&quot;&gt;'check'&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;END&lt;/i&gt;                   &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; Status
&lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; (&lt;i class=&quot;k&quot;&gt;VALUES&lt;/i&gt;
    (&lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'SKU: ab-1042 / blue'&lt;/i&gt;),
    (&lt;i class=&quot;n&quot;&gt;2&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'sku AB-2210 red'&lt;/i&gt;),
    (&lt;i class=&quot;n&quot;&gt;3&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'no code'&lt;/i&gt;),
    (&lt;i class=&quot;n&quot;&gt;4&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'  AB-0007   green'&lt;/i&gt;),
    (&lt;i class=&quot;n&quot;&gt;5&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'AB-77'&lt;/i&gt;),
    (&lt;i class=&quot;n&quot;&gt;6&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'ref ab-3301, ab-3302'&lt;/i&gt;)
) &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;feed&lt;/i&gt; (Id, Raw);&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;'i'&lt;/code&gt; flag makes &lt;code&gt;ab-1042&lt;/code&gt; match the upper-case pattern; &lt;code&gt;UPPER&lt;/code&gt; then normalises what was found. &lt;code&gt;\d{4}&lt;/code&gt; insists on exactly four digits, so &lt;code&gt;AB-77&lt;/code&gt; does not count.&lt;/p&gt;
&lt;h2 id=&quot;do-the-results-add-up&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#do-the-results-add-up&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Do the results add up?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Id&lt;/th&gt;&lt;th&gt;FirstCode&lt;/th&gt;&lt;th&gt;CodeCount&lt;/th&gt;&lt;th&gt;Status&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;AB-1042&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;ok&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;AB-2210&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;ok&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;check&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;AB-0007&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;ok&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;check&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;AB-3301&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;ok&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;4 rows with a code&lt;/td&gt;&lt;td&gt;5 codes&lt;/td&gt;&lt;td&gt;2 rows to check&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;What the query returns&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The counts: 1 + 1 + 0 + 1 + 0 + 2 = &lt;strong&gt;5&lt;/strong&gt; codes in &lt;strong&gt;4&lt;/strong&gt; of the 6 rows, and the 2 rows marked &amp;quot;check&amp;quot; are exactly those with a count of 0. Row 6 shows why &lt;code&gt;REGEXP_COUNT&lt;/code&gt; matters: &lt;code&gt;FirstCode&lt;/code&gt; keeps only &lt;code&gt;AB-3301&lt;/code&gt;, so a row with two codes needs a second &lt;code&gt;REGEXP_SUBSTR(..., 1, 2, 'i')&lt;/code&gt; or a review.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Row 1&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:50.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Row 2&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:50.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;red&quot;&gt;&lt;b&gt;Row 3&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:0.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Row 4&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:50.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;red&quot;&gt;&lt;b&gt;Row 5&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:0.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Row 6&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;Codes found per row&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-else-is-it-good-for&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-else-is-it-good-for&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What else is it good for?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Extracting part of a match&lt;/strong&gt; with a capture group, the sixth argument of &lt;code&gt;REGEXP_SUBSTR&lt;/code&gt;: &lt;code&gt;REGEXP_SUBSTR(Email, '@(.+)$', 1, 1, 'c', 1)&lt;/code&gt; returns the email domain.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Reformatting&lt;/strong&gt; with back-references: &lt;code&gt;REGEXP_REPLACE(Phone, '^(\d{3})-(\d{3})-(\d{4})$', '(\1) \2-\3')&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Masking&lt;/strong&gt;: keep the part you want as a capture group and replace the rest, for example &lt;code&gt;REGEXP_REPLACE(Card, '^\d{12}(\d{4})$', '************\1')&lt;/code&gt; shows only the last four digits of a 16-digit number.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Grouping&lt;/strong&gt; by an extracted value, for example customers per email domain, since the functions are allowed in &lt;code&gt;GROUP BY&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;which-flags-are-there&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-flags-are-there&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which flags are there?&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;c&lt;/code&gt; case-sensitive (the default), &lt;code&gt;i&lt;/code&gt; case-insensitive, &lt;code&gt;m&lt;/code&gt; makes &lt;code&gt;^&lt;/code&gt; and &lt;code&gt;$&lt;/code&gt; match at every line, &lt;code&gt;s&lt;/code&gt; lets &lt;code&gt;.&lt;/code&gt; match a newline. Flags combine in one string of up to 30 characters; with contradictory flags the last one wins, so &lt;code&gt;'ic'&lt;/code&gt; ends up case-sensitive.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Relying on the column's collation.&lt;/strong&gt; Regex ignores collation. A case-insensitive column still matches case-sensitively unless you pass &lt;code&gt;'i'&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Returning &lt;code&gt;REGEXP_LIKE&lt;/code&gt; as a column.&lt;/strong&gt; It is a Boolean; wrap it in &lt;code&gt;CASE&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Patterns copied from other tools.&lt;/strong&gt; The functions follow RE2 syntax; a pattern written for another engine can use constructs RE2 does not accept. Test it on a few rows first.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Expecting a split into rows.&lt;/strong&gt; &lt;code&gt;REGEXP_SPLIT_TO_TABLE&lt;/code&gt; and &lt;code&gt;REGEXP_MATCHES&lt;/code&gt; are not in the warehouse; use &lt;code&gt;REGEXP_SUBSTR&lt;/code&gt; with an occurrence number, or &lt;code&gt;STRING_SPLIT&lt;/code&gt; on a cleaned delimiter.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Huge values and patterns.&lt;/strong&gt; Input up to 2 MB, patterns up to 8,000 bytes, and counted repeats up to 1,000.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Preview.&lt;/strong&gt; Test the exact patterns you depend on before building a production load on them.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/data-warehouse/regular-expressions&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Regular expression functions in Fabric Data Warehouse&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/functions/regular-expressions-functions-transact-sql&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Regular expressions in T-SQL&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/functions/regexp-substr-transact-sql&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: REGEXP_SUBSTR&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Pick the free-text column your team cleans by hand most often, write one &lt;code&gt;REGEXP_LIKE&lt;/code&gt; that marks the good rows, and count the rest. That count is your data quality number before and after. &lt;a href=&quot;/blog/fabric-sql-analytics-endpoint-explained/&quot;&gt;The SQL analytics endpoint&lt;/a&gt; runs the same functions on lakehouse tables, and &lt;a href=&quot;/blog/sql-window-functions-explained/&quot;&gt;window functions&lt;/a&gt; pair well with them for de-duplicating cleaned codes.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>What does an AI coding agent cost a data team?</title>
    <link href="https://data.benibix.com/blog/ai-coding-agent-cost-for-a-data-team/"/>
    <id>https://data.benibix.com/blog/ai-coding-agent-cost-for-a-data-team/</id>
    <published>2026-11-16T09:00:00Z</published>
    <updated>2026-11-16T09:00:00Z</updated>
    <summary>Claude Code is not on the free plan, so a data team has to pick: plans per person, Team seats, or pay per token through the API. The prices, how to estimate a month for five analysts, and how to see what you really spend.</summary>
    <category term="AI"/>
    <category term="Claude Code"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; Claude Code needs a paid plan or a Console account. Per person, &lt;strong&gt;Pro is $20 a month&lt;/strong&gt;, &lt;strong&gt;Max $100&lt;/strong&gt; and &lt;strong&gt;Ultra $200&lt;/strong&gt;. For a company, &lt;strong&gt;Team&lt;/strong&gt; costs &lt;strong&gt;$25 a seat a month for Standard&lt;/strong&gt; or &lt;strong&gt;$125 for Premium&lt;/strong&gt; ($20 and $100 billed yearly), and &lt;strong&gt;Enterprise&lt;/strong&gt; is &lt;strong&gt;$20 a seat a month billed yearly, 20 seats minimum, plus usage at API rates&lt;/strong&gt;. A Console account instead charges &lt;strong&gt;per token&lt;/strong&gt;, for example &lt;strong&gt;$4 per million input and $20 per million output tokens on Opus 5.5&lt;/strong&gt;. Estimate with a two-week trial and real usage numbers, not guesses.&lt;/p&gt;
&lt;p&gt;Data teams use agents unevenly: one engineer runs it all day on pipeline changes, three analysts use it twice a week for a query. A per-seat price and a per-token price reward those patterns very differently.&lt;/p&gt;
&lt;h2 id=&quot;what-are-the-options&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-options&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the options?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Option&lt;/th&gt;&lt;th&gt;Price&lt;/th&gt;&lt;th&gt;Fits&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Pro&lt;/td&gt;&lt;td&gt;$20 a month ($17 billed yearly)&lt;/td&gt;&lt;td&gt;Light, personal use&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Max&lt;/td&gt;&lt;td&gt;$100 a month&lt;/td&gt;&lt;td&gt;Daily use&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ultra&lt;/td&gt;&lt;td&gt;$200 a month&lt;/td&gt;&lt;td&gt;Heavy daily use&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Team Standard&lt;/td&gt;&lt;td&gt;$25 a seat a month ($20 yearly)&lt;/td&gt;&lt;td&gt;A team with company data terms&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Team Premium&lt;/td&gt;&lt;td&gt;$125 a seat a month ($100 yearly)&lt;/td&gt;&lt;td&gt;Team members who use it heavily&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Enterprise&lt;/td&gt;&lt;td&gt;$20 a seat a month yearly, 20 seats minimum, plus API-rate usage&lt;/td&gt;&lt;td&gt;Larger organizations&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Console (API)&lt;/td&gt;&lt;td&gt;Per token, e.g. Opus 5.5 $4 in / $20 out per million&lt;/td&gt;&lt;td&gt;Scripts, CI, uneven use&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Ways to pay for Claude Code (US dollars before tax, checked 17 November 2026)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-estimate-a-month-for-a-team&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-estimate-a-month-for-a-team&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you estimate a month for a team?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Trial&lt;/b&gt;&lt;span&gt;two weeks on real tasks, everyone on the same setup&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Measure&lt;/b&gt;&lt;span&gt;tokens and sessions per person, by model&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Split&lt;/b&gt;&lt;span&gt;heavy users and light users&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Price&lt;/b&gt;&lt;span&gt;seats for the heavy users, the cheapest option for the rest&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From trial to a monthly number&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;For company data, remember that Team, Enterprise and the API are the account types Anthropic does not train on; personal plans train when the setting is on.&lt;/p&gt;
&lt;h2 id=&quot;what-drives-the-cost-up&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-drives-the-cost-up&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What drives the cost up?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A bigger model or higher effort&lt;/strong&gt; for every task, when medium would do.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Long sessions&lt;/strong&gt; that carry a huge context; start fresh for a new task.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Agents in CI&lt;/strong&gt; running on every commit instead of when needed.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://claude.com/pricing&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude: Pricing&lt;/a&gt;, plan prices&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://platform.claude.com/docs/en/about-claude/pricing&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude API docs: pricing&lt;/a&gt;, per-token prices&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/data-usage&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Data usage&lt;/a&gt;, training by account type&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;See tokens and cost per model from your own history with &lt;a href=&quot;https://tools.benibix.com/coding-agents/claude-code/usage-insights/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Usage Insights for Claude Code&lt;/a&gt;. Match the model to the job with &lt;a href=&quot;/blog/which-claude-model-for-data-work/&quot;&gt;which Claude model for data work&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Power BI report vs dashboard: the difference</title>
    <link href="https://data.benibix.com/blog/power-bi-report-vs-dashboard/"/>
    <id>https://data.benibix.com/blog/power-bi-report-vs-dashboard/</id>
    <published>2026-11-15T17:00:00Z</published>
    <updated>2026-11-15T17:00:00Z</updated>
    <summary>In Power BI a report and a dashboard are different things. A report has one or more pages with filters and slicers and is built in Desktop; a dashboard is one page of pinned tiles that exists only in the online service. The full comparison and when to use which.</summary>
    <category term="Visuals"/>
    <category term="Report design"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; in Power BI, a &lt;strong&gt;report&lt;/strong&gt; has &lt;strong&gt;one or more pages&lt;/strong&gt;, with filters, slicers and drill-down, and you build it in &lt;strong&gt;Power BI Desktop&lt;/strong&gt; (or the service). A &lt;strong&gt;dashboard&lt;/strong&gt; is &lt;strong&gt;one page of tiles&lt;/strong&gt; that you &lt;strong&gt;pin&lt;/strong&gt; from reports, and it exists &lt;strong&gt;only in the Power BI service&lt;/strong&gt; online; you cannot filter or slice it. Build the report first, in layers: an overview page, then one page per question. Make a dashboard only when people need one screen that gathers tiles from several reports.&lt;/p&gt;
&lt;p&gt;People say &amp;quot;dashboard&amp;quot; for any page of charts, so a request for &amp;quot;a Power BI dashboard&amp;quot; usually means a report. Knowing the real difference saves a week of building the wrong thing.&lt;/p&gt;
&lt;h2 id=&quot;how-do-a-report-and-a-dashboard-differ&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-a-report-and-a-dashboard-differ&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do a report and a dashboard differ?&lt;/h2&gt;
&lt;p&gt;From Microsoft's comparison:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Capability&lt;/th&gt;&lt;th&gt;Dashboard&lt;/th&gt;&lt;th&gt;Report&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Pages&lt;/td&gt;&lt;td&gt;One&lt;/td&gt;&lt;td&gt;One or more&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Data sources&lt;/td&gt;&lt;td&gt;One or more reports and semantic models&lt;/td&gt;&lt;td&gt;One semantic model&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Built in Power BI Desktop&lt;/td&gt;&lt;td&gt;No, service only&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Filtering and slicing&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;td&gt;Yes, many ways&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Drill-down in visuals&lt;/td&gt;&lt;td&gt;Only on a pinned report page&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Alerts on a number&lt;/td&gt;&lt;td&gt;Yes, on some tiles&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Subscribe by email&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;td&gt;Yes, per page&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;See tables and fields&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Power BI dashboards and reports side by side&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;A dashboard is a front page: each tile opens the report it came from. A report is where people actually explore.&lt;/p&gt;
&lt;h2 id=&quot;when-do-you-need-a-dashboard-at-all&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-do-you-need-a-dashboard-at-all&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When do you need a dashboard at all?&lt;/h2&gt;
&lt;p&gt;When one screen must gather numbers from &lt;strong&gt;several reports&lt;/strong&gt;: revenue from the sales report, tickets from the support report, headcount from HR. Or when you want an &lt;strong&gt;alert&lt;/strong&gt; when a number crosses a line. For everything else, a report page does the job and can be filtered.&lt;/p&gt;
&lt;p&gt;Creating a dashboard in a shared workspace needs a Power BI Pro or Premium Per User licence; in your own My Workspace you can create one without.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-build-the-report-in-layers&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-the-report-in-layers&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build the report in layers?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:3&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Overview&lt;/b&gt;&lt;span&gt;one page, the few numbers that matter, with their trend&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;One page per question&lt;/b&gt;&lt;span&gt;sales by region, margin by product, customers who left&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Same slicers in the same spot&lt;/b&gt;&lt;span&gt;date and region top left on every page&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;A report in layers&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ol&gt;&lt;li&gt;&lt;strong&gt;An overview page first&lt;/strong&gt;: the handful of KPIs everyone asks about, each with a trend. Readers should know whether things are fine in five seconds.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Then one page per question&lt;/strong&gt;: each detail page answers one question the overview raises.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Keep the slicers in the same spot&lt;/strong&gt; on every page, so people never hunt for the date filter.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;A &lt;strong&gt;theme file&lt;/strong&gt; sets the colours and fonts of every visual at once, so all pages look like one report. &lt;a href=&quot;/blog/report-theme-json-power-bi/&quot;&gt;Report themes in Power BI&lt;/a&gt; explains the JSON.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Mistake&lt;/th&gt;&lt;th&gt;Fix&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Building a dashboard when people need to filter&lt;/td&gt;&lt;td&gt;Build a report page; dashboards cannot be sliced&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Squeezing everything onto one report page&lt;/td&gt;&lt;td&gt;Overview page plus one page per question&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Slicers in a different place on each page&lt;/td&gt;&lt;td&gt;One position, the same on every page&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Colours set visual by visual&lt;/td&gt;&lt;td&gt;One theme file for the whole report&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/service-dashboards&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Intro to dashboards for Power BI designers&lt;/a&gt;, the dashboards versus reports table&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-report-themes&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Use report themes in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;For the page layout itself, read &lt;a href=&quot;/blog/power-bi-report-design-pattern/&quot;&gt;how I design a Power BI report page, step by step&lt;/a&gt;. &lt;a href=&quot;https://tools.benibix.com/data/report-design-studio/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Report Design Studio&lt;/a&gt; builds the theme file (palette, fonts, every visual) on a live preview, checks every colour pair for contrast and exports it for Power BI.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>AB-730: the AI Business Professional exam explained</title>
    <link href="https://data.benibix.com/blog/ab-730-study-guide/"/>
    <id>https://data.benibix.com/blog/ab-730-study-guide/</id>
    <published>2026-11-15T12:00:00Z</published>
    <updated>2026-11-15T12:00:00Z</updated>
    <summary>What the AB-730 AI Business Professional exam measures since October 2026, how its four areas are weighted, who it is for, and how to prepare by doing your real work with Microsoft 365 Copilot and its agents.</summary>
    <category term="Exams"/>
    <category term="AI"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; AB-730 earns &lt;strong&gt;Microsoft Certified: AI Business Professional&lt;/strong&gt;. It checks that you use Microsoft 365 Copilot well in everyday work, without coding: generative AI basics and risks (25 to 30%), prompts and chats (20 to 25%), business content, meetings and collaboration (20 to 25%), and prebuilt agents and Copilot Cowork (20 to 25%). It is a 45-minute, beginner-level exam, and you need 700 out of 1,000.&lt;/p&gt;
&lt;p&gt;It suits anyone in an office role who wants to show they can write good prompts, check AI output, and hand multi-step tasks to agents safely.&lt;/p&gt;
&lt;h2 id=&quot;what-does-ab-730-cover&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-ab-730-cover&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does AB-730 cover?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Generative AI fundamentals&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;25-30%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;Prompts and chats in Copilot&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:83.3%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;20-25%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;Business content and collaboration&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:83.3%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;20-25%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;Business outcomes with agents&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:83.3%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;20-25%&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;AB-730 skills, by weight in the exam&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Fundamentals&lt;/strong&gt;: how Copilot keeps company data private, and the risks: inaccuracies, prompt injection, over-reliance.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Prompts and chats&lt;/strong&gt;: effective prompts (including choosing a model), saving and reusing prompts, finding and managing chats.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Content and collaboration&lt;/strong&gt;: drafting and analysing documents, connectors to sources outside Microsoft 365, preparing for and catching up on meetings, the Facilitator agent.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Agents&lt;/strong&gt;: when a prebuilt agent helps, prebuilt against custom, and Copilot Cowork for multi-step tasks with its skills, security points and limits.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-prepare&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-prepare&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you prepare?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Task&lt;/th&gt;&lt;th&gt;Area&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Rewrite a vague prompt with goal, context, source and format&lt;/td&gt;&lt;td&gt;Prompts and chats&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Check three facts in a Copilot answer against the source&lt;/td&gt;&lt;td&gt;Fundamentals (risks)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Draft a report from two files and a meeting transcript&lt;/td&gt;&lt;td&gt;Content and collaboration&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Catch up on a meeting you missed&lt;/td&gt;&lt;td&gt;Collaboration&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Hand a multi-step task to Cowork and review each step&lt;/td&gt;&lt;td&gt;Agents&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;A week of real work, mapped to the exam&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Then take the free practice assessment Microsoft offers for AB-730.&lt;/p&gt;
&lt;h2 id=&quot;what-helps-on-the-day&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-helps-on-the-day&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What helps on the day?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Risks are a quarter of the exam.&lt;/strong&gt; Know what prompt injection and over-reliance look like in an office scenario.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Prebuilt before custom.&lt;/strong&gt; If a prebuilt agent meets the need, that is usually the answer.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/ab-730&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam AB-730&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/exams/ab-730/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Microsoft Certified: AI Business Professional&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/practice-assessments-for-microsoft-certifications&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Practice assessments&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Use Copilot for a week of real tasks and note what went wrong. &lt;a href=&quot;/blog/ab-731-study-guide/&quot;&gt;AB-731&lt;/a&gt; is the matching exam for the people who lead AI adoption.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Microsoft IQ explained: Work, Fabric, Foundry and Web IQ</title>
    <link href="https://data.benibix.com/blog/what-is-microsoft-iq/"/>
    <id>https://data.benibix.com/blog/what-is-microsoft-iq/</id>
    <published>2026-11-15T12:00:00Z</published>
    <updated>2026-11-15T12:00:00Z</updated>
    <summary>Microsoft IQ is the context layer behind Microsoft's agents and Copilot, made of four parts. What Work IQ, Fabric IQ, Foundry IQ and Web IQ each know, where their data comes from, how a single business question uses all four, what Fabric IQ adds on top of Power BI semantic models, and what a data team should prepare first.</summary>
    <category term="Fabric"/>
    <category term="Platform"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;Microsoft IQ&lt;/strong&gt; is the shared context that Microsoft's agents and Copilot draw on, in four parts. &lt;strong&gt;Work IQ&lt;/strong&gt; knows how people work: emails, meetings, chats, documents and who works with whom, from Microsoft 365. &lt;strong&gt;Fabric IQ&lt;/strong&gt; knows the state of the business: the numbers and business concepts in OneLake, Power BI &lt;strong&gt;semantic models&lt;/strong&gt; and &lt;strong&gt;ontologies&lt;/strong&gt;. &lt;strong&gt;Foundry IQ&lt;/strong&gt; knows the organisation's written knowledge: policies and documents in knowledge bases, with permission-aware retrieval and citations. &lt;strong&gt;Web IQ&lt;/strong&gt; brings fresh information from the web: pages, news, images, videos and places. For a data team, Fabric IQ is the part you build: good semantic models are what make the answers correct.&lt;/p&gt;
&lt;p&gt;Every AI assistant hits the same wall in a company. It writes fluent text, but it does not know that &amp;quot;revenue&amp;quot; here means net of returns, that the October plan was revised, or that the key account complained in a meeting last week. Microsoft IQ is Microsoft's answer: four sources of context, each owned by a different part of the Microsoft stack, that an agent can combine.&lt;/p&gt;
&lt;h2 id=&quot;what-does-each-part-know&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-each-part-know&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does each part know?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Part&lt;/th&gt;&lt;th&gt;Knows about&lt;/th&gt;&lt;th&gt;Comes from&lt;/th&gt;&lt;th&gt;Built and kept by&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Work IQ&lt;/td&gt;&lt;td&gt;people, collaboration, workflows&lt;/td&gt;&lt;td&gt;Microsoft 365: mail, meetings, chats, files&lt;/td&gt;&lt;td&gt;Microsoft 365 admins&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Fabric IQ&lt;/td&gt;&lt;td&gt;the live state of the business: numbers, entities, rules&lt;/td&gt;&lt;td&gt;OneLake, semantic models, ontologies&lt;/td&gt;&lt;td&gt;data teams&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Foundry IQ&lt;/td&gt;&lt;td&gt;policies, authoritative documents, knowledge bases&lt;/td&gt;&lt;td&gt;Blob storage, SharePoint, OneLake, the web&lt;/td&gt;&lt;td&gt;knowledge owners, developers&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Web IQ&lt;/td&gt;&lt;td&gt;fresh real-world information&lt;/td&gt;&lt;td&gt;web pages, news, images, videos, places&lt;/td&gt;&lt;td&gt;Microsoft, called through APIs&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The four parts of Microsoft IQ&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Each part keeps the permissions of its source. Work IQ only sees what the user can see in Microsoft 365, Fabric IQ applies the semantic model's row-level and object-level security, and Foundry IQ enforces access lists and sensitivity labels when it answers.&lt;/p&gt;
&lt;h2 id=&quot;how-does-one-question-use-all-four&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-one-question-use-all-four&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does one question use all four?&lt;/h2&gt;
&lt;p&gt;A regional manager asks Copilot: &amp;quot;Why did the East region miss its October plan, what did our biggest customer there say, and does our discount policy allow a recovery offer?&amp;quot;&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Fabric IQ&lt;/b&gt;&lt;span&gt;the semantic model: East plan 500,000, actual 440,000, so 60,000 or 12% short&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Work IQ&lt;/b&gt;&lt;span&gt;last week's meeting notes and emails with the largest East customer about a delayed project&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Foundry IQ&lt;/b&gt;&lt;span&gt;the discount policy document: the cap per deal and who must approve it&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Web IQ&lt;/b&gt;&lt;span&gt;news that the customer's industry paused orders in October&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One question, four sources of context&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The numbers check out: 500,000 - 440,000 = 60,000, and 60,000 / 500,000 = 12%. Only the first step is the data team's work, and it is the step everything else rests on. If the semantic model's &amp;quot;actual&amp;quot; includes returns in one region and not another, the fluent answer is fluently wrong.&lt;/p&gt;
&lt;h2 id=&quot;what-does-fabric-iq-add-on-top-of-power-bi&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-fabric-iq-add-on-top-of-power-bi&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does Fabric IQ add on top of Power BI?&lt;/h2&gt;
&lt;p&gt;Fabric IQ is also a &lt;strong&gt;workload&lt;/strong&gt; in Fabric (in preview) that groups the items holding business context:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;layers&quot;&gt;&lt;ol class=&quot;dfig-stack&quot;&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Agents&lt;/b&gt;&lt;span&gt;data agents answer questions; operations agents watch live data and suggest actions&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Ontology (preview)&lt;/b&gt;&lt;span&gt;entity types such as Customer or Shipment, their relationships, rules and metrics&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Semantic models&lt;/b&gt;&lt;span&gt;measures, hierarchies, relationships: the KPIs people already trust&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;b&gt;OneLake&lt;/b&gt;&lt;span&gt;lakehouses, warehouses, eventhouses, shortcuts and mirrored data&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Fabric IQ, from the data up&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The workload also holds &lt;strong&gt;planning&lt;/strong&gt; (plans and forecasts on top of semantic models) and &lt;strong&gt;graph&lt;/strong&gt; (for questions about chains of relationships). An &lt;strong&gt;ontology&lt;/strong&gt; can be generated from an existing semantic model, which carries its DAX measures over as metrics, so a well-built model is the fastest way in.&lt;/p&gt;
&lt;h2 id=&quot;how-do-people-reach-fabric-iq-today&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-people-reach-fabric-iq-today&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do people reach Fabric IQ today?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Microsoft 365 Copilot Chat&lt;/strong&gt; answers questions from Power BI reports and semantic models the user can access; this data answering is generally available. Users with a premium Copilot licence also get Work IQ context in the same answer.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Microsoft Copilot in Power BI and Fabric&lt;/strong&gt; (preview) brings the same experience into the Power BI navigation, replacing &lt;a href=&quot;/blog/standalone-power-bi-copilot-retirement/&quot;&gt;standalone Power BI Copilot&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Fabric data agents&lt;/strong&gt; answer questions for one domain and can be published to Microsoft 365, Foundry and Copilot Studio.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-should-a-data-team-do-first&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-should-a-data-team-do-first&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What should a data team do first?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Fix the definitions.&lt;/strong&gt; One measure per business term, in one shared semantic model, with descriptions. Copilot reads names and descriptions.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Hide what is not for answers.&lt;/strong&gt; Technical columns, keys and helper measures confuse an AI just as they confuse readers.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Check security.&lt;/strong&gt; Row-level and object-level security apply to AI answers too; test them with a real user's account.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Refresh reliably.&lt;/strong&gt; Answers come from the last successful refresh; a failed refresh means yesterday's numbers in today's answer.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Pick one domain for an agent.&lt;/strong&gt; A data agent on sales or on stock, grounded in one good model, teaches you more than a general one.&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Treating IQ as a product to buy.&lt;/strong&gt; It is context that comes from your data, documents and Microsoft 365. Weak models give weak answers.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Two definitions of one KPI.&lt;/strong&gt; The agent picks one; the reader cannot tell which. Consolidate first.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Ignoring licences.&lt;/strong&gt; Who gets Work IQ depends on their Copilot licence, not their Power BI licence.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Trusting without checking.&lt;/strong&gt; Microsoft's own guidance is to validate important answers against the source data.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Preview parts in production.&lt;/strong&gt; Ontology, the IQ workload and Microsoft Copilot in Power BI are in preview; plan pilots, not rollouts.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/microsoft-iq/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Microsoft IQ documentation&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/iq/overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What is Fabric IQ?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/foundry/agents/concepts/what-is-foundry-iq&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What is Foundry IQ?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/microsoft-365/copilot/extensibility/work-iq/api-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Work IQ API overview&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/web-iq/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Microsoft Web IQ documentation&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/iq/connectors/microsoft-365-copilot-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Fabric IQ in Microsoft 365 Copilot Chat&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Choose the semantic model people ask the most questions about, clean its names and descriptions, and ask it ten real questions through Copilot Chat. Every wrong answer points at a definition to fix. &lt;a href=&quot;/blog/star-schema-power-bi-explained/&quot;&gt;The star schema&lt;/a&gt; is the shape that makes those answers reliable, and &lt;a href=&quot;/blog/semantic-view-vs-semantic-model/&quot;&gt;semantic views&lt;/a&gt; are a new way to define shared metrics next to the data.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>My workspace in Fabric: how admins govern personal content</title>
    <link href="https://data.benibix.com/blog/my-workspace-governance-fabric/"/>
    <id>https://data.benibix.com/blog/my-workspace-governance-fabric/</id>
    <published>2026-11-15T12:00:00Z</published>
    <updated>2026-11-15T12:00:00Z</updated>
    <summary>Every Fabric user has a My workspace that only they can open, and important reports end up there. How a Fabric admin finds personal workspaces, gets 24-hour access from the OneLake catalog or the admin REST API (service principals included), moves content out, restores a deleted My workspace within 30 days, and keeps personal content on the right capacity. With a worked rate-limit example for a script.</summary>
    <category term="Fabric"/>
    <category term="Admin and security"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;My workspace&lt;/strong&gt; is visible only to its owner, but a &lt;strong&gt;Fabric admin&lt;/strong&gt; can take &lt;strong&gt;temporary access for 24 hours&lt;/strong&gt;: in the &lt;strong&gt;OneLake catalog, Govern, Workspaces&lt;/strong&gt;, select the personal workspace and &lt;strong&gt;Get Access&lt;/strong&gt;, or call the admin API &lt;strong&gt;Grant Admin Temporary Access&lt;/strong&gt; (users, &lt;strong&gt;service principals&lt;/strong&gt; and managed identities are supported). Access ends by itself after 24 hours or with &lt;strong&gt;Remove Access&lt;/strong&gt;; the owner keeps theirs. A deleted My workspace stays restorable for &lt;strong&gt;30 days&lt;/strong&gt; and can be restored as a normal workspace. Admins can also set a &lt;strong&gt;default capacity&lt;/strong&gt; for all My workspaces.&lt;/p&gt;
&lt;p&gt;It always starts the same way. Someone leaves the company, and on Monday finance asks why the weekly margin report is gone. It was built, refreshed and shared from the leaver's My workspace for two years. Nobody else had access, because nobody else can have access to a My workspace. These are the admin tools for that moment, and for preventing the next one.&lt;/p&gt;
&lt;h2 id=&quot;what-can-an-admin-do-with-a-my-workspace&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-can-an-admin-do-with-a-my-workspace&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What can an admin do with a My workspace?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:4&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Temporary access&lt;/b&gt;&lt;span&gt;24 hours to view and change its content, then revoked by itself&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Default capacity&lt;/b&gt;&lt;span&gt;put every existing and new My workspace on a chosen capacity&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Restore&lt;/b&gt;&lt;span&gt;bring back a deleted My workspace within 30 days, as a normal workspace&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Find and filter&lt;/b&gt;&lt;span&gt;list all workspaces of type Personal Group and see their capacity and state&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Four admin controls for personal workspaces&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;With temporary access you can do anything the owner could: open, change, share or unshare items. One thing you cannot do is grant a third person access to that My workspace.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-get-access-in-the-portal&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-get-access-in-the-portal&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you get access in the portal?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;Sign in with your admin account and open the &lt;strong&gt;OneLake catalog&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Select &lt;strong&gt;Govern&lt;/strong&gt;, then &lt;strong&gt;Workspaces&lt;/strong&gt; under Manage.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Filter&lt;/strong&gt; by Type &lt;strong&gt;Personal Group&lt;/strong&gt; and search for the owner's name.&lt;/li&gt;&lt;li&gt;Select the workspace and choose &lt;strong&gt;Get Access&lt;/strong&gt; on the command bar.&lt;/li&gt;&lt;li&gt;It now appears in your workspace list with a My workspace icon. When done, select it again and choose &lt;strong&gt;Remove Access&lt;/strong&gt;, or let the 24 hours run out.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;The same Workspaces list has a &lt;strong&gt;State&lt;/strong&gt; column: &lt;strong&gt;Orphaned&lt;/strong&gt; means a workspace with no admin, which needs one assigned; &lt;strong&gt;Deleted&lt;/strong&gt; means it is in its retention period.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-do-it-with-the-api&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-do-it-with-the-api&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you do it with the API?&lt;/h2&gt;
&lt;p&gt;The admin REST API makes this repeatable, for example as part of an offboarding run under a service principal:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;text&quot;&gt;&lt;code&gt;GET  https://api.fabric.microsoft.com/v1/admin/workspaces?type=personal&amp;amp;state=active
POST https://api.fabric.microsoft.com/v1/admin/workspaces/{workspaceId}/grantAdminTemporaryAccess
POST https://api.fabric.microsoft.com/v1/admin/workspaces/{workspaceId}/removeAdminTemporaryAccess&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The caller must be a Fabric administrator or a service principal, with the delegated scope &lt;code&gt;Tenant.ReadWrite.All&lt;/code&gt; for user sign-in. The limits shape any script:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Call&lt;/th&gt;&lt;th&gt;Limit&lt;/th&gt;&lt;th&gt;Effect on 1,200 personal workspaces&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;List workspaces&lt;/td&gt;&lt;td&gt;10,000 records per page, 200 requests per hour&lt;/td&gt;&lt;td&gt;one request lists all 1,200&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Grant temporary access&lt;/td&gt;&lt;td&gt;25 requests per minute&lt;/td&gt;&lt;td&gt;1,200 / 25 = 48 minutes to grant them all&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Remove temporary access&lt;/td&gt;&lt;td&gt;its own call per workspace&lt;/td&gt;&lt;td&gt;run it when each check is done&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The limits a review script has to respect&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Grant in batches of 25, review each workspace within its 24 hours, then remove access. Granting all 1,200 at once and reviewing slowly just lets the access expire half-way.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-move-content-out-of-a-leaver-s-my-workspace&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-move-content-out-of-a-leaver-s-my-workspace&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you move content out of a leaver's My workspace?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Get access&lt;/b&gt;&lt;span&gt;24 hours, from Govern or the API&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;List what matters&lt;/b&gt;&lt;span&gt;reports, semantic models, dataflows people still use; check who it was shared with&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Rebuild in a shared workspace&lt;/b&gt;&lt;span&gt;download or republish into a team workspace with at least two admins&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Fix the sharing&lt;/b&gt;&lt;span&gt;point users and apps at the new copy&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Remove access&lt;/b&gt;&lt;span&gt;and note the new owner in the workspace description&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Rescuing a report from a leaver's My workspace&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;If the My workspace is already deleted, restore it first: in the Workspaces list, select it and &lt;strong&gt;Restore&lt;/strong&gt;. A restored My workspace comes back as a normal workspace, so you can assign admins to it like any other.&lt;/p&gt;
&lt;h2 id=&quot;which-capacity-should-my-workspaces-use&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-capacity-should-my-workspaces-use&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which capacity should My workspaces use?&lt;/h2&gt;
&lt;p&gt;A &lt;strong&gt;Fabric admin or capacity admin&lt;/strong&gt; can make a capacity the &lt;strong&gt;default for My workspaces&lt;/strong&gt;, in the capacity's settings. Two reasons to do it: data residency (personal content then lives in the region you chose) and cost control (personal experiments run on a capacity you can watch and limit with &lt;a href=&quot;/blog/workspace-surge-protection-fabric/&quot;&gt;surge protection&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Note one gap: even on a Premium capacity, the owner can move their My workspace back to the Pro workspace type, which can take content out of the region you intended. The tenant setting &lt;strong&gt;Block users from reassigning personal workspaces (My Workspace)&lt;/strong&gt; stops that; turn it on if residency matters.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Business-critical content in personal space.&lt;/strong&gt; Temporary access is the rescue, not the plan. Shared reports belong in team workspaces with two or more admins.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Access that expires mid-review.&lt;/strong&gt; 24 hours is short when a script grants hundreds at once.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Waiting too long.&lt;/strong&gt; After 30 days a deleted My workspace is removed for good.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Forgetting the retention difference.&lt;/strong&gt; Shared workspaces keep 7 days by default (adjustable to 90); My workspaces have a fixed 30.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Opening personal content without a reason.&lt;/strong&gt; The feature exists for governance; agree a written rule (who may use it, when, and how it is logged) before the first offboarding.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/admin/portal-workspaces&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Manage workspaces (Govern My workspaces)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/rest/api/fabric/admin/workspaces/grant-admin-temporary-access&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Workspaces - Grant Admin Temporary Access&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/rest/api/fabric/admin/workspaces/remove-admin-temporary-access&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Workspaces - Remove Admin Temporary Access&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/rest/api/fabric/admin/workspaces/list-workspaces&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Workspaces - List Workspaces (admin)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;List your tenant's personal workspaces by capacity and pick the ten with the most content. Ask their owners which items others depend on, and move those to team workspaces now, before anyone leaves. &lt;a href=&quot;/blog/fabric-capacity-units-and-f-skus/&quot;&gt;Fabric capacity units and F SKUs&lt;/a&gt; helps you pick the default capacity for the rest.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>OneLake security: define row and column rules once</title>
    <link href="https://data.benibix.com/blog/onelake-security-across-engines/"/>
    <id>https://data.benibix.com/blog/onelake-security-across-engines/</id>
    <published>2026-11-15T12:00:00Z</published>
    <updated>2026-11-15T12:00:00Z</updated>
    <summary>OneLake security puts table, row and column rules on the data in a lakehouse, and Spark, the SQL analytics endpoint, Direct Lake on OneLake models, Eventhouse and graph enforce them. Who the rules apply to, the RLS syntax, a worked example whose totals add up per engine, the two settings engines need, and the limits (no dynamic RLS, one role for RLS plus CLS).</summary>
    <category term="Fabric"/>
    <category term="Admin and security"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;OneLake security&lt;/strong&gt; lets a workspace Admin or Member define &lt;strong&gt;roles&lt;/strong&gt; on a lakehouse (or another data item) that grant &lt;strong&gt;tables or folders&lt;/strong&gt;, filter &lt;strong&gt;rows&lt;/strong&gt; with a SQL &lt;code&gt;WHERE&lt;/code&gt; rule, and hide &lt;strong&gt;columns&lt;/strong&gt;. Every Fabric engine that reads the data applies those rules: &lt;strong&gt;Spark notebooks, the lakehouse, the SQL analytics endpoint&lt;/strong&gt; (in user's identity mode), &lt;strong&gt;Direct Lake on OneLake&lt;/strong&gt; semantic models, &lt;strong&gt;Eventhouse&lt;/strong&gt; and &lt;strong&gt;graph&lt;/strong&gt;, all generally available. The rules restrict &lt;strong&gt;Viewers&lt;/strong&gt; and people with &lt;strong&gt;Read&lt;/strong&gt; on the item; workspace &lt;strong&gt;Admins, Members and Contributors&lt;/strong&gt; always see everything.&lt;/p&gt;
&lt;p&gt;Before this, the same &amp;quot;Austria sees only Austria&amp;quot; rule lived in four places: a SQL security policy on the endpoint, a DAX role in the semantic model, a filter in a notebook, and a KQL function in the eventhouse. Four copies meant four chances to get it wrong, and a quiet leak the day one of them was forgotten. OneLake security moves the rule to the data, so every engine reads the same one.&lt;/p&gt;
&lt;h2 id=&quot;where-does-each-kind-of-permission-sit&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-does-each-kind-of-permission-sit&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where does each kind of permission sit?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;layers&quot;&gt;&lt;ol class=&quot;dfig-stack&quot;&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Data plane: OneLake security roles&lt;/b&gt;&lt;span&gt;tables, folders, rows and columns; who sees which data&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Item permissions&lt;/b&gt;&lt;span&gt;Read, ReadData, ReadAll, Write on one item, given by sharing&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;b&gt;Control plane: workspace roles&lt;/b&gt;&lt;span&gt;Admin, Member, Contributor, Viewer; who can manage and create&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Two planes of permission in OneLake&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Workspace roles decide what people can do. OneLake security decides what data Viewers and item readers see. Because roles only &lt;strong&gt;grant&lt;/strong&gt;, they cannot take data away from someone a workspace role already lets in: Admins, Members and Contributors read all data in the workspace.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-role-contain&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-role-contain&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a role contain?&lt;/h2&gt;
&lt;p&gt;Four parts: &lt;strong&gt;permission&lt;/strong&gt; (Read or ReadWrite), &lt;strong&gt;type&lt;/strong&gt; (only Grant roles exist), &lt;strong&gt;data&lt;/strong&gt; (tables, folders or schemas, with row and column rules) and &lt;strong&gt;members&lt;/strong&gt; (Microsoft Entra users, groups or service identities). Every lakehouse also has a &lt;strong&gt;DefaultReader&lt;/strong&gt; role that gives anyone with ReadAll access to all data; remove people from it, or narrow it, before the narrower roles mean anything.&lt;/p&gt;
&lt;p&gt;A row rule is a SQL &lt;code&gt;SELECT&lt;/code&gt; with a &lt;code&gt;WHERE&lt;/code&gt; clause:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;SELECT&lt;/i&gt; * &lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; dbo.sales &lt;i class=&quot;k&quot;&gt;WHERE&lt;/i&gt; Region &lt;i class=&quot;k&quot;&gt;IN&lt;/i&gt; (&lt;i class=&quot;s&quot;&gt;'Austria'&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Germany'&lt;/i&gt;)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Rules allow &lt;code&gt;=&lt;/code&gt;, &lt;code&gt;&amp;lt;&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;gt;=&lt;/code&gt;, &lt;code&gt;&amp;lt;&lt;/code&gt;, &lt;code&gt;&amp;lt;=&lt;/code&gt;, &lt;code&gt;IN&lt;/code&gt;, &lt;code&gt;NOT&lt;/code&gt;, &lt;code&gt;AND&lt;/code&gt;, &lt;code&gt;OR&lt;/code&gt;, &lt;code&gt;IS NULL&lt;/code&gt; and &lt;code&gt;IS BLANK&lt;/code&gt;, up to 1,000 characters. String comparisons ignore case. Include the schema when the lakehouse uses schemas; a wrong table name shows no rows at all.&lt;/p&gt;
&lt;h2 id=&quot;do-the-numbers-add-up-in-every-engine&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#do-the-numbers-add-up-in-every-engine&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Do the numbers add up in every engine?&lt;/h2&gt;
&lt;p&gt;A sales table, and a role &lt;strong&gt;DACH sales&lt;/strong&gt; with the rule above, the &lt;code&gt;Margin&lt;/code&gt; column removed, and the Viewer group as members:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;OrderId&lt;/th&gt;&lt;th&gt;Region&lt;/th&gt;&lt;th&gt;Amount&lt;/th&gt;&lt;th&gt;Margin&lt;/th&gt;&lt;th&gt;DACH sales sees&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;Austria&lt;/td&gt;&lt;td&gt;1,200&lt;/td&gt;&lt;td&gt;300&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;Germany&lt;/td&gt;&lt;td&gt;2,500&lt;/td&gt;&lt;td&gt;600&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;France&lt;/td&gt;&lt;td&gt;1,800&lt;/td&gt;&lt;td&gt;450&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;Austria&lt;/td&gt;&lt;td&gt;900&lt;/td&gt;&lt;td&gt;200&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;Italy&lt;/td&gt;&lt;td&gt;1,100&lt;/td&gt;&lt;td&gt;250&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;Germany&lt;/td&gt;&lt;td&gt;1,600&lt;/td&gt;&lt;td&gt;400&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;6 rows&lt;/td&gt;&lt;td&gt;9,100&lt;/td&gt;&lt;td&gt;2,200&lt;/td&gt;&lt;td&gt;4 rows, 6,200&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;dbo.sales, and what the DACH sales role sees&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The sums: all rows 1,200 + 2,500 + 1,800 + 900 + 1,100 + 1,600 = 9,100; the role's rows 1,200 + 2,500 + 900 + 1,600 = &lt;strong&gt;6,200&lt;/strong&gt;. Every engine should return 6,200 to a member of the role. A workspace Contributor in the same group still sees 9,100, because the workspace role already grants everything.&lt;/p&gt;
&lt;p&gt;The engines differ on one thing, a &lt;code&gt;SELECT *&lt;/code&gt; that touches the hidden column:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Engine&lt;/th&gt;&lt;th&gt;Rows&lt;/th&gt;&lt;th&gt;Margin column&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Spark notebook&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;left out, the query succeeds&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SQL analytics endpoint (user's identity mode)&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;error: the query is blocked&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Direct Lake on OneLake semantic model&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;error when Margin is used&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Eventhouse, graph, lakehouse&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;filtered by the same rules&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The same query, SELECT * FROM dbo.sales, by engine&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;So reports must not use &lt;code&gt;Margin&lt;/code&gt; for this audience, and SQL users should list their columns.&lt;/p&gt;
&lt;h2 id=&quot;what-does-each-engine-need&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-each-engine-need&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does each engine need?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;SQL analytics endpoint:&lt;/strong&gt; switch it to &lt;strong&gt;user's identity&lt;/strong&gt; access mode; otherwise it uses its own SQL permissions.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Semantic models:&lt;/strong&gt; must use &lt;strong&gt;Direct Lake on OneLake&lt;/strong&gt; to read secured tables.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Shortcuts:&lt;/strong&gt; the rules of the lakehouse where the data is stored apply. The tenant setting &lt;strong&gt;Users can access data stored in OneLake with apps external to Fabric&lt;/strong&gt; must be on to use shortcuts with OneLake security.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Other engines:&lt;/strong&gt; engines outside Fabric that are not registered as authorized engines are treated as user access, so a user with partial access is blocked from the whole table rather than filtered.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Expecting rules to apply to Contributors.&lt;/strong&gt; They never do. Readers of protected data should be Viewers or have item Read only.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The DefaultReader role.&lt;/strong&gt; Left as it is, it gives ReadAll holders everything and makes your narrow roles pointless.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;RLS and CLS in two roles.&lt;/strong&gt; A user in one role with a row rule and another with a column rule gets query errors. Put both rules on one role.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Dynamic rules.&lt;/strong&gt; RLS roles do not support dynamic or multi-table rules (no &amp;quot;the user's own region&amp;quot; lookup). Make one role per region, or keep dynamic RLS in the semantic model.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Rules on other table types.&lt;/strong&gt; Row and column rules work on Delta Parquet and virtualised Iceberg tables; on others they block the whole table for members.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A rule that names a missing column.&lt;/strong&gt; The query fails and returns nothing; recheck rules after schema changes.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/onelake/security/get-started-security&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Get started with OneLake security&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/onelake/security/row-level-security&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Table, column and row-level security in OneLake&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/onelake/security/read-secured-data&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Read data secured with OneLake security&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/onelake/security/row-level-security-syntax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Row-level security syntax reference&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Pick one table that has the same filter copied into several places. Create one role with that rule in the lakehouse, add a test Viewer, and compare the total in a notebook, the SQL endpoint and a Direct Lake report. When all three match, delete the old copies. &lt;a href=&quot;/blog/onelake-shortcuts-explained/&quot;&gt;OneLake shortcuts&lt;/a&gt; explains how the rules travel with shared data, and &lt;a href=&quot;/blog/direct-lake-power-bi-explained/&quot;&gt;Direct Lake in Power BI&lt;/a&gt; the model mode that passes them through.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Power BI report or Fabric app: which one to build?</title>
    <link href="https://data.benibix.com/blog/power-bi-report-or-fabric-app/"/>
    <id>https://data.benibix.com/blog/power-bi-report-or-fabric-app/</id>
    <published>2026-11-15T12:00:00Z</published>
    <updated>2026-11-15T12:00:00Z</updated>
    <summary>Fabric Apps let teams build data apps on Fabric that read a semantic model and also write data back, and Power BI Desktop for Apps (preview) builds them by conversation. When a report is still the right answer, when an app is, what each licence allows, what an app is made of, and a worked planning example.</summary>
    <category term="Power BI"/>
    <category term="Apps and sharing"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; build a &lt;strong&gt;report&lt;/strong&gt; when people need to &lt;strong&gt;read and explore&lt;/strong&gt; numbers: totals, trends, drill-down, slicers. Build a &lt;strong&gt;Fabric app&lt;/strong&gt; when they need to &lt;strong&gt;do something&lt;/strong&gt; with the numbers: enter a target, approve a request, comment on a line, start a workflow. A Fabric app is a web app hosted in Fabric with its own database, sign-in and API, and it can read your &lt;strong&gt;semantic models&lt;/strong&gt;, lakehouses and warehouses. Developers build one in TypeScript; analysts can describe it in plain language in &lt;strong&gt;Power BI Desktop for Apps&lt;/strong&gt; (preview), a separate application started from Power BI Desktop. A &lt;strong&gt;Power BI Pro&lt;/strong&gt; licence can create apps within Pro limits; a workspace on &lt;strong&gt;Fabric capacity&lt;/strong&gt; or a trial lifts them. Most solutions need both, and an &lt;strong&gt;org app&lt;/strong&gt; can put the report and the app side by side.&lt;/p&gt;
&lt;p&gt;Reports are read-only by design, and that is their strength. But every company has a spreadsheet that sits next to a report: targets typed in by hand, comments on why a region missed, approvals sent by email. Those spreadsheets exist because the report cannot take input. A Fabric app can, on the same data and the same sign-in.&lt;/p&gt;
&lt;h2 id=&quot;when-is-a-report-the-right-answer&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-a-report-the-right-answer&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is a report the right answer?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Report&lt;/b&gt;&lt;ul&gt;&lt;li&gt;read, compare, filter, drill, export&lt;/li&gt;&lt;li&gt;many readers, the same numbers&lt;/li&gt;&lt;li&gt;refresh on a schedule&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Fabric app&lt;/b&gt;&lt;ul&gt;&lt;li&gt;enter, change, approve, comment, trigger&lt;/li&gt;&lt;li&gt;each user writes their own rows&lt;/li&gt;&lt;li&gt;data saved at once&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Both&lt;/b&gt;&lt;ul&gt;&lt;li&gt;the report shows the result, the app collects the input&lt;/li&gt;&lt;li&gt;one org app holds the two&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Report or app, by what people do&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;If nobody needs to type anything, keep the report. It is faster to build, every Power BI user knows it, and features like row-level security and subscriptions come built in. Reach for an app when the request contains a verb other than &amp;quot;see&amp;quot;: plan, enter, approve, assign, correct.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-worked-example-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-worked-example-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a worked example look like?&lt;/h2&gt;
&lt;p&gt;A sales team plans next quarter's targets. Today: a report shows this quarter's revenue by region, someone exports it, five regional managers type targets into a shared spreadsheet, and finance copies the totals back.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Report&lt;/b&gt;&lt;span&gt;shows actuals by region from the semantic model&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Fabric app&lt;/b&gt;&lt;span&gt;each manager sees their region's actual and types a target&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;App database&lt;/b&gt;&lt;span&gt;targets saved per region and user, with who and when&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Report again&lt;/b&gt;&lt;span&gt;reads the targets back and shows target against actual&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;The same planning round with a report and a Fabric app&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;With five regions, the old way meant five spreadsheet edits, one export and one copy back, every quarter, with no record of who changed what. In the app, each manager edits one row they are allowed to see, and the app's database records the change at once.&lt;/p&gt;
&lt;h2 id=&quot;what-is-a-fabric-app-made-of&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-a-fabric-app-made-of&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is a Fabric app made of?&lt;/h2&gt;
&lt;p&gt;When an app is deployed, Fabric creates its parts as child items under the app:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;layers&quot;&gt;&lt;ol class=&quot;dfig-stack&quot;&gt;&lt;li&gt;&lt;b&gt;Static content&lt;/b&gt;&lt;span&gt;the web front end (HTML, CSS, JavaScript) at the app's URL&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;API&lt;/b&gt;&lt;span&gt;one backend address with a GraphQL data API and a sign-in service&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Authentication&lt;/b&gt;&lt;span&gt;Microsoft Entra single sign-on through Fabric; no other providers once deployed&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;App database&lt;/b&gt;&lt;span&gt;a SQL database in Fabric whose tables come from the app's code&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Connectors&lt;/b&gt;&lt;span&gt;typed access to semantic models, lakehouses, warehouses and SQL databases in Fabric&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;The parts of a deployed Fabric app&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The database schema comes from the code (TypeScript classes with decorators), so you change tables in code and redeploy, not in the database. Apps support Git integration and deployment pipelines like other Fabric items.&lt;/p&gt;
&lt;h2 id=&quot;how-does-power-bi-desktop-for-apps-fit-in&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-power-bi-desktop-for-apps-fit-in&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does Power BI Desktop for Apps fit in?&lt;/h2&gt;
&lt;p&gt;It is for analysts and report authors who do not want to set up developer tools. You describe who the app is for and what they need to do, it generates the app from a data app template, you preview and refine it locally through chat, then publish to a Fabric workspace. It can connect to semantic models already in the Power BI service, so the app uses the same measures and definitions as your reports.&lt;/p&gt;
&lt;p&gt;To use it, an admin enables both the &lt;strong&gt;Power BI Desktop for Apps&lt;/strong&gt; and the &lt;strong&gt;Fabric Apps&lt;/strong&gt; tenant settings, and you turn on the Power BI Desktop for Apps preview switch in Power BI Desktop (off by default). Sign-in with Power BI and GitHub is required. Developers can do the same with the command line instead: create a project, deploy with one command, run the front end locally against the deployed backend.&lt;/p&gt;
&lt;h2 id=&quot;which-licence-can-do-what&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-licence-can-do-what&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which licence can do what?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Licence or workspace&lt;/th&gt;&lt;th&gt;Create an app&lt;/th&gt;&lt;th&gt;Use and share one&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Fabric (Free)&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;yes, in a workspace on Fabric capacity, with the item permissions&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Power BI Pro (also Pro in Microsoft 365 E5)&lt;/td&gt;&lt;td&gt;yes, in a Pro workspace, within Pro limits&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Fabric capacity or Fabric trial&lt;/td&gt;&lt;td&gt;yes, app services use the capacity's units&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Creating and using Fabric apps by licence&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The Pro limits matter for the planning example: a PostgreSQL app database of up to &lt;strong&gt;1 GB&lt;/strong&gt;, no app functions, no file storage, no anonymous access and no public sites. Connectors to semantic models, lakehouses, warehouses and SQL databases in Fabric work. Users of a capacity-backed app do not need Pro just to open it, but when the app reads a semantic model on their behalf, they need the Power BI licence and permission that model requires.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;An app where a report would do.&lt;/strong&gt; If nobody writes data, you have added a database, an API and a code base to maintain for nothing.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Changing tables in the database.&lt;/strong&gt; The schema belongs to the code; manual changes conflict with the next deploy.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Users who open the app but see no data.&lt;/strong&gt; The app item is shared, but its related items (the semantic model, the lakehouse) are not. Share those too, or the user lacks the Power BI licence the model needs.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Pro limits found late.&lt;/strong&gt; Need files, functions or more than 1 GB? Plan for a capacity-backed workspace from the start.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Preview in production.&lt;/strong&gt; Power BI Desktop for Apps is in preview; keep the app's code in Git so you are not tied to one tool.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Regions.&lt;/strong&gt; Fabric Apps are not in every region yet; check before you promise a date.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/apps/overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What are Fabric Apps?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/apps/licensing&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Choose a licensing option for Fabric Apps&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/apps/create-app-power-bi-desktop&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create Fabric apps with Power BI Desktop for Apps (preview)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/apps/create-app&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create your first Fabric app&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/apps/faq&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Fabric Apps FAQ&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;List the spreadsheets that live next to your reports and the verbs in them: enter, approve, comment. Pick the smallest one, ask your admin to enable the two tenant settings for a test group, and build it as an app on the same semantic model as the report. &lt;a href=&quot;/blog/org-app-audiences-power-bi/&quot;&gt;Org apps in Power BI&lt;/a&gt; puts the report and the app in one place for readers, and &lt;a href=&quot;/blog/star-schema-power-bi-explained/&quot;&gt;the star schema&lt;/a&gt; keeps the semantic model both of them read from clean.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Few-shot prompts: show the AI an example row</title>
    <link href="https://data.benibix.com/blog/few-shot-prompts-for-data/"/>
    <id>https://data.benibix.com/blog/few-shot-prompts-for-data/</id>
    <published>2026-11-15T09:00:00Z</published>
    <updated>2026-11-15T09:00:00Z</updated>
    <summary>Words describe what you want; an example shows it. How to add one to three example rows to a prompt for categorising, cleaning or summarising data, and why the AI then follows your pattern instead of its own.</summary>
    <category term="AI"/>
    <category term="Prompts"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;few-shot prompt&lt;/strong&gt; gives the AI one to three &lt;strong&gt;examples of input and the output you want&lt;/strong&gt;, then the new input. The AI copies the pattern: your categories, your spelling, your format. Use it whenever the answer has to fit something that already exists, like your product categories, your naming rules or your report style. Pick examples that cover the tricky cases, not just the easy ones.&lt;/p&gt;
&lt;p&gt;The words say what you want; an example shows it. &amp;quot;Categorise these support tickets&amp;quot; gets the AI's categories. Three tickets with your categories next to them get yours.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-few-shot-prompt-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-few-shot-prompt-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a few-shot prompt look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;The task&lt;/b&gt;&lt;span&gt;&amp;quot;Give each ticket one category from our list&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;The list&lt;/b&gt;&lt;span&gt;Billing, Login, Bug, Feature request, Other&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Examples&lt;/b&gt;&lt;span&gt;three tickets with the category you would give them&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;New input&lt;/b&gt;&lt;span&gt;the tickets to categorise&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Format&lt;/b&gt;&lt;span&gt;&amp;quot;one line per ticket: ID, category&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;A few-shot prompt, in order&lt;/figcaption&gt;&lt;/figure&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot;&gt;&lt;code&gt;Give each support ticket one category: Billing, Login, Bug, Feature request or Other.

Examples:
T-101 &amp;quot;I was charged twice in October&amp;quot; -&amp;gt; Billing
T-102 &amp;quot;Reset link never arrives&amp;quot; -&amp;gt; Login
T-103 &amp;quot;Export to CSV would save me hours&amp;quot; -&amp;gt; Feature request

Now categorise, one line each as ID, category:
T-201 &amp;quot;Can't sign in since the update&amp;quot;
T-202 &amp;quot;Invoice shows the wrong VAT number&amp;quot;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-do-you-pick-good-examples&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-pick-good-examples&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you pick good examples?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Cover the borders.&lt;/strong&gt; &amp;quot;Can't sign in since the update&amp;quot; could be Login or Bug. Include an example that shows which way you decide.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Use your real format.&lt;/strong&gt; If the output goes into a table, show the exact columns.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Keep them short.&lt;/strong&gt; Three clear examples beat ten long ones.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Vary them.&lt;/strong&gt; Three billing examples teach the AI that most things are billing.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;when-does-it-help-most&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-does-it-help-most&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When does it help most?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Job&lt;/th&gt;&lt;th&gt;Without examples&lt;/th&gt;&lt;th&gt;With examples&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Categorise free text&lt;/td&gt;&lt;td&gt;The AI invents categories&lt;/td&gt;&lt;td&gt;Your categories, your edge cases&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Clean names (&amp;quot;ACME corp.&amp;quot;, &amp;quot;Acme Corporation&amp;quot;)&lt;/td&gt;&lt;td&gt;A different spelling each time&lt;/td&gt;&lt;td&gt;One canonical form&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Write metric definitions&lt;/td&gt;&lt;td&gt;Long, generic paragraphs&lt;/td&gt;&lt;td&gt;Your template, your length&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Summarise a chart for email&lt;/td&gt;&lt;td&gt;A wall of text&lt;/td&gt;&lt;td&gt;Three sentences, in your tone&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Examples that disagree with the instructions.&lt;/strong&gt; The AI follows the examples.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Real customer text.&lt;/strong&gt; Make the examples up, or remove names and numbers.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;No check.&lt;/strong&gt; Categorise 20 rows you already know, and count how many match, before you run the rest.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/multishot-prompting&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Anthropic: Use examples (multishot prompting)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://ai.google.dev/gemini-api/docs/prompting-strategies&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Google AI for Developers: Prompt design strategies&lt;/a&gt;, few-shot examples&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Start with a job you repeat every week, and save the prompt in &lt;a href=&quot;/blog/prompt-library-for-analysts/&quot;&gt;a prompt library&lt;/a&gt;. For prompts that write queries, see &lt;a href=&quot;/blog/prompt-engineering-for-sql/&quot;&gt;prompt engineering for SQL&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Run Codex inside a data pipeline with codex exec</title>
    <link href="https://data.benibix.com/blog/codex-exec-in-a-data-pipeline/"/>
    <id>https://data.benibix.com/blog/codex-exec-in-a-data-pipeline/</id>
    <published>2026-11-15T01:00:00Z</published>
    <updated>2026-11-15T01:00:00Z</updated>
    <summary>Codex CLI is not only for a person at a terminal. codex exec runs one task with no interface, which fits a scheduled job: write the weekly data-quality summary, explain a failed load. How it works, the sandbox it starts in, and where to be careful.</summary>
    <category term="AI"/>
    <category term="Codex"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;code&gt;codex exec &amp;quot;your task&amp;quot;&lt;/code&gt; runs Codex &lt;strong&gt;once, with no interface&lt;/strong&gt;: progress goes to stderr and &lt;strong&gt;only the final answer to stdout&lt;/strong&gt;, so &lt;code&gt;codex exec &amp;quot;summarise today's data-quality test results in tests/out/&amp;quot; &amp;gt; dq-summary.md&lt;/code&gt; just works in a scheduled job. It starts in a &lt;strong&gt;read-only sandbox&lt;/strong&gt;; add &lt;code&gt;--sandbox workspace-write&lt;/code&gt; only when it must change files. &lt;code&gt;--json&lt;/code&gt; streams every event, and &lt;code&gt;-o file&lt;/code&gt; saves the final answer.&lt;/p&gt;
&lt;p&gt;Most data teams have a step after the pipeline where a person reads logs and writes a summary. That step is a good fit for an agent: it reads a lot, writes a little, and changes nothing.&lt;/p&gt;
&lt;h2 id=&quot;where-does-it-fit-in-a-pipeline&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-does-it-fit-in-a-pipeline&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where does it fit in a pipeline?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Load&lt;/b&gt;&lt;span&gt;the pipeline runs as usual&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Test&lt;/b&gt;&lt;span&gt;data-quality tests write their results to a folder&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;codex exec&lt;/b&gt;&lt;span&gt;reads the results, writes a short summary (read-only)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Send&lt;/b&gt;&lt;span&gt;the summary goes to the team channel or an email&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;A nightly job with one Codex step&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;which-tasks-suit-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-tasks-suit-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which tasks suit it?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Task&lt;/th&gt;&lt;th&gt;Fits?&lt;/th&gt;&lt;th&gt;Why&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Summarise test results in plain English&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;td&gt;Reads only, output is text&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Explain why a load failed, from the log&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;td&gt;Reads only&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Draft release notes for model changes&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;td&gt;Reads Git history&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Fix failing data automatically in production&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;td&gt;Writes, with nobody reviewing&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-should-you-be-careful-with&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-should-you-be-careful-with&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What should you be careful with?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Keep the sandbox read-only&lt;/strong&gt; for reporting tasks; the default already is.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Use an API key from the CI's secret store&lt;/strong&gt;, never in the script.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Treat the output as a draft&lt;/strong&gt; when it goes to people outside the team.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://developers.openai.com/codex/noninteractive&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;OpenAI Codex docs: non-interactive mode&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.chatgpt.com/docs/codex/cli&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Codex docs: Codex CLI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Get comfortable with Codex at the terminal first: &lt;a href=&quot;/blog/first-codex-task-on-a-data-repo/&quot;&gt;your first Codex task on a data repository&lt;/a&gt;. The tests it summarises can come from &lt;a href=&quot;/blog/data-quality-quarantine-fabric-notebook/&quot;&gt;a data quality quarantine in a Fabric notebook&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>AI-901 in 2026: what the exam covers and how to study</title>
    <link href="https://data.benibix.com/blog/ai-901-study-guide/"/>
    <id>https://data.benibix.com/blog/ai-901-study-guide/</id>
    <published>2026-11-14T12:00:00Z</published>
    <updated>2026-11-14T12:00:00Z</updated>
    <summary>What the AI-901 Azure AI Fundamentals exam measures, why it replaced AI-900 in 2026, how its two areas are weighted, and a study plan that builds small AI apps in Microsoft Foundry instead of memorising service names.</summary>
    <category term="Exams"/>
    <category term="AI"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; AI-901 earns &lt;strong&gt;Microsoft Certified: Azure AI Fundamentals&lt;/strong&gt;, the same certification AI-900 used to lead to; AI-900 retired on 30 June 2026. The new exam is far more hands-on: AI concepts are 40 to 45%, and implementing AI solutions in &lt;strong&gt;Microsoft Foundry&lt;/strong&gt; is 55 to 60%. It is a fundamentals exam (45 minutes), you need 700 out of 1,000, and the certification does not expire.&lt;/p&gt;
&lt;p&gt;AI-900 asked you to describe services. AI-901 asks you to use them: write prompts, deploy a model, and build small apps for text, speech, vision and document extraction.&lt;/p&gt;
&lt;h2 id=&quot;what-does-ai-901-cover&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-ai-901-cover&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does AI-901 cover?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;Identify AI concepts and capabilities&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:75.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;40-45%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Implement AI solutions in Microsoft Foundry&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;55-60%&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;AI-901 skills, by weight in the exam&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Concepts&lt;/strong&gt;: responsible AI (fairness, reliability and safety and the other principles), how generative models work and how to pick one, and the common workloads: generative and agentic AI, text analysis, speech, computer vision and information extraction.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Implementation in Foundry&lt;/strong&gt;: system and user prompts, deploying a model and using it in the portal, a lightweight text-analysis app, answering spoken prompts with a multimodal model, reading and generating images, and extracting fields from documents and images with Content Understanding.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-is-it-different-from-ai-900&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-different-from-ai-900&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it different from AI-900?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;AI-900 (retired 30 June 2026)&lt;/th&gt;&lt;th&gt;AI-901&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Focus&lt;/td&gt;&lt;td&gt;describe AI workloads and services&lt;/td&gt;&lt;td&gt;describe, then build in Foundry&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Weights&lt;/td&gt;&lt;td&gt;five areas of 15 to 25% each&lt;/td&gt;&lt;td&gt;concepts 40-45%, implementation 55-60%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Generative AI&lt;/td&gt;&lt;td&gt;one area&lt;/td&gt;&lt;td&gt;runs through every area&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Certification&lt;/td&gt;&lt;td&gt;Azure AI Fundamentals&lt;/td&gt;&lt;td&gt;Azure AI Fundamentals&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;AI-900 and AI-901&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Old AI-900 notes still help with the concepts, but not with the Foundry half.&lt;/p&gt;
&lt;h2 id=&quot;how-would-you-study-for-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-would-you-study-for-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How would you study for it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:6&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Concepts&lt;/b&gt;&lt;span&gt;the responsible AI principles and the workload types&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Prompt&lt;/b&gt;&lt;span&gt;deploy a chat model, write a system prompt, compare two models&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Text and speech&lt;/b&gt;&lt;span&gt;a small app that summarises text and answers a spoken question&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Vision&lt;/b&gt;&lt;span&gt;describe an image, generate one&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Extraction&lt;/b&gt;&lt;span&gt;pull fields from an invoice with Content Understanding&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;6&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Practice assessment&lt;/b&gt;&lt;span&gt;the free one&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Small builds in Foundry&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The skills list mentions Python for the small apps; a few lines with the Foundry SDK are enough.&lt;/p&gt;
&lt;h2 id=&quot;what-helps-on-the-day&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-helps-on-the-day&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What helps on the day?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Match the workload to the scenario.&lt;/strong&gt; &amp;quot;Pull the total from a receipt&amp;quot; is information extraction, &amp;quot;is this review positive?&amp;quot; is text analysis.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Responsible AI questions are about the principle.&lt;/strong&gt; Learn which principle a scenario tests.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;No Microsoft Learn during the exam&lt;/strong&gt;, as on every fundamentals exam.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-keep-the-certification&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-keep-the-certification&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you keep the certification?&lt;/h2&gt;
&lt;p&gt;Fundamentals certifications do not expire.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/ai-901&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam AI-901&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/exams/ai-901/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Exam AI-901&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/ai-900&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam AI-900 (retired)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Open Foundry and deploy one model. &lt;a href=&quot;/blog/ai-103-study-guide/&quot;&gt;AI-103&lt;/a&gt; is the developer exam after it, and &lt;a href=&quot;/blog/which-fundamentals-exam-first/&quot;&gt;Which fundamentals exam first?&lt;/a&gt; compares it with AZ-900 and DP-900.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Fabric capacity units and F SKUs, explained</title>
    <link href="https://data.benibix.com/blog/fabric-capacity-units-and-f-skus/"/>
    <id>https://data.benibix.com/blog/fabric-capacity-units-and-f-skus/</id>
    <published>2026-11-14T12:00:00Z</published>
    <updated>2026-11-14T12:00:00Z</updated>
    <summary>What a capacity unit is in Microsoft Fabric, the F SKUs from F2 to F8192, how smoothing and throttling work, and why F64 matters for report viewers.</summary>
    <category term="Fabric"/>
    <category term="Platform"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a Fabric &lt;strong&gt;capacity&lt;/strong&gt; is the compute a workspace runs on, sized in &lt;strong&gt;capacity units&lt;/strong&gt; (CUs): an F2 has 2 CUs, an F64 has 64. Everything in the workspace (notebooks, pipelines, warehouses, reports) draws from it. Fabric spreads heavy jobs over time (&lt;strong&gt;smoothing&lt;/strong&gt;) and only slows or rejects new work (&lt;strong&gt;throttling&lt;/strong&gt;) when the capacity has used up its next ten minutes or more. From F64 up, people with a free licence can view Power BI content.&lt;/p&gt;
&lt;p&gt;The price is easy to read off a page; what it buys is not. Smoothing and throttling decide whether a size is enough.&lt;/p&gt;
&lt;h2 id=&quot;which-sizes-are-there&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-sizes-are-there&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which sizes are there?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;b&gt;F2&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:0.8%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;2 CU&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;b&gt;F8&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:3.1%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;8 CU&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;F32&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:12.5%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;32 CU&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;F64&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:25.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;64 CU&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;F128&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:50.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;128 CU&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;F256&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;256 CU&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;Capacity units per F SKU, from F2 to F256; from F64 up, free licences can view reports&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The F SKUs run from F2 to F8192, each one twice the one before. F64 has the compute of a Power BI Premium P1. F capacities are bought in Azure, billed per second, and can be paused, scaled up or down at any time.&lt;/p&gt;
&lt;h2 id=&quot;how-do-smoothing-and-throttling-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-smoothing-and-throttling-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do smoothing and throttling work?&lt;/h2&gt;
&lt;p&gt;Jobs may use more than the capacity for a while (&lt;strong&gt;bursting&lt;/strong&gt;), and Fabric then spreads their cost over future time. Interactive work, like a report query, is smoothed over at least five minutes; background work, like a refresh or a notebook, over 24 hours. Throttling only starts when that future is used up:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Future capacity used&lt;/th&gt;&lt;th&gt;What happens&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;up to 10 minutes&lt;/td&gt;&lt;td&gt;nothing: overage protection&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;10 to 60 minutes&lt;/td&gt;&lt;td&gt;new interactive work waits 20 seconds&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;60 minutes to 24 hours&lt;/td&gt;&lt;td&gt;new interactive work is rejected&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;more than 24 hours&lt;/td&gt;&lt;td&gt;all new work is rejected&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Throttling stages, by how much future capacity is already used&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Work that was already running finishes. The capacity heals by itself as idle time pays off the debt; scaling up or pausing and resuming pays it off faster.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-size-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-size-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you size one?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Start small and measure.&lt;/strong&gt; Run real loads on a trial or an F-capacity and read the &lt;strong&gt;Fabric Capacity Metrics app&lt;/strong&gt;: utilisation and throttling per item.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Count the viewers.&lt;/strong&gt; Below F64, everyone who views Power BI content needs a Pro or PPU licence. From F64, viewers with a free licence and a viewer role are enough, which often decides the size on its own.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Split by workload.&lt;/strong&gt; One capacity for heavy engineering and another for reports keeps a big notebook from slowing the CEO's dashboard.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Every job at 02:00.&lt;/strong&gt; Smoothing makes this cheaper than it sounds, but a capacity that is full every night is near the 24-hour limit by morning.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A paused capacity.&lt;/strong&gt; Reports and pipelines in its workspaces stop until it resumes.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Blaming the capacity first.&lt;/strong&gt; A slow report is more often a model problem than throttling; the metrics app shows which.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/enterprise/licenses&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Microsoft Fabric licenses and capacity&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/enterprise/throttling&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Understand capacity throttling and smoothing&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/enterprise/metrics-app&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What is the Microsoft Fabric Capacity Metrics app?&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/blog/delta-tables-and-v-order-fabric/&quot;&gt;Delta tables and V-Order&lt;/a&gt; covers the table upkeep that keeps capacity use down, and &lt;a href=&quot;/blog/direct-lake-power-bi-explained/&quot;&gt;Direct Lake&lt;/a&gt; lists its row and file limits per F SKU.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Microsoft exam scores: what 700 means and the score report</title>
    <link href="https://data.benibix.com/blog/microsoft-exam-score-report/"/>
    <id>https://data.benibix.com/blog/microsoft-exam-score-report/</id>
    <published>2026-11-14T12:00:00Z</published>
    <updated>2026-11-14T12:00:00Z</updated>
    <summary>How Microsoft certification exams are scored in 2026, why 700 out of 1,000 is not 70%, partial credit and unscored questions, when results arrive, how to read the score report's bar chart, and what to do with it after a fail.</summary>
    <category term="Exams"/>
    <category term="Exam tips"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; you pass with &lt;strong&gt;700 or more on a scale of 1 to 1,000&lt;/strong&gt;. It is a &lt;strong&gt;scaled score&lt;/strong&gt;, not 70% of the points: a harder set of questions needs fewer points to pass, an easier set more. Each correct part of a multi-part question usually earns a point, wrong answers cost nothing, and some questions are unscored trial items. Most results appear within minutes; exams with labs take about 30 minutes. The report shows your total and a &lt;strong&gt;bar per skill area&lt;/strong&gt;, not the questions you missed.&lt;/p&gt;
&lt;h2 id=&quot;why-is-700-not-70&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-is-700-not-70&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why is 700 not 70%?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:1&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Harder question set&lt;/b&gt;&lt;span&gt;fewer raw points needed to reach 700&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Easier question set&lt;/b&gt;&lt;span&gt;more raw points needed to reach 700&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Scaled scoring&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The pass mark is set by experts judging how hard each question is for someone who has the skill. Scaling makes scores comparable between versions of the exam and between retakes.&lt;/p&gt;
&lt;h2 id=&quot;what-does-the-report-show&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-the-report-show&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does the report show?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Part&lt;/th&gt;&lt;th&gt;What it tells you&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Total score&lt;/td&gt;&lt;td&gt;your scaled score out of 1,000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Pass or fail&lt;/td&gt;&lt;td&gt;700 or more passes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bar per skill area&lt;/td&gt;&lt;td&gt;relative strength: short bar weak, long bar strong&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Interpretation notes&lt;/td&gt;&lt;td&gt;how to read the bars&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The score report&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The bars &lt;strong&gt;cannot&lt;/strong&gt; be added up into a score. Areas have different numbers of questions, so bars above 70% everywhere can still mean a fail, and a small area can show zero after only a few questions.&lt;/p&gt;
&lt;h2 id=&quot;where-do-you-find-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-find-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you find it?&lt;/h2&gt;
&lt;p&gt;Sign in to Microsoft Learn with the account you booked with, open your profile, then Credentials and Certifications. Under &lt;strong&gt;Past exams&lt;/strong&gt;, choose &amp;quot;View details on provider site&amp;quot; to open the report on Pearson VUE. Your result is in your Learn profile within 24 hours.&lt;/p&gt;
&lt;h2 id=&quot;what-do-you-do-after-a-fail&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-do-you-do-after-a-fail&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What do you do after a fail?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;red&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Read the bars&lt;/b&gt;&lt;span&gt;find the short ones&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Weigh them&lt;/b&gt;&lt;span&gt;practise weak areas and the areas with the most weight&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Build&lt;/b&gt;&lt;span&gt;do the tasks hands-on, not just reread&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Retake&lt;/b&gt;&lt;span&gt;after 24 hours for the second try, 14 days between later tries&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From a fail to a retake&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Microsoft does not tell you which questions you got wrong. Getting the same score twice is normal; it means the exam measures consistently, and you need a different way of practising. See &lt;a href=&quot;/blog/microsoft-exam-retake-policy/&quot;&gt;the retake policy&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/exam-scoring-reports&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Exam scoring and score reports&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/support/retake-policy&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Exam retake policy&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Before the exam, compare the skill weights in your study guide with your practice results; the score report uses the same areas. &lt;a href=&quot;/blog/study-plan-for-any-microsoft-exam/&quot;&gt;A study plan for any Microsoft exam&lt;/a&gt; builds the practice around them.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>OTIF: on-time in-full delivery KPI with DAX</title>
    <link href="https://data.benibix.com/blog/otif-kpi/"/>
    <id>https://data.benibix.com/blog/otif-kpi/</id>
    <published>2026-11-14T12:00:00Z</published>
    <updated>2026-11-14T12:00:00Z</updated>
    <summary>How to calculate on-time in-full (OTIF), order lines delivered on the promised date with the full quantity divided by all lines due, on time and in full measured separately, by order or by line, tolerance windows, the DAX on a deliveries table, and a chart of failures by reason.</summary>
    <category term="KPIs"/>
    <category term="Operations"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;OTIF (on-time in-full)&lt;/strong&gt; = order lines delivered &lt;strong&gt;on the promised date&lt;/strong&gt; with the &lt;strong&gt;full quantity&lt;/strong&gt; / all order lines due in the period. Report &lt;strong&gt;on time&lt;/strong&gt; and &lt;strong&gt;in full&lt;/strong&gt; separately too: an OTIF of 88% can come from 95% on time and 92% in full, two different problems for logistics and for planning. Define the details once: promised date (first confirmed, not the latest), the tolerance (same day, or within one day), and whether it is measured per &lt;strong&gt;line&lt;/strong&gt; or per &lt;strong&gt;order&lt;/strong&gt; (an order is OTIF only if all its lines are).&lt;/p&gt;
&lt;p&gt;Customers judge suppliers by OTIF, and large retailers fine suppliers who miss it. It is the clearest single measure of whether operations keep promises.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Result&lt;/th&gt;&lt;th&gt;Lines&lt;/th&gt;&lt;th&gt;Share&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;On time and in full&lt;/td&gt;&lt;td&gt;1,760&lt;/td&gt;&lt;td&gt;88.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;On time, short quantity&lt;/td&gt;&lt;td&gt;140&lt;/td&gt;&lt;td&gt;7.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Late, full quantity&lt;/td&gt;&lt;td&gt;80&lt;/td&gt;&lt;td&gt;4.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;Late and short&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;1.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;2,000&lt;/td&gt;&lt;td&gt;100%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Order lines due in September&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;On time = (1,760 + 140) / 2,000 = &lt;strong&gt;95.0%&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;In full = (1,760 + 80) / 2,000 = &lt;strong&gt;92.0%&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;OTIF = 1,760 / 2,000 = &lt;strong&gt;88.0%&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;bar&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;bar chart: Stock not available 95; Carrier delay 60; Picking error 45; Late production 40&quot;&gt;&lt;line x1=&quot;153.2&quot; y1=&quot;8&quot; x2=&quot;153.2&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;153.2&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;241.8&quot; y1=&quot;8&quot; x2=&quot;241.8&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;241.8&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;20&lt;/text&gt;&lt;line x1=&quot;330.3&quot; y1=&quot;8&quot; x2=&quot;330.3&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;330.3&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;40&lt;/text&gt;&lt;line x1=&quot;418.9&quot; y1=&quot;8&quot; x2=&quot;418.9&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;418.9&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;60&lt;/text&gt;&lt;line x1=&quot;507.4&quot; y1=&quot;8&quot; x2=&quot;507.4&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;507.4&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;80&lt;/text&gt;&lt;line x1=&quot;596&quot; y1=&quot;8&quot; x2=&quot;596&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;596&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;100&lt;/text&gt;&lt;rect x=&quot;153.2&quot; y=&quot;19.1&quot; width=&quot;420.7&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;579.9&quot; y=&quot;44.8&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;95&lt;/text&gt;&lt;text x=&quot;143.2&quot; y=&quot;44.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Stock not available&lt;/text&gt;&lt;rect x=&quot;153.2&quot; y=&quot;84.6&quot; width=&quot;265.7&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-gold&quot;/&gt;&lt;text x=&quot;424.9&quot; y=&quot;110.3&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;60&lt;/text&gt;&lt;text x=&quot;143.2&quot; y=&quot;110.3&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Carrier delay&lt;/text&gt;&lt;rect x=&quot;153.2&quot; y=&quot;150.1&quot; width=&quot;199.3&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-gold&quot;/&gt;&lt;text x=&quot;358.5&quot; y=&quot;175.8&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;45&lt;/text&gt;&lt;text x=&quot;143.2&quot; y=&quot;175.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Picking error&lt;/text&gt;&lt;rect x=&quot;153.2&quot; y=&quot;215.6&quot; width=&quot;177.1&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-blue&quot;/&gt;&lt;text x=&quot;336.3&quot; y=&quot;241.3&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;40&lt;/text&gt;&lt;text x=&quot;143.2&quot; y=&quot;241.3&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Late production&lt;/text&gt;&lt;line x1=&quot;153.2&quot; y1=&quot;8&quot; x2=&quot;153.2&quot; y2=&quot;270&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;OTIF failures by reason (lines)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;A Deliveries table with one row per order line: Order ID, Line, Promised Date, Delivered Date, Ordered Qty, Delivered Qty, Failure Reason. Relate Promised Date to the Date table, so lines count in the period they were due:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Lines Due = &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Deliveries )

On Time Lines =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;m&quot;&gt;[Lines Due]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( Deliveries, Deliveries&lt;i class=&quot;m&quot;&gt;[Delivered Date]&lt;/i&gt; &amp;lt;= Deliveries&lt;i class=&quot;m&quot;&gt;[Promised Date]&lt;/i&gt; )
)

In Full Lines =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;m&quot;&gt;[Lines Due]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( Deliveries, Deliveries&lt;i class=&quot;m&quot;&gt;[Delivered Qty]&lt;/i&gt; &amp;gt;= Deliveries&lt;i class=&quot;m&quot;&gt;[Ordered Qty]&lt;/i&gt; )
)

OTIF Lines =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;m&quot;&gt;[Lines Due]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; (
        Deliveries,
        Deliveries&lt;i class=&quot;m&quot;&gt;[Delivered Date]&lt;/i&gt; &amp;lt;= Deliveries&lt;i class=&quot;m&quot;&gt;[Promised Date]&lt;/i&gt;
            &amp;amp;&amp;amp; Deliveries&lt;i class=&quot;m&quot;&gt;[Delivered Qty]&lt;/i&gt; &amp;gt;= Deliveries&lt;i class=&quot;m&quot;&gt;[Ordered Qty]&lt;/i&gt;
    )
)

On Time % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[On Time Lines]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Lines Due]&lt;/i&gt; )
In Full % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[In Full Lines]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Lines Due]&lt;/i&gt; )
OTIF % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[OTIF Lines]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Lines Due]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- order level: an order counts only if all its lines are OTIF&lt;/i&gt;
OTIF Orders % =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Orders = &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Deliveries&lt;i class=&quot;m&quot;&gt;[Order ID]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Good = &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( Orders, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[OTIF Lines]&lt;/i&gt; = &lt;i class=&quot;m&quot;&gt;[Lines Due]&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Good ), &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Orders ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Lines not yet delivered past their promised date have a blank Delivered Date; count them as late with &lt;code&gt;Deliveries[Delivered Date] &amp;lt;= Deliveries[Promised Date] &amp;amp;&amp;amp; NOT ISBLANK ( Deliveries[Delivered Date] )&lt;/code&gt;, or the open misses disappear. A calculated column &lt;code&gt;OTIF Flag&lt;/code&gt; with 1 or 0 makes the measures simpler and faster on large tables.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Latest promised date.&lt;/strong&gt; Re-promising late orders makes them &amp;quot;on time&amp;quot;; use the first confirmed date.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Open lines.&lt;/strong&gt; Undelivered overdue lines must count as failures.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Line against order level.&lt;/strong&gt; Line OTIF is always higher; say which you report, and use the customer's definition when they measure you.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Early deliveries.&lt;/strong&gt; Some customers count early as a failure; add a window (no earlier than one day before) if so.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/filter-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: FILTER function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/calculate-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: CALCULATE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-decomposition-tree&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Decomposition tree visual&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Record promised and delivered date and quantity for each line, then show OTIF with on time and in full side by side, and the failure reasons. &lt;a href=&quot;/blog/order-cycle-time-kpi/&quot;&gt;Order cycle time&lt;/a&gt; shows how long orders take.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Price, volume and mix analysis in Power BI with DAX</title>
    <link href="https://data.benibix.com/blog/price-volume-mix-analysis/"/>
    <id>https://data.benibix.com/blog/price-volume-mix-analysis/</id>
    <published>2026-11-14T12:00:00Z</published>
    <updated>2026-11-14T12:00:00Z</updated>
    <summary>How price-volume-mix (PVM) analysis splits a revenue change into price, volume, mix and new or lost product effects, the formulas with a worked two-product example that adds up exactly, the DAX measures, and a waterfall chart from last year's revenue to this year's.</summary>
    <category term="KPIs"/>
    <category term="Sales"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;price-volume-mix (PVM)&lt;/strong&gt; splits the change in revenue between two periods into parts that add up exactly: &lt;strong&gt;volume&lt;/strong&gt; (more or fewer units in total, at last year's average price), &lt;strong&gt;mix&lt;/strong&gt; (a shift toward dearer or cheaper products), &lt;strong&gt;price&lt;/strong&gt; (each product's price change on this year's units), and &lt;strong&gt;new and lost products&lt;/strong&gt;. For products sold in both periods: volume = (Q1 - Q0) × average price last year; mix = Σ Q1 × P0 per product - Q1 × average price last year; price = Σ (P1 - P0) × Q1. A waterfall from last year's revenue through the effects to this year's shows it in one picture.&lt;/p&gt;
&lt;p&gt;&amp;quot;Revenue is up 40%&amp;quot; invites the question &amp;quot;because we sold more, or charged more?&amp;quot;. PVM answers it.&lt;/p&gt;
&lt;h2 id=&quot;how-does-a-worked-example-add-up&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-a-worked-example-add-up&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does a worked example add up?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Product&lt;/th&gt;&lt;th&gt;Q0&lt;/th&gt;&lt;th&gt;P0&lt;/th&gt;&lt;th&gt;Revenue 0&lt;/th&gt;&lt;th&gt;Q1&lt;/th&gt;&lt;th&gt;P1&lt;/th&gt;&lt;th&gt;Revenue 1&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;A&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;1,000&lt;/td&gt;&lt;td&gt;90&lt;/td&gt;&lt;td&gt;11&lt;/td&gt;&lt;td&gt;990&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;B&lt;/td&gt;&lt;td&gt;50&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;2,000&lt;/td&gt;&lt;td&gt;80&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;3,200&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;150&lt;/td&gt;&lt;td&gt;20 (average)&lt;/td&gt;&lt;td&gt;3,000&lt;/td&gt;&lt;td&gt;170&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;4,190&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Two products, last year (0) and this year (1)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Volume&lt;/strong&gt; = (170 - 150) × 20 = &lt;strong&gt;+400&lt;/strong&gt;: 20 more units at last year's average price.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Mix&lt;/strong&gt; = (90 × 10 + 80 × 40) - 170 × 20 = 4,100 - 3,400 = &lt;strong&gt;+700&lt;/strong&gt;: sales moved toward B, the dearer product.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Price&lt;/strong&gt; = (11 - 10) × 90 + (40 - 40) × 80 = &lt;strong&gt;+90&lt;/strong&gt;: A got dearer.&lt;/li&gt;&lt;li&gt;Total = 400 + 700 + 90 = &lt;strong&gt;+1,190&lt;/strong&gt; = 4,190 - 3,000.&lt;/li&gt;&lt;/ul&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;waterfall&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;waterfall chart: Last year 3,000; Volume 400; Mix 700; Price 90; This year total&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;628&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;1,000&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;628&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;2,000&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;628&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;3,000&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;628&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;4,000&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;628&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;5,000&lt;/text&gt;&lt;rect x=&quot;72.7&quot; y=&quot;114.8&quot; width=&quot;73.7&quot; height=&quot;151.2&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;109.6&quot; y=&quot;108.8&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;3,000&lt;/text&gt;&lt;line x1=&quot;146.5&quot; y1=&quot;114.8&quot; x2=&quot;187.9&quot; y2=&quot;114.8&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;109.6&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Last year&lt;/text&gt;&lt;rect x=&quot;187.9&quot; y=&quot;94.6&quot; width=&quot;73.7&quot; height=&quot;20.2&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;224.8&quot; y=&quot;88.6&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;+400&lt;/text&gt;&lt;line x1=&quot;261.7&quot; y1=&quot;94.6&quot; x2=&quot;303.1&quot; y2=&quot;94.6&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;224.8&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Volume&lt;/text&gt;&lt;rect x=&quot;303.1&quot; y=&quot;59.4&quot; width=&quot;73.7&quot; height=&quot;35.3&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;340&quot; y=&quot;53.4&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;+700&lt;/text&gt;&lt;line x1=&quot;376.9&quot; y1=&quot;59.4&quot; x2=&quot;418.3&quot; y2=&quot;59.4&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;340&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Mix&lt;/text&gt;&lt;rect x=&quot;418.3&quot; y=&quot;54.8&quot; width=&quot;73.7&quot; height=&quot;4.5&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;455.2&quot; y=&quot;48.8&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;+90&lt;/text&gt;&lt;line x1=&quot;492.1&quot; y1=&quot;54.8&quot; x2=&quot;533.5&quot; y2=&quot;54.8&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;455.2&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Price&lt;/text&gt;&lt;rect x=&quot;533.5&quot; y=&quot;54.8&quot; width=&quot;73.7&quot; height=&quot;211.2&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;570.4&quot; y=&quot;48.8&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;4,190&lt;/text&gt;&lt;text x=&quot;570.4&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;This year&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Revenue last year to this year&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Most of the growth is mix: customers bought more of the expensive product. Price was a small part.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;Measures by product: &lt;code&gt;[Revenue]&lt;/code&gt;, &lt;code&gt;[Qty]&lt;/code&gt;, and their last-year versions with &lt;code&gt;SAMEPERIODLASTYEAR&lt;/code&gt;. Products sold in both periods are the &amp;quot;continuing&amp;quot; set:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Qty = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Quantity]&lt;/i&gt; )
Qty LY = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Qty]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
Revenue LY = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )

Volume Effect =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Cont = &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Qty]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; &amp;amp;&amp;amp; &lt;i class=&quot;m&quot;&gt;[Qty LY]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Q1 = &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Cont, &lt;i class=&quot;m&quot;&gt;[Qty]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Q0 = &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Cont, &lt;i class=&quot;m&quot;&gt;[Qty LY]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; AvgP0 = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Cont, &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt; ), Q0 )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; ( Q1 - Q0 ) * AvgP0

Mix Effect =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Cont = &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Qty]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; &amp;amp;&amp;amp; &lt;i class=&quot;m&quot;&gt;[Qty LY]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Q1 = &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Cont, &lt;i class=&quot;m&quot;&gt;[Qty]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; AvgP0 = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Cont, &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Cont, &lt;i class=&quot;m&quot;&gt;[Qty LY]&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Cont, &lt;i class=&quot;m&quot;&gt;[Qty]&lt;/i&gt; * &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Qty LY]&lt;/i&gt; ) ) - Q1 * AvgP0

Price Effect =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Cont = &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Qty]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; &amp;amp;&amp;amp; &lt;i class=&quot;m&quot;&gt;[Qty LY]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Cont, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Qty]&lt;/i&gt; * &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Qty LY]&lt;/i&gt; ) )

New Products Effect =
&lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Qty]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; &amp;amp;&amp;amp; &lt;i class=&quot;f&quot;&gt;NOT&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Qty LY]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; ) ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )

Lost Products Effect =
- &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Qty LY]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; &amp;amp;&amp;amp; &lt;i class=&quot;f&quot;&gt;NOT&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Qty]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; ) ), &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Volume + Mix + Price + New + Lost = Revenue - Revenue LY, always. For the waterfall, put the five effects in a small disconnected table (Step, Order) and a &lt;code&gt;SWITCH&lt;/code&gt; measure that returns the effect for each step.&lt;/p&gt;
&lt;h2 id=&quot;which-level-should-the-mix-be-measured-at&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-level-should-the-mix-be-measured-at&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which level should the mix be measured at?&lt;/h2&gt;
&lt;p&gt;Mix depends on the grain: by product, by product category, by customer segment or by country. Measured by category, a shift between two products of the same category counts as price, not mix. Pick the level at which pricing decisions are made, and keep it fixed.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Effects that do not add up.&lt;/strong&gt; Usually new or lost products left out; give them their own bars.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Units of different kinds.&lt;/strong&gt; Mixing kilograms and pieces makes volume meaningless; analyse each unit type separately.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Discounts.&lt;/strong&gt; Use net price after discounts, or discounts appear as mix.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Currency.&lt;/strong&gt; Exchange-rate changes show up as price; add an FX effect for multi-currency sales.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-waterfall-charts&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Waterfall charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/sumx-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SUMX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/sameperiodlastyear-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SAMEPERIODLASTYEAR function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Run the three effects on your top product category for this year against last. &lt;a href=&quot;/blog/profit-margin-kpis/&quot;&gt;Profit margin&lt;/a&gt; shows whether the mix shift also helped profit.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>What is a scatter plot? Read the shape, not the dots</title>
    <link href="https://data.benibix.com/blog/what-is-a-scatter-plot/"/>
    <id>https://data.benibix.com/blog/what-is-a-scatter-plot/</id>
    <published>2026-11-14T12:00:00Z</published>
    <updated>2026-11-14T12:00:00Z</updated>
    <summary>A scatter plot places each item as a dot by two numbers, so you can see whether they move together. How to read the three shapes, why one lone dot matters, and why a pattern is not proof that one causes the other.</summary>
    <category term="Visuals"/>
    <category term="Distribution"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;scatter plot&lt;/strong&gt; places each item (a month, a store, a customer) as &lt;strong&gt;one dot, by two numbers&lt;/strong&gt;: one on the horizontal axis, one on the vertical. The &lt;strong&gt;shape&lt;/strong&gt; of the dots tells you the link: dots &lt;strong&gt;rising together&lt;/strong&gt; mean both grow together, dots &lt;strong&gt;falling&lt;/strong&gt; mean one rises as the other falls, and a &lt;strong&gt;shapeless cloud&lt;/strong&gt; means no clear link. A dot far from the rest is an &lt;strong&gt;outlier&lt;/strong&gt; worth checking. And a pattern is &lt;strong&gt;not proof&lt;/strong&gt; that one number causes the other.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The chart, part by part:&lt;/strong&gt; &lt;a href=&quot;/visuals/scatter-plot/&quot;&gt;What is a scatter plot?&lt;/a&gt; draws its parts and shows how to read one, its kinds and the mistakes to avoid.&lt;/p&gt;
&lt;p&gt;&amp;quot;Does more ad spend bring more sales?&amp;quot; A bar chart of ad spend and another of sales, side by side, cannot answer it. One scatter plot can, in a glance.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-scatter-plot-show&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-scatter-plot-show&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a scatter plot show?&lt;/h2&gt;
&lt;p&gt;A made-up shop, one dot per month, ad spend against sales:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;scatter&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;scatter chart: Jan 2, 21; Feb 3, 24; Mar 4, 29; Apr 5, 30; May 6, 36; Jun 7, 38; Jul 8, 43; Aug 9, 22; Sep 10, 49; Oct 11, 52; Nov 12, 58; Dec 13, 61&quot;&gt;&lt;line x1=&quot;56&quot; y1=&quot;254&quot; x2=&quot;570&quot; y2=&quot;254&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;48&quot; y=&quot;258&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;56&quot; y1=&quot;194&quot; x2=&quot;570&quot; y2=&quot;194&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;48&quot; y=&quot;198&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;20&lt;/text&gt;&lt;line x1=&quot;56&quot; y1=&quot;134&quot; x2=&quot;570&quot; y2=&quot;134&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;48&quot; y=&quot;138&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;40&lt;/text&gt;&lt;line x1=&quot;56&quot; y1=&quot;74&quot; x2=&quot;570&quot; y2=&quot;74&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;48&quot; y=&quot;78&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;60&lt;/text&gt;&lt;line x1=&quot;56&quot; y1=&quot;14&quot; x2=&quot;570&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;48&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;80&lt;/text&gt;&lt;text x=&quot;56&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0&lt;/text&gt;&lt;text x=&quot;227.3&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;5&lt;/text&gt;&lt;text x=&quot;398.7&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;10&lt;/text&gt;&lt;text x=&quot;570&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;15&lt;/text&gt;&lt;circle cx=&quot;124.5&quot; cy=&quot;191&quot; r=&quot;6&quot; class=&quot;m bub k0&quot;/&gt;&lt;circle cx=&quot;158.8&quot; cy=&quot;182&quot; r=&quot;6&quot; class=&quot;m bub k1&quot;/&gt;&lt;circle cx=&quot;193.1&quot; cy=&quot;167&quot; r=&quot;6&quot; class=&quot;m bub k2&quot;/&gt;&lt;circle cx=&quot;227.3&quot; cy=&quot;164&quot; r=&quot;6&quot; class=&quot;m bub k3&quot;/&gt;&lt;circle cx=&quot;261.6&quot; cy=&quot;146&quot; r=&quot;6&quot; class=&quot;m bub k4&quot;/&gt;&lt;circle cx=&quot;295.9&quot; cy=&quot;140&quot; r=&quot;6&quot; class=&quot;m bub k5&quot;/&gt;&lt;circle cx=&quot;330.1&quot; cy=&quot;125&quot; r=&quot;6&quot; class=&quot;m bub k0&quot;/&gt;&lt;circle cx=&quot;364.4&quot; cy=&quot;188&quot; r=&quot;6&quot; class=&quot;m bub t-red&quot;/&gt;&lt;circle cx=&quot;398.7&quot; cy=&quot;107&quot; r=&quot;6&quot; class=&quot;m bub k2&quot;/&gt;&lt;circle cx=&quot;432.9&quot; cy=&quot;98&quot; r=&quot;6&quot; class=&quot;m bub k3&quot;/&gt;&lt;circle cx=&quot;467.2&quot; cy=&quot;80&quot; r=&quot;6&quot; class=&quot;m bub k4&quot;/&gt;&lt;circle cx=&quot;501.5&quot; cy=&quot;71&quot; r=&quot;6&quot; class=&quot;m bub k5&quot;/&gt;&lt;text x=&quot;134.5&quot; y=&quot;195&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;Jan&lt;/text&gt;&lt;text x=&quot;168.8&quot; y=&quot;186&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;Feb&lt;/text&gt;&lt;text x=&quot;203.1&quot; y=&quot;171&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;Mar&lt;/text&gt;&lt;text x=&quot;237.3&quot; y=&quot;168&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;Apr&lt;/text&gt;&lt;text x=&quot;271.6&quot; y=&quot;150&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;May&lt;/text&gt;&lt;text x=&quot;305.9&quot; y=&quot;144&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;Jun&lt;/text&gt;&lt;text x=&quot;340.1&quot; y=&quot;129&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;Jul&lt;/text&gt;&lt;text x=&quot;374.4&quot; y=&quot;192&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;Aug&lt;/text&gt;&lt;text x=&quot;408.7&quot; y=&quot;111&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;Sep&lt;/text&gt;&lt;text x=&quot;442.9&quot; y=&quot;102&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;Oct&lt;/text&gt;&lt;text x=&quot;477.2&quot; y=&quot;84&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;Nov&lt;/text&gt;&lt;text x=&quot;511.5&quot; y=&quot;75&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;Dec&lt;/text&gt;&lt;text x=&quot;313&quot; y=&quot;294&quot; class=&quot;tax&quot; text-anchor=&quot;middle&quot;&gt;Ad spend (k)&lt;/text&gt;&lt;text x=&quot;14&quot; y=&quot;134&quot; class=&quot;tax&quot; text-anchor=&quot;middle&quot; transform=&quot;rotate(-90 14 134)&quot;&gt;Sales (k)&lt;/text&gt;&lt;line x1=&quot;56&quot; y1=&quot;254&quot; x2=&quot;570&quot; y2=&quot;254&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Ad spend against sales, one dot per month (k, made-up shop)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The dots climb together from the bottom left to the top right: the months with more ad spend had more sales. That is a relationship. And August, with 9k spent and only 22k sold, sits far below the line the others make. Something happened in August: a stock-out, a broken checkout, a holiday. That lone dot is the most useful thing on the chart.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-read-the-shape&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-read-the-shape&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you read the shape?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Shape&lt;/th&gt;&lt;th&gt;What it means&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Rising from bottom left to top right&lt;/td&gt;&lt;td&gt;Positive link: they rise together&lt;/td&gt;&lt;td&gt;Ad spend and sales&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Falling from top left to bottom right&lt;/td&gt;&lt;td&gt;Negative link: one rises as the other falls&lt;/td&gt;&lt;td&gt;Discount and margin&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;A shapeless cloud&lt;/td&gt;&lt;td&gt;No clear link&lt;/td&gt;&lt;td&gt;Shoe size and salary&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;A curve&lt;/td&gt;&lt;td&gt;A link, but not a straight one&lt;/td&gt;&lt;td&gt;Sales that flatten out after a certain spend&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;One dot far from the rest&lt;/td&gt;&lt;td&gt;An outlier: check the data or the story behind it&lt;/td&gt;&lt;td&gt;August above&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;The tighter the dots hug a line, the stronger the link. A loose band still shows a direction, but with more exceptions.&lt;/p&gt;
&lt;h2 id=&quot;does-a-pattern-prove-cause&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#does-a-pattern-prove-cause&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Does a pattern prove cause?&lt;/h2&gt;
&lt;p&gt;No. Ice cream sales and sunburns rise together, but ice cream does not cause sunburn: hot sunny days drive both. Statisticians put it simply: causality implies association, but association does not imply causality. A scatter plot shows that two numbers move together; why they do is a separate question, usually answered with a test or an experiment.&lt;/p&gt;
&lt;h2 id=&quot;when-is-a-scatter-plot-the-right-chart&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-a-scatter-plot-the-right-chart&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is a scatter plot the right chart?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;You have &lt;strong&gt;two numbers&lt;/strong&gt; for each item and want to know if they are related.&lt;/li&gt;&lt;li&gt;You want to find &lt;strong&gt;outliers&lt;/strong&gt; among many items at once.&lt;/li&gt;&lt;li&gt;You have &lt;strong&gt;many items&lt;/strong&gt;: 12 months works, 500 customers works even better.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;It is the wrong chart for one number over time (a &lt;a href=&quot;/blog/line-chart-power-bi/&quot;&gt;line chart&lt;/a&gt;) or for comparing categories (a &lt;a href=&quot;/blog/bar-chart-power-bi/&quot;&gt;bar chart&lt;/a&gt;).&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://www.itl.nist.gov/div898/handbook/eda/section3/scatterp.htm&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;NIST/SEMATECH e-Handbook of Statistical Methods: Scatter plot&lt;/a&gt;, the questions a scatter plot answers and why association is not causality&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;To build one in Power BI, with bubbles, a play axis and quadrant lines, see &lt;a href=&quot;/blog/scatter-bubble-chart-power-bi/&quot;&gt;scatter, bubble and dot plot charts in Power BI&lt;/a&gt;. To check whether a scatter plot is the right chart for your data, paste it into &lt;a href=&quot;https://tools.benibix.com/data/chart-compass/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Chart Compass&lt;/a&gt; and see the charts that fit, drawn with your own numbers.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Mock up a dashboard with Nano Banana Pro before you build</title>
    <link href="https://data.benibix.com/blog/mock-up-a-dashboard-with-ai/"/>
    <id>https://data.benibix.com/blog/mock-up-a-dashboard-with-ai/</id>
    <published>2026-11-14T09:00:00Z</published>
    <updated>2026-11-14T09:00:00Z</updated>
    <summary>Nano Banana Pro renders readable text, which makes it good for one data job: a quick picture of a dashboard idea to agree on before anyone builds it. How to prompt it, what to label, and why the numbers in it must be fake.</summary>
    <category term="AI"/>
    <category term="AI images"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; use &lt;strong&gt;Nano Banana Pro&lt;/strong&gt; (Google's Gemini 3 Pro Image model), which is built for &lt;strong&gt;readable text&lt;/strong&gt; in images, to draw a &lt;strong&gt;picture of a dashboard idea&lt;/strong&gt;: the layout, the card titles, the chart types. Describe it like a wireframe (title band, KPI cards, one main chart, two breakdowns), ask for &lt;strong&gt;placeholder numbers&lt;/strong&gt;, and label the result &amp;quot;mock-up&amp;quot;. Agree on the picture, then build the real thing in Power BI from your data.&lt;/p&gt;
&lt;p&gt;A wireframe on paper is fast but hard for some people to imagine. A mock-up that looks like a finished dashboard gets clearer feedback, as long as nobody mistakes its numbers for real ones.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-in-the-prompt&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-in-the-prompt&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes in the prompt?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:4&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Frame&lt;/b&gt;&lt;span&gt;&amp;quot;A flat screenshot of a business dashboard, 16:9, light theme&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Layout&lt;/b&gt;&lt;ul&gt;&lt;li&gt;title band with the page question&lt;/li&gt;&lt;li&gt;four KPI cards&lt;/li&gt;&lt;li&gt;one wide line chart&lt;/li&gt;&lt;li&gt;two bar charts below&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Labels&lt;/b&gt;&lt;span&gt;the exact card titles in quotes: &amp;quot;Revenue&amp;quot;, &amp;quot;Margin %&amp;quot;, &amp;quot;Orders&amp;quot;, &amp;quot;Avg order value&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Honesty&lt;/b&gt;&lt;ul&gt;&lt;li&gt;&amp;quot;use round placeholder numbers like 1,000 and 50%&lt;/li&gt;&lt;li&gt;add the word MOCK-UP in the corner&amp;quot;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;A dashboard mock-up prompt&lt;/figcaption&gt;&lt;/figure&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot;&gt;&lt;code&gt;A flat screenshot of a business dashboard, 16:9, light theme, no device frame.
Top: a title band reading &amp;quot;Are we on track for Q4?&amp;quot;.
Below: four KPI cards titled &amp;quot;Revenue&amp;quot;, &amp;quot;Margin %&amp;quot;, &amp;quot;Orders&amp;quot;, &amp;quot;Avg order value&amp;quot;,
each with a round placeholder number and a small green or red arrow.
Middle: one wide line chart, revenue by week against a dashed target line.
Bottom: two horizontal bar charts, &amp;quot;Revenue by region&amp;quot; and &amp;quot;Revenue by product&amp;quot;.
Small grey text &amp;quot;MOCK-UP&amp;quot; in the top right corner.&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;why-nano-banana-pro-for-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-nano-banana-pro-for-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why Nano Banana Pro for this?&lt;/h2&gt;
&lt;p&gt;Google positions Nano Banana Pro for precise image work: text that must be readable, 2K or 4K output, and combining up to 14 reference images. A mock-up is mostly text and layout, so readable labels matter more than artistic style. For a quick rough idea, the everyday Gemini image model is usually enough.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Numbers taken seriously.&lt;/strong&gt; Image models invent numbers; keep them obviously round and label the mock-up.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too much detail.&lt;/strong&gt; Ask for five to seven visuals; a crowded picture leads to a crowded report.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Using it as the design.&lt;/strong&gt; Fonts and colours come from your report theme, not from the picture.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://aistudio.google.com/docs/image-generation&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Google AI Studio docs: Image generation&lt;/a&gt;, the image models, text rendering, resolutions and reference limits&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Sketch the layout first with &lt;a href=&quot;/blog/wireframe-a-power-bi-report/&quot;&gt;wireframe a Power BI report&lt;/a&gt;, keep the page lean with &lt;a href=&quot;/blog/how-many-visuals-per-power-bi-page/&quot;&gt;how many visuals per page&lt;/a&gt;, and see why the real charts must come from the data in &lt;a href=&quot;/blog/can-ai-image-models-draw-charts/&quot;&gt;can an AI image model draw a chart?&lt;/a&gt;&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Claude Code vs Codex for data work: how to choose</title>
    <link href="https://data.benibix.com/blog/claude-code-vs-codex-for-data-work/"/>
    <id>https://data.benibix.com/blog/claude-code-vs-codex-for-data-work/</id>
    <published>2026-11-14T01:00:00Z</published>
    <updated>2026-11-14T01:00:00Z</updated>
    <summary>Claude Code and Codex do the same kind of work with different files and defaults: CLAUDE.md or AGENTS.md, ask-first or a sandbox. What that means for SQL, pipelines and notebooks, and a fair test to run on your own data repo.</summary>
    <category term="AI"/>
    <category term="Codex"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; for data work the two are closer than the debates suggest. &lt;strong&gt;Claude Code&lt;/strong&gt; (Anthropic) reads &lt;code&gt;CLAUDE.md&lt;/code&gt; and &lt;strong&gt;asks before&lt;/strong&gt; it edits files or runs commands. &lt;strong&gt;Codex&lt;/strong&gt; (OpenAI) reads &lt;code&gt;AGENTS.md&lt;/code&gt; and works inside a &lt;strong&gt;sandbox&lt;/strong&gt; where it may edit the project and run routine commands without asking. Both have skills, hooks and MCP servers, and both run in the terminal, the editor and the cloud. Choose by running the &lt;strong&gt;same data task&lt;/strong&gt; on both and comparing the result, the review effort and the cost.&lt;/p&gt;
&lt;p&gt;A data repository makes the difference in defaults matter: a command that runs without asking might be a test, or a query against a database. Knowing how each agent holds back tells you what to set up before either touches your pipeline.&lt;/p&gt;
&lt;h2 id=&quot;what-differs-for-data-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-differs-for-data-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What differs for data work?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;|&lt;/th&gt;&lt;th&gt;Claude Code&lt;/th&gt;&lt;th&gt;Codex&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Project rules&lt;/td&gt;&lt;td&gt;CLAUDE.md (reads AGENTS.md if there is no CLAUDE.md)&lt;/td&gt;&lt;td&gt;AGENTS.md&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Default before acting&lt;/td&gt;&lt;td&gt;Asks for each new edit or command&lt;/td&gt;&lt;td&gt;Edits and runs routine commands in the workspace&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Settings&lt;/td&gt;&lt;td&gt;settings.json&lt;/td&gt;&lt;td&gt;~/.codex/config.toml&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Scripted runs&lt;/td&gt;&lt;td&gt;claude -p&lt;/td&gt;&lt;td&gt;codex exec&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Database access&lt;/td&gt;&lt;td&gt;MCP server, scoped local, project or user&lt;/td&gt;&lt;td&gt;MCP server&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The differences that matter in a data repo&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-run-a-fair-test&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-run-a-fair-test&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you run a fair test?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Pick a task&lt;/b&gt;&lt;span&gt;one you know the answer to: &amp;quot;add a region column to the sales view&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Same rules&lt;/b&gt;&lt;span&gt;one AGENTS.md; Claude Code reads it when there is no CLAUDE.md&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Same check&lt;/b&gt;&lt;span&gt;&amp;quot;done when monthly totals are unchanged and tests pass&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Compare&lt;/b&gt;&lt;span&gt;correct result, corrections you made, time, tokens&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;A fair comparison on your own repo&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-should-you-set-up-on-either&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-should-you-set-up-on-either&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What should you set up on either?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A read-only database login&lt;/strong&gt; for any MCP server.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The test command&lt;/strong&gt; allowed to run without asking.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A totals check&lt;/strong&gt; in the &amp;quot;done when&amp;quot; of every pipeline task.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Overview&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.chatgpt.com/docs/codex/cli&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Codex docs: Codex CLI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.chatgpt.com/docs/sandboxing&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Codex docs: Sandbox&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Start each one on a safe task: &lt;a href=&quot;/blog/profile-a-csv-with-claude-code/&quot;&gt;your first data task in Claude Code&lt;/a&gt; and &lt;a href=&quot;/blog/first-codex-task-on-a-data-repo/&quot;&gt;your first Codex task on a data repository&lt;/a&gt;. Both read the same rules from &lt;a href=&quot;/blog/claude-md-for-a-data-repo/&quot;&gt;a CLAUDE.md for a data repository&lt;/a&gt; if you name it AGENTS.md.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>How to show before and after in one chart</title>
    <link href="https://data.benibix.com/blog/show-before-and-after-in-one-chart/"/>
    <id>https://data.benibix.com/blog/show-before-and-after-in-one-chart/</id>
    <published>2026-11-13T17:00:00Z</published>
    <updated>2026-11-13T17:00:00Z</updated>
    <summary>Some data questions only need two moments: where did each item start, and where did it end? Three charts for before and after, when to use each, and the DAX for the two values.</summary>
    <category term="Visuals"/>
    <category term="Comparison"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; when only the &lt;strong&gt;start and the end&lt;/strong&gt; matter, show those two values per item and the change between them. A &lt;strong&gt;dumbbell&lt;/strong&gt; (two dots joined by a line) shows both values and the gap; a &lt;strong&gt;slope chart&lt;/strong&gt; (two columns of dots joined by lines) shows who rose and who fell; a &lt;strong&gt;sorted bar of the change&lt;/strong&gt; shows only the difference, biggest first. A line chart of every month in between is the wrong tool when the months in between are noise.&lt;/p&gt;
&lt;p&gt;Many business questions only care about two moments: last year against this year, before against after a change. For that question everything in between is noise, and a chart that shows every month hides the answer.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-before-and-after-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-before-and-after-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a before and after look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;dumbbell&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;t-grey&quot;&gt;Before&lt;/li&gt;&lt;li class=&quot;ka&quot;&gt;After&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 720 300&quot; class=&quot;fit&quot; role=&quot;img&quot; aria-label=&quot;dumbbell chart: Email 62, 71; Chat 70, 84; Phone 75, 73; App 58, 69&quot;&gt;&lt;line x1=&quot;67&quot; y1=&quot;10&quot; x2=&quot;67&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;67&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;186.4&quot; y1=&quot;10&quot; x2=&quot;186.4&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;186.4&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;20&lt;/text&gt;&lt;line x1=&quot;305.8&quot; y1=&quot;10&quot; x2=&quot;305.8&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;305.8&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;40&lt;/text&gt;&lt;line x1=&quot;425.2&quot; y1=&quot;10&quot; x2=&quot;425.2&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;425.2&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;60&lt;/text&gt;&lt;line x1=&quot;544.6&quot; y1=&quot;10&quot; x2=&quot;544.6&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;544.6&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;80&lt;/text&gt;&lt;line x1=&quot;664&quot; y1=&quot;10&quot; x2=&quot;664&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;664&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;100&lt;/text&gt;&lt;g&gt;&lt;text x=&quot;53&quot; y=&quot;47&quot; class=&quot;tl&quot; text-anchor=&quot;end&quot;&gt;Email&lt;/text&gt;&lt;line x1=&quot;437.1&quot; y1=&quot;42.5&quot; x2=&quot;490.9&quot; y2=&quot;42.5&quot; class=&quot;dbl t-grey&quot;/&gt;&lt;circle cx=&quot;437.1&quot; cy=&quot;42.5&quot; r=&quot;7&quot; class=&quot;m t-grey&quot;/&gt;&lt;circle cx=&quot;490.9&quot; cy=&quot;42.5&quot; r=&quot;7&quot; class=&quot;m ka&quot;/&gt;&lt;/g&gt;&lt;g&gt;&lt;text x=&quot;53&quot; y=&quot;112&quot; class=&quot;tl&quot; text-anchor=&quot;end&quot;&gt;Chat&lt;/text&gt;&lt;line x1=&quot;484.9&quot; y1=&quot;107.5&quot; x2=&quot;568.5&quot; y2=&quot;107.5&quot; class=&quot;dbl t-grey&quot;/&gt;&lt;circle cx=&quot;484.9&quot; cy=&quot;107.5&quot; r=&quot;7&quot; class=&quot;m t-grey&quot;/&gt;&lt;circle cx=&quot;568.5&quot; cy=&quot;107.5&quot; r=&quot;7&quot; class=&quot;m ka&quot;/&gt;&lt;/g&gt;&lt;g&gt;&lt;text x=&quot;53&quot; y=&quot;177&quot; class=&quot;tl&quot; text-anchor=&quot;end&quot;&gt;Phone&lt;/text&gt;&lt;line x1=&quot;514.8&quot; y1=&quot;172.5&quot; x2=&quot;502.8&quot; y2=&quot;172.5&quot; class=&quot;dbl t-grey&quot;/&gt;&lt;circle cx=&quot;514.8&quot; cy=&quot;172.5&quot; r=&quot;7&quot; class=&quot;m t-grey&quot;/&gt;&lt;circle cx=&quot;502.8&quot; cy=&quot;172.5&quot; r=&quot;7&quot; class=&quot;m ka&quot;/&gt;&lt;/g&gt;&lt;g&gt;&lt;text x=&quot;53&quot; y=&quot;242&quot; class=&quot;tl&quot; text-anchor=&quot;end&quot;&gt;App&lt;/text&gt;&lt;line x1=&quot;413.3&quot; y1=&quot;237.5&quot; x2=&quot;478.9&quot; y2=&quot;237.5&quot; class=&quot;dbl t-grey&quot;/&gt;&lt;circle cx=&quot;413.3&quot; cy=&quot;237.5&quot; r=&quot;7&quot; class=&quot;m t-grey&quot;/&gt;&lt;circle cx=&quot;478.9&quot; cy=&quot;237.5&quot; r=&quot;7&quot; class=&quot;m ka&quot;/&gt;&lt;/g&gt;&lt;line x1=&quot;67&quot; y1=&quot;270&quot; x2=&quot;664&quot; y2=&quot;270&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Customer satisfaction before and after the new support hours (made-up, score out of 100)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Chat improved most, and phone is the one channel that slipped. The months in between would only have hidden that.&lt;/p&gt;
&lt;h2 id=&quot;which-of-the-three-charts-fits&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-of-the-three-charts-fits&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which of the three charts fits?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Chart&lt;/th&gt;&lt;th&gt;Shows&lt;/th&gt;&lt;th&gt;Best when&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Dumbbell&lt;/td&gt;&lt;td&gt;Both values and the gap, per item&lt;/td&gt;&lt;td&gt;You want the level and the change&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Slope chart&lt;/td&gt;&lt;td&gt;Rises and falls as line directions&lt;/td&gt;&lt;td&gt;Many items, and the direction matters most&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bar of the change&lt;/td&gt;&lt;td&gt;Only the difference, sorted&lt;/td&gt;&lt;td&gt;Only the change matters, e.g. &amp;quot;+14 points&amp;quot;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-do-you-get-the-two-values-in-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-get-the-two-values-in-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you get the two values in DAX?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Score Before = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Avg Score]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Period'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Phase]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Before&amp;quot;&lt;/i&gt; )
Score After = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Avg Score]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Period'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Phase]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;After&amp;quot;&lt;/i&gt; )
Score Change = &lt;i class=&quot;m&quot;&gt;[Score After]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Score Before]&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;A &lt;code&gt;Phase&lt;/code&gt; column in a small period table keeps the dates of the change in one place; change the cut-off once and every measure follows.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Different lengths.&lt;/strong&gt; Three months before against one month after is not a fair comparison.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Hidden seasonality.&lt;/strong&gt; December against June mixes the change with the season; compare like with like.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Cause.&lt;/strong&gt; Before and after shows that something changed, not that your change caused it.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/calculate-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: CALCULATE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;For change against last year with a date table, see &lt;a href=&quot;/blog/year-over-year-dax/&quot;&gt;year-over-year in DAX&lt;/a&gt;. To see which chart fits your own before and after data, paste it into &lt;a href=&quot;https://tools.benibix.com/data/chart-compass/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Chart Compass&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Employee turnover rate: formula, DAX and retention</title>
    <link href="https://data.benibix.com/blog/employee-turnover-kpi/"/>
    <id>https://data.benibix.com/blog/employee-turnover-kpi/</id>
    <published>2026-11-13T12:00:00Z</published>
    <updated>2026-11-13T12:00:00Z</updated>
    <summary>How to calculate employee turnover, leavers divided by average headcount, voluntary against involuntary turnover, annualising monthly rates, first-year turnover, retention rate, the DAX on an employee table with hire and leave dates, and turnover by department.</summary>
    <category term="KPIs"/>
    <category term="People"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;employee turnover rate&lt;/strong&gt; = leavers in a period / &lt;strong&gt;average headcount&lt;/strong&gt; in that period. With 24 leavers in a year and an average of 200 employees, annual turnover is &lt;strong&gt;12%&lt;/strong&gt;. Split &lt;strong&gt;voluntary&lt;/strong&gt; (resignations) from &lt;strong&gt;involuntary&lt;/strong&gt; (dismissals, end of contract) turnover; they have different causes. Track &lt;strong&gt;first-year turnover&lt;/strong&gt; (leavers within 12 months of hire / hires) separately, because early leavers point to hiring and onboarding problems.&lt;/p&gt;
&lt;p&gt;Replacing an employee costs recruiting, training and lost output. Turnover by team shows where that cost is concentrated.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Department&lt;/th&gt;&lt;th&gt;Average headcount&lt;/th&gt;&lt;th&gt;Leavers&lt;/th&gt;&lt;th&gt;Voluntary&lt;/th&gt;&lt;th&gt;Turnover&lt;/th&gt;&lt;th&gt;Voluntary turnover&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Sales&lt;/td&gt;&lt;td&gt;50&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;td&gt;20.0%&lt;/td&gt;&lt;td&gt;16.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Operations&lt;/td&gt;&lt;td&gt;90&lt;/td&gt;&lt;td&gt;9&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;10.0%&lt;/td&gt;&lt;td&gt;5.6%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Engineering&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;7.5%&lt;/td&gt;&lt;td&gt;7.5%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Admin&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;10.0%&lt;/td&gt;&lt;td&gt;5.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Company&lt;/td&gt;&lt;td&gt;200&lt;/td&gt;&lt;td&gt;24&lt;/td&gt;&lt;td&gt;17&lt;/td&gt;&lt;td&gt;12.0%&lt;/td&gt;&lt;td&gt;8.5%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;2026 by department&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;bar&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;bar chart: Sales 16; Engineering 7.5; Operations 5.6; Admin 5&quot;&gt;&lt;line x1=&quot;98.8&quot; y1=&quot;8&quot; x2=&quot;98.8&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;98.8&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;223.1&quot; y1=&quot;8&quot; x2=&quot;223.1&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;223.1&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;5&lt;/text&gt;&lt;line x1=&quot;347.4&quot; y1=&quot;8&quot; x2=&quot;347.4&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;347.4&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;10&lt;/text&gt;&lt;line x1=&quot;471.7&quot; y1=&quot;8&quot; x2=&quot;471.7&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;471.7&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;15&lt;/text&gt;&lt;line x1=&quot;596&quot; y1=&quot;8&quot; x2=&quot;596&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;596&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;20&lt;/text&gt;&lt;rect x=&quot;98.8&quot; y=&quot;19.1&quot; width=&quot;397.8&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;502.6&quot; y=&quot;44.8&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;16&lt;/text&gt;&lt;text x=&quot;88.8&quot; y=&quot;44.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Sales&lt;/text&gt;&lt;rect x=&quot;98.8&quot; y=&quot;84.6&quot; width=&quot;186.5&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-gold&quot;/&gt;&lt;text x=&quot;291.3&quot; y=&quot;110.3&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;7.5&lt;/text&gt;&lt;text x=&quot;88.8&quot; y=&quot;110.3&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Engineering&lt;/text&gt;&lt;rect x=&quot;98.8&quot; y=&quot;150.1&quot; width=&quot;139.2&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-grey&quot;/&gt;&lt;text x=&quot;244&quot; y=&quot;175.8&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;5.6&lt;/text&gt;&lt;text x=&quot;88.8&quot; y=&quot;175.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Operations&lt;/text&gt;&lt;rect x=&quot;98.8&quot; y=&quot;215.6&quot; width=&quot;124.3&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-grey&quot;/&gt;&lt;text x=&quot;229.1&quot; y=&quot;241.3&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;5&lt;/text&gt;&lt;text x=&quot;88.8&quot; y=&quot;241.3&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Admin&lt;/text&gt;&lt;line x1=&quot;98.8&quot; y1=&quot;8&quot; x2=&quot;98.8&quot; y2=&quot;270&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Voluntary turnover by department (%)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;An Employees table with one row per employment: Employee ID, Department, Hire Date, Leave Date (blank while employed), Leave Type (Voluntary or Involuntary). The dates are not related to the Date table; measures read the period:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Headcount on Date =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; D = &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( Employees, Employees&lt;i class=&quot;m&quot;&gt;[Hire Date]&lt;/i&gt; &amp;lt;= D &amp;amp;&amp;amp; ( &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( Employees&lt;i class=&quot;m&quot;&gt;[Leave Date]&lt;/i&gt; ) || Employees&lt;i class=&quot;m&quot;&gt;[Leave Date]&lt;/i&gt; &amp;gt; D ) )
    )

Average Headcount =
&lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Headcount on Date]&lt;/i&gt; ) )

Leavers =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; PStart = &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; PEnd = &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( Employees, Employees&lt;i class=&quot;m&quot;&gt;[Leave Date]&lt;/i&gt; &amp;gt;= PStart &amp;amp;&amp;amp; Employees&lt;i class=&quot;m&quot;&gt;[Leave Date]&lt;/i&gt; &amp;lt;= PEnd ) )

Voluntary Leavers = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Leavers]&lt;/i&gt;, Employees&lt;i class=&quot;m&quot;&gt;[Leave Type]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Voluntary&amp;quot;&lt;/i&gt; )

Turnover Rate = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Leavers]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Average Headcount]&lt;/i&gt; )
Voluntary Turnover = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Voluntary Leavers]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Average Headcount]&lt;/i&gt; )

Retention Rate = &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Turnover Rate]&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;Average Headcount&lt;/code&gt; averages each month's end headcount. For a single month, annualise with &lt;code&gt;1 - POWER ( 1 - [Turnover Rate], 12 )&lt;/code&gt;, or simply × 12 for rough comparisons; say which.&lt;/p&gt;
&lt;h2 id=&quot;what-is-first-year-turnover&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-first-year-turnover&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is first-year turnover?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;First Year Leavers =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; PStart = &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; PEnd = &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; (
            Employees,
            Employees&lt;i class=&quot;m&quot;&gt;[Hire Date]&lt;/i&gt; &amp;gt;= PStart &amp;amp;&amp;amp; Employees&lt;i class=&quot;m&quot;&gt;[Hire Date]&lt;/i&gt; &amp;lt;= PEnd
                &amp;amp;&amp;amp; NOT &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( Employees&lt;i class=&quot;m&quot;&gt;[Leave Date]&lt;/i&gt; )
                &amp;amp;&amp;amp; Employees&lt;i class=&quot;m&quot;&gt;[Leave Date]&lt;/i&gt; - Employees&lt;i class=&quot;m&quot;&gt;[Hire Date]&lt;/i&gt; &amp;lt; &lt;i class=&quot;n&quot;&gt;365&lt;/i&gt;
        )
    )

Hires =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; PStart = &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; PEnd = &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( Employees, Employees&lt;i class=&quot;m&quot;&gt;[Hire Date]&lt;/i&gt; &amp;gt;= PStart &amp;amp;&amp;amp; Employees&lt;i class=&quot;m&quot;&gt;[Hire Date]&lt;/i&gt; &amp;lt;= PEnd ) )

First Year Turnover = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[First Year Leavers]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Hires]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;This counts by hire cohort: of those hired in 2025, how many left within a year. Cohorts less than a year old are not complete yet.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Dividing by headcount at the end.&lt;/strong&gt; Growth inflates the base; use the average.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Counting transfers as leavers.&lt;/strong&gt; Internal moves are not turnover; keep them as a separate event.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Mixing temporary contracts.&lt;/strong&gt; Planned contract ends inflate involuntary turnover; report them apart.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Small teams.&lt;/strong&gt; One leaver in a team of five is 20%; show counts, and hide teams under a minimum size for privacy.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/filter-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: FILTER function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/averagex-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: AVERAGEX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/security/service-admin-row-level-security&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Row-level security (RLS) with Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Load hire and leave dates with leave type, and show voluntary turnover by department with the leaver counts. Protect the page with &lt;a href=&quot;/blog/userprincipalname-rls-dax/&quot;&gt;row-level security&lt;/a&gt; so managers see their own teams.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Profit margins: gross, operating, net and EBITDA in DAX</title>
    <link href="https://data.benibix.com/blog/profit-margin-kpis/"/>
    <id>https://data.benibix.com/blog/profit-margin-kpis/</id>
    <published>2026-11-13T12:00:00Z</published>
    <updated>2026-11-13T12:00:00Z</updated>
    <summary>How to calculate gross margin, contribution margin, operating margin, EBITDA margin and net margin, from a profit and loss statement in a worked example, margin against markup, the DAX on a general ledger with account mapping, margin by product and customer, and the mistake of averaging margins.</summary>
    <category term="KPIs"/>
    <category term="Finance"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;margin&lt;/strong&gt; is a profit divided by revenue. &lt;strong&gt;Gross margin&lt;/strong&gt; = (revenue - cost of goods sold) / revenue. &lt;strong&gt;Contribution margin&lt;/strong&gt; also takes off other variable costs (shipping, payment fees). &lt;strong&gt;Operating margin&lt;/strong&gt; = operating profit (EBIT) / revenue, after all operating costs. &lt;strong&gt;EBITDA margin&lt;/strong&gt; adds back depreciation and amortisation. &lt;strong&gt;Net margin&lt;/strong&gt; = net profit after interest and tax / revenue. In DAX, compute each as &lt;code&gt;DIVIDE ( profit, revenue )&lt;/code&gt; on totals, never as an average of line margins.&lt;/p&gt;
&lt;p&gt;Each margin answers a different question: gross margin, &amp;quot;do our products make money?&amp;quot;; operating margin, &amp;quot;does the business?&amp;quot;; net margin, &amp;quot;what is left for the owners?&amp;quot;.&lt;/p&gt;
&lt;h2 id=&quot;how-do-the-margins-come-from-a-p-l&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-the-margins-come-from-a-p-l&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do the margins come from a P&amp;amp;L?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Line&lt;/th&gt;&lt;th&gt;Amount&lt;/th&gt;&lt;th&gt;Margin&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Revenue&lt;/td&gt;&lt;td&gt;10,000&lt;/td&gt;&lt;td&gt;100%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Cost of goods sold&lt;/td&gt;&lt;td&gt;-6,000&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Gross profit&lt;/td&gt;&lt;td&gt;4,000&lt;/td&gt;&lt;td&gt;40.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Variable selling costs (shipping, fees)&lt;/td&gt;&lt;td&gt;-800&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Contribution&lt;/td&gt;&lt;td&gt;3,200&lt;/td&gt;&lt;td&gt;32.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Operating expenses (staff, rent, marketing)&lt;/td&gt;&lt;td&gt;-1,900&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;EBITDA&lt;/td&gt;&lt;td&gt;1,300&lt;/td&gt;&lt;td&gt;13.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Depreciation and amortisation&lt;/td&gt;&lt;td&gt;-300&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Operating profit (EBIT)&lt;/td&gt;&lt;td&gt;1,000&lt;/td&gt;&lt;td&gt;10.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Interest&lt;/td&gt;&lt;td&gt;-100&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Tax&lt;/td&gt;&lt;td&gt;-225&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Net profit&lt;/td&gt;&lt;td&gt;675&lt;/td&gt;&lt;td&gt;6.75%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;A profit and loss statement (k)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;waterfall&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;waterfall chart: Revenue 10K; Cost of goods sold -6,000; Variable costs -800; Operating expenses -1,900; Depreciation -300; Interest and tax -325; Net profit total&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;628&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;2,000&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;628&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;4,000&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;628&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;6,000&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;628&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;8,000&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;628&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;10K&lt;/text&gt;&lt;rect x=&quot;66.8&quot; y=&quot;14&quot; width=&quot;52.7&quot; height=&quot;252&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;93.1&quot; y=&quot;8&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;10K&lt;/text&gt;&lt;line x1=&quot;119.5&quot; y1=&quot;14&quot; x2=&quot;149.1&quot; y2=&quot;14&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;93.1&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Revenue&lt;/text&gt;&lt;rect x=&quot;149.1&quot; y=&quot;14&quot; width=&quot;52.7&quot; height=&quot;151.2&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;175.4&quot; y=&quot;8&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;-6,000&lt;/text&gt;&lt;line x1=&quot;201.8&quot; y1=&quot;165.2&quot; x2=&quot;231.4&quot; y2=&quot;165.2&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;175.4&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Cost of goods sold&lt;/text&gt;&lt;rect x=&quot;231.4&quot; y=&quot;165.2&quot; width=&quot;52.7&quot; height=&quot;20.2&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;257.7&quot; y=&quot;159.2&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;-800&lt;/text&gt;&lt;line x1=&quot;284&quot; y1=&quot;185.4&quot; x2=&quot;313.7&quot; y2=&quot;185.4&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;257.7&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Variable costs&lt;/text&gt;&lt;rect x=&quot;313.7&quot; y=&quot;185.4&quot; width=&quot;52.7&quot; height=&quot;47.9&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;340&quot; y=&quot;179.4&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;-1,900&lt;/text&gt;&lt;line x1=&quot;366.3&quot; y1=&quot;233.2&quot; x2=&quot;396&quot; y2=&quot;233.2&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;340&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Operating expenses&lt;/text&gt;&lt;rect x=&quot;396&quot; y=&quot;233.2&quot; width=&quot;52.7&quot; height=&quot;7.6&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;422.3&quot; y=&quot;227.2&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;-300&lt;/text&gt;&lt;line x1=&quot;448.6&quot; y1=&quot;240.8&quot; x2=&quot;478.2&quot; y2=&quot;240.8&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;422.3&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Depreciation&lt;/text&gt;&lt;rect x=&quot;478.2&quot; y=&quot;240.8&quot; width=&quot;52.7&quot; height=&quot;8.2&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;504.6&quot; y=&quot;234.8&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;-325&lt;/text&gt;&lt;line x1=&quot;530.9&quot; y1=&quot;249&quot; x2=&quot;560.5&quot; y2=&quot;249&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;504.6&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Interest and tax&lt;/text&gt;&lt;rect x=&quot;560.5&quot; y=&quot;249&quot; width=&quot;52.7&quot; height=&quot;17&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;586.9&quot; y=&quot;243&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;675&lt;/text&gt;&lt;text x=&quot;586.9&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Net profit&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;From revenue to net profit (k)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;margin-or-markup&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#margin-or-markup&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Margin or markup?&lt;/h2&gt;
&lt;p&gt;Margin divides profit by &lt;strong&gt;revenue&lt;/strong&gt;; markup divides it by &lt;strong&gt;cost&lt;/strong&gt;. A product bought for 60 and sold for 100 has a 40% margin and a 66.7% markup. Price lists often use markup, finance uses margin; label which one a report shows.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;On a general ledger table (Account, Date, Amount) with an account mapping table (Account, P&amp;amp;L Line, Sign):&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Amount = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( GL&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )

Revenue = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt;, Accounts&lt;i class=&quot;m&quot;&gt;[P&amp;amp;L Line]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Revenue&amp;quot;&lt;/i&gt; )
COGS = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt;, Accounts&lt;i class=&quot;m&quot;&gt;[P&amp;amp;L Line]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;COGS&amp;quot;&lt;/i&gt; )
Variable Costs = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt;, Accounts&lt;i class=&quot;m&quot;&gt;[P&amp;amp;L Line]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Variable costs&amp;quot;&lt;/i&gt; )
Opex = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt;, Accounts&lt;i class=&quot;m&quot;&gt;[P&amp;amp;L Line]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Opex&amp;quot;&lt;/i&gt; )
D&amp;amp;A = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt;, Accounts&lt;i class=&quot;m&quot;&gt;[P&amp;amp;L Line]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;D&amp;amp;A&amp;quot;&lt;/i&gt; )
Interest and Tax = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt;, Accounts&lt;i class=&quot;m&quot;&gt;[P&amp;amp;L Line]&lt;/i&gt; IN { &lt;i class=&quot;s&quot;&gt;&amp;quot;Interest&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Tax&amp;quot;&lt;/i&gt; } )

&lt;i class=&quot;c&quot;&gt;-- costs stored as positive amounts&lt;/i&gt;
Gross Profit = &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[COGS]&lt;/i&gt;
Contribution = &lt;i class=&quot;m&quot;&gt;[Gross Profit]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Variable Costs]&lt;/i&gt;
EBITDA = &lt;i class=&quot;m&quot;&gt;[Contribution]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Opex]&lt;/i&gt;
EBIT = &lt;i class=&quot;m&quot;&gt;[EBITDA]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[D&amp;amp;A]&lt;/i&gt;
Net Profit = &lt;i class=&quot;m&quot;&gt;[EBIT]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Interest and Tax]&lt;/i&gt;

Gross Margin % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Gross Profit]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )
Contribution Margin % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Contribution]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )
EBITDA Margin % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[EBITDA]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )
Operating Margin % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[EBIT]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )
Net Margin % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Net Profit]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Sign conventions differ between ledgers (revenue often negative, costs positive); fix them once in the mapping table's Sign column, &lt;code&gt;SUMX ( GL, GL[Amount] * RELATED ( Accounts[Sign] ) )&lt;/code&gt;, rather than in each measure.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-show-margin-by-product-or-customer&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-show-margin-by-product-or-customer&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you show margin by product or customer?&lt;/h2&gt;
&lt;p&gt;Gross and contribution margins can be calculated per product or customer from sales lines with cost. Operating costs are usually not assigned per product, so operating and net margins stay at company or business-unit level, unless you allocate costs with an agreed key.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;bar&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;bar chart: Accessories 58; Clothing 46; Bikes 31; Components 22&quot;&gt;&lt;line x1=&quot;98.8&quot; y1=&quot;8&quot; x2=&quot;98.8&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;98.8&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;264.5&quot; y1=&quot;8&quot; x2=&quot;264.5&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;264.5&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;20&lt;/text&gt;&lt;line x1=&quot;430.3&quot; y1=&quot;8&quot; x2=&quot;430.3&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;430.3&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;40&lt;/text&gt;&lt;line x1=&quot;596&quot; y1=&quot;8&quot; x2=&quot;596&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;596&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;60&lt;/text&gt;&lt;rect x=&quot;98.8&quot; y=&quot;19.1&quot; width=&quot;480.6&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;585.4&quot; y=&quot;44.8&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;58&lt;/text&gt;&lt;text x=&quot;88.8&quot; y=&quot;44.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Accessories&lt;/text&gt;&lt;rect x=&quot;98.8&quot; y=&quot;84.6&quot; width=&quot;381.2&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;486&quot; y=&quot;110.3&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;46&lt;/text&gt;&lt;text x=&quot;88.8&quot; y=&quot;110.3&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Clothing&lt;/text&gt;&lt;rect x=&quot;98.8&quot; y=&quot;150.1&quot; width=&quot;256.9&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-blue&quot;/&gt;&lt;text x=&quot;361.7&quot; y=&quot;175.8&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;31&lt;/text&gt;&lt;text x=&quot;88.8&quot; y=&quot;175.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Bikes&lt;/text&gt;&lt;rect x=&quot;98.8&quot; y=&quot;215.6&quot; width=&quot;182.3&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-gold&quot;/&gt;&lt;text x=&quot;287.1&quot; y=&quot;241.3&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;22&lt;/text&gt;&lt;text x=&quot;88.8&quot; y=&quot;241.3&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Components&lt;/text&gt;&lt;line x1=&quot;98.8&quot; y1=&quot;8&quot; x2=&quot;98.8&quot; y2=&quot;270&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Gross margin % by product category&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Sort by margin and show revenue next to it: a low-margin category can still bring most of the gross profit.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Averaging margin percentages.&lt;/strong&gt; The margin of a total is total profit / total revenue; &lt;code&gt;AVERAGE&lt;/code&gt; of line margins weights a 1-euro sale like a 10,000-euro one.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Margin against markup.&lt;/strong&gt; Mixing them makes 40% and 67% look like different businesses.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Costs missing from the sales table.&lt;/strong&gt; Gross margin needs the cost at the time of sale; today's standard cost rewrites history.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Sign mix-ups.&lt;/strong&gt; One wrong sign turns a cost into income; check totals against the official P&amp;amp;L.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/divide-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DIVIDE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-waterfall-charts&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Waterfall charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/related-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: RELATED function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Map your ledger accounts to P&amp;amp;L lines once, then build the five profit measures and their margins. &lt;a href=&quot;/blog/budget-variance-kpi/&quot;&gt;Budget variance&lt;/a&gt; compares them with plan.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Q&amp;A visual in Power BI, and what replaces it</title>
    <link href="https://data.benibix.com/blog/qa-visual-power-bi/"/>
    <id>https://data.benibix.com/blog/qa-visual-power-bi/</id>
    <published>2026-11-13T12:00:00Z</published>
    <updated>2026-11-13T12:00:00Z</updated>
    <summary>How the Q&amp;A visual in Power BI answers questions typed in plain language, suggested questions and synonyms, turning an answer into a standard visual, its retirement in February 2027, and how to move to Copilot.</summary>
    <category term="Visuals"/>
    <category term="AI visuals"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; the &lt;strong&gt;Q&amp;amp;A visual&lt;/strong&gt; lets report readers type a question in plain language (&amp;quot;revenue by region last year as bar chart&amp;quot;) and draws the answer as a chart. It needs no prompt engineering: it maps words to the model's tables, columns and &lt;strong&gt;synonyms&lt;/strong&gt;. Microsoft has announced that &lt;strong&gt;Q&amp;amp;A experiences go away in February 2027&lt;/strong&gt; and recommends &lt;strong&gt;Copilot for Power BI&lt;/strong&gt; instead. Existing Q&amp;amp;A visuals can be converted into standard visuals now, so the answers they gave stay in the report.&lt;/p&gt;
&lt;p&gt;Q&amp;amp;A was Power BI's first natural-language feature and is still in many reports. Knowing how it works helps keep those reports useful, and plan the move before the date.&lt;/p&gt;
&lt;h2 id=&quot;what-does-q-a-do&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-q-a-do&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does Q&amp;amp;A do?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Question&lt;/b&gt;&lt;span&gt;&amp;quot;top 5 products by revenue in 2026&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Mapping&lt;/b&gt;&lt;span&gt;products to Product[Product], revenue to [Revenue], 2026 to Date[Year]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;span&gt;a bar chart of five products, sorted&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Convert&lt;/b&gt;&lt;span&gt;turn it into a standard bar chart that stays on the page&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From a typed question to a chart&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-add-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-add-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you add one?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;In &lt;strong&gt;Visualizations&lt;/strong&gt; pick &lt;strong&gt;Q&amp;amp;A&lt;/strong&gt;, or double-click an empty spot on the canvas.&lt;/li&gt;&lt;li&gt;Pick a &lt;strong&gt;suggested question&lt;/strong&gt;, or type your own. The visual shows the answer as it understands the question; underlined words were matched to the model, red ones were not.&lt;/li&gt;&lt;li&gt;To keep the answer, select the &lt;strong&gt;Turn this Q&amp;amp;A result into a standard visual&lt;/strong&gt; icon. It becomes an ordinary visual you can format.&lt;/li&gt;&lt;li&gt;Format the Q&amp;amp;A box itself (background, text box, suggestions) in &lt;strong&gt;Format visual&lt;/strong&gt;.&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;how-do-you-make-the-model-understand-people-s-words&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-make-the-model-understand-people-s-words&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you make the model understand people's words?&lt;/h2&gt;
&lt;p&gt;Q&amp;amp;A works only as well as the model's names. In the &lt;strong&gt;Q&amp;amp;A setup&lt;/strong&gt; (Modeling, &lt;strong&gt;Q&amp;amp;A setup&lt;/strong&gt;):&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Synonyms&lt;/strong&gt;: &amp;quot;turnover&amp;quot; and &amp;quot;sales&amp;quot; for &lt;code&gt;[Revenue]&lt;/code&gt;, &amp;quot;client&amp;quot; for &lt;code&gt;Customer&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Teach Q&amp;amp;A&lt;/strong&gt;: when a question fails, define what the unknown word means (&amp;quot;big customers&amp;quot; are customers with revenue over 100,000).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Suggest questions&lt;/strong&gt;: the questions readers see first.&lt;/li&gt;&lt;li&gt;Clear table and column names in the model help more than anything else: &lt;code&gt;Sales[Amount]&lt;/code&gt; is found, &lt;code&gt;F_SLS[AMT_NET_LC]&lt;/code&gt; is not.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;The same naming work helps Copilot later, which also reads the model's names, descriptions and synonyms.&lt;/p&gt;
&lt;h2 id=&quot;what-happens-in-february-2027&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-happens-in-february-2027&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What happens in February 2027?&lt;/h2&gt;
&lt;p&gt;Microsoft's note on the Q&amp;amp;A page: Q&amp;amp;A experiences are going away in February 2027, and Copilot for Power BI is the recommended way to ask questions of data in natural language. To prepare:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;&lt;strong&gt;List&lt;/strong&gt; the reports that use the Q&amp;amp;A visual.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Convert&lt;/strong&gt; answers that people rely on into standard visuals, so they no longer depend on Q&amp;amp;A.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Keep&lt;/strong&gt; the synonyms and descriptions in the model: Copilot uses the linguistic schema and descriptions too.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Plan Copilot&lt;/strong&gt;: it needs a Fabric capacity (or Premium) and the Copilot tenant settings; check your licensing before the date.&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;which-questions-work-well&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-questions-work-well&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which questions work well?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Question&lt;/th&gt;&lt;th&gt;Works?&lt;/th&gt;&lt;th&gt;Why&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;revenue by region&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;measure and column found by name&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;top 5 products by revenue in 2026&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;top N, measure, year filter&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;revenue last month vs last year&lt;/td&gt;&lt;td&gt;partly&lt;/td&gt;&lt;td&gt;time phrases work; comparisons are limited&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;why did revenue drop in March&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;Q&amp;amp;A charts data; it does not explain causes&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Questions and how Q&amp;amp;A reads them&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Cryptic names.&lt;/strong&gt; Columns named in codes are not found; rename or add synonyms.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Answers that change.&lt;/strong&gt; A Q&amp;amp;A answer is recalculated from the question; convert important answers into standard visuals.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Relying on it for new reports.&lt;/strong&gt; With the retirement date set, build new natural-language features on Copilot.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Ambiguous words.&lt;/strong&gt; &amp;quot;Sales&amp;quot; as a count of orders and an amount at once; define one meaning per word.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-q-and-a&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create a Q&amp;amp;A visual in a report in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/copilot-create-narrative&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create a narrative visual with Copilot for Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Find the reports with Q&amp;amp;A visuals, convert the answers people use into standard visuals, and keep improving names and synonyms in the model for Copilot. The &lt;a href=&quot;/blog/narrative-visual-power-bi/&quot;&gt;narrative visual&lt;/a&gt; shows Copilot at work inside a report.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>SQL window functions, explained with real examples</title>
    <link href="https://data.benibix.com/blog/sql-window-functions-explained/"/>
    <id>https://data.benibix.com/blog/sql-window-functions-explained/</id>
    <published>2026-11-13T12:00:00Z</published>
    <updated>2026-11-13T12:00:00Z</updated>
    <summary>What window functions are in SQL, how OVER, PARTITION BY and ORDER BY work, and three everyday uses, the latest row per key, running totals, the previous value.</summary>
    <category term="SQL"/>
    <category term="T-SQL"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;window function&lt;/strong&gt; calculates a value for each row from a set of related rows, its &lt;strong&gt;window&lt;/strong&gt;, without collapsing the rows the way &lt;code&gt;GROUP BY&lt;/code&gt; does. &lt;code&gt;OVER (PARTITION BY ... ORDER BY ...)&lt;/code&gt; defines the window: which rows belong together and in what order. Three uses cover most of the daily work: keep the &lt;strong&gt;latest row per key&lt;/strong&gt;, a &lt;strong&gt;running total&lt;/strong&gt;, and the &lt;strong&gt;previous value&lt;/strong&gt; for a change.&lt;/p&gt;
&lt;p&gt;GROUP BY answers &amp;quot;how much per customer&amp;quot; with one row per customer. Window functions answer &amp;quot;for each order, how much had this customer spent so far&amp;quot; and keep every order.&lt;/p&gt;
&lt;h2 id=&quot;how-does-over-define-a-window&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-over-define-a-window&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does OVER define a window?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;CustomerID&lt;/th&gt;&lt;th&gt;OrderDate&lt;/th&gt;&lt;th&gt;Amount&lt;/th&gt;&lt;th&gt;Running total&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1042&lt;/td&gt;&lt;td&gt;2026-01-04&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1042&lt;/td&gt;&lt;td&gt;2026-02-11&lt;/td&gt;&lt;td&gt;80&lt;/td&gt;&lt;td&gt;200&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1042&lt;/td&gt;&lt;td&gt;2026-03-02&lt;/td&gt;&lt;td&gt;50&lt;/td&gt;&lt;td&gt;250&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;dfig-cut&quot;&gt;&lt;td colspan=&quot;4&quot;&gt;&lt;span&gt;a new partition starts: the total starts again&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2077&lt;/td&gt;&lt;td&gt;2026-01-20&lt;/td&gt;&lt;td&gt;300&lt;/td&gt;&lt;td&gt;300&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2077&lt;/td&gt;&lt;td&gt;2026-02-03&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;340&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;SUM(Amount) OVER (PARTITION BY CustomerID ORDER BY OrderDate)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;strong&gt;PARTITION BY&lt;/strong&gt; splits the rows into groups that do not see each other. &lt;strong&gt;ORDER BY&lt;/strong&gt; orders the rows inside each group. An optional &lt;strong&gt;frame&lt;/strong&gt;, like &lt;code&gt;ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW&lt;/code&gt;, says which of those rows the function adds up.&lt;/p&gt;
&lt;h2 id=&quot;which-three-uses-come-up-every-day&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-three-uses-come-up-every-day&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which three uses come up every day?&lt;/h2&gt;
&lt;p&gt;The latest version of each order, a common clean-up step in silver:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;WITH&lt;/i&gt; ranked &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; (
    &lt;i class=&quot;k&quot;&gt;SELECT&lt;/i&gt; *, &lt;i class=&quot;f&quot;&gt;ROW_NUMBER&lt;/i&gt;() &lt;i class=&quot;f&quot;&gt;OVER&lt;/i&gt; (PARTITION &lt;i class=&quot;k&quot;&gt;BY&lt;/i&gt; OrderID &lt;i class=&quot;k&quot;&gt;ORDER&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;BY&lt;/i&gt; ModifiedDate DESC) &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; rn
    &lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; stage.Orders
)
&lt;i class=&quot;k&quot;&gt;SELECT&lt;/i&gt; * &lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; ranked &lt;i class=&quot;k&quot;&gt;WHERE&lt;/i&gt; rn = &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;A running total per customer:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;SELECT&lt;/i&gt; CustomerID, OrderDate, Amount,
       &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt;(Amount) &lt;i class=&quot;f&quot;&gt;OVER&lt;/i&gt; (PARTITION &lt;i class=&quot;k&quot;&gt;BY&lt;/i&gt; CustomerID &lt;i class=&quot;k&quot;&gt;ORDER&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;BY&lt;/i&gt; OrderDate
                         ROWS BETWEEN UNBOUNDED PRECEDING &lt;i class=&quot;k&quot;&gt;AND&lt;/i&gt; CURRENT ROW) &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; RunningTotal
&lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; dbo.Orders;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The change from the month before:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;SELECT&lt;/i&gt; &lt;i class=&quot;m&quot;&gt;[Month]&lt;/i&gt;, Revenue,
       Revenue - &lt;i class=&quot;f&quot;&gt;LAG&lt;/i&gt;(Revenue) &lt;i class=&quot;f&quot;&gt;OVER&lt;/i&gt; (&lt;i class=&quot;k&quot;&gt;ORDER&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;BY&lt;/i&gt; &lt;i class=&quot;m&quot;&gt;[Month]&lt;/i&gt;) &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; ChangeFromLastMonth
&lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; dbo.MonthlyRevenue;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Ranking&lt;/b&gt;&lt;span&gt;ROW_NUMBER, RANK, DENSE_RANK, NTILE&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Offset&lt;/b&gt;&lt;span&gt;LAG, LEAD, FIRST_VALUE, LAST_VALUE&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Aggregate&lt;/b&gt;&lt;span&gt;SUM, AVG, COUNT, MIN, MAX with OVER&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;The functions you reach for&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Ties in ROW_NUMBER.&lt;/strong&gt; Two rows with the same date get an arbitrary order. Add a tie-breaker to &lt;code&gt;ORDER BY&lt;/code&gt;, like the load timestamp.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The default frame.&lt;/strong&gt; With &lt;code&gt;ORDER BY&lt;/code&gt; and no frame, SQL Server uses &lt;code&gt;RANGE&lt;/code&gt;, which treats rows with equal dates as one step and is slower. Write &lt;code&gt;ROWS BETWEEN ...&lt;/code&gt; when you mean rows.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Filtering in the same SELECT.&lt;/strong&gt; A window function cannot be used in &lt;code&gt;WHERE&lt;/code&gt;. Wrap the query in a CTE, as above, and filter outside.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/queries/select-over-clause-transact-sql&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SELECT - OVER clause (Transact-SQL)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/functions/row-number-transact-sql&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: ROW_NUMBER (Transact-SQL)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/functions/lag-transact-sql&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: LAG (Transact-SQL)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;The open course &lt;a href=&quot;/courses/upserts-into-azure-sql/&quot;&gt;Upserts into Azure SQL&lt;/a&gt; keeps one row per key in staging before the merge, which is where &lt;code&gt;ROW_NUMBER&lt;/code&gt; earns its keep. In a lakehouse, the same clean-up runs in a notebook before the merge in &lt;a href=&quot;/blog/medallion-architecture-fabric-lakehouse/&quot;&gt;Bronze, silver and gold&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>The paginated report visual in Power BI</title>
    <link href="https://data.benibix.com/blog/paginated-report-visual-power-bi/"/>
    <id>https://data.benibix.com/blog/paginated-report-visual-power-bi/</id>
    <published>2026-11-13T12:00:00Z</published>
    <updated>2026-11-13T12:00:00Z</updated>
    <summary>How the paginated report visual puts a pixel-perfect paginated report inside a Power BI report, mapping its parameters to fields, cross-filtering, the toolbar and export, Auto-apply filters, capacity needs and the 30,000-value limit.</summary>
    <category term="Visuals"/>
    <category term="More visuals"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; the &lt;strong&gt;paginated report visual&lt;/strong&gt; shows a paginated report (the pixel-perfect, printable report type built in Power BI Report Builder) inside a normal Power BI report. Map the paginated report's &lt;strong&gt;parameters&lt;/strong&gt; to Power BI fields, and slicers and clicks on the page drive it. With the &lt;strong&gt;toolbar&lt;/strong&gt; on, readers export the full detail to Excel, PDF, Word and more from the page. It is for large exports, detail lists and documents next to interactive visuals; saving needs a Premium or Fabric capacity (F64 or larger, or a P SKU).&lt;/p&gt;
&lt;p&gt;Interactive reports are poor at &amp;quot;give me all 40,000 order lines for this customer as Excel&amp;quot; and &amp;quot;print this invoice&amp;quot;. Paginated reports are made for that. The visual puts both in one place: the reader slices in Power BI and exports the exact list.&lt;/p&gt;
&lt;h2 id=&quot;what-does-it-look-like-on-a-page&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-it-look-like-on-a-page&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does it look like on a page?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Slicers&lt;/b&gt;&lt;span&gt;year and customer selected on the page&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Charts&lt;/b&gt;&lt;span&gt;revenue trend and products for that customer&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Paginated visual&lt;/b&gt;&lt;span&gt;every order line, with page numbers and totals, parameters taken from the slicers&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Export&lt;/b&gt;&lt;span&gt;toolbar: Excel, PDF, Word, CSV, PowerPoint&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;A page that combines interactive visuals and a paginated report&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-add-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-add-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you add one?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;Publish a paginated report (&lt;code&gt;.rdl&lt;/code&gt;) to a workspace in a Premium or Fabric capacity.&lt;/li&gt;&lt;li&gt;In the Power BI report, select &lt;strong&gt;Paginated report&lt;/strong&gt; in &lt;strong&gt;Visualizations&lt;/strong&gt;, then &lt;strong&gt;Connect to report&lt;/strong&gt; and pick the paginated report.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Set parameters&lt;/strong&gt;: drag Power BI fields into the visual's &lt;strong&gt;Parameters&lt;/strong&gt; well and map each to a paginated report parameter, or use the parameter's default.&lt;/li&gt;&lt;li&gt;Select &lt;strong&gt;See report&lt;/strong&gt;. The paginated report renders in the visual.&lt;/li&gt;&lt;li&gt;Save in the service, or publish from Desktop to a workspace on a capacity (Premium or Fabric F64 or larger).&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;how-does-it-react-to-the-page&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-it-react-to-the-page&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does it react to the page?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Cross-filtering&lt;/strong&gt;: when its parameters are mapped to fields, slicers and selections on the page set those fields, and the visual re-renders. A Fiscal Year slicer on FY2018 shows the paginated report for FY2018.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Auto-apply filters&lt;/strong&gt;: off by default. On, report filters apply to the visual automatically; off, the reader applies them with the toolbar.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Toolbar&lt;/strong&gt;: shows or hides export and paging, and optionally the &lt;strong&gt;Parameters&lt;/strong&gt; so readers can change them in the visual.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Map fields with care: a field used &lt;strong&gt;as is&lt;/strong&gt; (Don't summarize) passes the selected values; an aggregated field (Sum, Average) passes one number. A multi-value parameter needs the field as is.&lt;/p&gt;
&lt;h2 id=&quot;what-dax-helps&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-dax-helps&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What DAX helps?&lt;/h2&gt;
&lt;p&gt;Paginated reports read the semantic model with their own DAX queries, which you write in Report Builder. A typical dataset query for an order list, parameterised by year and customer:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;EVALUATE
&lt;i class=&quot;f&quot;&gt;SUMMARIZECOLUMNS&lt;/i&gt; (
    Orders&lt;i class=&quot;m&quot;&gt;[Order ID]&lt;/i&gt;,
    Orders&lt;i class=&quot;m&quot;&gt;[Order Date]&lt;/i&gt;,
    Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;TREATAS&lt;/i&gt; ( { @Year }, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;TREATAS&lt;/i&gt; ( { @Customer }, Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ),
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Quantity&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Quantity]&lt;/i&gt; ),
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Amount&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;
)
ORDER BY Orders&lt;i class=&quot;m&quot;&gt;[Order Date]&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;@Year&lt;/code&gt; and &lt;code&gt;@Customer&lt;/code&gt; are the paginated report's parameters, which the visual fills from the Power BI fields. &lt;a href=&quot;/blog/dax-query-view-evaluate/&quot;&gt;DAX queries with EVALUATE&lt;/a&gt; explains the query syntax.&lt;/p&gt;
&lt;h2 id=&quot;what-are-the-limits&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-limits&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the limits?&lt;/h2&gt;
&lt;p&gt;From Microsoft's list:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;A built-in limit of 30,000 values per field from Power BI (the visual maximum); more values are cut.&lt;/li&gt;&lt;li&gt;Not supported in Power BI report subscriptions or export of the Power BI report; subscribe to the paginated report itself.&lt;/li&gt;&lt;li&gt;In an app, include the paginated report and all its subreports and drillthrough targets.&lt;/li&gt;&lt;li&gt;Embedding for customers needs a service principal and a multi-resource embed token.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;No capacity.&lt;/strong&gt; Without Premium or Fabric F64 (or a P SKU), the visual cannot be saved and rendered for others.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Parameters fed aggregates.&lt;/strong&gt; A summed year field passes one number; use Don't summarize.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;More than 30,000 values.&lt;/strong&gt; Passing every customer ID to a parameter breaks the limit; filter first.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Expecting the Power BI export to include it.&lt;/strong&gt; Exporting the Power BI report skips the visual; use its toolbar.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/paginated-report-visual&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create and use the paginated report visual&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/summarizecolumns-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SUMMARIZECOLUMNS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add a paginated report visual where readers ask for &amp;quot;the full list as Excel&amp;quot;, map its parameters to the page's slicers, and turn on the toolbar. The &lt;a href=&quot;/blog/table-visual-power-bi/&quot;&gt;table visual&lt;/a&gt; covers detail inside Power BI when the list is short.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>What is EBITDA, and what does it hide?</title>
    <link href="https://data.benibix.com/blog/what-is-ebitda/"/>
    <id>https://data.benibix.com/blog/what-is-ebitda/</id>
    <published>2026-11-13T12:00:00Z</published>
    <updated>2026-11-13T12:00:00Z</updated>
    <summary>EBITDA is earnings before interest, taxes, depreciation and amortisation, the profit from running the business before debt, tax and write-downs. How to calculate it two ways, the EBITDA margin, and why it is not cash and why &quot;adjusted&quot; versions need a close look.</summary>
    <category term="KPIs"/>
    <category term="Finance"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;EBITDA&lt;/strong&gt; is &lt;strong&gt;earnings before interest, taxes, depreciation and amortisation&lt;/strong&gt;: the profit from running the business before the cost of debt, tax and the accounting write-downs of equipment and intangible assets. The quick formula is &lt;strong&gt;operating profit + depreciation + amortisation&lt;/strong&gt;. It is popular because it compares businesses with different debt and asset histories, but it is &lt;strong&gt;not cash&lt;/strong&gt;, and &lt;strong&gt;&amp;quot;adjusted&amp;quot; EBITDA&lt;/strong&gt; can leave out more and more costs.&lt;/p&gt;
&lt;p&gt;Companies put EBITDA in the headline because it is usually the biggest profit number they can show. Knowing what it adds back tells you what the headline leaves out.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-calculate-ebitda&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-calculate-ebitda&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you calculate EBITDA?&lt;/h2&gt;
&lt;p&gt;Two ways, and they should give the same answer. From operating profit (adding back the two non-cash costs):&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Line&lt;/th&gt;&lt;th&gt;Amount&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Operating profit (EBIT)&lt;/td&gt;&lt;td&gt;150,000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Add back depreciation&lt;/td&gt;&lt;td&gt;30,000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Add back amortisation&lt;/td&gt;&lt;td&gt;10,000&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;EBITDA&lt;/td&gt;&lt;td&gt;190,000&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;EBITDA from operating profit&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;From net income (adding back all four):&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Line&lt;/th&gt;&lt;th&gt;Amount&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Net income&lt;/td&gt;&lt;td&gt;90,000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Add back tax&lt;/td&gt;&lt;td&gt;30,000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Add back interest&lt;/td&gt;&lt;td&gt;30,000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Add back depreciation and amortisation&lt;/td&gt;&lt;td&gt;40,000&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;EBITDA&lt;/td&gt;&lt;td&gt;190,000&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;EBITDA from net income&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Both reach &lt;strong&gt;190,000&lt;/strong&gt;. In real accounts they can differ when there are items between operating profit and net income other than interest and tax, such as a gain on selling a building. That is why the SEC asks US-listed companies to reconcile EBITDA to &lt;strong&gt;net income&lt;/strong&gt;, not to operating profit.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;EBITDA margin&lt;/strong&gt; puts it against sales: EBITDA / revenue. With revenue of 1,000,000, that is 190,000 / 1,000,000 = &lt;strong&gt;19%&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-does-each-letter-leave-out&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-each-letter-leave-out&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does each letter leave out?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Letter&lt;/th&gt;&lt;th&gt;Cost left out&lt;/th&gt;&lt;th&gt;Why it matters&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;I, interest&lt;/td&gt;&lt;td&gt;The cost of debt&lt;/td&gt;&lt;td&gt;A heavily indebted company looks as healthy as one with none&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;T, taxes&lt;/td&gt;&lt;td&gt;Income tax&lt;/td&gt;&lt;td&gt;Real money that leaves every year&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;D, depreciation&lt;/td&gt;&lt;td&gt;The wear of machines, vehicles, buildings&lt;/td&gt;&lt;td&gt;They must be replaced one day, with cash&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;A, amortisation&lt;/td&gt;&lt;td&gt;The write-down of intangibles, like bought software or licences&lt;/td&gt;&lt;td&gt;Same: a real cost spread over years&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;why-is-ebitda-not-cash&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-is-ebitda-not-cash&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why is EBITDA not cash?&lt;/h2&gt;
&lt;p&gt;Because cash pays for everything EBITDA skips. A company with an EBITDA of 190,000 may still have to pay 30,000 of interest, 30,000 of tax and buy new equipment, and it may be waiting for customers to pay their invoices. Cash flow from operations, minus capital spending, is closer to the money that is actually left. &lt;a href=&quot;/blog/profit-vs-cash-flow-kpi/&quot;&gt;Profit vs cash flow&lt;/a&gt; shows the gap with numbers.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-catch-with-adjusted-ebitda&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-catch-with-adjusted-ebitda&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the catch with adjusted EBITDA?&lt;/h2&gt;
&lt;p&gt;&amp;quot;Adjusted EBITDA&amp;quot; starts from EBITDA and removes more costs: restructuring, share-based pay, &amp;quot;one-off&amp;quot; items that come back every year. Each adjustment may be fair; together they can turn a loss into a healthy-looking number. The SEC's staff guidance says a measure calculated differently from EBITDA must not be called &amp;quot;EBITDA&amp;quot;, and should carry a different name, such as &amp;quot;Adjusted EBITDA&amp;quot;. When you see one, read the reconciliation line by line and ask whether each removed cost will really not come back.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Mistake&lt;/th&gt;&lt;th&gt;Fix&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Treating EBITDA as cash&lt;/td&gt;&lt;td&gt;Look at operating cash flow and capital spending too&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Comparing one company's adjusted EBITDA with another's plain EBITDA&lt;/td&gt;&lt;td&gt;Compare like with like, or rebuild both from net income&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;EBITDA margin across industries&lt;/td&gt;&lt;td&gt;Asset-heavy businesses (telecoms, factories) always look better on EBITDA; compare within an industry&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Adding back depreciation twice&lt;/td&gt;&lt;td&gt;Start from operating profit &lt;strong&gt;or&lt;/strong&gt; net income, not a mix&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://www.sec.gov/corpfin/non-gaap-financial-measures&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;U.S. SEC: Non-GAAP Financial Measures, compliance and disclosure interpretations&lt;/a&gt;, questions 103.01 and 103.02 on EBIT, EBITDA and adjusted measures&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;For the EBITDA margin next to gross, operating and net margin, in DAX on a general ledger, read &lt;a href=&quot;/blog/profit-margin-kpis/&quot;&gt;profit margins: gross, operating, net and EBITDA in DAX&lt;/a&gt;. &lt;a href=&quot;https://tools.benibix.com/data/kpi-atlas/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;KPI Atlas&lt;/a&gt; has the margin formulas with ready-to-copy DAX, SQL and Excel, a benchmark and the mistakes to avoid.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Claude Code and company data: what is sent and kept</title>
    <link href="https://data.benibix.com/blog/claude-code-and-company-data/"/>
    <id>https://data.benibix.com/blog/claude-code-and-company-data/</id>
    <published>2026-11-13T01:00:00Z</published>
    <updated>2026-11-13T01:00:00Z</updated>
    <summary>Before a data team installs Claude Code, someone asks where the code, the queries and the sample rows go. What Claude Code sends, how long each plan keeps it, which plans are used for training, and what stays on your machine.</summary>
    <category term="AI"/>
    <category term="Claude Code"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; Claude Code runs on your machine but sends your &lt;strong&gt;prompts and the model's outputs&lt;/strong&gt;, including any file contents or query results it reads, to Anthropic over &lt;strong&gt;TLS 1.2+&lt;/strong&gt;. On &lt;strong&gt;Team, Enterprise and the API&lt;/strong&gt;, Anthropic &lt;strong&gt;does not train&lt;/strong&gt; on that data and keeps it &lt;strong&gt;30 days&lt;/strong&gt; by default, with &lt;strong&gt;zero data retention&lt;/strong&gt; available per organization on Enterprise. On &lt;strong&gt;Free, Pro, Max and Ultra&lt;/strong&gt;, data is used for training &lt;strong&gt;when that setting is on&lt;/strong&gt; (kept 5 years) and kept 30 days when it is off. Session transcripts also stay on your machine under &lt;code&gt;~/.claude/projects/&lt;/code&gt; for 30 days.&lt;/p&gt;
&lt;p&gt;For a data team the question is concrete: if Claude reads a sample of the customer table to write a query, those rows are part of the conversation. Knowing where they go decides which account to use and what to keep out.&lt;/p&gt;
&lt;h2 id=&quot;what-happens-to-the-data-on-each-plan&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-happens-to-the-data-on-each-plan&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What happens to the data on each plan?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Account&lt;/th&gt;&lt;th&gt;Used for training?&lt;/th&gt;&lt;th&gt;Kept on Anthropic's side&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Free, Pro, Max, Ultra, setting on&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;td&gt;5 years&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Free, Pro, Max, Ultra, setting off&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;td&gt;30 days&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Team, Enterprise, API&lt;/td&gt;&lt;td&gt;No, unless the customer opts in&lt;/td&gt;&lt;td&gt;30 days&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Enterprise with zero data retention&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;td&gt;No server-side persistence&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Training and retention by account type (Claude Code docs, November 2026)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-leaves-your-machine-and-what-stays&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-leaves-your-machine-and-what-stays&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What leaves your machine, and what stays?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Your session&lt;/b&gt;&lt;span&gt;prompts, files Claude reads, command output&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Sent to the model&lt;/b&gt;&lt;span&gt;prompts and outputs over TLS 1.2+&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Kept locally&lt;/b&gt;&lt;span&gt;transcripts in ~/.claude/projects/ for 30 days (cleanupPeriodDays)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Where a Claude Code session's data goes&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Telemetry metrics never include your code, prompts or file paths, and can be turned off with &lt;code&gt;DISABLE_TELEMETRY=1&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-should-a-data-team-do&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-should-a-data-team-do&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What should a data team do?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Use a commercial account&lt;/strong&gt; (Team, Enterprise or the API) for company work, not personal plans.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Point Claude at samples or test data&lt;/strong&gt;, not production tables with personal information.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Keep secrets out:&lt;/strong&gt; connection strings and passwords in environment variables, never in files Claude reads.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Shorten local history&lt;/strong&gt; with &lt;code&gt;cleanupPeriodDays&lt;/code&gt; if transcripts on laptops are a concern.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/data-usage&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Data usage&lt;/a&gt;, training policy, retention, local caching, TLS and telemetry&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;This is a summary of Anthropic's published policy, not legal advice; check your own contract.&lt;/p&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Give Claude only a safe database login with &lt;a href=&quot;/blog/connect-claude-code-to-a-database/&quot;&gt;connect Claude Code to a database&lt;/a&gt;, and write the &amp;quot;never touch&amp;quot; rules into &lt;a href=&quot;/blog/claude-md-for-a-data-repo/&quot;&gt;a CLAUDE.md for a data repository&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Free practice assessments, and why exam dumps cost more</title>
    <link href="https://data.benibix.com/blog/practice-assessments-and-exam-dumps/"/>
    <id>https://data.benibix.com/blog/practice-assessments-and-exam-dumps/</id>
    <published>2026-11-12T12:00:00Z</published>
    <updated>2026-11-12T12:00:00Z</updated>
    <summary>How Microsoft's free practice assessments work in 2026, what they can and cannot tell you, how to use them twice in a study plan, and why exam dumps break the candidate agreement and can end in decertification.</summary>
    <category term="Exams"/>
    <category term="Exam tips"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; most Microsoft exams have a &lt;strong&gt;free practice assessment&lt;/strong&gt; on Microsoft Learn (now on AI Skills Navigator for many exams). It shows the &lt;strong&gt;style, wording and difficulty&lt;/strong&gt; of real questions, not the real questions, and is not a replacement for hands-on experience. Take it once early to find gaps and again near the end to check readiness. &lt;strong&gt;Exam dumps&lt;/strong&gt; (leaked real questions) break the candidate agreement: Microsoft can invalidate your exam, decertify you and ban you from future exams.&lt;/p&gt;
&lt;h2 id=&quot;how-should-you-use-a-practice-assessment&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-should-you-use-a-practice-assessment&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How should you use a practice assessment?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Early&lt;/b&gt;&lt;span&gt;take it cold after reading the study guide&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Map&lt;/b&gt;&lt;span&gt;note the skill areas where you are weak&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Build&lt;/b&gt;&lt;span&gt;practise those skills hands-on, not by reading answers&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Late&lt;/b&gt;&lt;span&gt;take it again a week before the exam&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Decide&lt;/b&gt;&lt;span&gt;book or move the date based on the second result&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Two attempts, two purposes&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Read the explanation for every answer, including the ones you got right: they link to the Learn page behind the question, which is the material that matters.&lt;/p&gt;
&lt;h2 id=&quot;what-can-it-not-tell-you&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-can-it-not-tell-you&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What can it not tell you?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:1&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Shows&lt;/b&gt;&lt;span&gt;question style, wording, difficulty, weak areas, the Learn pages behind each topic&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Does not show&lt;/b&gt;&lt;span&gt;the real questions, the exam's length, case studies or labs as they appear&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Practice assessment&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;A high practice score with no hands-on work is a warning, not a green light: the real exam asks you to choose between options you only understand by having used them.&lt;/p&gt;
&lt;h2 id=&quot;why-not-use-dumps&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-not-use-dumps&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why not use dumps?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:4&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;red&quot;&gt;&lt;b&gt;Your certification&lt;/b&gt;&lt;span&gt;an exam passed with leaked questions can be invalidated and you can be decertified&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;red&quot;&gt;&lt;b&gt;Future exams&lt;/b&gt;&lt;span&gt;Microsoft can ban you from its certification program&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Your job&lt;/b&gt;&lt;span&gt;a certification without the skill shows the first week on a project&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Accuracy&lt;/b&gt;&lt;span&gt;dumps can be wrong or out of date, since skills lists change and new questions are added&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;What dumps cost&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The candidate agreement forbids copying, recording, sharing or discussing exam questions. Practice tests from Microsoft, MeasureUp (linked on some exam pages) and Microsoft Press are legitimate; anything sold as &amp;quot;real exam questions&amp;quot; is not.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/practice-assessments-for-microsoft-certifications&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Practice assessments for Microsoft Certifications&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/prepare-exam&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Prepare for an exam&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/online-exams&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: About online exams with Pearson VUE&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Find the practice assessment link on your exam's page and take it before you study anything else. &lt;a href=&quot;/blog/study-plan-for-any-microsoft-exam/&quot;&gt;A study plan for any Microsoft exam&lt;/a&gt; shows where the two attempts fit.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Load only the rows that changed, with a watermark</title>
    <link href="https://data.benibix.com/blog/incremental-load-watermark-azure-data-factory/"/>
    <id>https://data.benibix.com/blog/incremental-load-watermark-azure-data-factory/</id>
    <published>2026-11-12T12:00:00Z</published>
    <updated>2026-11-12T12:00:00Z</updated>
    <summary>An incremental load in Azure Data Factory asks the source only for rows changed since the last good run, merges them by key, and moves the watermark on only on success.</summary>
    <category term="Azure"/>
    <category term="Data Factory"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; store a &lt;strong&gt;watermark&lt;/strong&gt; per table, the latest change you already loaded. Each run reads the highest change value in the source first, copies the rows between the old watermark and that value, merges them into the target by key, and only then moves the watermark on. A failed run leaves the watermark where it was, so the next run picks the same rows up again.&lt;/p&gt;
&lt;p&gt;A full copy every night is simple, and it gets slower every month the data grows. Most tables have a column that says when a row last changed, usually a modified date. That column is enough to ask the source for the new rows only.&lt;/p&gt;
&lt;h2 id=&quot;what-is-a-watermark&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-a-watermark&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is a watermark?&lt;/h2&gt;
&lt;p&gt;The highest value of the change column you have already loaded. Everything above it is new to you; everything at or below it you already have.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;SalesOrderID&lt;/th&gt;&lt;th&gt;ModifiedDate&lt;/th&gt;&lt;th&gt;Status&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;71774&lt;/td&gt;&lt;td&gt;2026-10-25 22:10&lt;/td&gt;&lt;td&gt;Shipped&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;71776&lt;/td&gt;&lt;td&gt;2026-10-26 09:42&lt;/td&gt;&lt;td&gt;Shipped&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;dfig-cut&quot;&gt;&lt;td colspan=&quot;3&quot;&gt;&lt;span&gt;LastWatermark 2026-10-26 09:42&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;71780&lt;/td&gt;&lt;td&gt;2026-10-27 14:05&lt;/td&gt;&lt;td&gt;Ordered&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;71776&lt;/td&gt;&lt;td&gt;2026-10-27 18:31&lt;/td&gt;&lt;td&gt;Returned&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;dfig-cut&quot;&gt;&lt;td colspan=&quot;3&quot;&gt;&lt;span&gt;NewWatermark 2026-10-27 18:31&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;One night's run on SalesOrderHeader: only the rows above the watermark are copied&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Order 71776 shows up twice: the version the last run loaded, and the same order after it was returned. That second version is why the target needs a &lt;strong&gt;merge by key&lt;/strong&gt;, not an insert: the changed row has to replace the old one.&lt;/p&gt;
&lt;h2 id=&quot;how-does-one-run-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-one-run-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does one run work?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Read the new watermark&lt;/b&gt;&lt;span&gt;MAX(ModifiedDate) in the source, before copying&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Copy the rows in between&lt;/b&gt;&lt;span&gt;above the old watermark, up to the new one&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Merge by key&lt;/b&gt;&lt;span&gt;update what changed, insert what is new&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Move the watermark&lt;/b&gt;&lt;span&gt;only when the merge succeeded&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;An incremental run, in the order that keeps it safe&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Reading the new watermark &lt;strong&gt;before&lt;/strong&gt; the copy matters. A row that changes while the copy runs gets a later date than the value you read, so the next run copies it, instead of the watermark jumping past it.&lt;/p&gt;
&lt;p&gt;The copy's source query in Data Factory, inside a ForEach over the control table:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;SELECT&lt;/i&gt; * &lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; @{&lt;i class=&quot;f&quot;&gt;item&lt;/i&gt;().SchemaName}.@{&lt;i class=&quot;f&quot;&gt;item&lt;/i&gt;().TableName}
&lt;i class=&quot;k&quot;&gt;WHERE&lt;/i&gt; @{&lt;i class=&quot;f&quot;&gt;item&lt;/i&gt;().WatermarkColumn} &amp;gt;  &lt;i class=&quot;s&quot;&gt;'@{item().LastWatermark}'&lt;/i&gt;
  &lt;i class=&quot;k&quot;&gt;AND&lt;/i&gt; @{&lt;i class=&quot;f&quot;&gt;item&lt;/i&gt;().WatermarkColumn} &amp;lt;= &lt;i class=&quot;s&quot;&gt;'@{activity('&lt;/i&gt;New watermark&lt;i class=&quot;s&quot;&gt;').output.firstRow.NewWatermark}'&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The rows land in a staging table, and one stored procedure merges them into the target:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;MERGE&lt;/i&gt; dbo.SalesOrderHeader &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; t
&lt;i class=&quot;k&quot;&gt;USING&lt;/i&gt; stage.SalesOrderHeader &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; s
    &lt;i class=&quot;k&quot;&gt;ON&lt;/i&gt; t.SalesOrderID = s.SalesOrderID
&lt;i class=&quot;k&quot;&gt;WHEN&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;MATCHED&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;THEN&lt;/i&gt;
    &lt;i class=&quot;k&quot;&gt;UPDATE&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;SET&lt;/i&gt; t.Status = s.Status, t.ModifiedDate = s.ModifiedDate
&lt;i class=&quot;k&quot;&gt;WHEN&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;NOT&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;MATCHED&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;BY&lt;/i&gt; TARGET &lt;i class=&quot;k&quot;&gt;THEN&lt;/i&gt;
    &lt;i class=&quot;k&quot;&gt;INSERT&lt;/i&gt; (SalesOrderID, Status, ModifiedDate)
    &lt;i class=&quot;k&quot;&gt;VALUES&lt;/i&gt; (s.SalesOrderID, s.Status, s.ModifiedDate);&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The last step is a second stored procedure that writes the new watermark into the control table, on the Copy's and the merge's success path only.&lt;/p&gt;
&lt;h2 id=&quot;why-not-just-copy-the-rows-since-yesterday&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-not-just-copy-the-rows-since-yesterday&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why not just copy the rows since yesterday?&lt;/h2&gt;
&lt;p&gt;Because &amp;quot;yesterday&amp;quot; is a guess about when the last run worked. If Tuesday's run fails and nobody notices until Thursday, a load of &amp;quot;the last 24 hours&amp;quot; has lost Tuesday's changes for good. The watermark is a fact about what you actually loaded, so a failed run, a paused trigger or a week's holiday all catch up on their own.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-watermark-not-catch&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-watermark-not-catch&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a watermark not catch?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Deleted rows.&lt;/strong&gt; A deleted row has no modified date; it is simply gone. If deletes matter, use soft deletes in the source, or change tracking or change data capture, which record them.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Changes that do not touch the column.&lt;/strong&gt; A bulk update that forgets to set &lt;code&gt;ModifiedDate&lt;/code&gt; is invisible. Check with the source team how the column is maintained before you trust it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Clock and time zone surprises.&lt;/strong&gt; Compare like with like: if the source writes local time, keep the watermark in local time too, or convert both.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/data-factory/tutorial-incremental-copy-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Incrementally load data from a source data store to a destination&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/statements/merge-transact-sql&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: MERGE (Transact-SQL)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/track-changes/about-change-tracking-sql-server&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: About change tracking (SQL Server)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;The last lesson of &lt;a href=&quot;/courses/metadata-driven-pipeline/#load-only-what-changed&quot;&gt;Your first metadata-driven pipeline&lt;/a&gt; adds the watermark to a pipeline you build yourself, and &lt;a href=&quot;/courses/upserts-into-azure-sql/&quot;&gt;Upserts into Azure SQL&lt;/a&gt; covers the staging table, the merge and a log of every run. The same idea in a Fabric lakehouse is &lt;a href=&quot;/courses/incremental-lakehouse-loads/&quot;&gt;Incremental loads in a lakehouse&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Profit margin vs markup: why 40% is not 40%</title>
    <link href="https://data.benibix.com/blog/margin-vs-markup/"/>
    <id>https://data.benibix.com/blog/margin-vs-markup/</id>
    <published>2026-11-12T12:00:00Z</published>
    <updated>2026-11-12T12:00:00Z</updated>
    <summary>Profit margin is the share of each sale you keep as profit; markup is what you add on top of cost. Buy at 60, sell at 100: that is a 40% margin but a 67% markup. The formulas, a worked example from sales to net profit, and a table to convert one into the other.</summary>
    <category term="KPIs"/>
    <category term="Finance"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;profit margin&lt;/strong&gt; is the share of every sale you keep as profit: &lt;strong&gt;profit / revenue x 100&lt;/strong&gt;. &lt;strong&gt;Markup&lt;/strong&gt; is what you add on top of cost: &lt;strong&gt;profit / cost x 100&lt;/strong&gt;. Same profit, different base, so the numbers differ: buy at &lt;strong&gt;60&lt;/strong&gt;, sell at &lt;strong&gt;100&lt;/strong&gt;, and you have a &lt;strong&gt;40% margin&lt;/strong&gt; but a &lt;strong&gt;67% markup&lt;/strong&gt;. Margin can never go above 100%; markup can be any size.&lt;/p&gt;
&lt;p&gt;&amp;quot;We price at 40% on top&amp;quot; and &amp;quot;we make 40% margin&amp;quot; sound like the same business. They are not, and mixing them up is how a price list that looks profitable loses money.&lt;/p&gt;
&lt;h2 id=&quot;what-is-profit-margin&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-profit-margin&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is profit margin?&lt;/h2&gt;
&lt;p&gt;The share of each sale you keep. Follow 100 in sales down a profit and loss statement:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Step&lt;/th&gt;&lt;th&gt;What is left&lt;/th&gt;&lt;th&gt;Margin&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Sales&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;td&gt;100%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;After direct costs (goods sold)&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;40% gross margin&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;After running costs (rent, wages, marketing)&lt;/td&gt;&lt;td&gt;15&lt;/td&gt;&lt;td&gt;15% operating margin&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;After everything (interest, tax)&lt;/td&gt;&lt;td&gt;9&lt;/td&gt;&lt;td&gt;9% net margin&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;100 in sales, down to net profit&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;All three are margins, each after a different set of costs. &lt;strong&gt;Net margin&lt;/strong&gt; is the usual meaning of &amp;quot;profit margin&amp;quot;: net income / revenue x 100. Big sales with a tiny net margin means the costs further down are eating the profit.&lt;/p&gt;
&lt;h2 id=&quot;what-is-markup&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-markup&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is markup?&lt;/h2&gt;
&lt;p&gt;What you add to your cost to get the price. If a product costs 60 and you sell it for 100, the profit is 40:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Margin = 40 / &lt;strong&gt;100&lt;/strong&gt; = &lt;strong&gt;40%&lt;/strong&gt; (profit over the price)&lt;/li&gt;&lt;li&gt;Markup = 40 / &lt;strong&gt;60&lt;/strong&gt; = &lt;strong&gt;66.7%&lt;/strong&gt; (profit over the cost)&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-convert-one-into-the-other&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-convert-one-into-the-other&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you convert one into the other?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;Margin = markup / (1 + markup)&lt;/li&gt;&lt;li&gt;Markup = margin / (1 - margin)&lt;/li&gt;&lt;/ul&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Markup on cost&lt;/th&gt;&lt;th&gt;Margin on price&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;25%&lt;/td&gt;&lt;td&gt;20.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;50%&lt;/td&gt;&lt;td&gt;33.3%&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;66.7%&lt;/td&gt;&lt;td&gt;40.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;100%&lt;/td&gt;&lt;td&gt;50.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;150%&lt;/td&gt;&lt;td&gt;60.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;200%&lt;/td&gt;&lt;td&gt;66.7%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Markup and the margin it gives&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;So &amp;quot;double the cost&amp;quot; (100% markup) is a 50% margin, not 100%.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Mistake&lt;/th&gt;&lt;th&gt;What happens&lt;/th&gt;&lt;th&gt;Fix&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Pricing with a markup to hit a margin target&lt;/td&gt;&lt;td&gt;A 40% markup gives only a 28.6% margin&lt;/td&gt;&lt;td&gt;Price = cost / (1 - target margin)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Calling a markup a margin in a report&lt;/td&gt;&lt;td&gt;The business looks far more profitable than it is&lt;/td&gt;&lt;td&gt;Name the base: &amp;quot;on cost&amp;quot; or &amp;quot;on price&amp;quot;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Averaging margins of products&lt;/td&gt;&lt;td&gt;A small product with a high margin counts as much as a big one&lt;/td&gt;&lt;td&gt;Total profit / total revenue&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Gross margin used as profit&lt;/td&gt;&lt;td&gt;Running costs, interest and tax are still to come&lt;/td&gt;&lt;td&gt;Show gross, operating and net side by side&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;Check the first one: cost 60 with a 40% markup is a price of 84, profit 24, and 24 / 84 = 28.6%. To get a real 40% margin on a cost of 60: 60 / (1 - 0.40) = 100.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://pages.stern.nyu.edu/~adamodar/New_Home_Page/datafile/margin.html&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Aswath Damodaran, NYU Stern: margins by industry, US, January 2026&lt;/a&gt;, real gross, operating and net margins to compare with&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;For every margin in DAX from a general ledger, by product and customer, read &lt;a href=&quot;/blog/profit-margin-kpis/&quot;&gt;profit margins: gross, operating, net and EBITDA in DAX&lt;/a&gt;. &lt;a href=&quot;https://tools.benibix.com/data/kpi-atlas/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;KPI Atlas&lt;/a&gt; has each margin with its definition, formula and ready-to-copy DAX, SQL and Excel, a benchmark and the mistakes to avoid.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Revenue growth KPI: YoY, MoM and CAGR in DAX</title>
    <link href="https://data.benibix.com/blog/revenue-growth-kpi/"/>
    <id>https://data.benibix.com/blog/revenue-growth-kpi/</id>
    <published>2026-11-12T12:00:00Z</published>
    <updated>2026-11-12T12:00:00Z</updated>
    <summary>How to measure revenue growth, year over year, month over month, year to date against last year, compound annual growth rate, like-for-like growth for stores and products, growth with incomplete periods, the DAX for each, and how to chart it.</summary>
    <category term="KPIs"/>
    <category term="Sales"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;revenue growth %&lt;/strong&gt; = (revenue this period - revenue in the comparison period) / revenue in the comparison period. Compare with the &lt;strong&gt;same period last year&lt;/strong&gt; (YoY) to remove seasonality; use month over month only for fast-moving businesses. For several years, use &lt;strong&gt;CAGR&lt;/strong&gt; = (last / first)^(1 / years) - 1. For retail, report &lt;strong&gt;like-for-like&lt;/strong&gt; growth too: only stores or products that existed in both periods, so openings do not inflate it.&lt;/p&gt;
&lt;p&gt;Growth is the first number a manager looks at, and the easiest to get wrong: a partial month against a full one, new stores counted as growth, or a 200% jump from a tiny base.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quarter&lt;/th&gt;&lt;th&gt;2025&lt;/th&gt;&lt;th&gt;2026&lt;/th&gt;&lt;th&gt;Growth&lt;/th&gt;&lt;th&gt;Growth %&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Q1&lt;/td&gt;&lt;td&gt;1,800&lt;/td&gt;&lt;td&gt;2,016&lt;/td&gt;&lt;td&gt;+216&lt;/td&gt;&lt;td&gt;+12.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Q2&lt;/td&gt;&lt;td&gt;2,100&lt;/td&gt;&lt;td&gt;2,247&lt;/td&gt;&lt;td&gt;+147&lt;/td&gt;&lt;td&gt;+7.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Q3&lt;/td&gt;&lt;td&gt;2,000&lt;/td&gt;&lt;td&gt;2,300&lt;/td&gt;&lt;td&gt;+300&lt;/td&gt;&lt;td&gt;+15.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;YTD Q3&lt;/td&gt;&lt;td&gt;5,900&lt;/td&gt;&lt;td&gt;6,563&lt;/td&gt;&lt;td&gt;+663&lt;/td&gt;&lt;td&gt;+11.2%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Revenue by quarter, this year against last year&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;column&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;column chart: Q1 12; Q2 7; Q3 15&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;182&quot; x2=&quot;628&quot; y2=&quot;182&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;186&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;5&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;98&quot; x2=&quot;628&quot; y2=&quot;98&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;102&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;10&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;628&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;15&lt;/text&gt;&lt;rect x=&quot;82.7&quot; y=&quot;64.4&quot; width=&quot;128.6&quot; height=&quot;201.6&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;148&quot; y=&quot;58.4&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;12&lt;/text&gt;&lt;text x=&quot;148&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q1&lt;/text&gt;&lt;rect x=&quot;274.7&quot; y=&quot;148.4&quot; width=&quot;128.6&quot; height=&quot;117.6&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;340&quot; y=&quot;142.4&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;7&lt;/text&gt;&lt;text x=&quot;340&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q2&lt;/text&gt;&lt;rect x=&quot;466.7&quot; y=&quot;14&quot; width=&quot;128.6&quot; height=&quot;252&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;532&quot; y=&quot;8&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;15&lt;/text&gt;&lt;text x=&quot;532&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q3&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Revenue growth % year over year&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )

Revenue LY = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )

Revenue Growth % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt; )

Revenue PM = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DATEADD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, -&lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, MONTH ) )
Revenue MoM % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Revenue PM]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue PM]&lt;/i&gt; )

Revenue YTD = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DATESYTD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
Revenue YTD LY = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue YTD]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
Revenue YTD Growth % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue YTD]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Revenue YTD LY]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue YTD LY]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;In depth: &lt;a href=&quot;/blog/year-over-year-dax/&quot;&gt;year over year in DAX&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-handle-the-current-incomplete-month&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-handle-the-current-incomplete-month&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you handle the current, incomplete month?&lt;/h2&gt;
&lt;p&gt;October to date (29 days) against all of last October understates growth. Compare like with like by cutting last year at the same day: the two date filters in &lt;code&gt;CALCULATE&lt;/code&gt; apply together.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Last Sale Date = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( Sales ) )

Revenue LY to date =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Cutoff = &lt;i class=&quot;f&quot;&gt;EDATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Last Sale Date]&lt;/i&gt;, -&lt;i class=&quot;n&quot;&gt;12&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; &amp;lt;= Cutoff )

Revenue Growth to date % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Revenue LY to date]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue LY to date]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;A simpler, common approach is a calculated column &lt;code&gt;Date[Is To Date]&lt;/code&gt; that marks dates up to the same day of the year as the last sale date, and a filter on it for both years.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-calculate-cagr&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-calculate-cagr&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you calculate CAGR?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;CAGR =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; FirstYear = &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; LastYear = &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; First = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt; = FirstYear )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Last = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt; = LastYear )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Years = LastYear - FirstYear
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( Years &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;POWER&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( Last, First ), &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; / Years ) - &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;From 5.0M in 2022 to 7.3M in 2026: (7.3 / 5.0)^(1/4) - 1 = &lt;strong&gt;9.9% a year&lt;/strong&gt;. &lt;code&gt;RRI ( Years, First, Last )&lt;/code&gt; returns the same.&lt;/p&gt;
&lt;h2 id=&quot;what-is-like-for-like-growth&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-like-for-like-growth&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is like-for-like growth?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- stores with sales in both periods&lt;/i&gt;
Revenue LFL Growth % =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Stores =
    &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Store&lt;i class=&quot;m&quot;&gt;[Store]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; &amp;amp;&amp;amp; &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Stores, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; ) - &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Stores, &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt; ),
        &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Stores, &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt; )
    )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;If total growth is +11% and like-for-like +4%, most growth came from new stores.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Partial periods.&lt;/strong&gt; Compare to-date with to-date.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Tiny bases.&lt;/strong&gt; +300% from 1,000 is noise; show the amounts next to the percentage.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Price against volume.&lt;/strong&gt; Growth from price increases is not growth in customers; split it with &lt;a href=&quot;/blog/price-volume-mix-analysis/&quot;&gt;price, volume and mix&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Currency effects.&lt;/strong&gt; Growth in reporting currency can hide flat local sales; compare at constant exchange rates.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Averaging growth rates.&lt;/strong&gt; The average of monthly growth % is not the period's growth; divide the totals.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/sameperiodlastyear-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SAMEPERIODLASTYEAR function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/dateadd-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DATEADD function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/rri-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: RRI function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add Revenue LY and Revenue Growth % to your headline card, and a like-for-like version if you open stores or launch products. &lt;a href=&quot;/blog/average-order-value-kpi/&quot;&gt;Average order value&lt;/a&gt; explains part of the growth.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Row-level security in Power BI, explained</title>
    <link href="https://data.benibix.com/blog/row-level-security-power-bi-explained/"/>
    <id>https://data.benibix.com/blog/row-level-security-power-bi-explained/</id>
    <published>2026-11-12T12:00:00Z</published>
    <updated>2026-11-12T12:00:00Z</updated>
    <summary>What row-level security does in Power BI, static and dynamic roles, a security table with USERPRINCIPALNAME, who it applies to, and how to test it.</summary>
    <category term="Power BI"/>
    <category term="Modelling"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;row-level security&lt;/strong&gt; (RLS) limits which rows of a semantic model a person can see. You define &lt;strong&gt;roles&lt;/strong&gt; with DAX filters in Power BI Desktop, publish, and add people or groups to each role in the service. A &lt;strong&gt;dynamic&lt;/strong&gt; role uses &lt;code&gt;USERPRINCIPALNAME()&lt;/code&gt; and a security table, so one role serves everyone. RLS applies to people with the &lt;strong&gt;Viewer&lt;/strong&gt; role on the workspace, or who see the report through an app or a share; workspace Admins, Members and Contributors see all rows.&lt;/p&gt;
&lt;p&gt;One report for every region, each manager seeing only theirs, is the usual goal. The model does the filtering, so every visual, export and Analyze in Excel connection respects it.&lt;/p&gt;
&lt;h2 id=&quot;static-or-dynamic-roles&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#static-or-dynamic-roles&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Static or dynamic roles?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Static&lt;/b&gt;&lt;ul&gt;&lt;li&gt;a role per region, with a fixed filter like Region = &amp;quot;West&amp;quot;&lt;/li&gt;&lt;li&gt;simple, but one role per value&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Dynamic&lt;/b&gt;&lt;ul&gt;&lt;li&gt;one role&lt;/li&gt;&lt;li&gt;a security table maps each sign-in to what it may see&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Two ways to write a role&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-does-a-dynamic-role-filter-the-facts&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-a-dynamic-role-filter-the-facts&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does a dynamic role filter the facts?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Sign-in&lt;/b&gt;&lt;span&gt;anna@contoso.com&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Security table&lt;/b&gt;&lt;span&gt;Anna may see West and North&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Region&lt;/b&gt;&lt;span&gt;filtered to West and North&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Sales&lt;/b&gt;&lt;span&gt;only those regions' rows reach every visual&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One sign-in, filtered down to its rows&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The security table has one row per person and region. Relate it to the Region dimension, and the role filters the security table only:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- Role &amp;quot;By user&amp;quot;, filter on the table UserRegion&lt;/i&gt;
UserRegion&lt;i class=&quot;m&quot;&gt;[Email]&lt;/i&gt; = &lt;i class=&quot;f&quot;&gt;USERPRINCIPALNAME&lt;/i&gt; ()&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The filter flows from UserRegion to Region to Sales. For it to cross from UserRegion to Region, that relationship needs &lt;strong&gt;Apply security filter in both directions&lt;/strong&gt;, or write the filter on Region with a lookup:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- Role &amp;quot;By user&amp;quot;, filter on the table Region&lt;/i&gt;
Region&lt;i class=&quot;m&quot;&gt;[RegionID]&lt;/i&gt; IN
    &lt;i class=&quot;f&quot;&gt;CALCULATETABLE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( UserRegion&lt;i class=&quot;m&quot;&gt;[RegionID]&lt;/i&gt; ), UserRegion&lt;i class=&quot;m&quot;&gt;[Email]&lt;/i&gt; = &lt;i class=&quot;f&quot;&gt;USERPRINCIPALNAME&lt;/i&gt; () )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-do-you-test-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-test-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you test it?&lt;/h2&gt;
&lt;p&gt;In Power BI Desktop, &lt;strong&gt;Modeling &amp;gt; View as&lt;/strong&gt; shows the report as a role, and with &lt;strong&gt;Other user&lt;/strong&gt; as a given email. In the service, &lt;strong&gt;Test as role&lt;/strong&gt; on the semantic model's security page does the same with real sign-ins. Test a person with two regions and a person with none: someone with no row in the security table should see nothing, not everything.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Testing as a workspace member.&lt;/strong&gt; Members see all rows. Test with a Viewer, or with View as.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Totals that leak.&lt;/strong&gt; A measure that removes filters with &lt;code&gt;ALL&lt;/code&gt; still respects RLS, but a &amp;quot;share of total&amp;quot; then means share of what the person may see. Decide which one the report means.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Email case and guests.&lt;/strong&gt; &lt;code&gt;USERPRINCIPALNAME()&lt;/code&gt; returns the sign-in as Entra has it; guest users can look different. Compare emails in lower case.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/security/service-admin-row-level-security&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Row-level security (RLS) with Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/guidance/rls-guidance&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Row-level security (RLS) guidance in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;The open course &lt;a href=&quot;/courses/row-level-security/&quot;&gt;Row-level security that holds&lt;/a&gt; builds a role, one role for everyone, and the tests, in a model of your own.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Star schema in Power BI, explained</title>
    <link href="https://data.benibix.com/blog/star-schema-power-bi-explained/"/>
    <id>https://data.benibix.com/blog/star-schema-power-bi-explained/</id>
    <published>2026-11-12T12:00:00Z</published>
    <updated>2026-11-12T12:00:00Z</updated>
    <summary>What a star schema is, facts and dimensions, why Power BI models work best in one, and how to turn a wide flat table into a star.</summary>
    <category term="Power BI"/>
    <category term="Modelling"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;star schema&lt;/strong&gt; splits data into &lt;strong&gt;fact tables&lt;/strong&gt;, which hold the events you count and sum (sales, orders, visits), and &lt;strong&gt;dimension tables&lt;/strong&gt;, which describe them (date, customer, product). Each dimension connects to the fact with a one-to-many relationship. Power BI is built for this shape: filters flow from dimensions to facts, measures stay short, and the model stays small and fast.&lt;/p&gt;
&lt;p&gt;The most common modelling problem in Power BI is one wide table with everything in it, or a web of tables joined every way. Both work for the first report and fight back from the second.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-star-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-star-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a star look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;star&quot;&gt;&lt;div class=&quot;dfig-star&quot;&gt;&lt;svg viewBox=&quot;0 0 100 100&quot; preserveAspectRatio=&quot;none&quot; aria-hidden=&quot;true&quot;&gt;&lt;line x1=&quot;50&quot; y1=&quot;50&quot; x2=&quot;50.00&quot; y2=&quot;16.67&quot;/&gt;&lt;line x1=&quot;50&quot; y1=&quot;50&quot; x2=&quot;16.67&quot; y2=&quot;50.00&quot;/&gt;&lt;line x1=&quot;50&quot; y1=&quot;50&quot; x2=&quot;83.33&quot; y2=&quot;50.00&quot;/&gt;&lt;line x1=&quot;50&quot; y1=&quot;50&quot; x2=&quot;50.00&quot; y2=&quot;83.33&quot;/&gt;&lt;/svg&gt;&lt;div style=&quot;grid-area:2/2&quot; class=&quot;dfig-node dfig-fact&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Sales&lt;/b&gt;&lt;span&gt;one row per order line: keys and amounts&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;grid-area:1/2&quot; class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Date&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;grid-area:2/1&quot; class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Customer&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;grid-area:2/3&quot; class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Product&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;grid-area:3/2&quot; class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Store&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Sales in a star schema&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Fact table&lt;/b&gt;&lt;ul&gt;&lt;li&gt;many rows, few columns: keys, amounts, quantities&lt;/li&gt;&lt;li&gt;you sum and count it&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Dimension table&lt;/b&gt;&lt;ul&gt;&lt;li&gt;fewer rows, many descriptive columns&lt;/li&gt;&lt;li&gt;you filter and group by it&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Facts and dimensions have different jobs&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Each relationship goes from the dimension's key (one row per customer) to the fact's key (many rows per customer), and filters flow in that direction: pick a region on Customer, and Sales shows only that region's rows.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-get-from-a-flat-table-to-a-star&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-get-from-a-flat-table-to-a-star&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you get from a flat table to a star?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Wide table&lt;/b&gt;&lt;span&gt;order line with customer name, city, product, category&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Pull out each dimension&lt;/b&gt;&lt;span&gt;distinct customers, distinct products, a date table&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Give each a key&lt;/b&gt;&lt;span&gt;and keep only the keys in the fact&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Relate one to many&lt;/b&gt;&lt;span&gt;dimension to fact, single direction&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Splitting one wide extract&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In SQL, building the customer dimension from the extract is a &lt;code&gt;DISTINCT&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;SELECT&lt;/i&gt; DISTINCT CustomerID, CustomerName, City, Region
&lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; stage.OrderLines;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;And measures written against the star stay plain:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )
Revenue Vienna = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, Customer&lt;i class=&quot;m&quot;&gt;[City]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Vienna&amp;quot;&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;why-does-it-matter-so-much&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-does-it-matter-so-much&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why does it matter so much?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Smaller models.&lt;/strong&gt; A city name stored once per customer instead of once per order line compresses far better.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Simpler DAX.&lt;/strong&gt; Filters arrive through relationships, so measures rarely need to fight the model.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Fewer wrong numbers.&lt;/strong&gt; Bidirectional and many-to-many relationships are where totals go strange; a star rarely needs either.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A date table missing.&lt;/strong&gt; Time intelligence needs its own date table with every day, marked as one.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Dimensions related to each other.&lt;/strong&gt; Customer to Store to Region chains (a snowflake) work, but flatten them into one dimension when you can.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Two-way filters as a habit.&lt;/strong&gt; Turn on both directions only for a reason you can name.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/guidance/star-schema&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Understand star schema and the importance for Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-relationships-understand&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Model relationships in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;The open course &lt;a href=&quot;/courses/dax-measures-that-add-up/&quot;&gt;DAX measures that add up&lt;/a&gt; works on a star like this one, and &lt;a href=&quot;/blog/calculation-groups-power-bi-time-intelligence/&quot;&gt;Every KPI once&lt;/a&gt; builds the measures on top of it.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Three Codex habits that make SQL changes safe</title>
    <link href="https://data.benibix.com/blog/codex-habits-for-sql-changes/"/>
    <id>https://data.benibix.com/blog/codex-habits-for-sql-changes/</id>
    <published>2026-11-12T09:00:00Z</published>
    <updated>2026-11-12T09:00:00Z</updated>
    <summary>OpenAI's own advice for Codex comes down to three habits: save a Git checkpoint, say what done looks like, and review before you keep anything. What each one means when the change is a query, a view or a pipeline step.</summary>
    <category term="AI"/>
    <category term="Codex"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;save a Git checkpoint&lt;/strong&gt; before Codex starts, so any change can be undone. &lt;strong&gt;Say what done looks like&lt;/strong&gt; in a way Codex can check: &amp;quot;done when the reconciliation query returns the same monthly totals as before&amp;quot;. &lt;strong&gt;Run &lt;code&gt;/review&lt;/code&gt;&lt;/strong&gt; and read the changes before you keep them. For SQL, the second habit matters most: a query that runs is not a query that is right.&lt;/p&gt;
&lt;p&gt;Agents are good at making code that runs. They cannot know that revenue for March must still be 412,880 unless you tell them. The &amp;quot;done&amp;quot; line turns your knowledge into a check the agent can run itself.&lt;/p&gt;
&lt;h2 id=&quot;what-does-each-habit-look-like-for-sql&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-each-habit-look-like-for-sql&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does each habit look like for SQL?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Checkpoint&lt;/b&gt;&lt;ul&gt;&lt;li&gt;git commit before the task&lt;/li&gt;&lt;li&gt;one task per commit&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Done when&lt;/b&gt;&lt;span&gt;&amp;quot;the totals query returns the same 12 monthly numbers as before, and the new column has no blanks&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Review&lt;/b&gt;&lt;span&gt;/review, then read every changed join and filter yourself&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Three habits, applied to a query change&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-write-a-good-done-when&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-write-a-good-done-when&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you write a good &amp;quot;done when&amp;quot;?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Weak&lt;/th&gt;&lt;th&gt;Strong&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&amp;quot;Make it faster&amp;quot;&lt;/td&gt;&lt;td&gt;&amp;quot;Done when it runs under 10 s on the test database and the result has the same 1,284 rows&amp;quot;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;quot;Fix the revenue view&amp;quot;&lt;/td&gt;&lt;td&gt;&amp;quot;Done when March revenue equals the finance figure of 412,880&amp;quot;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;quot;Add the region column&amp;quot;&lt;/td&gt;&lt;td&gt;&amp;quot;Done when every row has a region and the monthly totals are unchanged&amp;quot;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;The numbers here are made up. Use a figure you trust, from finance or a past run.&lt;/p&gt;
&lt;h2 id=&quot;what-does-permissions-add&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-permissions-add&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does /permissions add?&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;/permissions&lt;/code&gt; sets what Codex may do without asking. For SQL work, let it run your tests and the read-only checks freely, and keep it asking before anything that writes to a database.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.chatgpt.com/guides/best-practices&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Codex docs: Best practices&lt;/a&gt;, the parts of a prompt and reviewing work&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.chatgpt.com/docs/codex/cli&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Codex docs: Codex CLI&lt;/a&gt;, Git checkpoints and &lt;code&gt;/review&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Try it on a first task with &lt;a href=&quot;/blog/first-codex-task-on-a-data-repo/&quot;&gt;your first Codex task on a data repository&lt;/a&gt;. For checks you run before any query, see &lt;a href=&quot;/blog/claude-code-skill-that-checks-sql/&quot;&gt;a skill that checks SQL&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Write a custom SQL reviewer agent for Claude Code</title>
    <link href="https://data.benibix.com/blog/custom-sql-reviewer-agent/"/>
    <id>https://data.benibix.com/blog/custom-sql-reviewer-agent/</id>
    <published>2026-11-12T01:00:00Z</published>
    <updated>2026-11-12T01:00:00Z</updated>
    <summary>Claude Code has built-in agents for exploring and planning. A custom agent adds a reviewer that reads your SQL changes in its own context, with read-only tools, and answers in a fixed format. The file, the fields, and how to call it.</summary>
    <category term="AI"/>
    <category term="Claude Code"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; create &lt;code&gt;.claude/agents/sql-reviewer.md&lt;/code&gt; with a &lt;code&gt;name&lt;/code&gt;, a &lt;code&gt;description&lt;/code&gt; that says when to use it, a &lt;code&gt;tools&lt;/code&gt; line limited to reading (&lt;code&gt;Read, Grep, Glob&lt;/code&gt;), and the review instructions below. Call it by typing &lt;strong&gt;&lt;code&gt;@&lt;/code&gt;&lt;/strong&gt; and picking it, or let Claude hand it the job when you ask for a review. It works in &lt;strong&gt;its own context window&lt;/strong&gt;, so a long review does not crowd your main conversation.&lt;/p&gt;
&lt;p&gt;Claude Code already has three built-in agents: &lt;strong&gt;Explore&lt;/strong&gt; (searches code, read-only), &lt;strong&gt;Plan&lt;/strong&gt; (researches for plan mode) and &lt;strong&gt;general-purpose&lt;/strong&gt;. None of them knows your team's rules for SQL. A custom agent does, and it reviews the same way every time.&lt;/p&gt;
&lt;h2 id=&quot;how-is-an-agent-different-from-a-skill&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-an-agent-different-from-a-skill&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is an agent different from a skill?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;|&lt;/th&gt;&lt;th&gt;Skill&lt;/th&gt;&lt;th&gt;Agent&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Where it runs&lt;/td&gt;&lt;td&gt;In your main conversation&lt;/td&gt;&lt;td&gt;In its own context window&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Tools&lt;/td&gt;&lt;td&gt;Whatever the session has&lt;/td&gt;&lt;td&gt;Only the ones you list&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Good for&lt;/td&gt;&lt;td&gt;A checklist on one query&lt;/td&gt;&lt;td&gt;Reviewing many changed files&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Called by&lt;/td&gt;&lt;td&gt;/name, or a matching request&lt;/td&gt;&lt;td&gt;@name, or a matching request&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Skill or agent for a SQL review?&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-does-the-agent-file-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-the-agent-file-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does the agent file look like?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot;&gt;&lt;code&gt;---
name: sql-reviewer
description: Use after SQL files change, to review them before commit. Read-only.
tools: Read, Grep, Glob
---
You review SQL changes in this repository.
For each changed .sql file:
- Check joins for keys that are not unique (rows that repeat).
- Check date filters and NULL handling.
- Flag UPDATE or DELETE without WHERE.
- Compare column names with the files in schema/.
Answer as a table: file, line, problem, suggested fix.
If everything is fine, say so in one line.&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Because the tools are read-only, the reviewer can never &amp;quot;fix&amp;quot; a file on its own; it reports, and you decide.&lt;/p&gt;
&lt;h2 id=&quot;when-do-you-call-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-do-you-call-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When do you call it?&lt;/h2&gt;
&lt;p&gt;After a change and before the commit: &amp;quot;@sql-reviewer review the SQL I changed today&amp;quot;. On a big pull request, it reads every file in its own context and returns one table.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/sub-agents&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Subagents&lt;/a&gt;, built-in agents, file locations, fields and @-mentions&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;For a lighter check on one query, see &lt;a href=&quot;/blog/claude-code-skill-that-checks-sql/&quot;&gt;a skill that checks SQL&lt;/a&gt;. For a searching agent, see &lt;a href=&quot;/blog/claude-code-subagents-for-big-schemas/&quot;&gt;subagents for big schemas&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>AZ-900, DP-900 or AI-901: which fundamentals exam first?</title>
    <link href="https://data.benibix.com/blog/which-fundamentals-exam-first/"/>
    <id>https://data.benibix.com/blog/which-fundamentals-exam-first/</id>
    <published>2026-11-11T12:00:00Z</published>
    <updated>2026-11-11T12:00:00Z</updated>
    <summary>The three Microsoft fundamentals exams that matter for data and AI work compared side by side, what each covers, who each suits, and whether you need any of them before an associate exam.</summary>
    <category term="Exams"/>
    <category term="Choosing an exam"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; take the one that matches the work you are moving into: &lt;strong&gt;AZ-900&lt;/strong&gt; for Azure in general, &lt;strong&gt;DP-900&lt;/strong&gt; for data (databases, lakes, analytics, Power BI), &lt;strong&gt;AI-901&lt;/strong&gt; for AI apps in Microsoft Foundry. All three are 45-minute exams, need 700 out of 1,000, and never expire. None is required for any associate exam, so if you already work in the field, skip straight to the associate.&lt;/p&gt;
&lt;h2 id=&quot;how-do-the-three-compare&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-the-three-compare&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do the three compare?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;AZ-900&lt;/th&gt;&lt;th&gt;DP-900&lt;/th&gt;&lt;th&gt;AI-901&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Certification&lt;/td&gt;&lt;td&gt;Azure Fundamentals&lt;/td&gt;&lt;td&gt;Azure Data Fundamentals&lt;/td&gt;&lt;td&gt;Azure AI Fundamentals&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Largest area&lt;/td&gt;&lt;td&gt;Azure architecture and services (35-40%)&lt;/td&gt;&lt;td&gt;core data concepts and analytics (25-30% each)&lt;/td&gt;&lt;td&gt;implementing AI in Foundry (55-60%)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Hands-on?&lt;/td&gt;&lt;td&gt;describe&lt;/td&gt;&lt;td&gt;describe&lt;/td&gt;&lt;td&gt;describe and build&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Good before&lt;/td&gt;&lt;td&gt;AZ-104&lt;/td&gt;&lt;td&gt;PL-300, DP-600, DP-700, DP-300&lt;/td&gt;&lt;td&gt;AI-103, AI-200&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Expires&lt;/td&gt;&lt;td&gt;never&lt;/td&gt;&lt;td&gt;never&lt;/td&gt;&lt;td&gt;never&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Three fundamentals exams&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;who-should-take-which&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#who-should-take-which&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Who should take which?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;AZ-900&lt;/b&gt;&lt;span&gt;new to cloud, or working beside Azure teams: subscriptions, regions, security and costs&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;DP-900&lt;/b&gt;&lt;span&gt;moving into data: SQL, Cosmos DB, lakes, Fabric, Databricks, Power BI&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;AI-901&lt;/b&gt;&lt;span&gt;moving into AI apps: prompts, models, agents, vision and extraction&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Pick by where you are going&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;AI-901 is the most practical of the three: more than half of it is building in Foundry. AI-900, the older AI fundamentals exam, retired on 30 June 2026; AI-901 leads to the same certification.&lt;/p&gt;
&lt;h2 id=&quot;when-should-you-skip-fundamentals&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-should-you-skip-fundamentals&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When should you skip fundamentals?&lt;/h2&gt;
&lt;p&gt;If you already build in the area, an associate exam proves more for the same effort. A Power BI developer gains more from &lt;a href=&quot;/blog/pl-300-study-guide/&quot;&gt;PL-300&lt;/a&gt; than from DP-900, and an Azure admin more from &lt;a href=&quot;/blog/az-104-study-guide/&quot;&gt;AZ-104&lt;/a&gt; than from AZ-900.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-same-on-all-three&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-same-on-all-three&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the same on all three?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;No Microsoft Learn access during the exam (it is only on associate and expert exams).&lt;/li&gt;&lt;li&gt;No penalty for wrong answers, so answer everything.&lt;/li&gt;&lt;li&gt;A free practice assessment for each on Microsoft Learn.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/az-900&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam AZ-900&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/dp-900&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam DP-900&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/ai-901&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam AI-901&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/support/exam-duration-exam-experience&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Exam duration and exam experience&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Read the guide for your pick: &lt;a href=&quot;/blog/az-900-study-guide/&quot;&gt;AZ-900&lt;/a&gt;, &lt;a href=&quot;/blog/dp-900-study-guide/&quot;&gt;DP-900&lt;/a&gt; or &lt;a href=&quot;/blog/ai-901-study-guide/&quot;&gt;AI-901&lt;/a&gt;. &lt;a href=&quot;/blog/microsoft-data-certification-path/&quot;&gt;Microsoft data certifications by role&lt;/a&gt; shows what comes after.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>TREATAS in DAX: virtual relationships and filter tables</title>
    <link href="https://data.benibix.com/blog/treatas-dax/"/>
    <id>https://data.benibix.com/blog/treatas-dax/</id>
    <published>2026-11-11T12:00:00Z</published>
    <updated>2026-11-11T12:00:00Z</updated>
    <summary>How TREATAS applies the values of one table as a filter on columns of another in DAX, budgets at month and category grain, disconnected slicer tables, multi-column filters, fixed lists of values, why it beats FILTER with IN, and when a real relationship is better.</summary>
    <category term="DAX"/>
    <category term="Table functions"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;code&gt;TREATAS ( table, column1 [, column2, ...] )&lt;/code&gt; takes the rows of a table and applies them as a &lt;strong&gt;filter on the columns you name&lt;/strong&gt;, as if the values came from those columns. Inside &lt;code&gt;CALCULATE&lt;/code&gt; it creates a &lt;strong&gt;virtual relationship&lt;/strong&gt;: filter a Budget table by the months and categories selected on the Date and Product tables, even though there is no relationship. The number of columns must match, and values that do not exist in the target column are ignored.&lt;/p&gt;
&lt;p&gt;Budgets, targets and forecasts usually sit at a coarser grain (month and category) than sales (day and product). A many-to-many relationship would work, but &lt;code&gt;TREATAS&lt;/code&gt; keeps the model simple and the logic in the measure.&lt;/p&gt;
&lt;h2 id=&quot;how-does-it-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-it-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does it work?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Visual filter&lt;/b&gt;&lt;span&gt;Year 2026, Category Bikes&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;VALUES&lt;/b&gt;&lt;span&gt;the visible months and categories from Date and Product&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;TREATAS&lt;/b&gt;&lt;span&gt;treats them as Budget[Month] and Budget[Category]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Budget&lt;/b&gt;&lt;span&gt;filtered to the same months and category&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;TREATAS passes a filter from Date and Product to Budget&lt;/figcaption&gt;&lt;/figure&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Budget =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Budget&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;TREATAS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; ), Budget&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;TREATAS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; ), Budget&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; )
)

Revenue vs Budget % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Budget]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Budget]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;At day or product level the budget shows the month or category value. Hide it below its grain with &lt;code&gt;IF ( NOT ISINSCOPE ( 'Product'[Product] ), [Budget] )&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-filter-several-columns-at-once&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-filter-several-columns-at-once&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you filter several columns at once?&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;TREATAS&lt;/code&gt; with a multi-column table filters on combinations, not on each column separately:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue of Budgeted Combinations =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;TREATAS&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;SUMMARIZE&lt;/i&gt; ( Budget, Budget&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt;, Budget&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; ),
        &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt;,
        &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt;
    )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Only month and category pairs that exist in Budget filter the sales.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-use-a-fixed-list-or-a-disconnected-slicer&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-use-a-fixed-list-or-a-disconnected-slicer&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you use a fixed list or a disconnected slicer?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- a fixed list&lt;/i&gt;
Main Markets Revenue =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;TREATAS&lt;/i&gt; ( { &lt;i class=&quot;s&quot;&gt;&amp;quot;DE&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;AT&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;CH&amp;quot;&lt;/i&gt; }, Customer&lt;i class=&quot;m&quot;&gt;[Country]&lt;/i&gt; ) )

&lt;i class=&quot;c&quot;&gt;-- a slicer on a disconnected table 'Compare Region'&lt;/i&gt;
Compare Region Revenue =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;TREATAS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Compare Region'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Region]&lt;/i&gt; ), Region&lt;i class=&quot;m&quot;&gt;[Region]&lt;/i&gt; )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The second lets readers pick a comparison region in its own slicer without filtering the rest of the page.&lt;/p&gt;
&lt;h2 id=&quot;why-not-filter-with-in&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-not-filter-with-in&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why not FILTER with IN?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- works, but slower on large columns&lt;/i&gt;
Budget Old =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Budget&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( Budget&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; ), Budget&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; IN &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; ) )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;TREATAS&lt;/code&gt; passes the values directly as a filter, which the engine handles efficiently; &lt;code&gt;FILTER ... IN&lt;/code&gt; iterates the column and tests each value.&lt;/p&gt;
&lt;h2 id=&quot;when-is-a-relationship-better&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-a-relationship-better&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is a relationship better?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Situation&lt;/th&gt;&lt;th&gt;Choice&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;one budget per month and category, used in many measures&lt;/td&gt;&lt;td&gt;a relationship from a Month or Category bridge table, or &lt;code&gt;TREATAS&lt;/code&gt; in one Budget measure&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;several relationships between the same tables&lt;/td&gt;&lt;td&gt;&lt;code&gt;USERELATIONSHIP&lt;/code&gt; (Microsoft's advice in the TREATAS reference)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;an ad hoc filter from a disconnected slicer&lt;/td&gt;&lt;td&gt;&lt;code&gt;TREATAS&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;the grain matches and keys are unique&lt;/td&gt;&lt;td&gt;a normal one-to-many relationship&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Wrong column count.&lt;/strong&gt; The table and the column list must have the same number of columns, in the same order.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Type mismatch.&lt;/strong&gt; A text month &amp;quot;2026-10&amp;quot; does not match a date; values that do not exist are silently ignored, so the result is blank.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Showing the budget below its grain.&lt;/strong&gt; Daily budget values look like the monthly total on each day; hide them.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;DirectQuery.&lt;/strong&gt; Not supported in calculated columns or RLS rules in DirectQuery mode.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/treatas-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: TREATAS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/guidance/relationships-many-to-many&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Many-to-many relationship guidance&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/isinscope-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: ISINSCOPE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Load your budget at month and category grain and write the &lt;code&gt;Budget&lt;/code&gt; measure above. &lt;a href=&quot;/blog/budget-variance-kpi/&quot;&gt;Budget variance&lt;/a&gt; turns it into a KPI.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>What is a heat map? Colour that shows the value</title>
    <link href="https://data.benibix.com/blog/what-is-a-heat-map/"/>
    <id>https://data.benibix.com/blog/what-is-a-heat-map/</id>
    <published>2026-11-11T12:00:00Z</published>
    <updated>2026-11-11T12:00:00Z</updated>
    <summary>A heat map is a grid where colour shows the value, so the pattern in hundreds of numbers jumps out. How to read one, how to make it in Excel with Color Scales and in Power BI with a matrix, and why one colour from light to dark beats red and green.</summary>
    <category term="Visuals"/>
    <category term="Tables"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;heat map&lt;/strong&gt; is a grid of numbers where &lt;strong&gt;colour shows the value&lt;/strong&gt;: the stronger the colour, the bigger the number. You stop reading cells and see the pattern at once. In &lt;strong&gt;Excel&lt;/strong&gt;, select the numbers and use &lt;strong&gt;Conditional Formatting &amp;gt; Color Scales&lt;/strong&gt;. In &lt;strong&gt;Power BI&lt;/strong&gt;, use a &lt;strong&gt;matrix&lt;/strong&gt; and give the values a &lt;strong&gt;background colour&lt;/strong&gt; by gradient. Use &lt;strong&gt;one colour from light to dark&lt;/strong&gt;, not red and green, which many colour blind readers cannot tell apart.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The chart, part by part:&lt;/strong&gt; &lt;a href=&quot;/visuals/heat-map/&quot;&gt;What is a heat map?&lt;/a&gt; draws its parts and shows how to read one, its kinds and the mistakes to avoid.&lt;/p&gt;
&lt;p&gt;Twenty-eight cells of order counts by day and time are hard to read: you compare numbers one pair at a time and still miss the busiest hour. Colour every cell by its value and the busiest hour finds you.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-heat-map-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-heat-map-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a heat map look like?&lt;/h2&gt;
&lt;p&gt;A made-up shop's orders, by day and time of day:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Day&lt;/th&gt;&lt;th&gt;Morning&lt;/th&gt;&lt;th&gt;Lunch&lt;/th&gt;&lt;th&gt;Afternoon&lt;/th&gt;&lt;th&gt;Evening&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Mon&lt;/td&gt;&lt;td&gt;42&lt;/td&gt;&lt;td&gt;88&lt;/td&gt;&lt;td&gt;51&lt;/td&gt;&lt;td&gt;37&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Tue&lt;/td&gt;&lt;td&gt;45&lt;/td&gt;&lt;td&gt;91&lt;/td&gt;&lt;td&gt;49&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Wed&lt;/td&gt;&lt;td&gt;47&lt;/td&gt;&lt;td&gt;95&lt;/td&gt;&lt;td&gt;55&lt;/td&gt;&lt;td&gt;43&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Thu&lt;/td&gt;&lt;td&gt;50&lt;/td&gt;&lt;td&gt;104&lt;/td&gt;&lt;td&gt;58&lt;/td&gt;&lt;td&gt;61&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Fri&lt;/td&gt;&lt;td&gt;53&lt;/td&gt;&lt;td&gt;162&lt;/td&gt;&lt;td&gt;74&lt;/td&gt;&lt;td&gt;96&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sat&lt;/td&gt;&lt;td&gt;70&lt;/td&gt;&lt;td&gt;121&lt;/td&gt;&lt;td&gt;110&lt;/td&gt;&lt;td&gt;88&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sun&lt;/td&gt;&lt;td&gt;64&lt;/td&gt;&lt;td&gt;97&lt;/td&gt;&lt;td&gt;80&lt;/td&gt;&lt;td&gt;45&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Orders by day and time (made-up shop)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;As plain numbers, you have to hunt. As a heat map, Friday lunch (162) is the darkest cell by far, Saturday afternoon is the next hot spot, and every morning stays pale. The pattern was always in the table; colour makes it visible.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-read-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-read-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you read one?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;Find the darkest cells: the biggest values.&lt;/li&gt;&lt;li&gt;Look along rows and down columns for bands: a dark column means one time is busy every day.&lt;/li&gt;&lt;li&gt;Look for the odd cell out: one dark cell in a pale row is worth a question.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;A heat map is for &lt;strong&gt;patterns&lt;/strong&gt;, not exact values. Show the number in each cell as well when people will need it.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-make-one-in-excel&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-make-one-in-excel&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you make one in Excel?&lt;/h2&gt;
&lt;p&gt;Select the numbers (not the headers), then &lt;strong&gt;Home &amp;gt; Conditional Formatting &amp;gt; Color Scales&lt;/strong&gt; and pick a scale. A two-colour scale shades from one colour for the lowest value to another for the highest. Choose one that runs from white or a pale shade to one strong colour.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-make-one-in-power-bi&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-make-one-in-power-bi&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you make one in Power BI?&lt;/h2&gt;
&lt;p&gt;Power BI has no visual called &amp;quot;heat map&amp;quot; for a grid like this; the &lt;strong&gt;matrix&lt;/strong&gt; is the heat map:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Add a &lt;strong&gt;matrix&lt;/strong&gt;: day on Rows, time of day on Columns, the order count in Values.&lt;/li&gt;&lt;li&gt;In the Values well, open the field's menu and choose &lt;strong&gt;Conditional formatting &amp;gt; Background color&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Set &lt;strong&gt;Format style&lt;/strong&gt; to &lt;strong&gt;Gradient&lt;/strong&gt;, with the lowest value pale and the highest dark.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;To show only colour, set the &lt;strong&gt;Font color&lt;/strong&gt; to the same gradient: the numbers blend into the cells.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Mistake&lt;/th&gt;&lt;th&gt;Why it hurts&lt;/th&gt;&lt;th&gt;Fix&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Red to green&lt;/td&gt;&lt;td&gt;The most common colour blindness is red-green, so the scale looks flat&lt;/td&gt;&lt;td&gt;One hue, light to dark&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;A rainbow scale&lt;/td&gt;&lt;td&gt;Readers cannot tell whether yellow is more than green&lt;/td&gt;&lt;td&gt;One hue, or two hues only for above and below a midpoint&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Totals in the grid&lt;/td&gt;&lt;td&gt;The total row gets the darkest colour and washes out the rest&lt;/td&gt;&lt;td&gt;Keep totals out of the coloured range&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Very different row sizes&lt;/td&gt;&lt;td&gt;A big store is dark everywhere, the pattern disappears&lt;/td&gt;&lt;td&gt;Colour a rate or share, not the raw count&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://support.microsoft.com/en-us/office/use-conditional-formatting-to-highlight-information-fed60dfa-1d3f-4e13-9ecb-f1951ff89d7f&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Support: Use conditional formatting to highlight information&lt;/a&gt;, Color Scales in Excel&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Apply conditional table formatting in Power BI&lt;/a&gt;, background colour by gradient&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://www.nei.nih.gov/learn-about-eye-health/eye-conditions-and-diseases/color-blindness&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;National Eye Institute: Color blindness&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;For the colour rules in a Power BI table, see &lt;a href=&quot;/blog/conditional-formatting-power-bi/&quot;&gt;conditional formatting in Power BI&lt;/a&gt;. Not sure a heat map fits your data? Paste it into &lt;a href=&quot;https://tools.benibix.com/data/chart-compass/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Chart Compass&lt;/a&gt;, say what the chart should show, and see the charts that fit, drawn with your own numbers.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>WINDOW in DAX: running totals and moving averages</title>
    <link href="https://data.benibix.com/blog/window-dax/"/>
    <id>https://data.benibix.com/blog/window-dax/</id>
    <published>2026-11-11T12:00:00Z</published>
    <updated>2026-11-11T12:00:00Z</updated>
    <summary>How the WINDOW function returns a range of rows in DAX, absolute and relative positions, running totals, moving averages and first-to-current windows over sorted rows, PARTITIONBY for groups, and how WINDOW compares with DATESINPERIOD and RUNNINGSUM.</summary>
    <category term="DAX"/>
    <category term="Window functions"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;code&gt;WINDOW ( from, from_type, to, to_type, relation, ORDERBY ( ... ) [, PARTITIONBY ( ... )] )&lt;/code&gt; returns a range of rows of a sorted table. &lt;code&gt;from&lt;/code&gt; and &lt;code&gt;to&lt;/code&gt; are &lt;strong&gt;REL&lt;/strong&gt; (relative to the current row: -2 is two rows back) or &lt;strong&gt;ABS&lt;/strong&gt; (position in the partition: 1 is the first row, -1 the last). In &lt;code&gt;CALCULATE&lt;/code&gt; it gives running totals (&lt;code&gt;1, ABS, 0, REL&lt;/code&gt;), moving windows (&lt;code&gt;-2, REL, 0, REL&lt;/code&gt;) and whole-partition totals (&lt;code&gt;1, ABS, -1, ABS&lt;/code&gt;) over any order, dates or not.&lt;/p&gt;
&lt;p&gt;Running totals by date are easy with time intelligence. Running totals over visible rows only, over a sorted code or price, or restarting per group are where &lt;code&gt;WINDOW&lt;/code&gt; helps.&lt;/p&gt;
&lt;h2 id=&quot;which-windows-can-you-express&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-windows-can-you-express&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which windows can you express?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Window&lt;/th&gt;&lt;th&gt;from, from_type&lt;/th&gt;&lt;th&gt;to, to_type&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;running total, first row to current&lt;/td&gt;&lt;td&gt;1, ABS&lt;/td&gt;&lt;td&gt;0, REL&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;last 3 rows including current&lt;/td&gt;&lt;td&gt;-2, REL&lt;/td&gt;&lt;td&gt;0, REL&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;previous 3 rows only&lt;/td&gt;&lt;td&gt;-3, REL&lt;/td&gt;&lt;td&gt;-1, REL&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;whole partition&lt;/td&gt;&lt;td&gt;1, ABS&lt;/td&gt;&lt;td&gt;-1, ABS&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;current to last&lt;/td&gt;&lt;td&gt;0, REL&lt;/td&gt;&lt;td&gt;-1, ABS&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;WINDOW positions&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;code&gt;ABS&lt;/code&gt; counts from 1 (the first row); negative &lt;code&gt;ABS&lt;/code&gt; counts from the end. &lt;code&gt;REL&lt;/code&gt; is the default type.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-write-a-running-total&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-write-a-running-total&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you write a running total?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Running Revenue =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;WINDOW&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, ABS, &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;, REL, &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;ORDERBY&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; ) )
)

&lt;i class=&quot;c&quot;&gt;-- restarts each year&lt;/i&gt;
Running Revenue in Year =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;WINDOW&lt;/i&gt; (
        &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, ABS, &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;, REL,
        &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month Number]&lt;/i&gt; ),
        &lt;i class=&quot;f&quot;&gt;ORDERBY&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month Number]&lt;/i&gt; ),
        &lt;i class=&quot;f&quot;&gt;PARTITIONBY&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt; )
    )
)

&lt;i class=&quot;c&quot;&gt;-- 3-row moving average of monthly revenue&lt;/i&gt;
Revenue &lt;i class=&quot;n&quot;&gt;3&lt;/i&gt; Month Avg =
&lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;WINDOW&lt;/i&gt; ( -&lt;i class=&quot;n&quot;&gt;2&lt;/i&gt;, REL, &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;, REL, &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;ORDERBY&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; ) ),
    &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-do-you-build-a-pareto-curve&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-a-pareto-curve&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build a Pareto curve?&lt;/h2&gt;
&lt;p&gt;A Pareto curve sorts customers by revenue and shows the cumulative share. Window functions match the current row through the columns of the relation, so they are at their best with column orders. For an order by a measure, the dependable model measure is the classic &lt;code&gt;FILTER&lt;/code&gt; pattern, and on one visual the &lt;a href=&quot;/blog/visual-calculations-power-bi/&quot;&gt;visual calculation&lt;/a&gt; &lt;code&gt;RUNNINGSUM ( [Revenue] )&lt;/code&gt; on a table sorted by revenue does it directly:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Cumulative Revenue by Rank =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; R = &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; &amp;gt;= R ) )

Cumulative Share =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Cumulative Revenue by Rank]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ) ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;line&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;line chart: 10% 52; 20% 68; 30% 78; 40% 85; 50% 90; 60% 93; 70% 96; 80% 98; 90% 99; 100% 100&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;626&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;20&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;626&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;40&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;626&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;60&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;626&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;80&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;626&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;polyline points=&quot;52,135 115.8,94.6 179.6,69.4 243.3,51.8 307.1,39.2 370.9,31.6 434.7,24.1 498.4,19 562.2,16.5 626,14&quot; class=&quot;ln ka&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;135&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;115.8&quot; cy=&quot;94.6&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;179.6&quot; cy=&quot;69.4&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;243.3&quot; cy=&quot;51.8&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;307.1&quot; cy=&quot;39.2&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;370.9&quot; cy=&quot;31.6&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;434.7&quot; cy=&quot;24.1&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;498.4&quot; cy=&quot;19&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;562.2&quot; cy=&quot;16.5&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;14&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;text x=&quot;52&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;10%&lt;/text&gt;&lt;text x=&quot;115.8&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;20%&lt;/text&gt;&lt;text x=&quot;179.6&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;30%&lt;/text&gt;&lt;text x=&quot;243.3&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;40%&lt;/text&gt;&lt;text x=&quot;307.1&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;50%&lt;/text&gt;&lt;text x=&quot;370.9&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;60%&lt;/text&gt;&lt;text x=&quot;434.7&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;70%&lt;/text&gt;&lt;text x=&quot;498.4&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;80%&lt;/text&gt;&lt;text x=&quot;562.2&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;90%&lt;/text&gt;&lt;text x=&quot;626&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;100%&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Cumulative share of revenue by top share of customers (%)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Read it as &amp;quot;the top 20% of customers bring 68% of revenue&amp;quot;. For the x-axis as a share, divide each customer's rank by the customer count. Customers with equal revenue share a point, as with ties in a rank.&lt;/p&gt;
&lt;h2 id=&quot;window-datesinperiod-or-runningsum&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#window-datesinperiod-or-runningsum&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;WINDOW, DATESINPERIOD or RUNNINGSUM?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Use&lt;/th&gt;&lt;th&gt;When&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;DATESINPERIOD&lt;/code&gt;, &lt;code&gt;DATESYTD&lt;/code&gt;&lt;/td&gt;&lt;td&gt;calendar windows: the last 12 months, even if months are hidden&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;WINDOW&lt;/code&gt;&lt;/td&gt;&lt;td&gt;windows over rows: visible months only, or a non-date order such as rank&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;RUNNINGSUM&lt;/code&gt;, &lt;code&gt;MOVINGAVERAGE&lt;/code&gt;&lt;/td&gt;&lt;td&gt;the same on one visual, as &lt;a href=&quot;/blog/visual-calculations-power-bi/&quot;&gt;visual calculations&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Ties in ORDERBY.&lt;/strong&gt; Equal sort values make the order ambiguous, and running totals jump; add a tie-breaker column.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Visual sorted differently.&lt;/strong&gt; The window follows ORDERBY, not the visual's sort; a running total in a table sorted by name looks random.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Relation and visual columns differ.&lt;/strong&gt; Include every grouping column of the visual in the relation.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Large relations.&lt;/strong&gt; Each cell evaluates the window over the whole relation; keep relations to the columns you need.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/window-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: WINDOW function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/partitionby-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: PARTITIONBY function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/runningsum-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: RUNNINGSUM function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add &lt;code&gt;Running Revenue in Year&lt;/code&gt; to a monthly table, then build the Pareto curve for your customers; it is one of the most useful charts in sales analysis. &lt;a href=&quot;/blog/index-rank-rownumber-dax/&quot;&gt;INDEX, RANK and ROWNUMBER&lt;/a&gt; pick single positions in the same kind of table.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Share one Claude Code setup across a data team with plugins</title>
    <link href="https://data.benibix.com/blog/claude-code-plugins-for-data-teams/"/>
    <id>https://data.benibix.com/blog/claude-code-plugins-for-data-teams/</id>
    <published>2026-11-11T09:00:00Z</published>
    <updated>2026-11-11T09:00:00Z</updated>
    <summary>A Claude Code plugin bundles skills, agents, hooks and MCP servers into one install. For a data team that means one SQL checker, one DAX style and one database connection for everyone. How to package it, share it and keep it up to date.</summary>
    <category term="AI"/>
    <category term="Claude Code"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; put your team's Claude Code pieces into &lt;strong&gt;one plugin&lt;/strong&gt;: the SQL check skill, the DAX conventions skill, the reviewer agent, a hook that runs the totals check, and the MCP server for the reporting database. List it in a &lt;strong&gt;marketplace&lt;/strong&gt;, a Git repository with &lt;code&gt;.claude-plugin/marketplace.json&lt;/code&gt; (a &lt;code&gt;name&lt;/code&gt;, an &lt;code&gt;owner&lt;/code&gt; and a &lt;code&gt;plugins&lt;/code&gt; array). Teammates run &lt;code&gt;claude plugin marketplace add &amp;lt;owner&amp;gt;/&amp;lt;repo&amp;gt;&lt;/code&gt; once, then &lt;code&gt;claude plugin install &amp;lt;plugin&amp;gt;@&amp;lt;marketplace&amp;gt;&lt;/code&gt;, and get every update you publish.&lt;/p&gt;
&lt;p&gt;Copying skills into every project works for one analyst. For ten, the copies drift: someone has the old SQL checklist, someone else a different DAX style. A plugin is the single, versioned copy everyone installs.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-in-a-data-team-plugin&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-in-a-data-team-plugin&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes in a data team plugin?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;layers&quot;&gt;&lt;ol class=&quot;dfig-stack&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Skills&lt;/b&gt;&lt;span&gt;sql-check, dax-conventions, profile-a-csv&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Agents&lt;/b&gt;&lt;span&gt;sql-reviewer, schema-scout (read-only)&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Hooks&lt;/b&gt;&lt;span&gt;run the totals check before a commit&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;bronze&quot;&gt;&lt;b&gt;MCP server&lt;/b&gt;&lt;span&gt;the read-only reporting database&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;A data team plugin&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-share-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-share-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you share it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Marketplace repo&lt;/b&gt;&lt;span&gt;.claude-plugin/marketplace.json lists the plugin; can be private&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Validate&lt;/b&gt;&lt;span&gt;claude plugin validate checks the JSON and each entry&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Teammates add it&lt;/b&gt;&lt;span&gt;claude plugin marketplace add owner/repo&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Install&lt;/b&gt;&lt;span&gt;claude plugin install name@marketplace&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From your repo to every teammate&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Organizations can go further and require a marketplace and its plugins on every machine; Anthropic's docs cover that under managing plugins for your organization.&lt;/p&gt;
&lt;h2 id=&quot;what-should-you-watch-out-for&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-should-you-watch-out-for&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What should you watch out for?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;No secrets in the plugin.&lt;/strong&gt; Database passwords come from each person's environment, not the repository.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Read-only by default.&lt;/strong&gt; Agents and MCP servers in a shared plugin should not write anywhere.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Version notes.&lt;/strong&gt; Say what changed, so people know why the checker suddenly flags a join.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/plugins&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Plugins&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/plugin-marketplaces&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Plugin marketplaces&lt;/a&gt;, marketplace.json, validate and adding a marketplace&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Build the pieces first: &lt;a href=&quot;/blog/claude-code-skill-that-checks-sql/&quot;&gt;a skill that checks SQL&lt;/a&gt;, &lt;a href=&quot;/blog/claude-skill-for-dax-conventions/&quot;&gt;a skill for DAX conventions&lt;/a&gt; and &lt;a href=&quot;/blog/custom-sql-reviewer-agent/&quot;&gt;a custom SQL reviewer agent&lt;/a&gt;. &lt;a href=&quot;https://tools.benibix.com/coding-agents/claude-code/config-studio/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Config Studio for Claude Code&lt;/a&gt; writes the settings for each piece.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Plan a Power BI data model on a whiteboard first</title>
    <link href="https://data.benibix.com/blog/plan-a-data-model-on-a-whiteboard/"/>
    <id>https://data.benibix.com/blog/plan-a-data-model-on-a-whiteboard/</id>
    <published>2026-11-11T02:00:00Z</published>
    <updated>2026-11-11T02:00:00Z</updated>
    <summary>Claude Whiteboards turns a messy plan into a board your team can move around. The same habit works for a data model: draw the facts, the dimensions and the relationships before anyone opens Power BI. What to put on the board and what to agree.</summary>
    <category term="Power BI"/>
    <category term="Modelling"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; before building, draw the model on a whiteboard (a real one, or &lt;strong&gt;Claude Whiteboards&lt;/strong&gt;, in beta on paid Claude plans since 10 November 2026). Put the &lt;strong&gt;fact tables&lt;/strong&gt; in the middle with their &lt;strong&gt;grain&lt;/strong&gt; (&amp;quot;one row per order line&amp;quot;), the &lt;strong&gt;dimensions&lt;/strong&gt; around them (date, customer, product, store), and a line for each &lt;strong&gt;relationship&lt;/strong&gt; with its key. Agree on that picture with the people who know the business, then build it in Power BI as a star schema.&lt;/p&gt;
&lt;p&gt;Most data model problems are decided before the first table is loaded: a fact table at the wrong grain, two date columns nobody planned for, a customer table that mixes people and companies. A board with ten boxes catches them while they are cheap to fix.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-on-the-board&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-on-the-board&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes on the board?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;star&quot;&gt;&lt;div class=&quot;dfig-star&quot;&gt;&lt;svg viewBox=&quot;0 0 100 100&quot; preserveAspectRatio=&quot;none&quot; aria-hidden=&quot;true&quot;&gt;&lt;line x1=&quot;50&quot; y1=&quot;50&quot; x2=&quot;50.00&quot; y2=&quot;16.67&quot;/&gt;&lt;line x1=&quot;50&quot; y1=&quot;50&quot; x2=&quot;16.67&quot; y2=&quot;50.00&quot;/&gt;&lt;line x1=&quot;50&quot; y1=&quot;50&quot; x2=&quot;83.33&quot; y2=&quot;50.00&quot;/&gt;&lt;line x1=&quot;50&quot; y1=&quot;50&quot; x2=&quot;50.00&quot; y2=&quot;83.33&quot;/&gt;&lt;line x1=&quot;50&quot; y1=&quot;50&quot; x2=&quot;16.67&quot; y2=&quot;16.67&quot;/&gt;&lt;/svg&gt;&lt;div style=&quot;grid-area:2/2&quot; class=&quot;dfig-node dfig-fact&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Sales&lt;/b&gt;&lt;span&gt;fact: one row per order line&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;grid-area:1/2&quot; class=&quot;dfig-node&quot;&gt;&lt;b&gt;Date&lt;/b&gt;&lt;span&gt;one row per day&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;grid-area:2/1&quot; class=&quot;dfig-node&quot;&gt;&lt;b&gt;Customer&lt;/b&gt;&lt;span&gt;key CustomerID&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;grid-area:2/3&quot; class=&quot;dfig-node&quot;&gt;&lt;b&gt;Product&lt;/b&gt;&lt;span&gt;key ProductID&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;grid-area:3/2&quot; class=&quot;dfig-node&quot;&gt;&lt;b&gt;Store&lt;/b&gt;&lt;span&gt;key StoreID&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;grid-area:1/1&quot; class=&quot;dfig-node&quot;&gt;&lt;b&gt;Promotion&lt;/b&gt;&lt;span&gt;optional on a sale&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;A sales model, drawn before it is built&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-should-the-team-agree-on&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-should-the-team-agree-on&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What should the team agree on?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Question&lt;/th&gt;&lt;th&gt;Why it matters&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;What is one row of each fact?&lt;/td&gt;&lt;td&gt;The grain decides which questions the model can answer&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Which dates do we report on?&lt;/td&gt;&lt;td&gt;Order, ship and invoice dates give different totals&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Is a customer a person or a company?&lt;/td&gt;&lt;td&gt;Mixing them double counts&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Which numbers must match finance?&lt;/td&gt;&lt;td&gt;They become the reconciliation checks&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-does-claude-whiteboards-help&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-claude-whiteboards-help&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does Claude Whiteboards help?&lt;/h2&gt;
&lt;p&gt;Paste the meeting notes and ask Claude to lay them out as boxes: facts in one group, dimensions in another, open questions as sticky notes. Drag a box around one area and ask about only that part, for example &amp;quot;which of these could be one dimension?&amp;quot;. When the board is agreed, Claude can turn it into a doc for the project, or it moves to Lucid, Miro or Vani by Zoho.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://claude.com/resources/articles/sheets-whiteboards-data&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude: Introducing Claude Whiteboards, Claude Sheets, and Claude Data&lt;/a&gt;, 10 November 2026&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/guidance/star-schema&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Understand star schema and the importance for Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Build the board as a model with &lt;a href=&quot;/blog/star-schema-power-bi-explained/&quot;&gt;the star schema in Power BI&lt;/a&gt;, and plan the report on top of it with &lt;a href=&quot;/blog/wireframe-a-power-bi-report/&quot;&gt;wireframe a Power BI report&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>A CLAUDE.md for a data repository: what to put in it</title>
    <link href="https://data.benibix.com/blog/claude-md-for-a-data-repo/"/>
    <id>https://data.benibix.com/blog/claude-md-for-a-data-repo/</id>
    <published>2026-11-11T01:00:00Z</published>
    <updated>2026-11-11T01:00:00Z</updated>
    <summary>After installing Claude Code, /init writes a CLAUDE.md that Claude reads every session. For a data project, five things make it useful: where the data lives, how to run and test, the naming rules, what never to touch, and the numbers that must match.</summary>
    <category term="AI"/>
    <category term="Claude Code"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; run &lt;strong&gt;&lt;code&gt;/init&lt;/code&gt;&lt;/strong&gt; and Claude writes a &lt;code&gt;CLAUDE.md&lt;/code&gt; it reads at the start of every session. For a data repository, edit it to cover five things: &lt;strong&gt;where the data and schemas live&lt;/strong&gt;, &lt;strong&gt;how to run and test&lt;/strong&gt; (the exact commands), &lt;strong&gt;naming rules&lt;/strong&gt;, &lt;strong&gt;what never to touch&lt;/strong&gt; (production connections, raw data folders), and &lt;strong&gt;reconciliation numbers&lt;/strong&gt; that must still match after a change. Keep it short; move long details into separate files.&lt;/p&gt;
&lt;p&gt;Without notes, every session starts by rediscovering your project: which folder holds the views, which script runs the tests, why there are two date tables. A CLAUDE.md answers that once.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-in-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-in-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes in it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:4&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Map&lt;/b&gt;&lt;span&gt;schema/ holds the DDL, sql/ the views, pbi/ the Power BI project, data/ samples only&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Run and test&lt;/b&gt;&lt;span&gt;the commands: python -m pytest, sqlcmd -i tests/reconcile.sql&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Rules&lt;/b&gt;&lt;span&gt;naming, DIVIDE in DAX, no SELECT * in views&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Never&lt;/b&gt;&lt;span&gt;no writes to prod, no files in raw/, no secrets in code&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Must match&lt;/b&gt;&lt;span&gt;the reconciled totals from finance that no change may move&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Five sections of a data CLAUDE.md&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-does-a-short-one-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-short-one-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a short one look like?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot;&gt;&lt;code&gt;# Sales analytics repo

### Map
- schema/: table definitions (read these before writing SQL)
- sql/views/: reporting views, one file per view
- pbi/Sales.SemanticModel/: the Power BI project (PBIP)

### Run and test
- Tests: python -m pytest tests/
- Totals check: sqlcmd -S test-db -i tests/reconcile.sql

### Rules
- Views: no SELECT *, explicit column lists, comment the grain on line 1.
- DAX: DIVIDE for division, VAR for repeated expressions.

### Never
- Never connect to prod-db. Never edit files in raw/.

### Must still match after any change
- 2025 revenue 4,812,300 and 61,904 orders (finance, Jan 2026).&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The figures are made up; use your own reconciled numbers.&lt;/p&gt;
&lt;h2 id=&quot;what-comes-after-the-claude-md&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-comes-after-the-claude-md&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What comes after the CLAUDE.md?&lt;/h2&gt;
&lt;p&gt;Two more settings finish the setup: &lt;strong&gt;permissions&lt;/strong&gt; (&lt;code&gt;/permissions&lt;/code&gt;) for the commands you trust, like the test command, so Claude stops asking for them; and &lt;strong&gt;hooks&lt;/strong&gt; for rules that must never be skipped, such as running the totals check before every commit. Allow specific commands rather than skipping permissions altogether.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/memory&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Memory&lt;/a&gt;, &lt;code&gt;/init&lt;/code&gt; and what goes in CLAUDE.md&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/permission-modes&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Permission modes&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/hooks&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Hooks&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Put your conventions in a skill when they grow, with &lt;a href=&quot;/blog/claude-skill-for-dax-conventions/&quot;&gt;a skill for DAX conventions&lt;/a&gt;, and keep your Power BI files readable for Claude with &lt;a href=&quot;/blog/version-control-power-bi-pbip/&quot;&gt;version control with PBIP&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Claude Sheets or Excel: which one for a data job?</title>
    <link href="https://data.benibix.com/blog/claude-sheets-vs-excel/"/>
    <id>https://data.benibix.com/blog/claude-sheets-vs-excel/</id>
    <published>2026-11-10T23:00:00Z</published>
    <updated>2026-11-10T23:00:00Z</updated>
    <summary>Claude Sheets builds a spreadsheet from a sentence, with real formulas and drop-downs, and exports to Excel or CSV. Anthropic says the features are simple for now. Which spreadsheet jobs it fits, which stay in Excel, and how to hand over.</summary>
    <category term="AI"/>
    <category term="Claude apps"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;Claude Sheets&lt;/strong&gt; (beta on all paid Claude plans since &lt;strong&gt;10 November 2026&lt;/strong&gt;) is good for &lt;strong&gt;starting&lt;/strong&gt; a sheet: a tracker, a small budget, a list with a status drop-down, built from one sentence with &lt;strong&gt;real formulas&lt;/strong&gt; you can read. &lt;strong&gt;Excel&lt;/strong&gt; stays the tool for &lt;strong&gt;pivot tables, macros, Power Query and models with many linked sheets&lt;/strong&gt;; Anthropic itself says Sheets' features are simple for now. Build the first version in Sheets, export to &lt;strong&gt;.xlsx or CSV&lt;/strong&gt;, and carry on in Excel when it grows.&lt;/p&gt;
&lt;p&gt;The slow part of a new spreadsheet is rarely the maths. It is setting up the tabs, the columns, the formats and the drop-downs. That is the part Claude Sheets does from a sentence.&lt;/p&gt;
&lt;h2 id=&quot;which-job-fits-which-tool&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-job-fits-which-tool&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which job fits which tool?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Job&lt;/th&gt;&lt;th&gt;Claude Sheets&lt;/th&gt;&lt;th&gt;Excel&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;A tracker with a status drop-down&lt;/td&gt;&lt;td&gt;Yes: built from one sentence&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;A small budget with totals and rates&lt;/td&gt;&lt;td&gt;Yes: formulas you can read&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;A pivot table over 50,000 rows&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Cleaning a messy import&lt;/td&gt;&lt;td&gt;Ask Claude, then check&lt;/td&gt;&lt;td&gt;Power Query&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;A model with linked sheets and scenarios&lt;/td&gt;&lt;td&gt;No: simple features for now&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sharing and editing with colleagues&lt;/td&gt;&lt;td&gt;Yes, with Claude&lt;/td&gt;&lt;td&gt;Yes, in Microsoft 365&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Spreadsheet jobs, Sheets or Excel&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-makes-a-good-first-request&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-makes-a-good-first-request&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What makes a good first request?&lt;/h2&gt;
&lt;p&gt;Say what it is for, the columns, and one rule:&lt;/p&gt;
&lt;aside class=&quot;md-note&quot;&gt;&lt;p&gt;Make a tracker for our data requests: date asked, requester, team, question, status, due date, hours spent. Status is a drop-down: new, in progress, done. Show open requests per team at the top.&lt;/p&gt;&lt;/aside&gt;
&lt;p&gt;Then check the formulas it wrote: click a total and read it, the same way you would check a colleague's sheet.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-hand-over-to-excel&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-hand-over-to-excel&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you hand over to Excel?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Export&lt;/strong&gt; as .xlsx when the sheet needs Excel features; as CSV when it feeds Power BI or a database.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Check the formulas&lt;/strong&gt; after export; simple ones carry over, but read the key totals once.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Keep one copy as the master&lt;/strong&gt;, so two versions do not drift apart.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://claude.com/resources/articles/sheets-whiteboards-data&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude: Introducing Claude Whiteboards, Claude Sheets, and Claude Data&lt;/a&gt;, 10 November 2026&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;When the sheet becomes a report, see &lt;a href=&quot;/blog/excel-or-power-bi-for-a-dashboard/&quot;&gt;Excel or Power BI for a dashboard&lt;/a&gt;. For the right chart for the numbers in it, try &lt;a href=&quot;https://tools.benibix.com/data/chart-compass/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Chart Compass&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Claude Data vs Power BI: which one for which job?</title>
    <link href="https://data.benibix.com/blog/claude-data-vs-power-bi/"/>
    <id>https://data.benibix.com/blog/claude-data-vs-power-bi/</id>
    <published>2026-11-10T21:00:00Z</published>
    <updated>2026-11-10T21:00:00Z</updated>
    <summary>Claude Data builds a dashboard from a question and keeps it updated. Power BI is a full BI platform with a semantic model, DAX and row-level security. Where each one fits, where they overlap, and how a data team can use both.</summary>
    <category term="AI"/>
    <category term="Claude apps"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;Claude Data&lt;/strong&gt; (generally available since &lt;strong&gt;10 November 2026&lt;/strong&gt;, formerly Claude Dashboards) is fastest for a &lt;strong&gt;question you ask today&lt;/strong&gt;: connect a source such as Redshift, BigQuery or ClickHouse, ask in plain English, and get a dashboard with charts and a written summary. &lt;strong&gt;Power BI&lt;/strong&gt; is for &lt;strong&gt;reports a company runs on&lt;/strong&gt;: a governed semantic model, DAX measures, row-level security, deployment pipelines. Use Claude Data to explore and answer quickly; build what must be official, controlled and reused in Power BI.&lt;/p&gt;
&lt;p&gt;Most data teams get two kinds of requests: &amp;quot;can you quickly check X?&amp;quot; and &amp;quot;we need a monthly report on X for everyone&amp;quot;. The first kind fills the backlog and rarely needs a semantic model. That is where a question-to-dashboard tool earns its place.&lt;/p&gt;
&lt;h2 id=&quot;how-do-they-compare&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-they-compare&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do they compare?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;|&lt;/th&gt;&lt;th&gt;Claude Data&lt;/th&gt;&lt;th&gt;Power BI&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Start&lt;/td&gt;&lt;td&gt;A question in plain English&lt;/td&gt;&lt;td&gt;A data model, then visuals&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Charts&lt;/td&gt;&lt;td&gt;Picked and laid out by Claude&lt;/td&gt;&lt;td&gt;Placed and formatted by you&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Summary&lt;/td&gt;&lt;td&gt;Written by Claude next to the numbers&lt;/td&gt;&lt;td&gt;Your own text, or Copilot&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Official numbers&lt;/td&gt;&lt;td&gt;Certified queries, in beta&lt;/td&gt;&lt;td&gt;A governed semantic model with DAX measures&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Access control&lt;/td&gt;&lt;td&gt;Shared viewers see approved queries only (live sharing, beta)&lt;/td&gt;&lt;td&gt;Row-level and object-level security&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Best for&lt;/td&gt;&lt;td&gt;Exploring, one-off answers, quick dashboards&lt;/td&gt;&lt;td&gt;Recurring, company-wide, controlled reports&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Claude Data and Power BI side by side&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;where-do-they-overlap&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-they-overlap&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do they overlap?&lt;/h2&gt;
&lt;p&gt;Both connect to the warehouse, both draw dashboards, both refresh on a schedule. The difference is who decides: in Claude Data, Claude writes the queries and picks the charts for you to review; in Power BI, the model and the measures are written once by the data team and every report reuses them.&lt;/p&gt;
&lt;h2 id=&quot;how-can-a-team-use-both&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-can-a-team-use-both&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How can a team use both?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Ask&lt;/b&gt;&lt;span&gt;a manager asks why churn rose in Q3&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Explore in Claude Data&lt;/b&gt;&lt;span&gt;a dashboard in minutes, the summary points at one segment&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Agree the metric&lt;/b&gt;&lt;span&gt;define churn once, with the formula the team signs off&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Build in Power BI&lt;/b&gt;&lt;span&gt;the churn measure in the semantic model, on the monthly report&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One question, two tools&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Certified queries in Claude Data and the semantic model in Power BI should use the &lt;strong&gt;same definition&lt;/strong&gt;, or the two tools will show two churn numbers.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://claude.com/resources/articles/sheets-whiteboards-data&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude: Introducing Claude Whiteboards, Claude Sheets, and Claude Data&lt;/a&gt;, 10 November 2026&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/security/service-admin-row-level-security&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Row-level security (RLS) with Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Agree each definition before you certify it with &lt;a href=&quot;https://tools.benibix.com/data/kpi-atlas/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;KPI Atlas&lt;/a&gt;, which has 455 KPIs with their formulas and DAX. For the Power BI side, see &lt;a href=&quot;/blog/star-schema-power-bi-explained/&quot;&gt;the star schema in Power BI&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Power BI Desktop, service and mobile: what each one does</title>
    <link href="https://data.benibix.com/blog/power-bi-desktop-service-mobile/"/>
    <id>https://data.benibix.com/blog/power-bi-desktop-service-mobile/</id>
    <published>2026-11-10T17:00:00Z</published>
    <updated>2026-11-10T17:00:00Z</updated>
    <summary>Power BI is three things that work together: Desktop, a free Windows app where you build; the service in your browser, where you share; and the mobile app, where people read. What each one is for and how a report moves between them.</summary>
    <category term="Power BI"/>
    <category term="Getting started"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;Power BI Desktop&lt;/strong&gt; is a free Windows app where you &lt;strong&gt;build&lt;/strong&gt;: get data, clean it in Power Query, model it and make the report. The &lt;strong&gt;Power BI service&lt;/strong&gt; (in your browser) is where you &lt;strong&gt;publish and share&lt;/strong&gt; it, refresh it on a schedule and build dashboards. The &lt;strong&gt;Power BI mobile app&lt;/strong&gt; is where people &lt;strong&gt;read&lt;/strong&gt; reports on a phone or tablet. You build in Desktop, publish to the service, and readers open it anywhere.&lt;/p&gt;
&lt;p&gt;Beginners often install Desktop, build a great report, and then wonder how to send it to anyone. The answer is the second piece: the service.&lt;/p&gt;
&lt;h2 id=&quot;how-does-a-report-move-between-them&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-a-report-move-between-them&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does a report move between them?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Power BI Desktop&lt;/b&gt;&lt;span&gt;build: data, Power Query, model, report pages&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Publish&lt;/b&gt;&lt;span&gt;Home, Publish, pick a workspace&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Power BI service&lt;/b&gt;&lt;span&gt;share, refresh on a schedule, dashboards&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Mobile app&lt;/b&gt;&lt;span&gt;read on a phone or tablet&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One report, three places&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;which-one-does-what&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-one-does-what&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which one does what?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Task&lt;/th&gt;&lt;th&gt;Desktop&lt;/th&gt;&lt;th&gt;Service&lt;/th&gt;&lt;th&gt;Mobile&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Get and clean data in Power Query&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;td&gt;Partly&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Build the model and measures&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;td&gt;Yes, with web modeling&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Build report pages&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Share with others&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Scheduled refresh&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Dashboards with pinned tiles&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;td&gt;View only&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Read reports&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;Desktop is where most report building happens; Microsoft describes it as best for data modeling and report creation, and the service as best for sharing and collaboration.&lt;/p&gt;
&lt;h2 id=&quot;what-does-it-cost&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-it-cost&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does it cost?&lt;/h2&gt;
&lt;p&gt;Power BI Desktop is a free download. Sharing in the service usually needs a paid licence for the person sharing and, outside a capacity, for the people reading. A good first step is to build in Desktop and publish to your own workspace before deciding on licences.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Emailing the .pbix file.&lt;/strong&gt; It works, but everyone then has their own copy that never refreshes. Publish instead.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Building in the service first.&lt;/strong&gt; Fine for a quick report; for anything with a real model, start in Desktop.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Forgetting the gateway.&lt;/strong&gt; A report on data inside your network needs an on-premises data gateway to refresh in the service.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/fundamentals/power-bi-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What is Power BI?&lt;/a&gt;, Desktop, the service and mobile&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/fundamentals/service-service-vs-desktop&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Power BI Desktop vs. the Power BI service&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Download Desktop, load a small Excel file and build one page. Then read &lt;a href=&quot;/blog/power-bi-report-vs-dashboard/&quot;&gt;report vs dashboard&lt;/a&gt; and &lt;a href=&quot;/blog/power-bi-refresh-options-sync-schema/&quot;&gt;refresh options&lt;/a&gt;. If you are aiming for a certificate, the &lt;a href=&quot;/blog/pl-300-study-guide/&quot;&gt;PL-300 study guide&lt;/a&gt; lays out the whole path.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Which Claude model for data work: Fable, Opus or smaller?</title>
    <link href="https://data.benibix.com/blog/which-claude-model-for-data-work/"/>
    <id>https://data.benibix.com/blog/which-claude-model-for-data-work/</id>
    <published>2026-11-10T15:31:00Z</published>
    <updated>2026-11-10T15:31:00Z</updated>
    <summary>Claude Fable 5.2 arrived on 9 November, priced below Fable 5.1 and above Opus 5.5. Which model fits which data job: a quick SQL fix, a pipeline change, a messy migration, or thousands of rows to classify.</summary>
    <category term="AI"/>
    <category term="Claude apps"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; Anthropic's own advice is to start with &lt;strong&gt;Opus 5.5&lt;/strong&gt; for most coding and knowledge work, move up to &lt;strong&gt;Fable 5.2&lt;/strong&gt; for the most ambitious, open-ended technical work, and down to &lt;strong&gt;Sonnet 5.5&lt;/strong&gt; or &lt;strong&gt;Haiku 5.5&lt;/strong&gt; for smaller jobs. For data work that means: Opus 5.5 for everyday SQL, DAX and pipeline changes; Fable 5.2 for a long migration or an unfamiliar codebase it must work through alone; a smaller model for many small, repetitive jobs like tagging thousands of rows.&lt;/p&gt;
&lt;p&gt;The best model is not the one that wins the most benchmarks; it is the cheapest one that does your job right. Data work has both kinds of job: a few hard ones that need deep reasoning, and many easy ones that need to be fast and cheap.&lt;/p&gt;
&lt;h2 id=&quot;which-model-for-which-data-job&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-model-for-which-data-job&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which model for which data job?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Data job&lt;/th&gt;&lt;th&gt;Start with&lt;/th&gt;&lt;th&gt;Why&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Fix a query, write a measure, explain a view&lt;/td&gt;&lt;td&gt;Opus 5.5&lt;/td&gt;&lt;td&gt;Strong daily driver, the Claude Code default&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Change a pipeline across several layers&lt;/td&gt;&lt;td&gt;Opus 5.5 at higher effort&lt;/td&gt;&lt;td&gt;More checking per step&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Migrate a warehouse or untangle an unknown codebase&lt;/td&gt;&lt;td&gt;Fable 5.2&lt;/td&gt;&lt;td&gt;Long, open-ended work it runs alone&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Classify or clean thousands of short text values&lt;/td&gt;&lt;td&gt;Sonnet 5.5 or Haiku 5.5&lt;/td&gt;&lt;td&gt;Many small calls, cost adds up&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Summarise test results every night&lt;/td&gt;&lt;td&gt;A smaller model&lt;/td&gt;&lt;td&gt;Short, routine, repeated&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Matching the job to the model&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-do-the-two-biggest-cost&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-do-the-two-biggest-cost&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What do the two biggest cost?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Per million tokens&lt;/th&gt;&lt;th&gt;Input&lt;/th&gt;&lt;th&gt;Output&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Fable 5.2&lt;/td&gt;&lt;td&gt;$8&lt;/td&gt;&lt;td&gt;$40&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Opus 5.5&lt;/td&gt;&lt;td&gt;$4&lt;/td&gt;&lt;td&gt;$20&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;On a Claude plan you do not pay per token; you get usage limits, and a bigger model or a higher effort uses them faster.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-decide-for-your-own-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-decide-for-your-own-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you decide for your own work?&lt;/h2&gt;
&lt;p&gt;Take one real task you know the answer to, run it on two models, and compare the result, the time and the tokens. A benchmark says what a model can do on someone else's problems; one test on yours says what it does for you.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://www.anthropic.com/claude-fable-and-mythos-5-2&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Anthropic: Claude Fable and Mythos 5.2&lt;/a&gt;, the prices and the model advice&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://platform.claude.com/docs/en/about-claude/pricing&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude API docs: pricing&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Set the effort that fits each job with &lt;a href=&quot;/blog/claude-opus-5-5-effort-for-data-tasks/&quot;&gt;Opus 5.5 effort for data tasks&lt;/a&gt;, and see what your usage costs with &lt;a href=&quot;https://tools.benibix.com/coding-agents/claude-code/usage-insights/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Usage Insights for Claude Code&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Report page tooltips in Power BI</title>
    <link href="https://data.benibix.com/blog/report-page-tooltips-power-bi/"/>
    <id>https://data.benibix.com/blog/report-page-tooltips-power-bi/</id>
    <published>2026-11-10T12:00:00Z</published>
    <updated>2026-11-10T12:00:00Z</updated>
    <summary>How to build a report page tooltip in Power BI, a small page with its own visuals that appears on hover, the Tooltip canvas size, Allow use as tooltip, Tooltip fields, setting a tooltip page manually per visual, and the DAX that makes a tooltip useful.</summary>
    <category term="Visuals"/>
    <category term="Report features"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;report page tooltip&lt;/strong&gt; is a small report page that appears when readers hover a data point, filtered to that point. Create a page, set its &lt;strong&gt;Canvas settings&lt;/strong&gt; to the &lt;strong&gt;Tooltip&lt;/strong&gt; size, turn on &lt;strong&gt;Tooltip&lt;/strong&gt; in &lt;strong&gt;Page information&lt;/strong&gt;, and add visuals. It then replaces the default tooltip on visuals that use the fields in its &lt;strong&gt;Tooltip fields&lt;/strong&gt;, or on any visual where you pick it under &lt;strong&gt;Format, Tooltips, Page&lt;/strong&gt;. One hover then shows a trend, a breakdown and a target for that one product or month.&lt;/p&gt;
&lt;p&gt;The default tooltip shows the numbers already on the chart. A page tooltip answers the next question without a click: hover &amp;quot;Bikes&amp;quot; and see its monthly trend, its top three products and its margin against target.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-page-tooltip-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-page-tooltip-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a page tooltip look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Bikes&lt;/b&gt;&lt;ul&gt;&lt;li&gt;2,100 K revenue&lt;/li&gt;&lt;li&gt;+8.1% against last year&lt;/li&gt;&lt;li&gt;margin 31.2%&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Trend&lt;/b&gt;&lt;span&gt;a small line chart of the last 12 months&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Top products&lt;/b&gt;&lt;span&gt;Mountain-200, Road-150, Touring-1000&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Hovering &amp;quot;Bikes&amp;quot; in a column chart opens this tooltip page&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-build-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build one?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;Add a new page. In &lt;strong&gt;Format&lt;/strong&gt;, &lt;strong&gt;Canvas settings&lt;/strong&gt;, set &lt;strong&gt;Type&lt;/strong&gt; to &lt;strong&gt;Tooltip&lt;/strong&gt; (a small canvas made for tooltips).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;View, Page view, Actual size&lt;/strong&gt; to see it at the size readers will.&lt;/li&gt;&lt;li&gt;Add visuals: one or two cards, a small chart. Keep it light: the page renders on every hover.&lt;/li&gt;&lt;li&gt;In &lt;strong&gt;Format&lt;/strong&gt;, &lt;strong&gt;Page information&lt;/strong&gt;, turn &lt;strong&gt;Tooltip&lt;/strong&gt; on (Microsoft also calls it allowing the page to be used as a tooltip).&lt;/li&gt;&lt;li&gt;Drag fields to &lt;strong&gt;Tooltip fields&lt;/strong&gt; in the page's Build pane, for example &lt;code&gt;Product[Category]&lt;/code&gt;. Any visual that uses &lt;code&gt;Category&lt;/code&gt; now shows this tooltip page instead of the default.&lt;/li&gt;&lt;li&gt;To choose by hand: select a visual, &lt;strong&gt;Format, Tooltips&lt;/strong&gt;, &lt;strong&gt;Page&lt;/strong&gt;, and pick the tooltip page (or a blank page to turn tooltips off for that visual).&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Categorical and numeric fields, including measures, can be Tooltip fields. If the tooltip page shows nothing, check that Tooltip fields are set and the visuals on the page use them.&lt;/p&gt;
&lt;h2 id=&quot;what-dax-makes-a-tooltip-useful&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-dax-makes-a-tooltip-useful&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What DAX makes a tooltip useful?&lt;/h2&gt;
&lt;p&gt;The tooltip page is filtered to the hovered point, so measures show that point's numbers. A tooltip shines with comparisons the chart does not show:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue vs LY % =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt; )

Share of All Categories =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;REMOVEFILTERS&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; ) ) )

Rank of Category =
&lt;i class=&quot;f&quot;&gt;RANKX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Hovering Bikes shows &amp;quot;+8.1% vs last year, 72.5% of all revenue, rank 1 of 4&amp;quot;. A line chart on the tooltip page needs its own date axis: the hovered point filters the category, and the chart shows that category's twelve months, as long as the hovered visual does not also filter the date to one month. If it does, use a measure with &lt;code&gt;REMOVEFILTERS ( 'Date' )&lt;/code&gt; and &lt;code&gt;DATESINPERIOD&lt;/code&gt; for the trend.&lt;/p&gt;
&lt;h2 id=&quot;when-should-you-use-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-should-you-use-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When should you use one?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Need&lt;/th&gt;&lt;th&gt;Use&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;a few extra numbers on hover&lt;/td&gt;&lt;td&gt;default tooltip with measures in the visual's &lt;strong&gt;Tooltips&lt;/strong&gt; well&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;a small picture on hover&lt;/td&gt;&lt;td&gt;report page tooltip&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;a full page of detail&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;/blog/drill-down-drill-through-power-bi/&quot;&gt;drillthrough&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Slow hovers.&lt;/strong&gt; Five visuals on a tooltip page run five queries on every hover; keep it to two or three.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The tooltip appears on visuals it was not meant for.&lt;/strong&gt; Tooltip fields apply to every visual using that field; set the tooltip manually per visual instead.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Blank tooltip.&lt;/strong&gt; Tooltip fields missing, or the page's visuals filtered to something that excludes the hovered point.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too big.&lt;/strong&gt; A custom size larger than the default covers the chart being hovered; keep the tooltip size.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Touch screens.&lt;/strong&gt; Tooltips need a hover or a long press; do not hide anything essential in them.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-tooltips&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create report tooltips in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/rankx-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: RANKX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Build one tooltip page for your main category with a card of three comparisons and a small trend, and set it on the visuals where it helps. &lt;a href=&quot;/blog/drill-down-drill-through-power-bi/&quot;&gt;Drill down and drillthrough&lt;/a&gt; covers detail that needs a whole page.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Table visual in Power BI: exact numbers, done well</title>
    <link href="https://data.benibix.com/blog/table-visual-power-bi/"/>
    <id>https://data.benibix.com/blog/table-visual-power-bi/</id>
    <published>2026-11-10T12:00:00Z</published>
    <updated>2026-11-10T12:00:00Z</updated>
    <summary>When to use the table visual in Power BI, how to add and order columns, totals and why a measure's total is not the sum of its rows, conditional formatting with background colours, data bars and icons, copying values, and a fast table.</summary>
    <category term="Visuals"/>
    <category term="Tables"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; use a &lt;strong&gt;table&lt;/strong&gt; when people need exact values: a list of orders, customers with their numbers, the detail behind a chart. Drag fields and measures into &lt;strong&gt;Columns&lt;/strong&gt;; each row is a unique combination of the non-measure fields. The &lt;strong&gt;total row&lt;/strong&gt; evaluates each measure for all rows together, which is why a total can differ from the sum of the rows. &lt;strong&gt;Conditional formatting&lt;/strong&gt; adds background colours, font colours, data bars and icons, so a table can be scanned like a chart.&lt;/p&gt;
&lt;p&gt;Charts answer &amp;quot;how much, roughly?&amp;quot;. The moment someone asks &amp;quot;which ones exactly?&amp;quot; or &amp;quot;what is the number for order 10442?&amp;quot;, the answer is a table, and most reports need one under their charts.&lt;/p&gt;
&lt;h2 id=&quot;when-is-a-table-the-right-visual&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-a-table-the-right-visual&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is a table the right visual?&lt;/h2&gt;
&lt;p&gt;Microsoft lists: numerical data by category with several measures; data in a tabular format with rows and columns; reviewing and comparing detailed data and exact values rather than visual representations. A table with two hierarchy levels and columns across is a &lt;a href=&quot;/blog/matrix-visual-power-bi/&quot;&gt;matrix&lt;/a&gt;.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Customer&lt;/th&gt;&lt;th&gt;Revenue&lt;/th&gt;&lt;th&gt;Orders&lt;/th&gt;&lt;th&gt;Avg order&lt;/th&gt;&lt;th&gt;vs LY&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Alpine Sports&lt;/td&gt;&lt;td&gt;182,400&lt;/td&gt;&lt;td&gt;412&lt;/td&gt;&lt;td&gt;442.7&lt;/td&gt;&lt;td&gt;+12.4%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bergwerk Bikes&lt;/td&gt;&lt;td&gt;141,900&lt;/td&gt;&lt;td&gt;298&lt;/td&gt;&lt;td&gt;476.2&lt;/td&gt;&lt;td&gt;+3.1%&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;Cyclo Wien&lt;/td&gt;&lt;td&gt;96,300&lt;/td&gt;&lt;td&gt;251&lt;/td&gt;&lt;td&gt;383.7&lt;/td&gt;&lt;td&gt;-8.6%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Donau Outdoor&lt;/td&gt;&lt;td&gt;88,750&lt;/td&gt;&lt;td&gt;190&lt;/td&gt;&lt;td&gt;467.1&lt;/td&gt;&lt;td&gt;+0.4%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Customers with their revenue, orders and change; colour marks the change&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-build-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build one?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;In &lt;strong&gt;Visualizations&lt;/strong&gt; pick &lt;strong&gt;Table&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Drag fields and measures to &lt;strong&gt;Columns&lt;/strong&gt;; their order in the well is the order on screen.&lt;/li&gt;&lt;li&gt;Sort by clicking a column header (Shift plus click adds a second sort column).&lt;/li&gt;&lt;li&gt;In &lt;strong&gt;Format visual&lt;/strong&gt;: &lt;strong&gt;Grid&lt;/strong&gt; (gridlines, borders, row padding), &lt;strong&gt;Values&lt;/strong&gt; (font, colours, alternating row colour, text wrap), &lt;strong&gt;Column headers&lt;/strong&gt; (alignment, wrap), &lt;strong&gt;Totals&lt;/strong&gt; (on or off, and its style), and &lt;strong&gt;Specific column&lt;/strong&gt; to format one column's values, total or header.&lt;/li&gt;&lt;li&gt;Rename a column for this visual only by double-clicking it in the &lt;strong&gt;Columns&lt;/strong&gt; well.&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;why-does-the-total-not-match-the-sum-of-the-rows&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-does-the-total-not-match-the-sum-of-the-rows&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why does the total not match the sum of the rows?&lt;/h2&gt;
&lt;p&gt;Because the total is not a sum. It is the measure evaluated once for all the rows together. For a sum measure, that gives the same number. For anything else, it does not:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Avg Order = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Orders]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Customer&lt;/th&gt;&lt;th&gt;Revenue&lt;/th&gt;&lt;th&gt;Orders&lt;/th&gt;&lt;th&gt;Avg Order&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Alpine Sports&lt;/td&gt;&lt;td&gt;182,400&lt;/td&gt;&lt;td&gt;412&lt;/td&gt;&lt;td&gt;442.7&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Cyclo Wien&lt;/td&gt;&lt;td&gt;96,300&lt;/td&gt;&lt;td&gt;251&lt;/td&gt;&lt;td&gt;383.7&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Total&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;278,700&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;663&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;420.4&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;The total 420.4 is total revenue divided by total orders, which is right. Adding up the rows (826.4) or averaging them (413.2) would be wrong. Problems start with measures that use &lt;code&gt;IF&lt;/code&gt; or a minimum per row:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Commission =
&lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;100000&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; * &lt;i class=&quot;n&quot;&gt;0.05&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;On the total row, revenue is 278,700, so the total commission is 13,935: as if the whole was one customer over the threshold. The right total is the sum of the per-customer commissions, 9,120. Write the measure so it iterates the customers:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Commission =
&lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;100000&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; * &lt;i class=&quot;n&quot;&gt;0.05&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Or use a &lt;strong&gt;custom total&lt;/strong&gt;: right-click the column, &lt;strong&gt;Customize total calculation&lt;/strong&gt;, and pick Sum (or Average, Min, Max) of the displayed rows. It is built on visual calculations and only for numeric columns of tables and matrices.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-add-colours-bars-and-icons&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-add-colours-bars-and-icons&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you add colours, bars and icons?&lt;/h2&gt;
&lt;p&gt;Open the arrow next to a measure in &lt;strong&gt;Columns&lt;/strong&gt;, &lt;strong&gt;Conditional formatting&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Background color&lt;/strong&gt; or &lt;strong&gt;Font color&lt;/strong&gt;: a gradient between a minimum and maximum (optionally a centre), rules (&amp;quot;below 0 is red&amp;quot;), or a field value with a colour.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Data bars&lt;/strong&gt;: a bar inside the cell, as long as the value.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Icons&lt;/strong&gt;: arrows or traffic lights by rules.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Web URL&lt;/strong&gt;: turns a text column with links into clickable links.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Conditional formatting can apply to totals and subtotals too (&amp;quot;Values and totals&amp;quot;). For a rule driven by a measure:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Change Colour =
&lt;i class=&quot;f&quot;&gt;SWITCH&lt;/i&gt; ( &lt;i class=&quot;k&quot;&gt;TRUE&lt;/i&gt; (), &lt;i class=&quot;m&quot;&gt;[Revenue vs LY %]&lt;/i&gt; &amp;lt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#D64550&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue vs LY %]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;0.1&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#1A9E75&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;BLANK&lt;/i&gt; () )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Use it as &lt;strong&gt;Background color&lt;/strong&gt;, &lt;strong&gt;Field value&lt;/strong&gt;: a red cell for a decline, green for over 10% growth, nothing in between.&lt;/p&gt;
&lt;h2 id=&quot;how-do-people-get-the-numbers-out&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-people-get-the-numbers-out&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do people get the numbers out?&lt;/h2&gt;
&lt;p&gt;Right-click a cell: &lt;strong&gt;Copy, Copy value&lt;/strong&gt; copies one value without formatting, &lt;strong&gt;Copy selection&lt;/strong&gt; copies the selected cells with their headers, ready to paste into Excel. &lt;strong&gt;Export data&lt;/strong&gt; in the visual's &lt;strong&gt;More options (...)&lt;/strong&gt; exports the whole table, within the limits your admin allows.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Totals people do not trust.&lt;/strong&gt; Explain or fix them: iterate in the measure (&lt;code&gt;SUMX&lt;/code&gt;) or use a custom total.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too many rows.&lt;/strong&gt; A table of 100,000 order lines is slow and unreadable. Filter to what matters, or add a Top N filter and a drill-through to the details.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Duplicate-looking rows.&lt;/strong&gt; A table groups by every field in it; a hidden key or an extra column splits rows that look the same. Remove the column or add it on purpose.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Columns summed by accident.&lt;/strong&gt; A dragged numeric column like a price or a year is summed; set it to &lt;strong&gt;Don't summarize&lt;/strong&gt; in the model.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A wall of colour.&lt;/strong&gt; Colour one or two columns that carry the message, not all of them.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-tables&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create and format table visualizations in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Apply conditional formatting in tables and matrixes&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-matrix-visual&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create a matrix visual in Power BI (custom totals)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/sumx-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SUMX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Put the few columns people ask about into a table, check every measure's total, and colour only the column that carries the message. &lt;a href=&quot;/blog/sum-vs-sumx-dax/&quot;&gt;SUM vs SUMX&lt;/a&gt; explains row-by-row totals, and &lt;a href=&quot;/blog/sparklines-power-bi/&quot;&gt;sparklines&lt;/a&gt; add a trend to each row.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Year over year in DAX: SAMEPERIODLASTYEAR and DATEADD</title>
    <link href="https://data.benibix.com/blog/year-over-year-dax/"/>
    <id>https://data.benibix.com/blog/year-over-year-dax/</id>
    <published>2026-11-10T12:00:00Z</published>
    <updated>2026-11-10T12:00:00Z</updated>
    <summary>How to compare with last year in DAX, SAMEPERIODLASTYEAR, DATEADD and PARALLELPERIOD compared, growth percentages, month over month and quarter over quarter, comparing partial periods fairly, and showing the change in visuals.</summary>
    <category term="DAX"/>
    <category term="Time intelligence"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; last year's value is &lt;code&gt;CALCULATE ( [Revenue], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )&lt;/code&gt;. &lt;code&gt;DATEADD ( 'Date'[Date], -1, YEAR )&lt;/code&gt; does the same and also shifts by months, quarters or days (&lt;code&gt;-1, MONTH&lt;/code&gt; for the previous month). &lt;code&gt;PARALLELPERIOD ( 'Date'[Date], -1, YEAR )&lt;/code&gt; returns the &lt;strong&gt;whole&lt;/strong&gt; previous year, whatever part of the year is filtered. Growth is &lt;code&gt;DIVIDE ( [Revenue] - [Revenue LY], [Revenue LY] )&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;A number without a comparison means little. &amp;quot;1.2 million in October&amp;quot; becomes useful as &amp;quot;1.2 million, 8% more than last October&amp;quot;, and that needs one measure.&lt;/p&gt;
&lt;h2 id=&quot;what-do-the-three-functions-return&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-do-the-three-functions-return&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What do the three functions return?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Returns&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;SAMEPERIODLASTYEAR ( 'Date'[Date] )&lt;/td&gt;&lt;td&gt;1 to 31 March 2025&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DATEADD ( 'Date'[Date], -1, YEAR )&lt;/td&gt;&lt;td&gt;1 to 31 March 2025&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DATEADD ( 'Date'[Date], -1, MONTH )&lt;/td&gt;&lt;td&gt;1 to 28 February 2026&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DATEADD ( 'Date'[Date], -1, QUARTER )&lt;/td&gt;&lt;td&gt;1 to 31 December 2025&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PARALLELPERIOD ( 'Date'[Date], -1, YEAR )&lt;/td&gt;&lt;td&gt;1 January to 31 December 2025&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PARALLELPERIOD ( 'Date'[Date], -1, MONTH )&lt;/td&gt;&lt;td&gt;1 to 28 February 2026&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;With March 2026 in the filter context&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;code&gt;SAMEPERIODLASTYEAR ( dates )&lt;/code&gt; is the same as &lt;code&gt;DATEADD ( dates, -1, YEAR )&lt;/code&gt;. &lt;code&gt;DATEADD&lt;/code&gt; shifts the exact dates in context; &lt;code&gt;PARALLELPERIOD&lt;/code&gt; returns complete periods at the given level.&lt;/p&gt;
&lt;h2 id=&quot;which-measures-do-you-need&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-measures-do-you-need&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which measures do you need?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue LY = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )

Revenue vs LY = &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt;

Revenue vs LY % =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; LY = &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( NOT &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( LY ), &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; - LY, LY ) )

Revenue PM = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DATEADD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, -&lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, MONTH ) )
Revenue vs PM % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Revenue PM]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue PM]&lt;/i&gt; )

Revenue PQ = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DATEADD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, -&lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, QUARTER ) )

Revenue Full LY = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;PARALLELPERIOD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, -&lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, YEAR ) )

&lt;i class=&quot;c&quot;&gt;-- share of last year's full total reached so far&lt;/i&gt;
Pace vs Full LY = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue YTD]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue Full LY]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;combo&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;Revenue&lt;/li&gt;&lt;li class=&quot;ln-key k1&quot;&gt;vs LY %&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;combo chart: Jan 120, 9; Feb 135, 12; Mar 150, 6; Apr 142, -3; May 155, 8; Jun 158, 4&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;588&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;203&quot; x2=&quot;588&quot; y2=&quot;203&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;207&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;50&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;140&quot; x2=&quot;588&quot; y2=&quot;140&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;144&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;77&quot; x2=&quot;588&quot; y2=&quot;77&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;81&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;150&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;588&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;200&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;0&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;2.5&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;5&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;7.5&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;10&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;12.5&lt;/text&gt;&lt;rect x=&quot;69&quot; y=&quot;114.8&quot; width=&quot;55.4&quot; height=&quot;151.2&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;96.7&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jan&lt;/text&gt;&lt;rect x=&quot;158.3&quot; y=&quot;95.9&quot; width=&quot;55.4&quot; height=&quot;170.1&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;186&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Feb&lt;/text&gt;&lt;rect x=&quot;247.6&quot; y=&quot;77&quot; width=&quot;55.4&quot; height=&quot;189&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;275.3&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Mar&lt;/text&gt;&lt;rect x=&quot;337&quot; y=&quot;87.1&quot; width=&quot;55.4&quot; height=&quot;178.9&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;364.7&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Apr&lt;/text&gt;&lt;rect x=&quot;426.3&quot; y=&quot;70.7&quot; width=&quot;55.4&quot; height=&quot;195.3&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;454&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;May&lt;/text&gt;&lt;rect x=&quot;515.6&quot; y=&quot;66.9&quot; width=&quot;55.4&quot; height=&quot;199.1&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;543.3&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jun&lt;/text&gt;&lt;polyline points=&quot;96.7,84.6 186,24.1 275.3,145 364.7,326.5 454,104.7 543.3,185.4&quot; class=&quot;ln k1&quot;/&gt;&lt;circle cx=&quot;96.7&quot; cy=&quot;84.6&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;186&quot; cy=&quot;24.1&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;275.3&quot; cy=&quot;145&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;364.7&quot; cy=&quot;326.5&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;454&quot; cy=&quot;104.7&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;543.3&quot; cy=&quot;185.4&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;588&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Revenue by month with growth against last year&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-compare-partial-periods-fairly&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-compare-partial-periods-fairly&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you compare partial periods fairly?&lt;/h2&gt;
&lt;p&gt;In October, &amp;quot;this year&amp;quot; has 29 days of October and last year's October has 31. Two fixes:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- 1 last year, only up to the same day&lt;/i&gt;
Revenue LY to Date =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; LastSale = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Order Date]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;REMOVEFILTERS&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
        &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;,
        &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ),
        &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; &amp;lt;= &lt;i class=&quot;f&quot;&gt;EDATE&lt;/i&gt; ( LastSale, -&lt;i class=&quot;n&quot;&gt;12&lt;/i&gt; )
    )

&lt;i class=&quot;c&quot;&gt;-- 2 per working day&lt;/i&gt;
Revenue per Working Day = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Working Days]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Option 1 compares 1 to 29 October with 1 to 29 October last year. Option 2 removes the effect of different numbers of working days, useful when a month has more weekends than last year.&lt;/p&gt;
&lt;h2 id=&quot;how-should-the-change-be-shown&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-should-the-change-be-shown&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How should the change be shown?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;In a &lt;strong&gt;table&lt;/strong&gt;, a &lt;code&gt;vs LY %&lt;/code&gt; column with conditional formatting (good, bad).&lt;/li&gt;&lt;li&gt;In a &lt;strong&gt;column chart&lt;/strong&gt;, last year as a second series or as a line (combo).&lt;/li&gt;&lt;li&gt;On a &lt;strong&gt;card&lt;/strong&gt;, the reference label &amp;quot;vs last year&amp;quot; under the value (see &lt;a href=&quot;/blog/card-visual-power-bi/&quot;&gt;card visual&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;In a &lt;strong&gt;KPI visual&lt;/strong&gt;, last year as the target.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;New products or stores.&lt;/strong&gt; Growth is infinite or blank when last year is blank; show it as &amp;quot;new&amp;quot; with the &lt;code&gt;ISBLANK&lt;/code&gt; test above.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Shifting a fact table date column.&lt;/strong&gt; Always shift the date table's column.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Comparing a running month with a full one.&lt;/strong&gt; Limit last year to the same day.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;PARALLELPERIOD where DATEADD was meant.&lt;/strong&gt; The month filter becomes a full year: totals look far too big.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;53-week years and calendars.&lt;/strong&gt; Week-based comparisons need &lt;a href=&quot;/blog/calendar-based-time-intelligence-dax/&quot;&gt;calendar-based time intelligence&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/sameperiodlastyear-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SAMEPERIODLASTYEAR function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/dateadd-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DATEADD function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/parallelperiod-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: PARALLELPERIOD function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Write &lt;code&gt;Revenue LY&lt;/code&gt; and &lt;code&gt;Revenue vs LY %&lt;/code&gt; once and reuse them on every page; if you have many measures to compare, a &lt;a href=&quot;/blog/calculation-groups-power-bi-time-intelligence/&quot;&gt;calculation group&lt;/a&gt; does it for all of them. &lt;a href=&quot;/blog/rolling-12-months-dax/&quot;&gt;Rolling 12 months&lt;/a&gt; smooths the comparison.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>The three parts every chart needs: title, axes, note</title>
    <link href="https://data.benibix.com/blog/three-parts-of-a-clear-chart/"/>
    <id>https://data.benibix.com/blog/three-parts-of-a-clear-chart/</id>
    <published>2026-11-10T09:00:00Z</published>
    <updated>2026-11-10T09:00:00Z</updated>
    <summary>A chart needs three parts: a title that says the point, axes that say what is measured, and a note that points at what matters. How to write each one.</summary>
    <category term="Visuals"/>
    <category term="Report design"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; every chart needs a &lt;strong&gt;title that states the point&lt;/strong&gt; (&amp;quot;Returns doubled after the March price change&amp;quot;, not &amp;quot;Returns by month&amp;quot;), &lt;strong&gt;axes that say what is measured and in what unit&lt;/strong&gt; (&amp;quot;Returns, % of orders&amp;quot;), and a &lt;strong&gt;note on the one thing that matters&lt;/strong&gt;: a label, a reference line or a highlighted bar. With those three, a reader gets the message in seconds; without them, they have to work it out.&lt;/p&gt;
&lt;p&gt;A chart with only data makes the reader guess: they see the shapes but not the story.&lt;/p&gt;
&lt;h2 id=&quot;what-does-each-part-do&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-each-part-do&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does each part do?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Title&lt;/b&gt;&lt;span&gt;the message, in a sentence: &amp;quot;Returns doubled after the March price change&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Axes&lt;/b&gt;&lt;span&gt;what and in which unit: &amp;quot;Returns, % of orders&amp;quot; and &amp;quot;Month, 2026&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Note&lt;/b&gt;&lt;span&gt;one pointer: a label on March, a reference line at the target, or one bar in colour&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Three parts of a clear chart&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-does-it-look-like-on-a-chart&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-it-look-like-on-a-chart&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does it look like on a chart?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;line&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;line chart: Jan 4; Feb 4.2; Mar 8.1; Apr 8.4; May 8; Jun 7.9&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;626&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;2&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;626&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;4&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;626&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;6&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;626&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;8&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;626&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;10&lt;/text&gt;&lt;polyline points=&quot;52,165.2 166.8,160.2 281.6,61.9 396.4,54.3 511.2,64.4 626,66.9&quot; class=&quot;ln ka&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;165.2&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;166.8&quot; cy=&quot;160.2&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;281.6&quot; cy=&quot;61.9&quot; r=&quot;3.5&quot; class=&quot;dt t-red&quot;/&gt;&lt;circle cx=&quot;396.4&quot; cy=&quot;54.3&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;511.2&quot; cy=&quot;64.4&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;66.9&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;text x=&quot;52&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jan&lt;/text&gt;&lt;text x=&quot;166.8&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Feb&lt;/text&gt;&lt;text x=&quot;281.6&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Mar&lt;/text&gt;&lt;text x=&quot;396.4&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Apr&lt;/text&gt;&lt;text x=&quot;511.2&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;May&lt;/text&gt;&lt;text x=&quot;626&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jun&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Returns doubled after the March price change (% of orders, made-up shop)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The title carries the message, the caption gives the unit, and March is marked. A reader who sees nothing else still knows what happened and when.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-write-a-good-chart-title&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-write-a-good-chart-title&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you write a good chart title?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Weak title&lt;/th&gt;&lt;th&gt;Strong title&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Revenue by region&lt;/td&gt;&lt;td&gt;North brings 40% of revenue&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sales 2026&lt;/td&gt;&lt;td&gt;Sales grew every month except August&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Churn&lt;/td&gt;&lt;td&gt;Churn halved after the onboarding change&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;In Power BI, a title can come from a measure: use the &lt;strong&gt;fx&lt;/strong&gt; button next to the title text and point it at a DAX measure, so the sentence updates with the filters.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;No unit.&lt;/strong&gt; &amp;quot;12&amp;quot; what: thousands, per cent, days?&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Three highlights.&lt;/strong&gt; One note gets attention; three compete.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A message the chart does not show.&lt;/strong&gt; If the title says &amp;quot;doubled&amp;quot;, the reader should see it double.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/service-dashboards-design-tips&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Tips for designing a great Power BI dashboard&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-analytics-pane&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Analytics pane in Power BI&lt;/a&gt;, reference lines&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add the reference line with &lt;a href=&quot;/blog/analytics-pane-power-bi/&quot;&gt;the analytics pane&lt;/a&gt;, make the title follow the filters with &lt;a href=&quot;/blog/selectedvalue-hasonevalue-dax/&quot;&gt;SELECTEDVALUE&lt;/a&gt;, and cut the rest with &lt;a href=&quot;/blog/simplify-a-chart-without-losing-the-data/&quot;&gt;how to simplify a chart&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Opus 5.5 effort levels for data tasks: when to go higher</title>
    <link href="https://data.benibix.com/blog/claude-opus-5-5-effort-for-data-tasks/"/>
    <id>https://data.benibix.com/blog/claude-opus-5-5-effort-for-data-tasks/</id>
    <published>2026-11-10T01:00:00Z</published>
    <updated>2026-11-10T01:00:00Z</updated>
    <summary>Opus 5.5 starts at medium effort in Claude Code, one step below Opus 5. Which data jobs are fine at low or medium, which need high or xhigh, and how to switch with /effort for one session or as your default.</summary>
    <category term="AI"/>
    <category term="Claude Code"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; Opus 5.5 has five effort levels: &lt;code&gt;low&lt;/code&gt;, &lt;code&gt;medium&lt;/code&gt;, &lt;code&gt;high&lt;/code&gt;, &lt;code&gt;xhigh&lt;/code&gt; and &lt;code&gt;max&lt;/code&gt;, and it &lt;strong&gt;starts at &lt;code&gt;medium&lt;/code&gt;&lt;/strong&gt;. Anthropic says Opus 5.5 at medium matches or beats Opus 5 at high on coding and knowledge-work evaluations. For data work: &lt;strong&gt;low&lt;/strong&gt; for renames and quick lookups, &lt;strong&gt;medium&lt;/strong&gt; for everyday queries and measures, &lt;strong&gt;high or xhigh&lt;/strong&gt; for a wrong number you cannot explain or a schema change, &lt;strong&gt;max&lt;/strong&gt; for a hard problem it should work through alone. Type &lt;code&gt;/effort&lt;/code&gt; to change it.&lt;/p&gt;
&lt;p&gt;Effort is how long Claude thinks and how much it checks before answering. More effort catches more, but uses more tokens and takes longer. The trick is to raise it for the tasks where a quiet mistake would cost you.&lt;/p&gt;
&lt;h2 id=&quot;which-effort-for-which-data-task&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-effort-for-which-data-task&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which effort for which data task?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Task&lt;/th&gt;&lt;th&gt;Effort&lt;/th&gt;&lt;th&gt;Why&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Rename a column in one file, format SQL&lt;/td&gt;&lt;td&gt;low&lt;/td&gt;&lt;td&gt;Nothing to reason about&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Write a measure or a query from a clear spec&lt;/td&gt;&lt;td&gt;medium (default)&lt;/td&gt;&lt;td&gt;Clear scope, quick to check&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Find why a total is 3% off&lt;/td&gt;&lt;td&gt;high&lt;/td&gt;&lt;td&gt;Must check joins, filters and grain&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Change a schema used by many views&lt;/td&gt;&lt;td&gt;xhigh&lt;/td&gt;&lt;td&gt;Many places can break quietly&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Untangle a slow, undocumented pipeline alone&lt;/td&gt;&lt;td&gt;max&lt;/td&gt;&lt;td&gt;Long reasoning, many steps&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Effort by data task&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-switch&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-switch&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you switch?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;/effort high&lt;/code&gt;&lt;/strong&gt; saves high as your default for this model.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;/effort&lt;/code&gt;&lt;/strong&gt; with no level opens a slider; press &lt;code&gt;s&lt;/code&gt; there to use a level for this session only.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;/model opus&lt;/code&gt;&lt;/strong&gt; picks the latest Opus, which is Opus 5.5; it needs Claude Code 2.1.280 or later.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;does-more-effort-cost-more&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#does-more-effort-cost-more&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Does more effort cost more?&lt;/h2&gt;
&lt;p&gt;On the API, Opus 5.5 costs $4 per million input tokens and $20 per million output tokens, and higher effort means more output tokens. On a Claude plan, higher effort uses your limits faster. Go back to medium when the hard task is done.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/model-config&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Model configuration&lt;/a&gt;, effort levels and defaults&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://platform.claude.com/docs/en/about-claude/pricing&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude API docs: pricing&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Pick the model first with &lt;a href=&quot;/blog/which-claude-model-for-data-work/&quot;&gt;which Claude model for data work&lt;/a&gt;, and see what each effort level really used with &lt;a href=&quot;https://tools.benibix.com/coding-agents/claude-code/usage-insights/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Usage Insights for Claude Code&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Excel or Power BI for a dashboard? When to switch</title>
    <link href="https://data.benibix.com/blog/excel-or-power-bi-for-a-dashboard/"/>
    <id>https://data.benibix.com/blog/excel-or-power-bi-for-a-dashboard/</id>
    <published>2026-11-09T17:00:00Z</published>
    <updated>2026-11-09T17:00:00Z</updated>
    <summary>An Excel dashboard of PivotTables and slicers is often enough. Five signs it is time to move to Power BI, from row limits to sharing and refresh, and what you keep when you switch.</summary>
    <category term="Power BI"/>
    <category term="Getting started"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; stay in &lt;strong&gt;Excel&lt;/strong&gt; while the data fits on a sheet, one person updates it, and it goes out as a file. Move to &lt;strong&gt;Power BI&lt;/strong&gt; when the data outgrows a sheet (an Excel worksheet stops at &lt;strong&gt;1,048,576 rows&lt;/strong&gt;), when it comes from several sources that must be joined, when it should &lt;strong&gt;refresh on a schedule&lt;/strong&gt;, or when many people need the same numbers without emailing files. Your Excel skills carry over: Power Query is in both, and PivotTable thinking is how Power BI measures work.&lt;/p&gt;
&lt;p&gt;An Excel dashboard built from a table, PivotTables, PivotCharts and slicers is a perfectly good dashboard. The question is not which tool is better, but which problems you have.&lt;/p&gt;
&lt;h2 id=&quot;what-are-the-signs-it-is-time-to-switch&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-signs-it-is-time-to-switch&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the signs it is time to switch?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Sign&lt;/th&gt;&lt;th&gt;What it looks like&lt;/th&gt;&lt;th&gt;What Power BI does instead&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Too many rows&lt;/td&gt;&lt;td&gt;The data is split over sheets to stay under 1,048,576 rows&lt;/td&gt;&lt;td&gt;A model holds millions of rows, compressed&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Several sources&lt;/td&gt;&lt;td&gt;Copy and paste from the CRM, the ERP and a CSV every week&lt;/td&gt;&lt;td&gt;Power Query connects to each and refreshes them together&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Manual refresh&lt;/td&gt;&lt;td&gt;Someone opens the file every Monday to update it&lt;/td&gt;&lt;td&gt;Scheduled refresh in the Power BI service&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Versions by email&lt;/td&gt;&lt;td&gt;&amp;quot;Sales_final_v3_JM.xlsx&amp;quot;&lt;/td&gt;&lt;td&gt;One report, shared by link, with access rights&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Same formula everywhere&lt;/td&gt;&lt;td&gt;A margin formula copied into ten sheets, slightly different in two&lt;/td&gt;&lt;td&gt;One measure, used by every visual&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Five signs an Excel dashboard has outgrown Excel&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;One sign alone is not a reason. Two or three together usually are.&lt;/p&gt;
&lt;h2 id=&quot;what-do-you-keep-when-you-switch&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-do-you-keep-when-you-switch&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What do you keep when you switch?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Power Query.&lt;/strong&gt; The same editor, the same steps, in both tools. Queries can be copied across.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The table habit.&lt;/strong&gt; Excel tables (Ctrl+T) become tables in the model.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Pivot thinking.&lt;/strong&gt; Rows, columns and values in a PivotTable are the same idea as a matrix visual.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;What you lose:&lt;/strong&gt; typing straight into a cell. Power BI reads data; it is not where you enter it.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-the-two-compare-for-a-dashboard&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-the-two-compare-for-a-dashboard&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do the two compare for a dashboard?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;Excel&lt;/th&gt;&lt;th&gt;Power BI&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Rows per sheet or table&lt;/td&gt;&lt;td&gt;1,048,576&lt;/td&gt;&lt;td&gt;Millions, in a compressed model&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Calculations&lt;/td&gt;&lt;td&gt;Cell formulas&lt;/td&gt;&lt;td&gt;DAX measures&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Refresh&lt;/td&gt;&lt;td&gt;Manual or with Power Query, file open&lt;/td&gt;&lt;td&gt;Scheduled in the service&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sharing&lt;/td&gt;&lt;td&gt;A file&lt;/td&gt;&lt;td&gt;A link with access rights; usually needs a paid licence to share&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Cost to start&lt;/td&gt;&lt;td&gt;Part of Microsoft 365&lt;/td&gt;&lt;td&gt;Power BI Desktop is a free download for Windows&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://support.microsoft.com/en-us/office/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Support: Excel specifications and limits&lt;/a&gt;, 1,048,576 rows by 16,384 columns&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/fundamentals/power-bi-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What is Power BI?&lt;/a&gt;, Desktop, the service and mobile&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Begin with the model, not the visuals: see &lt;a href=&quot;/blog/star-schema-power-bi-explained/&quot;&gt;star schema in Power BI&lt;/a&gt; and &lt;a href=&quot;/blog/measures-vs-calculated-columns-dax/&quot;&gt;measures vs calculated columns&lt;/a&gt;. Then lay out the first page with &lt;a href=&quot;/blog/power-bi-report-design-pattern/&quot;&gt;how I design a Power BI report page&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Cross-filter and cross-highlight in Power BI</title>
    <link href="https://data.benibix.com/blog/visual-interactions-power-bi/"/>
    <id>https://data.benibix.com/blog/visual-interactions-power-bi/</id>
    <published>2026-11-09T12:00:00Z</published>
    <updated>2026-11-09T12:00:00Z</updated>
    <summary>How visuals in a Power BI report filter and highlight each other, the difference between cross-filtering and cross-highlighting, Edit interactions with Filter, Highlight and None, drilling that filters other visuals, and the DAX that behaves differently under each.</summary>
    <category term="Visuals"/>
    <category term="Filters and navigation"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; by default, clicking a data point in one visual changes the others on the page. &lt;strong&gt;Cross-filtering&lt;/strong&gt; keeps only the matching data in the other visual. &lt;strong&gt;Cross-highlighting&lt;/strong&gt; keeps all the data but highlights the matching part and dims the rest. &lt;strong&gt;Format, Edit interactions&lt;/strong&gt; sets, for each pair of visuals, &lt;strong&gt;Filter&lt;/strong&gt;, &lt;strong&gt;Highlight&lt;/strong&gt; or &lt;strong&gt;None&lt;/strong&gt;. Line charts, scatter charts and maps can only be cross-filtered, not highlighted. Drilling a visual does not affect others unless &lt;strong&gt;Drilling filters other visuals&lt;/strong&gt; is on.&lt;/p&gt;
&lt;p&gt;A report page is not a set of separate charts: the click on &amp;quot;Bikes&amp;quot; in one should answer &amp;quot;and what does that mean for the rest?&amp;quot; in the others. Interactions decide what the answer looks like, and a wrong default (a highlight where a filter was needed) is a common reason readers misread a page.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-difference&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-difference&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the difference?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Click on Online&lt;/b&gt;&lt;span&gt;in the channel column chart&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Cross-filter&lt;/b&gt;&lt;span&gt;the region chart now shows only online revenue per region; the bars shrink&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Cross-highlight&lt;/b&gt;&lt;span&gt;the region chart keeps total revenue per region and fills only the online part in full colour&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;The reader clicks &amp;quot;Online&amp;quot; in a channel chart&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Cross-highlighting shows the part inside the whole (&amp;quot;online is about a third of North&amp;quot;); cross-filtering shows the part on its own scale (&amp;quot;North is the biggest online region&amp;quot;).&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-change-the-interactions&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-change-the-interactions&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you change the interactions?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;Select the visual that people will click (the source).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Format&lt;/strong&gt; ribbon, &lt;strong&gt;Edit interactions&lt;/strong&gt;. Icons appear on every other visual.&lt;/li&gt;&lt;li&gt;On each other visual, pick &lt;strong&gt;Filter&lt;/strong&gt;, &lt;strong&gt;Highlight&lt;/strong&gt; or &lt;strong&gt;None&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Repeat for every source visual: interactions are set per pair, source to target.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;For drillable visuals, the &lt;strong&gt;Visual interactions&lt;/strong&gt; drop-down has &lt;strong&gt;Drilling filters other visuals&lt;/strong&gt;: on, drilling into &amp;quot;2026&amp;quot; in one chart filters the others to 2026.&lt;/p&gt;
&lt;p&gt;Readers can select several data points with Ctrl. In the report settings, the &lt;strong&gt;query reduction&lt;/strong&gt; options can add an Apply button to slicers and filters so that a page does not re-query on every click.&lt;/p&gt;
&lt;h2 id=&quot;how-do-measures-behave-under-each&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-measures-behave-under-each&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do measures behave under each?&lt;/h2&gt;
&lt;p&gt;A cross-filter is a real filter: every measure in the target visual sees it. A cross-highlight runs the measure twice: once with the selection (the highlighted part) and once without (the full bar). A measure that removes the filter with &lt;code&gt;ALL&lt;/code&gt; or &lt;code&gt;REMOVEFILTERS&lt;/code&gt; ignores both, which is what you want for a &amp;quot;share of total&amp;quot;:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Share of Total Revenue =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;REMOVEFILTERS&lt;/i&gt; ( Channel&lt;i class=&quot;m&quot;&gt;[Channel]&lt;/i&gt; ) ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;With &amp;quot;Online&amp;quot; clicked, a filtered region chart showing &lt;code&gt;Share of Total Revenue&lt;/code&gt; gives online revenue per region divided by all-channel revenue of that region, because &lt;code&gt;REMOVEFILTERS&lt;/code&gt; ignores the channel cross-filter in the denominator. That is the share of online in each region.&lt;/p&gt;
&lt;p&gt;To show which selection a visual reacts to, the same functions as for slicers work, because a cross-filter is a filter:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Channel Context =
&lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ISFILTERED&lt;/i&gt; ( Channel&lt;i class=&quot;m&quot;&gt;[Channel]&lt;/i&gt; ), &lt;i class=&quot;s&quot;&gt;&amp;quot;Channel: &amp;quot;&lt;/i&gt; &amp;amp; &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( Channel&lt;i class=&quot;m&quot;&gt;[Channel]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;several&amp;quot;&lt;/i&gt; ), &lt;i class=&quot;s&quot;&gt;&amp;quot;All channels&amp;quot;&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;which-default-should-a-page-have&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-default-should-a-page-have&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which default should a page have?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Filter&lt;/strong&gt; when the target answers &amp;quot;what about the selected item?&amp;quot;: a detail table, a trend line of the selection.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Highlight&lt;/strong&gt; when the target answers &amp;quot;how big is the selection inside the whole?&amp;quot;: a column chart by region.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;None&lt;/strong&gt; for visuals that must always show the full picture: a headline KPI, a map of all stores used for orientation.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A KPI that changes on every click.&lt;/strong&gt; Readers lose the headline number; set it to &lt;strong&gt;None&lt;/strong&gt; from the charts.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Highlight on visuals that cannot.&lt;/strong&gt; Line charts, scatter charts and maps can only be filtered; the highlight option is not offered there.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Matrix with mixed-level selections.&lt;/strong&gt; Microsoft notes errors in other visuals when you cross-highlight with several items at different levels of a matrix hierarchy built from different tables.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too many queries.&lt;/strong&gt; Every click re-queries every visual; on heavy pages, use query reduction or fewer visuals.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/service-reports-visual-interactions&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Change how visuals interact in a Power BI report&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-column-charts&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create and use column charts in Power BI (cross-filter and cross-highlight)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/removefilters-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: REMOVEFILTERS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;On each page, decide which visual readers click first, set its interactions on purpose (filter for detail, highlight for share, none for headline numbers), and test by clicking. &lt;a href=&quot;/blog/slicer-power-bi/&quot;&gt;Slicers&lt;/a&gt; are the other way readers filter a page.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>DAX statistical functions: every one with an example</title>
    <link href="https://data.benibix.com/blog/statistical-functions-dax-reference/"/>
    <id>https://data.benibix.com/blog/statistical-functions-dax-reference/</id>
    <published>2026-11-09T12:00:00Z</published>
    <updated>2026-11-09T12:00:00Z</updated>
    <summary>A reference of all DAX statistical functions, MEDIAN and PERCENTILE, standard deviation and variance, GEOMEAN, LINEST and LINESTX regression, distributions (NORM, T, CHISQ, BETA, POISSON, EXPON), CONFIDENCE, SAMPLE, RANK.EQ, COMBIN and PERMUT, with examples.</summary>
    <category term="DAX"/>
    <category term="Reference"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; DAX statistical functions describe &lt;strong&gt;spread and position&lt;/strong&gt; (&lt;code&gt;MEDIAN&lt;/code&gt;, &lt;code&gt;PERCENTILE.INC&lt;/code&gt;, &lt;code&gt;STDEV.S&lt;/code&gt;, &lt;code&gt;VAR.S&lt;/code&gt;, &lt;code&gt;GEOMEAN&lt;/code&gt;), fit &lt;strong&gt;lines&lt;/strong&gt; (&lt;code&gt;LINEST&lt;/code&gt;, &lt;code&gt;LINESTX&lt;/code&gt;), work with &lt;strong&gt;distributions&lt;/strong&gt; (&lt;code&gt;NORM.DIST&lt;/code&gt;, &lt;code&gt;T.INV&lt;/code&gt;, &lt;code&gt;CHISQ.DIST&lt;/code&gt;, &lt;code&gt;POISSON.DIST&lt;/code&gt;), give &lt;strong&gt;confidence intervals&lt;/strong&gt; (&lt;code&gt;CONFIDENCE.T&lt;/code&gt;), &lt;strong&gt;sample&lt;/strong&gt; tables (&lt;code&gt;SAMPLE&lt;/code&gt;) and count &lt;strong&gt;combinations&lt;/strong&gt; (&lt;code&gt;COMBIN&lt;/code&gt;, &lt;code&gt;PERMUT&lt;/code&gt;). Most come in two forms: on a column (&lt;code&gt;MEDIAN&lt;/code&gt;) and as an iterator over a table and an expression (&lt;code&gt;MEDIANX&lt;/code&gt;). &lt;code&gt;.S&lt;/code&gt; means sample, &lt;code&gt;.P&lt;/code&gt; means population.&lt;/p&gt;
&lt;p&gt;The average hides as much as it shows. A median order value next to the mean, or the 90th percentile of delivery time, tells readers what a typical customer experiences.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-describe-spread-and-position&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-describe-spread-and-position&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions describe spread and position?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Column form&lt;/th&gt;&lt;th&gt;Iterator form&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;median&lt;/td&gt;&lt;td&gt;MEDIAN&lt;/td&gt;&lt;td&gt;MEDIANX&lt;/td&gt;&lt;td&gt;MEDIANX ( VALUES ( Orders[Order ID] ), [Order Value] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;percentile, k from 0 to 1&lt;/td&gt;&lt;td&gt;PERCENTILE.INC, PERCENTILE.EXC&lt;/td&gt;&lt;td&gt;PERCENTILEX.INC, PERCENTILEX.EXC&lt;/td&gt;&lt;td&gt;PERCENTILE.INC ( Delivery[Days], 0.9 )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;standard deviation&lt;/td&gt;&lt;td&gt;STDEV.S, STDEV.P&lt;/td&gt;&lt;td&gt;STDEVX.S, STDEVX.P&lt;/td&gt;&lt;td&gt;STDEVX.S ( VALUES ( 'Date'[Date] ), [Revenue] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;variance&lt;/td&gt;&lt;td&gt;VAR.S, VAR.P&lt;/td&gt;&lt;td&gt;VARX.S, VARX.P&lt;/td&gt;&lt;td&gt;VAR.P ( Sales[Amount] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;geometric mean&lt;/td&gt;&lt;td&gt;GEOMEAN&lt;/td&gt;&lt;td&gt;GEOMEANX&lt;/td&gt;&lt;td&gt;GEOMEANX ( Years, 1 + [Growth %] ) - 1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;rank of a value&lt;/td&gt;&lt;td&gt;RANK.EQ&lt;/td&gt;&lt;td&gt;RANKX&lt;/td&gt;&lt;td&gt;RANK.EQ ( Sales[Amount], Sales[Amount], DESC )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Spread and position&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;code&gt;.INC&lt;/code&gt; includes the ends (k from 0 to 1); &lt;code&gt;.EXC&lt;/code&gt; excludes them. Use &lt;code&gt;.S&lt;/code&gt; when the rows are a sample of a larger group, &lt;code&gt;.P&lt;/code&gt; when they are all of it.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- typical and worst-case delivery&lt;/i&gt;
Median Days = &lt;i class=&quot;f&quot;&gt;MEDIAN&lt;/i&gt; ( Delivery&lt;i class=&quot;m&quot;&gt;[Days]&lt;/i&gt; )
P90 Days = PERCENTILE.&lt;i class=&quot;f&quot;&gt;INC&lt;/i&gt; ( Delivery&lt;i class=&quot;m&quot;&gt;[Days]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;0.9&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- daily revenue volatility in the selection&lt;/i&gt;
Daily Revenue StDev = STDEVX.&lt;i class=&quot;f&quot;&gt;S&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Microsoft notes that &lt;code&gt;MEDIAN&lt;/code&gt; over an integer column can return integer or double, so a calculated column may need &lt;code&gt;CONVERT ( ..., DOUBLE )&lt;/code&gt; to keep one type.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-fit-a-trend-line&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-fit-a-trend-line&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you fit a trend line?&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;LINESTX ( table, y, x1 [, x2, ...] )&lt;/code&gt; returns a one-row table with Slope1, Intercept, CoefficientOfDetermination (r²), StandardError, FStatistic and more:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue Trend =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Fit =
    &lt;i class=&quot;f&quot;&gt;LINESTX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month Index]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month Index]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Slope = &lt;i class=&quot;f&quot;&gt;SELECTCOLUMNS&lt;/i&gt; ( Fit, &lt;i class=&quot;m&quot;&gt;[Slope1]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Intercept = &lt;i class=&quot;f&quot;&gt;SELECTCOLUMNS&lt;/i&gt; ( Fit, &lt;i class=&quot;m&quot;&gt;[Intercept]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; Intercept + Slope * &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month Index]&lt;/i&gt; )

Trend R2 =
&lt;i class=&quot;f&quot;&gt;SELECTCOLUMNS&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;LINESTX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month Index]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month Index]&lt;/i&gt; ),
    &lt;i class=&quot;m&quot;&gt;[CoefficientOfDetermination]&lt;/i&gt;
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;LINEST&lt;/code&gt; takes columns of one table; &lt;code&gt;LINESTX&lt;/code&gt; takes any expressions, which is what measures need. Months as an index (1, 2, 3, ...) keep the slope readable: revenue change per month.&lt;/p&gt;
&lt;h2 id=&quot;which-distribution-functions-are-there&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-distribution-functions-are-there&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which distribution functions are there?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Family&lt;/th&gt;&lt;th&gt;Functions&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;normal&lt;/td&gt;&lt;td&gt;NORM.DIST, NORM.INV, NORM.S.DIST, NORM.S.INV&lt;/td&gt;&lt;td&gt;NORM.S.INV ( 0.975 ) = 1.96&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Student's t&lt;/td&gt;&lt;td&gt;T.DIST, T.DIST.2T, T.DIST.RT, T.INV, T.INV.2T&lt;/td&gt;&lt;td&gt;T.INV.2T ( 0.05, 20 ) = 2.086&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;chi-squared&lt;/td&gt;&lt;td&gt;CHISQ.DIST, CHISQ.DIST.RT, CHISQ.INV, CHISQ.INV.RT&lt;/td&gt;&lt;td&gt;CHISQ.DIST.RT ( 6.2, 2 ) = 0.045&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;beta&lt;/td&gt;&lt;td&gt;BETA.DIST, BETA.INV&lt;/td&gt;&lt;td&gt;BETA.DIST ( 0.4, 2, 3, TRUE )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Poisson&lt;/td&gt;&lt;td&gt;POISSON.DIST&lt;/td&gt;&lt;td&gt;POISSON.DIST ( 2, 3, FALSE ) = 0.224&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;exponential&lt;/td&gt;&lt;td&gt;EXPON.DIST&lt;/td&gt;&lt;td&gt;EXPON.DIST ( 1, 0.5, TRUE ) = 0.393&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Distributions&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;which-functions-give-confidence-and-samples&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-give-confidence-and-samples&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions give confidence and samples?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- 95% confidence interval for the mean order value&lt;/i&gt;
CI Half Width =
CONFIDENCE.&lt;i class=&quot;f&quot;&gt;T&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;0.05&lt;/i&gt;, STDEV.&lt;i class=&quot;f&quot;&gt;S&lt;/i&gt; ( Orders&lt;i class=&quot;m&quot;&gt;[Value]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Orders ) )

&lt;i class=&quot;c&quot;&gt;-- 100 customers spread evenly over the key order, for a scatter chart&lt;/i&gt;
Customer Sample = &lt;i class=&quot;f&quot;&gt;SAMPLE&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;100&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer Key]&lt;/i&gt; ), Customer&lt;i class=&quot;m&quot;&gt;[Customer Key]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;SAMPLE ( n, table, orderBy )&lt;/code&gt; returns n rows spread evenly over the order, including the first and last; Microsoft advises grouping the table by the sort column to avoid duplicates. &lt;code&gt;COMBIN ( 10, 3 )&lt;/code&gt; is 120 ways to pick 3 of 10; &lt;code&gt;PERMUT ( 10, 3 )&lt;/code&gt; is 720 when order matters; &lt;code&gt;COMBINA&lt;/code&gt; allows repeats.&lt;/p&gt;
&lt;p&gt;In depth: &lt;a href=&quot;/blog/analytics-pane-power-bi/&quot;&gt;error bars and confidence&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Mean when the data is skewed.&lt;/strong&gt; Order values and delivery times have long tails; report the median and a percentile.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;.S against .P.&lt;/strong&gt; Small groups show the difference; pick by whether the rows are all of the population.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Iterating the wrong grain.&lt;/strong&gt; &lt;code&gt;STDEVX.S ( Sales, ... )&lt;/code&gt; gives line-level spread; iterate &lt;code&gt;VALUES ( 'Date'[Date] )&lt;/code&gt; for daily spread.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Trend on dates.&lt;/strong&gt; Slopes per day on date serial numbers are tiny and hard to read; use a month index.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/statistical-functions-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Statistical functions (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/linestx-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: LINESTX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/sample-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SAMPLE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add &lt;code&gt;Median Days&lt;/code&gt; and &lt;code&gt;P90 Days&lt;/code&gt; next to the average in your delivery or response-time report. &lt;a href=&quot;/blog/financial-functions-dax-reference/&quot;&gt;Financial functions&lt;/a&gt; handle loans, depreciation and returns.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>How to share a Microsoft certification others can verify</title>
    <link href="https://data.benibix.com/blog/share-your-microsoft-credential/"/>
    <id>https://data.benibix.com/blog/share-your-microsoft-credential/</id>
    <published>2026-11-09T12:00:00Z</published>
    <updated>2026-11-09T12:00:00Z</updated>
    <summary>How to share Microsoft certifications and Applied Skills in 2026 so employers can verify them, the verifiable credential link from your Learn profile, the transcript link and PDF, the privacy setting that breaks verification, and where to put the link.</summary>
    <category term="Exams"/>
    <category term="Exam tips"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; in your &lt;strong&gt;Microsoft Learn profile&lt;/strong&gt;, open &lt;strong&gt;Credentials&lt;/strong&gt;, then &lt;strong&gt;Certifications&lt;/strong&gt; or &lt;strong&gt;Applied Skills&lt;/strong&gt;, choose &lt;strong&gt;View certification details&lt;/strong&gt; and &lt;strong&gt;Share&lt;/strong&gt;. That gives a link anyone can open to verify the credential, marked &lt;strong&gt;Online Verifiable&lt;/strong&gt;. For all credentials at once, share your &lt;strong&gt;transcript&lt;/strong&gt; link or print it to PDF. Verification only works while your Learn profile is &lt;strong&gt;public&lt;/strong&gt;; Private Mode hides everything.&lt;/p&gt;
&lt;h2 id=&quot;which-link-should-you-share&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-link-should-you-share&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which link should you share?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Link&lt;/th&gt;&lt;th&gt;Shows&lt;/th&gt;&lt;th&gt;Best for&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Credential link&lt;/td&gt;&lt;td&gt;one certification, verifiable&lt;/td&gt;&lt;td&gt;a CV, a LinkedIn certification entry, a proposal&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Transcript link&lt;/td&gt;&lt;td&gt;all credentials and modules&lt;/td&gt;&lt;td&gt;a job application asking for proof of several&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Transcript PDF&lt;/td&gt;&lt;td&gt;the same, as a file&lt;/td&gt;&lt;td&gt;email attachments, offline records&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Three ways to share&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-breaks-verification&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-breaks-verification&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What breaks verification?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:1&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Public&lt;/b&gt;&lt;span&gt;the link opens and shows the credential as verified&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;red&quot;&gt;&lt;b&gt;Private Mode&lt;/b&gt;&lt;span&gt;your name and achievements are hidden; the link shows nothing, even if you share it&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Profile privacy&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Check the privacy setting in the profile menu before sending a link, and open the link in a private browser window to see what others see.&lt;/p&gt;
&lt;h2 id=&quot;where-should-the-link-go&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-should-the-link-go&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where should the link go?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;LinkedIn:&lt;/strong&gt; in Licenses and certifications, with the credential link as the URL, so one click verifies it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;CV and portfolio:&lt;/strong&gt; next to each certification name.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Your site:&lt;/strong&gt; a link per certification. On &lt;a href=&quot;/about/&quot;&gt;my About page&lt;/a&gt; every card opens the credential on Microsoft Learn.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Digital certificates can also be downloaded and printed from the same place.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/cred-share-validate&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Sharing Microsoft Credentials&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/view-share-transcript&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: View and share your transcript&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Open your Learn profile, set it to public if it is not, and copy the credential link for your newest certification. &lt;a href=&quot;/blog/renew-microsoft-certification/&quot;&gt;Renewal&lt;/a&gt; keeps that link showing an active credential.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>UNION, EXCEPT, INTERSECT and CROSSJOIN in DAX</title>
    <link href="https://data.benibix.com/blog/union-except-intersect-crossjoin-dax/"/>
    <id>https://data.benibix.com/blog/union-except-intersect-crossjoin-dax/</id>
    <published>2026-11-09T12:00:00Z</published>
    <updated>2026-11-09T12:00:00Z</updated>
    <summary>How the DAX set functions combine tables, UNION to append, EXCEPT for rows only in the first table, INTERSECT for rows in both, CROSSJOIN for every combination, NATURALINNERJOIN and NATURALLEFTOUTERJOIN, with examples for new, lost and returning customers.</summary>
    <category term="DAX"/>
    <category term="Table functions"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;code&gt;UNION ( t1, t2 )&lt;/code&gt; appends rows (duplicates kept); &lt;code&gt;EXCEPT ( t1, t2 )&lt;/code&gt; returns the rows of &lt;code&gt;t1&lt;/code&gt; that are not in &lt;code&gt;t2&lt;/code&gt;; &lt;code&gt;INTERSECT ( t1, t2 )&lt;/code&gt; returns the rows of &lt;code&gt;t1&lt;/code&gt; that are also in &lt;code&gt;t2&lt;/code&gt;; &lt;code&gt;CROSSJOIN ( t1, t2 )&lt;/code&gt; returns every combination. The first three need the same number of columns, match by position and take the column names (and lineage) of the first table. With customer lists of two periods, they answer the classic questions: &lt;strong&gt;new&lt;/strong&gt;, &lt;strong&gt;lost&lt;/strong&gt; and &lt;strong&gt;returning&lt;/strong&gt; customers.&lt;/p&gt;
&lt;p&gt;&amp;quot;How many customers did we lose this year?&amp;quot; is a set question: customers last year minus customers this year. In DAX it is one &lt;code&gt;EXCEPT&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-does-each-return&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-each-return&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does each return?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Returns&lt;/th&gt;&lt;th&gt;Meaning&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;UNION ( LY, TY )&lt;/td&gt;&lt;td&gt;A, B, C, D, C, D, E&lt;/td&gt;&lt;td&gt;all, with duplicates&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DISTINCT ( UNION ( LY, TY ) )&lt;/td&gt;&lt;td&gt;A, B, C, D, E&lt;/td&gt;&lt;td&gt;all customers of both years&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;EXCEPT ( TY, LY )&lt;/td&gt;&lt;td&gt;E&lt;/td&gt;&lt;td&gt;new customers&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;EXCEPT ( LY, TY )&lt;/td&gt;&lt;td&gt;A, B&lt;/td&gt;&lt;td&gt;lost customers&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;INTERSECT ( TY, LY )&lt;/td&gt;&lt;td&gt;C, D&lt;/td&gt;&lt;td&gt;returning customers&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Customers last year {A, B, C, D} and this year {C, D, E}&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-write-new-lost-and-returning-customers&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-write-new-lost-and-returning-customers&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you write new, lost and returning customers?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Customers TY = &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Customer Key]&lt;/i&gt; )

New Customers =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; TY = &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Customer Key]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; LY = &lt;i class=&quot;f&quot;&gt;CALCULATETABLE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Customer Key]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;EXCEPT&lt;/i&gt; ( TY, LY ) )

Lost Customers =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; TY = &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Customer Key]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; LY = &lt;i class=&quot;f&quot;&gt;CALCULATETABLE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Customer Key]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;EXCEPT&lt;/i&gt; ( LY, TY ) )

Returning Customers =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; TY = &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Customer Key]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; LY = &lt;i class=&quot;f&quot;&gt;CALCULATETABLE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Customer Key]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;INTERSECT&lt;/i&gt; ( TY, LY ) )

Revenue from New Customers =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; LY = &lt;i class=&quot;f&quot;&gt;CALCULATETABLE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Customer Key]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;EXCEPT&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Customer Key]&lt;/i&gt; ), LY ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&amp;quot;New&amp;quot; here means &amp;quot;not a customer in the same period last year&amp;quot;; for &amp;quot;never bought before&amp;quot;, compare with all earlier dates: &lt;code&gt;CALCULATETABLE ( VALUES ( Sales[Customer Key] ), 'Date'[Date] &amp;lt; MIN ( 'Date'[Date] ) )&lt;/code&gt;.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;waterfall&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;waterfall chart: Last year 4,200; Lost -900; New 1,150; This year total&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;628&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;1,000&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;628&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;2,000&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;628&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;3,000&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;628&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;4,000&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;628&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;5,000&lt;/text&gt;&lt;rect x=&quot;77.9&quot; y=&quot;54.3&quot; width=&quot;92.2&quot; height=&quot;211.7&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;124&quot; y=&quot;48.3&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;4,200&lt;/text&gt;&lt;line x1=&quot;170.1&quot; y1=&quot;54.3&quot; x2=&quot;221.9&quot; y2=&quot;54.3&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;124&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Last year&lt;/text&gt;&lt;rect x=&quot;221.9&quot; y=&quot;54.3&quot; width=&quot;92.2&quot; height=&quot;45.4&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;268&quot; y=&quot;48.3&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;-900&lt;/text&gt;&lt;line x1=&quot;314.1&quot; y1=&quot;99.7&quot; x2=&quot;365.9&quot; y2=&quot;99.7&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;268&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Lost&lt;/text&gt;&lt;rect x=&quot;365.9&quot; y=&quot;41.7&quot; width=&quot;92.2&quot; height=&quot;58&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;412&quot; y=&quot;35.7&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;+1,150&lt;/text&gt;&lt;line x1=&quot;458.1&quot; y1=&quot;41.7&quot; x2=&quot;509.9&quot; y2=&quot;41.7&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;412&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;New&lt;/text&gt;&lt;rect x=&quot;509.9&quot; y=&quot;41.7&quot; width=&quot;92.2&quot; height=&quot;224.3&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;556&quot; y=&quot;35.7&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;4,450&lt;/text&gt;&lt;text x=&quot;556&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;This year&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Customers from last year to this year&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;when-do-you-use-crossjoin&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-do-you-use-crossjoin&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When do you use CROSSJOIN?&lt;/h2&gt;
&lt;p&gt;Every combination of two lists, for example to find product and region pairs with no sales:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;EVALUATE
&lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;CROSSJOIN&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Region&lt;i class=&quot;m&quot;&gt;[Region]&lt;/i&gt; ) ),
    &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Column names must differ across the tables. The row count is the product of both tables, so keep inputs small.&lt;/p&gt;
&lt;h2 id=&quot;what-about-joins&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-about-joins&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What about joins?&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;NATURALINNERJOIN ( t1, t2 )&lt;/code&gt; and &lt;code&gt;NATURALLEFTOUTERJOIN ( t1, t2 )&lt;/code&gt; join on columns with the same name and the same lineage (from the same source column). They are mostly used in queries on table variables; in a model, relationships do the joining.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Different column counts.&lt;/strong&gt; &lt;code&gt;UNION&lt;/code&gt;, &lt;code&gt;EXCEPT&lt;/code&gt; and &lt;code&gt;INTERSECT&lt;/code&gt; need the same number of columns, matched by position, not by name.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Lineage.&lt;/strong&gt; The result keeps the first table's lineage; &lt;code&gt;EXCEPT ( LY, TY )&lt;/code&gt; filters as Sales[Customer Key] because LY came from that column.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Duplicates.&lt;/strong&gt; &lt;code&gt;UNION&lt;/code&gt; keeps them; wrap in &lt;code&gt;DISTINCT&lt;/code&gt; to count unique values.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;INTERSECT order.&lt;/strong&gt; &lt;code&gt;INTERSECT ( t1, t2 )&lt;/code&gt; is not the same as &lt;code&gt;INTERSECT ( t2, t1 )&lt;/code&gt; when duplicates exist.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Huge CROSSJOINs.&lt;/strong&gt; Millions of combinations are slow; filter first.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/union-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: UNION function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/except-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: EXCEPT function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/intersect-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: INTERSECT function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Write &lt;code&gt;New Customers&lt;/code&gt;, &lt;code&gt;Lost Customers&lt;/code&gt; and &lt;code&gt;Returning Customers&lt;/code&gt; and put them in a waterfall from last year's count to this year's. &lt;a href=&quot;/blog/customer-retention-cohort-kpi/&quot;&gt;Customer retention and cohorts&lt;/a&gt; builds a KPI on the same sets.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Win rate KPI: formula, DAX and what counts as a loss</title>
    <link href="https://data.benibix.com/blog/win-rate-kpi/"/>
    <id>https://data.benibix.com/blog/win-rate-kpi/</id>
    <published>2026-11-09T12:00:00Z</published>
    <updated>2026-11-09T12:00:00Z</updated>
    <summary>How to calculate sales win rate, won deals divided by closed deals, by count and by value, which opportunities count, win rate by stage, rep, source and deal size, sales cycle length, the DAX for a CRM opportunity table, and how win rate feeds pipeline coverage.</summary>
    <category term="KPIs"/>
    <category term="Sales"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;win rate&lt;/strong&gt; = won opportunities / closed opportunities (won + lost) in a period, by the date they closed. Measure it &lt;strong&gt;by count&lt;/strong&gt; (how often you win) and &lt;strong&gt;by value&lt;/strong&gt; (how much of the closed amount you win); a big gap between the two means you win small deals and lose large ones. Exclude open deals, and decide once whether disqualified leads count as losses (usually not: only qualified opportunities). Win rate, deal size and cycle length together predict revenue from pipeline.&lt;/p&gt;
&lt;p&gt;&amp;quot;We win one in three&amp;quot; is a common claim that collapses when someone asks: one in three of what? Counting from qualified opportunities, by close date, settles it.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Stage at close&lt;/th&gt;&lt;th&gt;Count&lt;/th&gt;&lt;th&gt;Value (k)&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Won&lt;/td&gt;&lt;td&gt;18&lt;/td&gt;&lt;td&gt;540&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;Lost&lt;/td&gt;&lt;td&gt;42&lt;/td&gt;&lt;td&gt;2,100&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Open (not counted)&lt;/td&gt;&lt;td&gt;35&lt;/td&gt;&lt;td&gt;1,750&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Opportunities closed in Q3&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;Win rate by count = 18 / (18 + 42) = &lt;strong&gt;30%&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;Win rate by value = 540 / (540 + 2,100) = &lt;strong&gt;20.5%&lt;/strong&gt;: larger deals are lost more often.&lt;/li&gt;&lt;/ul&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;bar&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;bar chart: Referral 48; Partner 36; Inbound web 29; Outbound 17&quot;&gt;&lt;line x1=&quot;98.8&quot; y1=&quot;8&quot; x2=&quot;98.8&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;98.8&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;198.2&quot; y1=&quot;8&quot; x2=&quot;198.2&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;198.2&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;10&lt;/text&gt;&lt;line x1=&quot;297.7&quot; y1=&quot;8&quot; x2=&quot;297.7&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;297.7&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;20&lt;/text&gt;&lt;line x1=&quot;397.1&quot; y1=&quot;8&quot; x2=&quot;397.1&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;397.1&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;30&lt;/text&gt;&lt;line x1=&quot;496.6&quot; y1=&quot;8&quot; x2=&quot;496.6&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;496.6&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;40&lt;/text&gt;&lt;line x1=&quot;596&quot; y1=&quot;8&quot; x2=&quot;596&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;596&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;50&lt;/text&gt;&lt;rect x=&quot;98.8&quot; y=&quot;19.1&quot; width=&quot;477.3&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;582.1&quot; y=&quot;44.8&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;48&lt;/text&gt;&lt;text x=&quot;88.8&quot; y=&quot;44.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Referral&lt;/text&gt;&lt;rect x=&quot;98.8&quot; y=&quot;84.6&quot; width=&quot;358&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;462.8&quot; y=&quot;110.3&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;36&lt;/text&gt;&lt;text x=&quot;88.8&quot; y=&quot;110.3&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Partner&lt;/text&gt;&lt;rect x=&quot;98.8&quot; y=&quot;150.1&quot; width=&quot;288.4&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-blue&quot;/&gt;&lt;text x=&quot;393.2&quot; y=&quot;175.8&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;29&lt;/text&gt;&lt;text x=&quot;88.8&quot; y=&quot;175.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Inbound web&lt;/text&gt;&lt;rect x=&quot;98.8&quot; y=&quot;215.6&quot; width=&quot;169&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-gold&quot;/&gt;&lt;text x=&quot;273.8&quot; y=&quot;241.3&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;17&lt;/text&gt;&lt;text x=&quot;88.8&quot; y=&quot;241.3&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Outbound&lt;/text&gt;&lt;line x1=&quot;98.8&quot; y1=&quot;8&quot; x2=&quot;98.8&quot; y2=&quot;270&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Win rate by lead source (%)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;The Opportunities table has Status (Open, Won, Lost), Amount, Created Date and Close Date. Relate Close Date to the Date table:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Won Deals = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Opportunities ), Opportunities&lt;i class=&quot;m&quot;&gt;[Status]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Won&amp;quot;&lt;/i&gt; )
Lost Deals = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Opportunities ), Opportunities&lt;i class=&quot;m&quot;&gt;[Status]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Lost&amp;quot;&lt;/i&gt; )

Win Rate = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Won Deals]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Won Deals]&lt;/i&gt; + &lt;i class=&quot;m&quot;&gt;[Lost Deals]&lt;/i&gt; )

Won Value = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Opportunities&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ), Opportunities&lt;i class=&quot;m&quot;&gt;[Status]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Won&amp;quot;&lt;/i&gt; )
Lost Value = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Opportunities&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ), Opportunities&lt;i class=&quot;m&quot;&gt;[Status]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Lost&amp;quot;&lt;/i&gt; )
Win Rate by Value = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Won Value]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Won Value]&lt;/i&gt; + &lt;i class=&quot;m&quot;&gt;[Lost Value]&lt;/i&gt; )

Avg Sales Cycle Days =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; ( Opportunities, Opportunities&lt;i class=&quot;m&quot;&gt;[Close Date]&lt;/i&gt; - Opportunities&lt;i class=&quot;m&quot;&gt;[Created Date]&lt;/i&gt; ),
    Opportunities&lt;i class=&quot;m&quot;&gt;[Status]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Won&amp;quot;&lt;/i&gt;
)

Avg Won Deal Size = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Won Value]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Won Deals]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;If the model also relates Created Date, keep Close Date as the active relationship for win rate, and use &lt;a href=&quot;/blog/dax-relationship-functions/&quot;&gt;USERELATIONSHIP&lt;/a&gt; for &amp;quot;created this month&amp;quot; views.&lt;/p&gt;
&lt;h2 id=&quot;which-breakdowns-help&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-breakdowns-help&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which breakdowns help?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;By rep&lt;/strong&gt;: coaching; but small counts swing, so show the number of closed deals next to it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;By source&lt;/strong&gt;: where to invest (referrals often win more).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;By deal size band&lt;/strong&gt;: are big deals the problem?&lt;/li&gt;&lt;li&gt;&lt;strong&gt;By stage reached&lt;/strong&gt;: the stage where most losses happen (a &lt;a href=&quot;/blog/funnel-chart-power-bi/&quot;&gt;funnel&lt;/a&gt; of stages).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;By loss reason&lt;/strong&gt;: price, competitor, no decision. &amp;quot;No decision&amp;quot; is often the biggest.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-does-win-rate-connect-to-other-kpis&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-win-rate-connect-to-other-kpis&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does win rate connect to other KPIs?&lt;/h2&gt;
&lt;p&gt;Expected revenue from pipeline ≈ open pipeline value × win rate by value. That is the basis of &lt;a href=&quot;/blog/pipeline-coverage-kpi/&quot;&gt;pipeline coverage&lt;/a&gt;: with a 25% win rate by value you need about 4× the quota in pipeline.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Counting open deals.&lt;/strong&gt; They have not been won or lost yet.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Created date instead of close date.&lt;/strong&gt; A deal created in Q1 and lost in Q3 belongs to Q3's win rate.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Unqualified leads as losses.&lt;/strong&gt; Lowers the rate and mixes marketing quality with sales skill; keep them in a separate lead conversion rate.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Deals that never close.&lt;/strong&gt; Stale opportunities open for a year hide losses; close them as lost after a set age.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/calculate-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: CALCULATE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/userelationship-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: USERELATIONSHIP function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-funnel-charts&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Funnel charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add win rate by count and by value side by side, by quarter and by source. &lt;a href=&quot;/blog/pipeline-coverage-kpi/&quot;&gt;Pipeline coverage&lt;/a&gt; turns it into a forecast.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Version control for Power BI with PBIP files and Git</title>
    <link href="https://data.benibix.com/blog/version-control-power-bi-pbip/"/>
    <id>https://data.benibix.com/blog/version-control-power-bi-pbip/</id>
    <published>2026-11-09T09:00:00Z</published>
    <updated>2026-11-09T09:00:00Z</updated>
    <summary>A file named Sales_v7_final.pbix says that something changed, not what. Real version control starts with saving as a Power BI Project (PBIP): plain text files that Git can track, compare and roll back.</summary>
    <category term="Power BI"/>
    <category term="Modelling"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; in Power BI Desktop, &lt;strong&gt;File, Save as&lt;/strong&gt;, and choose &lt;strong&gt;Power BI project (.pbip)&lt;/strong&gt;. The report and the semantic model are saved as &lt;strong&gt;folders of plain text files&lt;/strong&gt; instead of one binary .pbix, so &lt;strong&gt;Git&lt;/strong&gt; can track every change, show you the difference between two versions, and roll one back. Microsoft describes PBIP as &lt;strong&gt;source control ready&lt;/strong&gt; and built for &lt;strong&gt;CI/CD&lt;/strong&gt;; it also works well with a code editor such as VS Code.&lt;/p&gt;
&lt;p&gt;A .pbix file saved as &amp;quot;Sales_v7_final.pbix&amp;quot; shows the usual problem: the name says it changed, not what, and nobody can tell which measure moved between v6 and v7.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-project-look-like-on-disk&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-project-look-like-on-disk&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a project look like on disk?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;layers&quot;&gt;&lt;ol class=&quot;dfig-stack&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Sales.pbip&lt;/b&gt;&lt;span&gt;the file you open in Power BI Desktop&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Sales.Report/&lt;/b&gt;&lt;span&gt;the report: pages and visuals as text files&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Sales.SemanticModel/&lt;/b&gt;&lt;span&gt;the model: tables, measures, relationships as text&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;.gitignore&lt;/b&gt;&lt;span&gt;keeps local cache files out of Git&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;A Power BI project in a folder&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-does-git-give-you-that-a-pbix-does-not&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-git-give-you-that-a-pbix-does-not&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does Git give you that a .pbix does not?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Question&lt;/th&gt;&lt;th&gt;With .pbix files&lt;/th&gt;&lt;th&gt;With PBIP in Git&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;What changed since last week?&lt;/td&gt;&lt;td&gt;Open both and compare by eye&lt;/td&gt;&lt;td&gt;A diff of the exact lines&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Who changed the margin measure?&lt;/td&gt;&lt;td&gt;Ask around&lt;/td&gt;&lt;td&gt;The commit history&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Undo one change, keep the rest&lt;/td&gt;&lt;td&gt;Not possible&lt;/td&gt;&lt;td&gt;Revert that commit&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Two people editing&lt;/td&gt;&lt;td&gt;One at a time&lt;/td&gt;&lt;td&gt;Branches, then merge&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-does-it-help-with-an-ai-agent&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-it-help-with-an-ai-agent&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does it help with an AI agent?&lt;/h2&gt;
&lt;p&gt;A coding agent like Claude Code works on text files. With a PBIP folder, it can read your measures, suggest a change in one file, and you see the exact diff before you commit. A binary .pbix gives it nothing to read.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Committing the cache.&lt;/strong&gt; Keep the &lt;code&gt;.gitignore&lt;/code&gt; Power BI writes; local cache files do not belong in Git.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Editing files while Desktop has them open.&lt;/strong&gt; Close Desktop or reload after outside edits.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Data in Git.&lt;/strong&gt; PBIP stores definitions; keep exported data and credentials out of the repository.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/developer/projects/projects-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Power BI Desktop projects (PBIP)&lt;/a&gt;, the folder structure, source control and CI/CD&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Write the project's notes for an agent with &lt;a href=&quot;/blog/claude-md-for-a-data-repo/&quot;&gt;a CLAUDE.md for a data repository&lt;/a&gt;. For pipelines in Git, see &lt;a href=&quot;/blog/azure-data-factory-git-ci-cd/&quot;&gt;Azure Data Factory with Git and CI/CD&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Should a chart move? Animation or small multiples</title>
    <link href="https://data.benibix.com/blog/animated-charts-or-small-multiples/"/>
    <id>https://data.benibix.com/blog/animated-charts-or-small-multiples/</id>
    <published>2026-11-09T01:00:00Z</published>
    <updated>2026-11-09T01:00:00Z</updated>
    <summary>Most of the time a still chart is better than a moving one. When animation helps a reader, why small multiples usually beat it, and what Power BI offers for each.</summary>
    <category term="Visuals"/>
    <category term="Trends"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; animate only when the &lt;strong&gt;movement itself is the message&lt;/strong&gt; and someone is there to explain it, like a scatter of countries moving over 20 years in a talk. For a report people read on their own, show the steps &lt;strong&gt;side by side&lt;/strong&gt; as &lt;strong&gt;small multiples&lt;/strong&gt;: the eye compares frames that sit next to each other far better than frames it has to remember. In Power BI, the scatter chart's &lt;strong&gt;Play axis&lt;/strong&gt; animates; &lt;strong&gt;small multiples&lt;/strong&gt; split a chart into a grid by a field.&lt;/p&gt;
&lt;p&gt;A chart is already a strong still. Adding motion takes something away: the ability to look at two moments at once.&lt;/p&gt;
&lt;h2 id=&quot;when-does-animation-help&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-does-animation-help&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When does animation help?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Situation&lt;/th&gt;&lt;th&gt;Better&lt;/th&gt;&lt;th&gt;Why&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;A talk, with you explaining as it plays&lt;/td&gt;&lt;td&gt;Animation&lt;/td&gt;&lt;td&gt;The movement holds attention and you point at what matters&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;A report read alone&lt;/td&gt;&lt;td&gt;Small multiples&lt;/td&gt;&lt;td&gt;Readers compare at their own pace&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Comparing 2026 with 2025 exactly&lt;/td&gt;&lt;td&gt;Side by side, same scale&lt;/td&gt;&lt;td&gt;Memory is bad at exact comparisons&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Showing that items moved in different directions&lt;/td&gt;&lt;td&gt;Animation, then a still of start and end&lt;/td&gt;&lt;td&gt;The motion shows the drift; the still lets people check it&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Printed or exported to PDF&lt;/td&gt;&lt;td&gt;Small multiples&lt;/td&gt;&lt;td&gt;Animation does not survive export&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Animate, or show side by side?&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-does-power-bi-offer&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-power-bi-offer&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does Power BI offer?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Play axis&lt;/strong&gt; on the scatter chart: put a date or year field in it and press play; the points move from period to period, with an optional trail for a selected point.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Small multiples&lt;/strong&gt; on bar, column, line and area charts: put a field in &lt;strong&gt;Small multiples&lt;/strong&gt; and the chart repeats once per value, on a shared axis.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Bookmarks&lt;/strong&gt; with buttons: step through prepared views of a page, which works like a slideshow you control.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-make-small-multiples-readable&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-make-small-multiples-readable&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you make small multiples readable?&lt;/h2&gt;
&lt;p&gt;Keep the &lt;strong&gt;same scale&lt;/strong&gt; on every panel, so a taller line means a bigger number everywhere. Limit the grid to what fits without scrolling, about 4 to 12 panels. Sort the panels in a meaningful order: by size, by region, by time.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-small-multiples&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create small multiples in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-scatter&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Scatter, bubble and dot plot charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Build the grid with &lt;a href=&quot;/blog/small-multiples-power-bi/&quot;&gt;small multiples in Power BI&lt;/a&gt;, and the moving version with &lt;a href=&quot;/blog/scatter-bubble-chart-power-bi/&quot;&gt;scatter and bubble charts&lt;/a&gt;. For guided steps through a page, see &lt;a href=&quot;/blog/buttons-bookmarks-navigators-power-bi/&quot;&gt;buttons, bookmarks and navigators&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Explore, plan, code, commit: a pipeline change with Claude</title>
    <link href="https://data.benibix.com/blog/claude-code-workflow-for-a-pipeline-change/"/>
    <id>https://data.benibix.com/blog/claude-code-workflow-for-a-pipeline-change/</id>
    <published>2026-11-08T17:00:00Z</published>
    <updated>2026-11-08T17:00:00Z</updated>
    <summary>Changing a data pipeline is where a wrong first step costs most. The four-step Claude Code workflow applied to one real change, a new column flowing from source to report, with what to ask at each step.</summary>
    <category term="AI"/>
    <category term="Claude Code"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;Explore&lt;/strong&gt; first: ask Claude to read the pipeline and explain where the data flows, with no edits. &lt;strong&gt;Plan&lt;/strong&gt; in plan mode (&lt;strong&gt;Shift+Tab&lt;/strong&gt;): ask for every file that must change and how you will test it, then approve or correct the plan. &lt;strong&gt;Code:&lt;/strong&gt; let it make the change and run the tests or a comparison query. &lt;strong&gt;Commit&lt;/strong&gt; when the numbers match. Skip the plan only for a one-line fix; a change across layers never should.&lt;/p&gt;
&lt;p&gt;Adding one column to a pipeline touches the source query, the staging table, the transformation, the model and the report. Miss one and the column is blank in the report, or worse, the join changes and every total moves.&lt;/p&gt;
&lt;h2 id=&quot;what-does-each-step-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-each-step-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does each step look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Explore&lt;/b&gt;&lt;span&gt;&amp;quot;Read the pipeline. Where does Orders come from, and which files touch it? No edits.&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Plan&lt;/b&gt;&lt;span&gt;Shift+Tab: &amp;quot;Plan adding Channel from the source to the sales report. List files and tests.&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Code&lt;/b&gt;&lt;span&gt;&amp;quot;Make the change, run the tests, and compare total revenue before and after.&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;bronze&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Commit&lt;/b&gt;&lt;span&gt;&amp;quot;Totals match. Commit with a message that says what changed and why.&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Adding a Channel column from source to report&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-should-the-plan-contain&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-should-the-plan-contain&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What should the plan contain?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Every file that changes&lt;/strong&gt;, layer by layer: source, staging, transformation, model, report.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;What stays the same:&lt;/strong&gt; &amp;quot;total revenue per month must not change&amp;quot;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;How you will check it:&lt;/strong&gt; a query that compares totals before and after, and a test for the new column's values.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;If the plan does not say how it will be checked, ask for that before approving.&lt;/p&gt;
&lt;h2 id=&quot;why-compare-totals&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-compare-totals&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why compare totals?&lt;/h2&gt;
&lt;p&gt;Because adding a column should not change any existing number. If revenue per month moves after the change, a join somewhere now repeats rows. A comparison query run before and after catches it in seconds:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;SELECT&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;FORMAT&lt;/i&gt;(OrderDate, &lt;i class=&quot;s&quot;&gt;'yyyy-MM'&lt;/i&gt;) &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; Month, &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt;(Amount) &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; Revenue
&lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; mart.Sales
&lt;i class=&quot;k&quot;&gt;GROUP&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;BY&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;FORMAT&lt;/i&gt;(OrderDate, &lt;i class=&quot;s&quot;&gt;'yyyy-MM'&lt;/i&gt;)
&lt;i class=&quot;k&quot;&gt;ORDER&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;BY&lt;/i&gt; Month;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/permission-modes&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Permission modes&lt;/a&gt;, plan mode&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/common-workflows&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Common workflows&lt;/a&gt;, exploring and planning before editing&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Give Claude your pipeline's rules first with &lt;a href=&quot;/blog/claude-md-for-a-data-repo/&quot;&gt;a CLAUDE.md for a data repository&lt;/a&gt;, and catch join problems with &lt;a href=&quot;/blog/claude-code-skill-that-checks-sql/&quot;&gt;a skill that checks SQL&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>DAX table functions: every one with an example</title>
    <link href="https://data.benibix.com/blog/table-functions-dax-reference/"/>
    <id>https://data.benibix.com/blog/table-functions-dax-reference/</id>
    <published>2026-11-08T12:00:00Z</published>
    <updated>2026-11-08T12:00:00Z</updated>
    <summary>A reference of all DAX table manipulation functions, grouping (SUMMARIZECOLUMNS, SUMMARIZE, GROUPBY, rollups), shaping (ADDCOLUMNS, SELECTCOLUMNS, TOPN), sets and joins (UNION, EXCEPT, INTERSECT, CROSSJOIN, GENERATE, natural joins), building (DATATABLE, ROW, GENERATESERIES) and more, with examples.</summary>
    <category term="DAX"/>
    <category term="Reference"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; DAX table functions return tables. You use them in four places: as &lt;strong&gt;filters&lt;/strong&gt; in &lt;code&gt;CALCULATE&lt;/code&gt; (&lt;code&gt;TREATAS&lt;/code&gt;, &lt;code&gt;TOPN&lt;/code&gt;), as the table an &lt;strong&gt;iterator&lt;/strong&gt; walks (&lt;code&gt;SUMX ( VALUES ( ... ) )&lt;/code&gt;), to define &lt;strong&gt;calculated tables&lt;/strong&gt; (&lt;code&gt;DATATABLE&lt;/code&gt;, &lt;code&gt;GENERATESERIES&lt;/code&gt;), and as the result of &lt;strong&gt;DAX queries&lt;/strong&gt; (&lt;code&gt;SUMMARIZECOLUMNS&lt;/code&gt;). This page lists every function in Microsoft's table manipulation group with one example each.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-group&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-group&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions group?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Does&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;SUMMARIZECOLUMNS&lt;/td&gt;&lt;td&gt;groups by columns of any tables and adds measures&lt;/td&gt;&lt;td&gt;SUMMARIZECOLUMNS ( 'Date'[Year], &amp;quot;Revenue&amp;quot;, [Revenue] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SUMMARIZE&lt;/td&gt;&lt;td&gt;distinct combinations of columns of a table and related ones&lt;/td&gt;&lt;td&gt;SUMMARIZE ( Sales, 'Product'[Category], 'Date'[Year] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;GROUPBY&lt;/td&gt;&lt;td&gt;groups a table, aggregating with CURRENTGROUP&lt;/td&gt;&lt;td&gt;GROUPBY ( T, T[Year], &amp;quot;@Max&amp;quot;, MAXX ( CURRENTGROUP ( ), [@Rev] ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CURRENTGROUP&lt;/td&gt;&lt;td&gt;the rows of the current group inside GROUPBY&lt;/td&gt;&lt;td&gt;MAXX ( CURRENTGROUP ( ), [@Rev] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ROLLUP, ROLLUPGROUP, ROLLUPADDISSUBTOTAL, ROLLUPISSUBTOTAL&lt;/td&gt;&lt;td&gt;subtotal rows in SUMMARIZE and SUMMARIZECOLUMNS&lt;/td&gt;&lt;td&gt;SUMMARIZECOLUMNS ( ROLLUPADDISSUBTOTAL ( 'Date'[Year], &amp;quot;IsTotal&amp;quot; ), &amp;quot;Revenue&amp;quot;, [Revenue] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ADDMISSINGITEMS&lt;/td&gt;&lt;td&gt;adds rows with empty values to a SUMMARIZECOLUMNS result&lt;/td&gt;&lt;td&gt;used by Power BI's own queries&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;IGNORE&lt;/td&gt;&lt;td&gt;leaves an expression out of the blank-row test in SUMMARIZECOLUMNS&lt;/td&gt;&lt;td&gt;IGNORE ( [Target] )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Grouping&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In depth: &lt;a href=&quot;/blog/summarize-summarizecolumns-addcolumns-dax/&quot;&gt;SUMMARIZECOLUMNS, SUMMARIZE and ADDCOLUMNS&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-shape-and-pick-rows&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-shape-and-pick-rows&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions shape and pick rows?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Does&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;ADDCOLUMNS&lt;/td&gt;&lt;td&gt;adds expression columns to a table&lt;/td&gt;&lt;td&gt;ADDCOLUMNS ( VALUES ( Customer[Customer] ), &amp;quot;@Rev&amp;quot;, [Revenue] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SELECTCOLUMNS&lt;/td&gt;&lt;td&gt;keeps or renames columns, or adds expressions&lt;/td&gt;&lt;td&gt;SELECTCOLUMNS ( Customer, &amp;quot;Name&amp;quot;, Customer[Customer] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;TOPN&lt;/td&gt;&lt;td&gt;the first N rows by an expression&lt;/td&gt;&lt;td&gt;TOPN ( 10, VALUES ( Customer[Customer] ), [Revenue] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;VALUES&lt;/td&gt;&lt;td&gt;visible distinct values, with the blank row&lt;/td&gt;&lt;td&gt;VALUES ( 'Product'[Category] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DISTINCT (column)&lt;/td&gt;&lt;td&gt;visible distinct values, without the blank row&lt;/td&gt;&lt;td&gt;DISTINCT ( 'Product'[Category] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DISTINCT (table)&lt;/td&gt;&lt;td&gt;distinct rows of a table expression&lt;/td&gt;&lt;td&gt;DISTINCT ( UNION ( T1, T2 ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;FILTERS&lt;/td&gt;&lt;td&gt;values directly filtered on a column&lt;/td&gt;&lt;td&gt;FILTERS ( 'Product'[Color] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;TREATAS&lt;/td&gt;&lt;td&gt;applies a table's values as a filter on other columns&lt;/td&gt;&lt;td&gt;TREATAS ( VALUES ( 'Date'[Year Month] ), Budget[Year Month] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DETAILROWS&lt;/td&gt;&lt;td&gt;returns the detail rows expression defined for a measure&lt;/td&gt;&lt;td&gt;DETAILROWS ( [Revenue] )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Shaping&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In depth: &lt;a href=&quot;/blog/topn-dax/&quot;&gt;TOPN&lt;/a&gt;, &lt;a href=&quot;/blog/values-vs-distinct-dax/&quot;&gt;VALUES vs DISTINCT&lt;/a&gt;, &lt;a href=&quot;/blog/treatas-dax/&quot;&gt;TREATAS&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-combine-tables&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-combine-tables&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions combine tables?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Does&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;UNION&lt;/td&gt;&lt;td&gt;appends rows, duplicates kept&lt;/td&gt;&lt;td&gt;UNION ( T1, T2 )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;EXCEPT&lt;/td&gt;&lt;td&gt;rows of the first table not in the second&lt;/td&gt;&lt;td&gt;EXCEPT ( CustomersTY, CustomersLY )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;INTERSECT&lt;/td&gt;&lt;td&gt;rows of the first table also in the second&lt;/td&gt;&lt;td&gt;INTERSECT ( CustomersTY, CustomersLY )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CROSSJOIN&lt;/td&gt;&lt;td&gt;every combination of rows&lt;/td&gt;&lt;td&gt;CROSSJOIN ( VALUES ( 'Product'[Category] ), VALUES ( Region[Region] ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;GENERATE&lt;/td&gt;&lt;td&gt;for each row of table1, the rows of table2 evaluated in that row&lt;/td&gt;&lt;td&gt;GENERATE ( VALUES ( 'Date'[Year] ), TOPN ( 3, VALUES ( 'Product'[Product] ), [Revenue] ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;GENERATEALL&lt;/td&gt;&lt;td&gt;as GENERATE, keeping rows of table1 where table2 is empty&lt;/td&gt;&lt;td&gt;GENERATEALL ( T1, T2 )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;NATURALINNERJOIN&lt;/td&gt;&lt;td&gt;joins on common columns with the same lineage&lt;/td&gt;&lt;td&gt;NATURALINNERJOIN ( T1, T2 )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;NATURALLEFTOUTERJOIN&lt;/td&gt;&lt;td&gt;as above, keeping all rows of the left table&lt;/td&gt;&lt;td&gt;NATURALLEFTOUTERJOIN ( T1, T2 )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SUBSTITUTEWITHINDEX&lt;/td&gt;&lt;td&gt;a semijoin that replaces common columns with an index&lt;/td&gt;&lt;td&gt;SUBSTITUTEWITHINDEX ( T1, &amp;quot;Index&amp;quot;, T2, T2[Key], ASC )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Sets and joins&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The &lt;code&gt;GENERATE&lt;/code&gt; example returns the top 3 products of each year. In depth: &lt;a href=&quot;/blog/union-except-intersect-crossjoin-dax/&quot;&gt;UNION, EXCEPT, INTERSECT and CROSSJOIN&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-build-tables&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-build-tables&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions build tables?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Does&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;DATATABLE&lt;/td&gt;&lt;td&gt;a typed table of constants&lt;/td&gt;&lt;td&gt;DATATABLE ( &amp;quot;Name&amp;quot;, STRING, { { &amp;quot;A&amp;quot; }, { &amp;quot;B&amp;quot; } } )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ROW&lt;/td&gt;&lt;td&gt;a one-row table with named columns&lt;/td&gt;&lt;td&gt;ROW ( &amp;quot;Revenue&amp;quot;, [Revenue] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;GENERATESERIES&lt;/td&gt;&lt;td&gt;a series of numbers in a column named Value&lt;/td&gt;&lt;td&gt;GENERATESERIES ( 0, 100, 10 )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Table constructor&lt;/td&gt;&lt;td&gt;rows from any expressions&lt;/td&gt;&lt;td&gt;{ ( &amp;quot;Low&amp;quot;, 0 ), ( &amp;quot;High&amp;quot;, 1 ) }&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Building&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In depth: &lt;a href=&quot;/blog/generateseries-datatable-row-dax/&quot;&gt;GENERATESERIES, DATATABLE and ROW&lt;/a&gt;. &lt;code&gt;CALENDAR&lt;/code&gt; and &lt;code&gt;CALENDARAUTO&lt;/code&gt; build date tables (see &lt;a href=&quot;/blog/date-and-time-functions-dax-reference/&quot;&gt;date and time functions&lt;/a&gt;).&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A table where a value is expected.&lt;/strong&gt; A table of one row and one column converts to a value; anything larger errors.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;No sort order.&lt;/strong&gt; Table functions do not sort; sort in the query or the visual.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Lineage lost.&lt;/strong&gt; Columns created with expressions (&lt;code&gt;SELECTCOLUMNS ( T, &amp;quot;X&amp;quot;, T[Col] &amp;amp; &amp;quot;&amp;quot; )&lt;/code&gt;) lose their link to the model and do not filter it; use &lt;code&gt;TREATAS&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Large intermediate tables.&lt;/strong&gt; &lt;code&gt;CROSSJOIN&lt;/code&gt; and &lt;code&gt;GENERATE&lt;/code&gt; multiply rows; filter first.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/table-manipulation-functions-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Table manipulation functions (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/generate-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: GENERATE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/selectcolumns-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SELECTCOLUMNS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Learn &lt;code&gt;VALUES&lt;/code&gt;, &lt;code&gt;ADDCOLUMNS&lt;/code&gt;, &lt;code&gt;SUMMARIZECOLUMNS&lt;/code&gt;, &lt;code&gt;TOPN&lt;/code&gt; and &lt;code&gt;TREATAS&lt;/code&gt; first; they cover most measures and queries. &lt;a href=&quot;/blog/offset-dax/&quot;&gt;Window functions&lt;/a&gt; work on tables like these, row by row.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Scatter, bubble and dot plot charts in Power BI</title>
    <link href="https://data.benibix.com/blog/scatter-bubble-chart-power-bi/"/>
    <id>https://data.benibix.com/blog/scatter-bubble-chart-power-bi/</id>
    <published>2026-11-08T12:00:00Z</published>
    <updated>2026-11-08T12:00:00Z</updated>
    <summary>How scatter, bubble and dot plot charts in Power BI show the relationship between two numbers, the Values, X-axis, Y-axis, Size, Legend and Play axis fields, quadrants with average lines, and the traps of correlation.</summary>
    <category term="Visuals"/>
    <category term="Distribution"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;scatter chart&lt;/strong&gt; places each item (a customer, a product, a store) as a point by two measures, one on the &lt;strong&gt;X-axis&lt;/strong&gt; and one on the &lt;strong&gt;Y-axis&lt;/strong&gt;, so it shows whether they move together and which items stand out. Add a third measure to &lt;strong&gt;Size&lt;/strong&gt; and the points become a &lt;strong&gt;bubble chart&lt;/strong&gt;; put a category on the X-axis and it becomes a &lt;strong&gt;dot plot&lt;/strong&gt;. The field in &lt;strong&gt;Values&lt;/strong&gt; decides what one point is, and the &lt;strong&gt;Play axis&lt;/strong&gt; animates the points over time.&lt;/p&gt;
&lt;p&gt;&amp;quot;Do stores that spend more on marketing sell more?&amp;quot; is a question no bar chart can answer for 80 stores at once. A scatter chart answers it in one picture, and shows the six stores that spend a lot and sell little.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-scatter-chart-show&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-scatter-chart-show&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a scatter chart show?&lt;/h2&gt;
&lt;p&gt;Four regions by discount and margin, bubble size by revenue:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;scatter&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;scatter chart: North 5, 32, 140; East 8, 27, 92; South 12, 21, 88; West 15, 18, 75; Online 7, 30, 110&quot;&gt;&lt;line x1=&quot;56&quot; y1=&quot;254&quot; x2=&quot;570&quot; y2=&quot;254&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;48&quot; y=&quot;258&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;56&quot; y1=&quot;194&quot; x2=&quot;570&quot; y2=&quot;194&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;48&quot; y=&quot;198&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;10&lt;/text&gt;&lt;line x1=&quot;56&quot; y1=&quot;134&quot; x2=&quot;570&quot; y2=&quot;134&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;48&quot; y=&quot;138&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;20&lt;/text&gt;&lt;line x1=&quot;56&quot; y1=&quot;74&quot; x2=&quot;570&quot; y2=&quot;74&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;48&quot; y=&quot;78&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;30&lt;/text&gt;&lt;line x1=&quot;56&quot; y1=&quot;14&quot; x2=&quot;570&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;48&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;40&lt;/text&gt;&lt;text x=&quot;56&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0&lt;/text&gt;&lt;text x=&quot;184.5&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;5&lt;/text&gt;&lt;text x=&quot;313&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;10&lt;/text&gt;&lt;text x=&quot;441.5&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;15&lt;/text&gt;&lt;text x=&quot;570&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;20&lt;/text&gt;&lt;circle cx=&quot;184.5&quot; cy=&quot;62&quot; r=&quot;26&quot; class=&quot;m bub k0&quot;/&gt;&lt;circle cx=&quot;261.6&quot; cy=&quot;92&quot; r=&quot;22.2&quot; class=&quot;m bub k1&quot;/&gt;&lt;circle cx=&quot;364.4&quot; cy=&quot;128&quot; r=&quot;21.9&quot; class=&quot;m bub k2&quot;/&gt;&lt;circle cx=&quot;441.5&quot; cy=&quot;146&quot; r=&quot;20.6&quot; class=&quot;m bub k3&quot;/&gt;&lt;circle cx=&quot;235.9&quot; cy=&quot;74&quot; r=&quot;23.7&quot; class=&quot;m bub k4&quot;/&gt;&lt;text x=&quot;214.5&quot; y=&quot;66&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;North&lt;/text&gt;&lt;text x=&quot;287.8&quot; y=&quot;96&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;East&lt;/text&gt;&lt;text x=&quot;390.3&quot; y=&quot;132&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;South&lt;/text&gt;&lt;text x=&quot;466.1&quot; y=&quot;150&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;West&lt;/text&gt;&lt;text x=&quot;263.6&quot; y=&quot;78&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;Online&lt;/text&gt;&lt;text x=&quot;313&quot; y=&quot;294&quot; class=&quot;tax&quot; text-anchor=&quot;middle&quot;&gt;Average discount %&lt;/text&gt;&lt;text x=&quot;14&quot; y=&quot;134&quot; class=&quot;tax&quot; text-anchor=&quot;middle&quot; transform=&quot;rotate(-90 14 134)&quot;&gt;Margin %&lt;/text&gt;&lt;line x1=&quot;56&quot; y1=&quot;254&quot; x2=&quot;570&quot; y2=&quot;254&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Discount against margin by region; bubble size is revenue&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The more discount, the lower the margin, and the regions that discount least are also the biggest. A bar chart of margin by region shows the ranking; only the scatter shows the relationship.&lt;/p&gt;
&lt;h2 id=&quot;when-is-it-the-right-chart&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-it-the-right-chart&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is it the right chart?&lt;/h2&gt;
&lt;p&gt;Microsoft lists the scatter chart's uses: the relationship between two numerical values; two groups of numbers as one series of x and y coordinates; patterns in large sets of data; many data points regardless of time; a logarithmic horizontal axis. Bubbles add: emphasising differences with size, three series of values at once, financial data as a picture, and quadrants. The dot plot's advantage is categorical data along the horizontal axis.&lt;/p&gt;
&lt;h2 id=&quot;which-fields-does-it-take&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-fields-does-it-take&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which fields does it take?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Well&lt;/th&gt;&lt;th&gt;What it does&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Values&lt;/td&gt;&lt;td&gt;the field that makes one point per value, for example &lt;code&gt;Store[Store Name]&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;X-axis&lt;/td&gt;&lt;td&gt;a measure for the horizontal position&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Y-axis&lt;/td&gt;&lt;td&gt;a measure for the vertical position&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Legend&lt;/td&gt;&lt;td&gt;colours the points by a category&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Size&lt;/td&gt;&lt;td&gt;a measure for the bubble size: a bubble chart&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Play axis&lt;/td&gt;&lt;td&gt;a date or period: a play button animates the points through time&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Tooltips&lt;/td&gt;&lt;td&gt;extra measures on hover&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;Without a field in &lt;strong&gt;Values&lt;/strong&gt;, the chart has one point: the total. That is the most common &amp;quot;my scatter chart shows one dot&amp;quot; problem.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-split-it-into-quadrants&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-split-it-into-quadrants&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you split it into quadrants?&lt;/h2&gt;
&lt;p&gt;Averages split the chart into four groups: high-high, high-low and so on. In the &lt;strong&gt;Analytics&lt;/strong&gt; pane add an &lt;strong&gt;Average line&lt;/strong&gt; for the X-axis and one for the Y-axis. Or, to use the groups elsewhere, write them as measures:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Avg Discount All Stores =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Store&lt;i class=&quot;m&quot;&gt;[Store Name]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Discount %]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( Store ) )

Avg Margin All Stores =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Store&lt;i class=&quot;m&quot;&gt;[Store Name]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Margin %]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( Store ) )

Store Quadrant =
&lt;i class=&quot;f&quot;&gt;SWITCH&lt;/i&gt; (
    &lt;i class=&quot;k&quot;&gt;TRUE&lt;/i&gt; (),
    &lt;i class=&quot;m&quot;&gt;[Discount %]&lt;/i&gt; &amp;lt;= &lt;i class=&quot;m&quot;&gt;[Avg Discount All Stores]&lt;/i&gt; &amp;amp;&amp;amp; &lt;i class=&quot;m&quot;&gt;[Margin %]&lt;/i&gt; &amp;gt;= &lt;i class=&quot;m&quot;&gt;[Avg Margin All Stores]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Low discount, high margin&amp;quot;&lt;/i&gt;,
    &lt;i class=&quot;m&quot;&gt;[Discount %]&lt;/i&gt; &amp;gt; &lt;i class=&quot;m&quot;&gt;[Avg Discount All Stores]&lt;/i&gt; &amp;amp;&amp;amp; &lt;i class=&quot;m&quot;&gt;[Margin %]&lt;/i&gt; &amp;gt;= &lt;i class=&quot;m&quot;&gt;[Avg Margin All Stores]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;High discount, high margin&amp;quot;&lt;/i&gt;,
    &lt;i class=&quot;m&quot;&gt;[Discount %]&lt;/i&gt; &amp;lt;= &lt;i class=&quot;m&quot;&gt;[Avg Discount All Stores]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Low discount, low margin&amp;quot;&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;High discount, low margin&amp;quot;&lt;/i&gt;
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;AVERAGEX&lt;/code&gt; over the stores gives the average of the points on the chart (each store counts once), not the average of all sales. Put &lt;code&gt;Store Quadrant&lt;/code&gt; in a table next to the chart, or use a numeric version of it to colour the points with &lt;strong&gt;Markers, Color, fx&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-does-the-play-axis-add&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-the-play-axis-add&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does the Play axis add?&lt;/h2&gt;
&lt;p&gt;Put &lt;code&gt;Date[Year]&lt;/code&gt; on the &lt;strong&gt;Play axis&lt;/strong&gt; and a play button appears under the chart. Each year the points move to their new place, and selecting a point draws its trail. It shows how a product moved from &amp;quot;small and low margin&amp;quot; to &amp;quot;big and high margin&amp;quot; over five years, which a static chart cannot. The animation is for presenting; for analysis, a trail on one selected point is often enough.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;One dot.&lt;/strong&gt; No field in &lt;strong&gt;Values&lt;/strong&gt;, so everything is aggregated into one point.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Correlation read as cause.&lt;/strong&gt; Stores with more marketing sell more, but bigger stores also get more marketing. The chart shows the relationship, not its reason.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Overplotting.&lt;/strong&gt; Ten thousand points become a blot. Power BI samples large scatter charts (a high-density sampling keeps the outliers); filter, or aggregate to a coarser level.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Bubble sizes.&lt;/strong&gt; People read bubble area roughly; use size for a rough third dimension, never for exact comparisons.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Mixing scales.&lt;/strong&gt; One point with 100 times the revenue squeezes all others into a corner; try a logarithmic axis.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-scatter&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Scatter charts, bubble charts, and dot plot charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-analytics-pane&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Use the Analytics pane in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/averagex-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: AVERAGEX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Pick what one point is, put it in &lt;strong&gt;Values&lt;/strong&gt;, add two measures, and draw average lines to split the chart into quadrants. The &lt;a href=&quot;/blog/analytics-pane-power-bi/&quot;&gt;Analytics pane&lt;/a&gt; adds trend lines, and &lt;a href=&quot;/blog/key-influencers-power-bi/&quot;&gt;key influencers&lt;/a&gt; tests which factors move a measure.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>SUM vs SUMX in DAX: when you need the X</title>
    <link href="https://data.benibix.com/blog/sum-vs-sumx-dax/"/>
    <id>https://data.benibix.com/blog/sum-vs-sumx-dax/</id>
    <published>2026-11-08T12:00:00Z</published>
    <updated>2026-11-08T12:00:00Z</updated>
    <summary>The difference between SUM and SUMX in DAX, aggregating a column against evaluating an expression per row, why SUM is SUMX in disguise, line amounts, weighted values, measures inside SUMX, totals that match the rows, and performance.</summary>
    <category term="DAX"/>
    <category term="Iterators and aggregation"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;code&gt;SUM ( Sales[Amount] )&lt;/code&gt; adds up one column. &lt;code&gt;SUMX ( table, expression )&lt;/code&gt; goes through a table row by row, evaluates the expression for each row, and adds the results. Use &lt;code&gt;SUM&lt;/code&gt; when the number is already in a column. Use &lt;code&gt;SUMX&lt;/code&gt; when it must be calculated per row first (&lt;code&gt;Quantity * Price&lt;/code&gt;), or when a total must add up the rows of a visual (the sum of per-customer results). Internally, &lt;code&gt;SUM ( col )&lt;/code&gt; is &lt;code&gt;SUMX ( table, col )&lt;/code&gt;, so there is no speed penalty for &lt;code&gt;SUMX&lt;/code&gt; with simple column math.&lt;/p&gt;
&lt;p&gt;A Sales table has Quantity and Unit Price but no Amount. &lt;code&gt;SUM ( Sales[Quantity] ) * SUM ( Sales[Unit Price] )&lt;/code&gt; multiplies two totals and is badly wrong. &lt;code&gt;SUMX ( Sales, Sales[Quantity] * Sales[Unit Price] )&lt;/code&gt; multiplies per line, then adds.&lt;/p&gt;
&lt;h2 id=&quot;why-does-the-order-of-operations-matter&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-does-the-order-of-operations-matter&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why does the order of operations matter?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Line&lt;/th&gt;&lt;th&gt;Quantity&lt;/th&gt;&lt;th&gt;Unit Price&lt;/th&gt;&lt;th&gt;Quantity x Price&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;td&gt;500&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;SUM(Qty) x SUM(Price)&lt;/td&gt;&lt;td&gt;7&lt;/td&gt;&lt;td&gt;110&lt;/td&gt;&lt;td&gt;770&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;SUMX(Qty x Price)&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;520&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Two order lines&lt;/figcaption&gt;&lt;/figure&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue Wrong = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Quantity]&lt;/i&gt; ) * &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Unit Price]&lt;/i&gt; )

Revenue = &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Sales, Sales&lt;i class=&quot;m&quot;&gt;[Quantity]&lt;/i&gt; * Sales&lt;i class=&quot;m&quot;&gt;[Unit Price]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;when-else-do-you-need-sumx&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-else-do-you-need-sumx&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When else do you need SUMX?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- 1 a related value per row&lt;/i&gt;
Revenue at List = &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Sales, Sales&lt;i class=&quot;m&quot;&gt;[Quantity]&lt;/i&gt; * &lt;i class=&quot;f&quot;&gt;RELATED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[List Price]&lt;/i&gt; ) )

&lt;i class=&quot;c&quot;&gt;-- 2 a weighted average: price weighted by quantity&lt;/i&gt;
Avg Price Weighted =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Sales, Sales&lt;i class=&quot;m&quot;&gt;[Quantity]&lt;/i&gt; * Sales&lt;i class=&quot;m&quot;&gt;[Unit Price]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Quantity]&lt;/i&gt; ) )

&lt;i class=&quot;c&quot;&gt;-- 3 a total that adds up the rows: sum of each customer's capped bonus&lt;/i&gt;
Bonus =
&lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; * &lt;i class=&quot;n&quot;&gt;0.05&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;500&lt;/i&gt; )
)

&lt;i class=&quot;c&quot;&gt;-- 4 currency conversion per row&lt;/i&gt;
Revenue EUR = &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Sales, Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; * &lt;i class=&quot;f&quot;&gt;RELATED&lt;/i&gt; ( Rates&lt;i class=&quot;m&quot;&gt;[Rate]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Example 3 is the important one for totals. Without &lt;code&gt;SUMX&lt;/code&gt;, the total row computes &lt;code&gt;MIN ( total revenue * 0.05, 500 )&lt;/code&gt;, which is 500, not the sum of the customers' bonuses.&lt;/p&gt;
&lt;h2 id=&quot;why-do-totals-not-add-up-without-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-do-totals-not-add-up-without-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why do totals not add up without it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Customer&lt;/th&gt;&lt;th&gt;Revenue&lt;/th&gt;&lt;th&gt;Bonus with MIN only&lt;/th&gt;&lt;th&gt;Bonus with SUMX over customers&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Ana&lt;/td&gt;&lt;td&gt;4,000&lt;/td&gt;&lt;td&gt;200&lt;/td&gt;&lt;td&gt;200&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ben&lt;/td&gt;&lt;td&gt;20,000&lt;/td&gt;&lt;td&gt;500&lt;/td&gt;&lt;td&gt;500&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Chen&lt;/td&gt;&lt;td&gt;8,000&lt;/td&gt;&lt;td&gt;400&lt;/td&gt;&lt;td&gt;400&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;32,000&lt;/td&gt;&lt;td&gt;500&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;32,000&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;1,100&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Capped bonus per customer&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;A measure is evaluated in the total's own filter context, not as a sum of the rows. &lt;code&gt;SUMX&lt;/code&gt; over the grouping column forces the total to be the sum of the per-row results.&lt;/p&gt;
&lt;h2 id=&quot;how-fast-is-sumx&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-fast-is-sumx&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How fast is SUMX?&lt;/h2&gt;
&lt;p&gt;Simple arithmetic on columns of one table (&lt;code&gt;Quantity * Price&lt;/code&gt;) is handled by the storage engine in bulk and is as fast as &lt;code&gt;SUM&lt;/code&gt;. It gets slower when:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;the expression calls a &lt;strong&gt;measure&lt;/strong&gt; (one context transition per row): iterate a small table such as &lt;code&gt;VALUES ( Customer[Customer] )&lt;/code&gt;, not the fact table,&lt;/li&gt;&lt;li&gt;the expression uses &lt;code&gt;RELATED&lt;/code&gt; across large tables,&lt;/li&gt;&lt;li&gt;the expression has &lt;code&gt;IF&lt;/code&gt; or other logic the storage engine cannot push down.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;A calculated column &lt;code&gt;Line Amount&lt;/code&gt; makes &lt;code&gt;SUM&lt;/code&gt; possible but costs memory; with &lt;code&gt;SUMX&lt;/code&gt; the model stays smaller.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Multiplying sums.&lt;/strong&gt; &lt;code&gt;SUM ( A ) * SUM ( B )&lt;/code&gt; is not &lt;code&gt;SUMX ( A * B )&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;SUMX over the fact table with a measure inside.&lt;/strong&gt; Millions of context transitions; iterate the dimension.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Expecting SUMX to change filters.&lt;/strong&gt; It iterates the rows in the current filter context; it removes nothing.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Blank handling.&lt;/strong&gt; Rows where the expression is BLANK are skipped in the sum.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/sum-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SUM function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/sumx-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SUMX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/aggregation-functions-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Aggregation functions (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Find measures that multiply two sums or totals that do not match their rows, and rewrite them with &lt;code&gt;SUMX&lt;/code&gt; over the right table. &lt;a href=&quot;/blog/averagex-minx-maxx-dax/&quot;&gt;AVERAGEX, MINX and MAXX&lt;/a&gt; work the same way for other aggregates.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Waterfall charts in Power BI: from start to end value</title>
    <link href="https://data.benibix.com/blog/waterfall-chart-power-bi/"/>
    <id>https://data.benibix.com/blog/waterfall-chart-power-bi/</id>
    <published>2026-11-08T12:00:00Z</published>
    <updated>2026-11-08T12:00:00Z</updated>
    <summary>How a waterfall (bridge) chart in Power BI explains the change from a start value to an end value, the Category and Breakdown fields, sorting, the DAX for a revenue bridge, and the mistakes that break it.</summary>
    <category term="Visuals"/>
    <category term="Comparison"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;waterfall chart&lt;/strong&gt;, also called a &lt;strong&gt;bridge chart&lt;/strong&gt;, shows a running total as values are added and taken away: each change is a floating column, increases and decreases in their own colours, and a &lt;strong&gt;Total&lt;/strong&gt; column at the end. Use it to explain why a number moved: last year's revenue to this year's, opening to closing headcount, budget to actual. It takes a &lt;strong&gt;Category&lt;/strong&gt; (the steps), a &lt;strong&gt;Y-axis&lt;/strong&gt; measure (the change) and an optional &lt;strong&gt;Breakdown&lt;/strong&gt; that splits each step into its biggest contributors.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The chart, part by part:&lt;/strong&gt; &lt;a href=&quot;/visuals/waterfall-chart/&quot;&gt;What is a waterfall chart?&lt;/a&gt; draws its parts and shows how to read one, its kinds and the mistakes to avoid.&lt;/p&gt;
&lt;p&gt;&amp;quot;Revenue grew 40 thousand&amp;quot; is a fact. &amp;quot;New customers added 120, prices 40, churn took 90 and discounts 30&amp;quot; is an explanation. The waterfall draws the second sentence.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-revenue-bridge-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-revenue-bridge-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a revenue bridge look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;waterfall&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;waterfall chart: 2025 revenue 500; New customers 120; Price 40; Churn -90; Discounts -30; 2026 revenue total&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;203&quot; x2=&quot;628&quot; y2=&quot;203&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;207&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;200&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;140&quot; x2=&quot;628&quot; y2=&quot;140&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;144&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;400&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;77&quot; x2=&quot;628&quot; y2=&quot;77&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;81&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;600&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;628&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;800&lt;/text&gt;&lt;rect x=&quot;69.3&quot; y=&quot;108.5&quot; width=&quot;61.4&quot; height=&quot;157.5&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;100&quot; y=&quot;102.5&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;500&lt;/text&gt;&lt;line x1=&quot;130.7&quot; y1=&quot;108.5&quot; x2=&quot;165.3&quot; y2=&quot;108.5&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;100&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;2025 revenue&lt;/text&gt;&lt;rect x=&quot;165.3&quot; y=&quot;70.7&quot; width=&quot;61.4&quot; height=&quot;37.8&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;196&quot; y=&quot;64.7&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;+120&lt;/text&gt;&lt;line x1=&quot;226.7&quot; y1=&quot;70.7&quot; x2=&quot;261.3&quot; y2=&quot;70.7&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;196&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;New customers&lt;/text&gt;&lt;rect x=&quot;261.3&quot; y=&quot;58.1&quot; width=&quot;61.4&quot; height=&quot;12.6&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;292&quot; y=&quot;52.1&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;+40&lt;/text&gt;&lt;line x1=&quot;322.7&quot; y1=&quot;58.1&quot; x2=&quot;357.3&quot; y2=&quot;58.1&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;292&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Price&lt;/text&gt;&lt;rect x=&quot;357.3&quot; y=&quot;58.1&quot; width=&quot;61.4&quot; height=&quot;28.3&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;388&quot; y=&quot;52.1&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;-90&lt;/text&gt;&lt;line x1=&quot;418.7&quot; y1=&quot;86.4&quot; x2=&quot;453.3&quot; y2=&quot;86.4&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;388&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Churn&lt;/text&gt;&lt;rect x=&quot;453.3&quot; y=&quot;86.4&quot; width=&quot;61.4&quot; height=&quot;9.4&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;484&quot; y=&quot;80.4&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;-30&lt;/text&gt;&lt;line x1=&quot;514.7&quot; y1=&quot;95.9&quot; x2=&quot;549.3&quot; y2=&quot;95.9&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;484&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Discounts&lt;/text&gt;&lt;rect x=&quot;549.3&quot; y=&quot;95.9&quot; width=&quot;61.4&quot; height=&quot;170.1&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;580&quot; y=&quot;89.9&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;540&lt;/text&gt;&lt;text x=&quot;580&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;2026 revenue&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;From 2025 revenue to 2026 revenue (in thousands)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The first column starts from the axis, each change floats where the last one ended, and the last column is the result: 500 + 120 + 40 - 90 - 30 = 540.&lt;/p&gt;
&lt;p&gt;Microsoft lists the common uses: changes of a measure over time or across categories, auditing the big changes behind a total, profit built from its revenue and cost lines, headcount from the start to the end of a year, and a running balance of money earned and spent per month.&lt;/p&gt;
&lt;h2 id=&quot;how-does-power-bi-build-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-power-bi-build-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does Power BI build it?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;In &lt;strong&gt;Visualizations&lt;/strong&gt; pick &lt;strong&gt;Waterfall chart&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Drag the measure of change to &lt;strong&gt;Y-axis&lt;/strong&gt; and the steps to &lt;strong&gt;Category&lt;/strong&gt; (for example the month, or a &amp;quot;Bridge Step&amp;quot; column).&lt;/li&gt;&lt;li&gt;Power BI adds a &lt;strong&gt;Total&lt;/strong&gt; column at the end and colours increases, decreases and the total differently (&lt;strong&gt;Format visual, Columns&lt;/strong&gt; sets the three colours).&lt;/li&gt;&lt;li&gt;Optional: drag a field to &lt;strong&gt;Breakdown&lt;/strong&gt;, for example the territory. Each step is split into its biggest contributors, and &lt;strong&gt;Breakdown, Maximum breakdowns&lt;/strong&gt; sets how many (the top ones by absolute value); the rest are grouped.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;By default the steps are in ascending or date order. &lt;strong&gt;More options (...)&lt;/strong&gt;, &lt;strong&gt;Sort axis&lt;/strong&gt; sorts by the category or by the value, which turns a monthly waterfall into &amp;quot;biggest gains first, biggest losses last&amp;quot;.&lt;/p&gt;
&lt;h2 id=&quot;what-dax-makes-a-bridge-between-two-years&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-dax-makes-a-bridge-between-two-years&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What DAX makes a bridge between two years?&lt;/h2&gt;
&lt;p&gt;A month-by-month waterfall is easy: the change per month is the measure. A bridge between two totals needs a small table of steps and a measure that returns each step's value. The steps:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Bridge Steps =
&lt;i class=&quot;f&quot;&gt;DATATABLE&lt;/i&gt; (
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Step&amp;quot;&lt;/i&gt;, STRING, &lt;i class=&quot;s&quot;&gt;&amp;quot;Order&amp;quot;&lt;/i&gt;, INTEGER,
    {
        { &lt;i class=&quot;s&quot;&gt;&amp;quot;New customers&amp;quot;&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; },
        { &lt;i class=&quot;s&quot;&gt;&amp;quot;Price&amp;quot;&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;2&lt;/i&gt; },
        { &lt;i class=&quot;s&quot;&gt;&amp;quot;Volume of existing customers&amp;quot;&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;3&lt;/i&gt; },
        { &lt;i class=&quot;s&quot;&gt;&amp;quot;Churn&amp;quot;&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;4&lt;/i&gt; }
    }
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Sort &lt;code&gt;Step&lt;/code&gt; by &lt;code&gt;Order&lt;/code&gt; in the model. The measure picks the right calculation per step:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue Change =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; ThisYear = &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; LastYear = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;SWITCH&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Bridge Steps'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Step]&lt;/i&gt; ),
        &lt;i class=&quot;s&quot;&gt;&amp;quot;New customers&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue from New Customers]&lt;/i&gt;,
        &lt;i class=&quot;s&quot;&gt;&amp;quot;Price&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Price Effect]&lt;/i&gt;,
        &lt;i class=&quot;s&quot;&gt;&amp;quot;Volume of existing customers&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Volume Effect]&lt;/i&gt;,
        &lt;i class=&quot;s&quot;&gt;&amp;quot;Churn&amp;quot;&lt;/i&gt;, - &lt;i class=&quot;m&quot;&gt;[Revenue Lost to Churn]&lt;/i&gt;,
        ThisYear - LastYear
    )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The last argument of &lt;code&gt;SWITCH&lt;/code&gt; is what the &lt;strong&gt;Total&lt;/strong&gt; column shows: the whole change, which must equal the sum of the steps. If it does not, a step is missing or counted twice, and the chart shows it as a gap between the last floating column and the total. &lt;a href=&quot;/blog/price-volume-mix-analysis/&quot;&gt;Price, volume and mix analysis&lt;/a&gt; writes the price and volume measures.&lt;/p&gt;
&lt;p&gt;Waterfalls in Power BI start from zero and show only changes, so the starting value appears as the first step: add a step &amp;quot;2025 revenue&amp;quot; that returns &lt;code&gt;LastYear&lt;/code&gt;, and the Total column becomes 2026 revenue.&lt;/p&gt;
&lt;h2 id=&quot;what-else-can-it-show&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-else-can-it-show&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What else can it show?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;waterfall&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;waterfall chart: 1 January 240; Hires 58; Transfers in 6; Leavers -41; Transfers out -9; 31 December total&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;203&quot; x2=&quot;628&quot; y2=&quot;203&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;207&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;140&quot; x2=&quot;628&quot; y2=&quot;140&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;144&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;200&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;77&quot; x2=&quot;628&quot; y2=&quot;77&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;81&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;300&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;628&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;400&lt;/text&gt;&lt;rect x=&quot;69.3&quot; y=&quot;114.8&quot; width=&quot;61.4&quot; height=&quot;151.2&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;100&quot; y=&quot;108.8&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;240&lt;/text&gt;&lt;line x1=&quot;130.7&quot; y1=&quot;114.8&quot; x2=&quot;165.3&quot; y2=&quot;114.8&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;100&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;1 January&lt;/text&gt;&lt;rect x=&quot;165.3&quot; y=&quot;78.3&quot; width=&quot;61.4&quot; height=&quot;36.5&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;196&quot; y=&quot;72.3&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;+58&lt;/text&gt;&lt;line x1=&quot;226.7&quot; y1=&quot;78.3&quot; x2=&quot;261.3&quot; y2=&quot;78.3&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;196&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Hires&lt;/text&gt;&lt;rect x=&quot;261.3&quot; y=&quot;74.5&quot; width=&quot;61.4&quot; height=&quot;3.8&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;292&quot; y=&quot;68.5&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;+6&lt;/text&gt;&lt;line x1=&quot;322.7&quot; y1=&quot;74.5&quot; x2=&quot;357.3&quot; y2=&quot;74.5&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;292&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Transfers in&lt;/text&gt;&lt;rect x=&quot;357.3&quot; y=&quot;74.5&quot; width=&quot;61.4&quot; height=&quot;25.8&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;388&quot; y=&quot;68.5&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;-41&lt;/text&gt;&lt;line x1=&quot;418.7&quot; y1=&quot;100.3&quot; x2=&quot;453.3&quot; y2=&quot;100.3&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;388&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Leavers&lt;/text&gt;&lt;rect x=&quot;453.3&quot; y=&quot;100.3&quot; width=&quot;61.4&quot; height=&quot;5.7&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;484&quot; y=&quot;94.3&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;-9&lt;/text&gt;&lt;line x1=&quot;514.7&quot; y1=&quot;106&quot; x2=&quot;549.3&quot; y2=&quot;106&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;484&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Transfers out&lt;/text&gt;&lt;rect x=&quot;549.3&quot; y=&quot;106&quot; width=&quot;61.4&quot; height=&quot;160&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;580&quot; y=&quot;100&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;254&lt;/text&gt;&lt;text x=&quot;580&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;31 December&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Headcount from 1 January to 31 December&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The same shape works for cash (opening balance, inflows, outflows, closing balance) and for a budget against actual bridge (budget, then each variance, then actual).&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Steps that do not add up.&lt;/strong&gt; The total is the sum of the columns; a step left out makes the bridge lie. Check &lt;code&gt;sum of steps = end - start&lt;/code&gt; in a card.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too many steps.&lt;/strong&gt; Twenty small steps read like noise. Keep the five or six biggest and put the rest into &amp;quot;Other&amp;quot;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Signs flipped.&lt;/strong&gt; Costs and churn must be negative in the measure; a positive churn makes the bar go up.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The breakdown hiding the story.&lt;/strong&gt; Breakdown with five contributors per step multiplies the columns. Use it to explore, then set &lt;strong&gt;Maximum breakdowns&lt;/strong&gt; low for the report.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Months sorted by value by accident.&lt;/strong&gt; A time waterfall sorted by value loses its timeline; check &lt;strong&gt;Sort axis&lt;/strong&gt;.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-waterfall-charts&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Waterfall charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/switch-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SWITCH function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/datatable-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DATATABLE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/sameperiodlastyear-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SAMEPERIODLASTYEAR function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Start with a month-by-month waterfall of one change measure, then build a two-year bridge with a step table when the question is &amp;quot;why&amp;quot;. &lt;a href=&quot;/blog/year-over-year-dax/&quot;&gt;Year over year in DAX&lt;/a&gt; covers the last-year measure, and &lt;a href=&quot;/blog/budget-variance-kpi/&quot;&gt;budget variance&lt;/a&gt; uses the same bridge for budget against actual.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>YTD, QTD and MTD in DAX: running totals in the period</title>
    <link href="https://data.benibix.com/blog/ytd-qtd-mtd-dax/"/>
    <id>https://data.benibix.com/blog/ytd-qtd-mtd-dax/</id>
    <published>2026-11-08T12:00:00Z</published>
    <updated>2026-11-08T12:00:00Z</updated>
    <summary>How to calculate year-to-date, quarter-to-date and month-to-date totals in DAX with TOTALYTD, DATESYTD, TOTALQTD, TOTALMTD and their week versions, fiscal years with a year-end date, last year's YTD, stopping at the last date with data, and common mistakes.</summary>
    <category term="DAX"/>
    <category term="Time intelligence"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;year to date&lt;/strong&gt; is &lt;code&gt;TOTALYTD ( [Revenue], 'Date'[Date] )&lt;/code&gt; or, the same, &lt;code&gt;CALCULATE ( [Revenue], DATESYTD ( 'Date'[Date] ) )&lt;/code&gt;. Quarter and month to date use &lt;code&gt;TOTALQTD&lt;/code&gt; / &lt;code&gt;DATESQTD&lt;/code&gt; and &lt;code&gt;TOTALMTD&lt;/code&gt; / &lt;code&gt;DATESMTD&lt;/code&gt;. For a fiscal year, pass the year-end date: &lt;code&gt;DATESYTD ( 'Date'[Date], &amp;quot;6-30&amp;quot; )&lt;/code&gt; for a year ending 30 June. They need a proper &lt;a href=&quot;/blog/date-table-dax/&quot;&gt;date table&lt;/a&gt;. With calendar-based time intelligence, week to date (&lt;code&gt;TOTALWTD&lt;/code&gt;) is also available.&lt;/p&gt;
&lt;p&gt;&amp;quot;Where are we this year?&amp;quot; is the first question of most sales meetings. A YTD line next to last year's YTD answers it; a monthly column chart does not.&lt;/p&gt;
&lt;h2 id=&quot;what-does-ytd-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-ytd-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does YTD look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;line&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;2026 YTD&lt;/li&gt;&lt;li class=&quot;k1&quot;&gt;2025 YTD&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;line chart: Jan 120, 110; Feb 255, 228; Mar 405, 352; Apr 547, 481; May 702, 615; Jun 860, 760&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;626&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;200&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;626&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;400&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;626&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;600&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;626&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;800&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;626&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;1,000&lt;/text&gt;&lt;polyline points=&quot;52,238.3 166.8,208.5 281.6,177.3 396.4,144.8 511.2,111 626,74.5&quot; class=&quot;ln k1&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;238.3&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;166.8&quot; cy=&quot;208.5&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;281.6&quot; cy=&quot;177.3&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;396.4&quot; cy=&quot;144.8&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;511.2&quot; cy=&quot;111&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;74.5&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;polyline points=&quot;52,235.8 166.8,201.7 281.6,163.9 396.4,128.2 511.2,89.1 626,49.3&quot; class=&quot;ln k0&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;235.8&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;166.8&quot; cy=&quot;201.7&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;281.6&quot; cy=&quot;163.9&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;396.4&quot; cy=&quot;128.2&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;511.2&quot; cy=&quot;89.1&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;49.3&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;text x=&quot;52&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jan&lt;/text&gt;&lt;text x=&quot;166.8&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Feb&lt;/text&gt;&lt;text x=&quot;281.6&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Mar&lt;/text&gt;&lt;text x=&quot;396.4&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Apr&lt;/text&gt;&lt;text x=&quot;511.2&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;May&lt;/text&gt;&lt;text x=&quot;626&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jun&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Revenue year to date, this year against last year (thousands)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue YTD = &lt;i class=&quot;f&quot;&gt;TOTALYTD&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )

Revenue YTD LY =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue YTD]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )

Revenue YTD vs LY % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue YTD]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Revenue YTD LY]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue YTD LY]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;which-functions-are-there&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-are-there&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions are there?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Period&lt;/th&gt;&lt;th&gt;Total function&lt;/th&gt;&lt;th&gt;Dates function (for CALCULATE)&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Year&lt;/td&gt;&lt;td&gt;TOTALYTD ( expr, dates [, filter] [, year_end] )&lt;/td&gt;&lt;td&gt;DATESYTD ( dates [, year_end] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Quarter&lt;/td&gt;&lt;td&gt;TOTALQTD ( expr, dates [, filter] )&lt;/td&gt;&lt;td&gt;DATESQTD ( dates )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Month&lt;/td&gt;&lt;td&gt;TOTALMTD ( expr, dates [, filter] )&lt;/td&gt;&lt;td&gt;DATESMTD ( dates )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Week&lt;/td&gt;&lt;td&gt;TOTALWTD ( expr, calendar )&lt;/td&gt;&lt;td&gt;DATESWTD ( calendar )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Period-to-date functions&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The week functions work with &lt;a href=&quot;/blog/calendar-based-time-intelligence-dax/&quot;&gt;calendar-based time intelligence&lt;/a&gt;, which defines what a week is. The &lt;code&gt;DATES...&lt;/code&gt; form is more flexible: it is a filter you can combine with others in one &lt;code&gt;CALCULATE&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue QTD = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DATESQTD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
Revenue MTD = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DATESMTD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
Online Revenue YTD = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DATESYTD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), Sales&lt;i class=&quot;m&quot;&gt;[Channel]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Online&amp;quot;&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-do-you-handle-a-fiscal-year&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-handle-a-fiscal-year&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you handle a fiscal year?&lt;/h2&gt;
&lt;p&gt;Pass the last day of the fiscal year as month and day:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue FYTD = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DATESYTD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;6-30&amp;quot;&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The year-end is a text literal (the year part is ignored), read in the locale the file was created in; &lt;code&gt;&amp;quot;6-30&amp;quot;&lt;/code&gt; is safe in most. &lt;code&gt;TOTALYTD&lt;/code&gt; takes the same year end as its last argument, after an optional filter. Add a Fiscal Year column to the date table so readers slice by fiscal year.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-stop-the-line-at-today&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-stop-the-line-at-today&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you stop the line at today?&lt;/h2&gt;
&lt;p&gt;The date table runs to 31 December, so a YTD line continues flat to the year end. Return BLANK after the last date with data:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue YTD =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; LastSale = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Order Date]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;REMOVEFILTERS&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) &amp;lt;= LastSale, &lt;i class=&quot;f&quot;&gt;TOTALYTD&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The same applies to last year's YTD when compared to a partial current year: comparing January to June 2026 with all of 2025 is wrong. &lt;code&gt;SAMEPERIODLASTYEAR&lt;/code&gt; over the current filter keeps the same dates, as long as the current period stops at the last date with data.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;No date table, or a column from the fact table.&lt;/strong&gt; &lt;code&gt;DATESYTD ( Sales[Order Date] )&lt;/code&gt; only sees dates with sales; use the date table's column.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Gaps in the dates.&lt;/strong&gt; Classic time intelligence needs contiguous dates; build the table with &lt;code&gt;CALENDAR&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;YTD flat into the future.&lt;/strong&gt; Stop at the last data date as above.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Comparing a partial year with a full one.&lt;/strong&gt; Compare YTD with last year's YTD to the same day.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Filters that remove the year.&lt;/strong&gt; YTD works within the year in context; with no year filtered, it calculates to the last date in the context.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/totalytd-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: TOTALYTD function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/datesytd-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DATESYTD function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/totalmtd-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: TOTALMTD function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add &lt;code&gt;Revenue YTD&lt;/code&gt; and &lt;code&gt;Revenue YTD LY&lt;/code&gt; to a line chart by month with the stop at the last sale. &lt;a href=&quot;/blog/year-over-year-dax/&quot;&gt;Year over year&lt;/a&gt; covers the comparison functions in depth.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Median or average: which one should your report show?</title>
    <link href="https://data.benibix.com/blog/median-vs-average/"/>
    <id>https://data.benibix.com/blog/median-vs-average/</id>
    <published>2026-11-08T09:00:00Z</published>
    <updated>2026-11-08T09:00:00Z</updated>
    <summary>The average and the median answer different questions, and one big value can move the average a long way. When to show which, a worked example, and the DAX for both.</summary>
    <category term="KPIs"/>
    <category term="Basics"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; show the &lt;strong&gt;median&lt;/strong&gt; when a few very big or very small values could pull the number away from what is typical: order values, salaries, delivery times, house prices. Show the &lt;strong&gt;average&lt;/strong&gt; (the mean) when every value should count by its size, like total cost per order across a budget. If the two are far apart, your data is skewed, and the median is the better &amp;quot;typical&amp;quot; value. In DAX they are &lt;code&gt;MEDIAN&lt;/code&gt; and &lt;code&gt;AVERAGE&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;A box plot is built around the median for a reason: it is the middle value, and one outlier cannot move it. A KPI card that shows only the average can hide that most customers wait two days while a few wait three weeks.&lt;/p&gt;
&lt;h2 id=&quot;how-far-can-one-value-move-the-average&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-far-can-one-value-move-the-average&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How far can one value move the average?&lt;/h2&gt;
&lt;p&gt;Nine support tickets, closed in hours:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;column&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;column chart: T1 2; T2 3; T3 3; T4 4; T5 4; T6 5; T7 5; T8 6; T9 48&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;628&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;10&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;628&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;20&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;628&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;30&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;628&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;40&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;628&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;50&lt;/text&gt;&lt;rect x=&quot;62.2&quot; y=&quot;255.9&quot; width=&quot;41.5&quot; height=&quot;10.1&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;84&quot; y=&quot;249.9&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;2&lt;/text&gt;&lt;text x=&quot;84&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;T1&lt;/text&gt;&lt;rect x=&quot;126.2&quot; y=&quot;250.9&quot; width=&quot;41.5&quot; height=&quot;15.1&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;148&quot; y=&quot;244.9&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;3&lt;/text&gt;&lt;text x=&quot;148&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;T2&lt;/text&gt;&lt;rect x=&quot;190.2&quot; y=&quot;250.9&quot; width=&quot;41.5&quot; height=&quot;15.1&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;212&quot; y=&quot;244.9&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;3&lt;/text&gt;&lt;text x=&quot;212&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;T3&lt;/text&gt;&lt;rect x=&quot;254.2&quot; y=&quot;245.8&quot; width=&quot;41.5&quot; height=&quot;20.2&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;276&quot; y=&quot;239.8&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;4&lt;/text&gt;&lt;text x=&quot;276&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;T4&lt;/text&gt;&lt;rect x=&quot;318.2&quot; y=&quot;245.8&quot; width=&quot;41.5&quot; height=&quot;20.2&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;340&quot; y=&quot;239.8&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;4&lt;/text&gt;&lt;text x=&quot;340&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;T5&lt;/text&gt;&lt;rect x=&quot;382.2&quot; y=&quot;240.8&quot; width=&quot;41.5&quot; height=&quot;25.2&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;404&quot; y=&quot;234.8&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;5&lt;/text&gt;&lt;text x=&quot;404&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;T6&lt;/text&gt;&lt;rect x=&quot;446.2&quot; y=&quot;240.8&quot; width=&quot;41.5&quot; height=&quot;25.2&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;468&quot; y=&quot;234.8&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;5&lt;/text&gt;&lt;text x=&quot;468&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;T7&lt;/text&gt;&lt;rect x=&quot;510.2&quot; y=&quot;235.8&quot; width=&quot;41.5&quot; height=&quot;30.2&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;532&quot; y=&quot;229.8&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;6&lt;/text&gt;&lt;text x=&quot;532&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;T8&lt;/text&gt;&lt;rect x=&quot;574.2&quot; y=&quot;24.1&quot; width=&quot;41.5&quot; height=&quot;241.9&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;596&quot; y=&quot;18.1&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;48&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;T9&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Hours to close nine tickets (made-up help desk)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The &lt;strong&gt;average&lt;/strong&gt; is (2 + 3 + 3 + 4 + 4 + 5 + 5 + 6 + 48) ÷ 9 = 80 ÷ 9 = &lt;strong&gt;8.9 hours&lt;/strong&gt;. The &lt;strong&gt;median&lt;/strong&gt;, the fifth of nine sorted values, is &lt;strong&gt;4 hours&lt;/strong&gt;. Eight of the nine tickets closed in 6 hours or less, so &amp;quot;typically about 4 hours&amp;quot; is the honest summary, and the one slow ticket deserves its own look.&lt;/p&gt;
&lt;h2 id=&quot;when-is-the-average-the-right-number&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-the-average-the-right-number&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is the average the right number?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Question&lt;/th&gt;&lt;th&gt;Use&lt;/th&gt;&lt;th&gt;Why&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;What does a typical customer wait?&lt;/td&gt;&lt;td&gt;Median&lt;/td&gt;&lt;td&gt;One very slow case should not move &amp;quot;typical&amp;quot;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;What is the typical order value?&lt;/td&gt;&lt;td&gt;Median&lt;/td&gt;&lt;td&gt;A few huge orders pull the average up&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;What does each order cost us on average, to plan the budget?&lt;/td&gt;&lt;td&gt;Average&lt;/td&gt;&lt;td&gt;Every euro counts, the big ones too&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;What is the average daily revenue this month?&lt;/td&gt;&lt;td&gt;Average&lt;/td&gt;&lt;td&gt;Totals divided by days, used to forecast&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;A good rule: if you would multiply the number back up to a total, use the average. If you want to describe one typical item, use the median.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-write-them-in-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-write-them-in-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you write them in DAX?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Avg Hours = &lt;i class=&quot;f&quot;&gt;AVERAGE&lt;/i&gt; ( Tickets&lt;i class=&quot;m&quot;&gt;[HoursToClose]&lt;/i&gt; )
Median Hours = &lt;i class=&quot;f&quot;&gt;MEDIAN&lt;/i&gt; ( Tickets&lt;i class=&quot;m&quot;&gt;[HoursToClose]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Both respect the filters on the page, so a slicer for a team gives that team's median. To compute over a measure per item instead of a column, use the iterator versions &lt;code&gt;AVERAGEX&lt;/code&gt; and &lt;code&gt;MEDIANX&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Only the average on the card.&lt;/strong&gt; Show both, or the median with the average in the tooltip, when the data is skewed.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Deleting the outlier to fix the average.&lt;/strong&gt; The 48-hour ticket is real; report the median and investigate the ticket.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Averaging averages.&lt;/strong&gt; The average of five store averages is not the company average when stores differ in size.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/median-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: MEDIAN function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/average-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: AVERAGE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://www.itl.nist.gov/div898/handbook/eda/section3/eda351.htm&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;NIST/SEMATECH e-Handbook of Statistical Methods: Measures of location&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;To see the whole spread instead of one number, see &lt;a href=&quot;/blog/what-is-a-histogram/&quot;&gt;what is a histogram&lt;/a&gt; and &lt;a href=&quot;/blog/averagex-minx-maxx-dax/&quot;&gt;AVERAGEX, MINX and MAXX&lt;/a&gt;. All statistical functions are in &lt;a href=&quot;/blog/statistical-functions-dax-reference/&quot;&gt;the DAX statistical functions reference&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Prompts for cleaning data: start with the verb</title>
    <link href="https://data.benibix.com/blog/ai-prompts-for-cleaning-data/"/>
    <id>https://data.benibix.com/blog/ai-prompts-for-cleaning-data/</id>
    <published>2026-11-08T01:00:00Z</published>
    <updated>2026-11-08T01:00:00Z</updated>
    <summary>A good cleaning prompt starts with what to do, says what to change and what must stay. Every verb in it maps to a Power Query step you can check.</summary>
    <category term="Power BI"/>
    <category term="Power Query"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; start each request with the &lt;strong&gt;verb&lt;/strong&gt; (remove, split, replace, merge, change type), name the &lt;strong&gt;column&lt;/strong&gt;, and say what must &lt;strong&gt;stay unchanged&lt;/strong&gt;: &amp;quot;Split the FullName column into FirstName and LastName at the last space; keep every other column as it is.&amp;quot; Ask for the result as &lt;strong&gt;Power Query steps&lt;/strong&gt; (M code) instead of a cleaned file, so the cleaning runs again on next month's data and you can read every step.&lt;/p&gt;
&lt;p&gt;&amp;quot;Clean this data&amp;quot; lets the AI decide what clean means, and it may change more than you wanted. &amp;quot;Trim the spaces in Customer, keep every other column as it is&amp;quot; changes one thing. The shape is always the same: one verb, one target, and a line about what stays.&lt;/p&gt;
&lt;h2 id=&quot;which-verbs-map-to-which-step&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-verbs-map-to-which-step&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which verbs map to which step?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Verb&lt;/th&gt;&lt;th&gt;Example request&lt;/th&gt;&lt;th&gt;Power Query step&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Remove&lt;/td&gt;&lt;td&gt;Remove rows where OrderID is blank&lt;/td&gt;&lt;td&gt;Table.SelectRows&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Remove duplicates&lt;/td&gt;&lt;td&gt;Remove duplicate rows by OrderID, keep the first&lt;/td&gt;&lt;td&gt;Table.Distinct&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Split&lt;/td&gt;&lt;td&gt;Split FullName at the last space&lt;/td&gt;&lt;td&gt;Table.SplitColumn&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Replace&lt;/td&gt;&lt;td&gt;Replace &amp;quot;N/A&amp;quot; with null in Region&lt;/td&gt;&lt;td&gt;Table.ReplaceValue&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Trim&lt;/td&gt;&lt;td&gt;Trim spaces in CustomerName&lt;/td&gt;&lt;td&gt;Table.TransformColumns with Text.Trim&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Change type&lt;/td&gt;&lt;td&gt;Make OrderDate a date, using the en-GB locale&lt;/td&gt;&lt;td&gt;Table.TransformColumnTypes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Merge&lt;/td&gt;&lt;td&gt;Merge Orders with Customers on CustomerID, left outer&lt;/td&gt;&lt;td&gt;Table.NestedJoin&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Cleaning verbs and their Power Query steps&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-does-one-request-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-one-request-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does one request look like?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot;&gt;&lt;code&gt;In Power Query (M), on the table Orders:
1. Remove rows where OrderID is blank.
2. Trim spaces in CustomerName.
3. Change OrderDate to a date using the en-GB locale (dates are written 31/12/2026).
Keep all other columns and their order unchanged.
Return the steps as M code I can paste into the Advanced Editor, one step per line.&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Numbering the steps gives you one applied step each in Power Query, so you can click through them and see what each one did.&lt;/p&gt;
&lt;h2 id=&quot;why-steps-and-not-a-cleaned-file&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-steps-and-not-a-cleaned-file&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why steps and not a cleaned file?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;They run again.&lt;/strong&gt; Next month's export goes through the same steps on refresh.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;You can read them.&lt;/strong&gt; Each applied step shows its result in the preview.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;No data leaves.&lt;/strong&gt; You describe the columns; the data never has to go into the chat.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;No locale on dates.&lt;/strong&gt; &amp;quot;03/04/2026&amp;quot; is March in one country and April in another.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&amp;quot;Clean this up.&amp;quot;&lt;/strong&gt; The AI decides what dirty means. Name each step.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Removing rows silently.&lt;/strong&gt; Before a Remove step, count the rows it removes and check they are the ones you meant.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/powerquery-m/power-query-m-function-reference&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Power Query M function reference&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-query/data-types&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Data types in Power Query&lt;/a&gt;, locale when changing types&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Keep the steps foldable to the source where you can: see &lt;a href=&quot;/blog/query-folding-power-query-explained/&quot;&gt;query folding explained&lt;/a&gt;. For the prompt shape behind this, see &lt;a href=&quot;/blog/few-shot-prompts-for-data/&quot;&gt;few-shot prompts&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>How many visuals should a Power BI page have?</title>
    <link href="https://data.benibix.com/blog/how-many-visuals-per-power-bi-page/"/>
    <id>https://data.benibix.com/blog/how-many-visuals-per-power-bi-page/</id>
    <published>2026-11-07T17:00:00Z</published>
    <updated>2026-11-07T17:00:00Z</updated>
    <summary>Fewer than you think. Every visual sends its own queries and asks for the reader's attention. Microsoft's guidance is to keep only what is necessary on a page; here is how to get to five to seven, and where the rest goes.</summary>
    <category term="Visuals"/>
    <category term="Report design"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; as few as the page's question needs, which in practice is about &lt;strong&gt;five to seven&lt;/strong&gt;. Microsoft's own guidance is to &lt;strong&gt;limit the visuals on a report page to only what is necessary&lt;/strong&gt;, because every visual runs its own queries and every extra one slows the page. Move the rest to &lt;strong&gt;drillthrough pages&lt;/strong&gt; and &lt;strong&gt;report page tooltips&lt;/strong&gt;, which Microsoft names as the places for extra detail.&lt;/p&gt;
&lt;p&gt;A page with twenty visuals feels thorough to the person who built it. To the reader it is twenty things to look at, and to Power BI it is twenty sets of queries every time a slicer changes.&lt;/p&gt;
&lt;h2 id=&quot;why-does-each-visual-cost-something&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-does-each-visual-cost-something&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why does each visual cost something?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Slicer changes&lt;/b&gt;&lt;span&gt;the filter context changes for the whole page&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Every visual queries&lt;/b&gt;&lt;span&gt;each one sends its own query to the model&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Visuals render&lt;/b&gt;&lt;span&gt;the page is ready when the slowest one is&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;red&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;The reader looks&lt;/b&gt;&lt;span&gt;one question answered, or twenty things to scan&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;What happens when a reader clicks a slicer&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Two costs add up: the queries (more visuals, more waiting) and the reader's attention (more visuals, longer to find the answer).&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-get-down-to-five-to-seven&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-get-down-to-five-to-seven&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you get down to five to seven?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Write the page's question&lt;/strong&gt; at the top, in one sentence: &amp;quot;Are we on track for this quarter's revenue?&amp;quot;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Keep what answers it:&lt;/strong&gt; the headline numbers next to their targets, one trend, one breakdown.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Merge look-alikes:&lt;/strong&gt; three cards for three regions become one bar chart.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Move the detail out:&lt;/strong&gt; a table of 500 orders belongs on a drillthrough page, not under the chart.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Hide the explanation in a tooltip:&lt;/strong&gt; a report page tooltip shows a small breakdown when the reader hovers.&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;where-does-the-rest-go&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-does-the-rest-go&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where does the rest go?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Drillthrough page&lt;/b&gt;&lt;span&gt;the detail for one item: right-click a region, see its orders&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Report page tooltip&lt;/b&gt;&lt;span&gt;a small page shown on hover, for the &amp;quot;why&amp;quot; behind a number&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;A second page&lt;/b&gt;&lt;span&gt;a different question gets its own page, with its own five to seven visuals&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Three places for what does not fit&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-check-the-page-is-fast&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-check-the-page-is-fast&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you check the page is fast?&lt;/h2&gt;
&lt;p&gt;Open &lt;strong&gt;Performance analyzer&lt;/strong&gt; on the Optimize ribbon, start recording and refresh the visuals. It lists each visual with how long it took. The slowest ones are often the ones nobody would miss.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/guidance/power-bi-optimization&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Optimization guide for Power BI&lt;/a&gt;, limit visuals on report pages&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-performance-analyzer&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Use Performance analyzer to examine report element performance&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Lay the page out the way people read it: see &lt;a href=&quot;/blog/power-bi-report-design-pattern/&quot;&gt;how I design a Power BI report page&lt;/a&gt;. For the detail pages, see &lt;a href=&quot;/blog/drill-down-drill-through-power-bi/&quot;&gt;drill down and drillthrough&lt;/a&gt; and &lt;a href=&quot;/blog/report-page-tooltips-power-bi/&quot;&gt;report page tooltips&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Microsoft data certifications: which path fits your role?</title>
    <link href="https://data.benibix.com/blog/microsoft-data-certification-path/"/>
    <id>https://data.benibix.com/blog/microsoft-data-certification-path/</id>
    <published>2026-11-07T12:00:00Z</published>
    <updated>2026-11-07T12:00:00Z</updated>
    <summary>A map of the current Microsoft certifications for data and AI work in 2026, by role (analyst, analytics engineer, data engineer, database administrator, AI developer, architect), with the order I would take them in and what each one proves.</summary>
    <category term="Exams"/>
    <category term="Choosing an exam"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; pick the exam for the work you do, not the most famous one. &lt;strong&gt;Analysts&lt;/strong&gt;: &lt;a href=&quot;/blog/pl-300-study-guide/&quot;&gt;PL-300&lt;/a&gt; for Power BI, then &lt;a href=&quot;/blog/dp-600-study-guide/&quot;&gt;DP-600&lt;/a&gt; for Fabric. &lt;strong&gt;Data engineers&lt;/strong&gt;: &lt;a href=&quot;/blog/dp-700-study-guide/&quot;&gt;DP-700&lt;/a&gt; on Fabric or &lt;a href=&quot;/blog/dp-750-study-guide/&quot;&gt;DP-750&lt;/a&gt; on Databricks. &lt;strong&gt;Database people&lt;/strong&gt;: &lt;a href=&quot;/blog/dp-300-study-guide/&quot;&gt;DP-300&lt;/a&gt;, then &lt;a href=&quot;/blog/dp-800-study-guide/&quot;&gt;DP-800&lt;/a&gt; for AI in SQL. &lt;strong&gt;AI developers&lt;/strong&gt;: &lt;a href=&quot;/blog/ai-103-study-guide/&quot;&gt;AI-103&lt;/a&gt;, &lt;a href=&quot;/blog/ai-200-study-guide/&quot;&gt;AI-200&lt;/a&gt; or &lt;a href=&quot;/blog/ai-300-study-guide/&quot;&gt;AI-300&lt;/a&gt;. Fundamentals exams are optional on every path; none is a prerequisite.&lt;/p&gt;
&lt;p&gt;I hold ten Microsoft and GitHub certifications across these paths. The order below is the one I would recommend to someone starting today.&lt;/p&gt;
&lt;h2 id=&quot;which-exam-fits-which-role&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-exam-fits-which-role&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which exam fits which role?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Role&lt;/th&gt;&lt;th&gt;Start with&lt;/th&gt;&lt;th&gt;Then&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Data analyst (Power BI)&lt;/td&gt;&lt;td&gt;PL-300 Power BI Data Analyst&lt;/td&gt;&lt;td&gt;DP-600 Fabric Analytics Engineer&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Analytics engineer (Fabric)&lt;/td&gt;&lt;td&gt;DP-600 Fabric Analytics Engineer&lt;/td&gt;&lt;td&gt;DP-700 Fabric Data Engineer&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Data engineer (Fabric)&lt;/td&gt;&lt;td&gt;DP-700 Fabric Data Engineer&lt;/td&gt;&lt;td&gt;DP-600 for the model side&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Data engineer (Databricks)&lt;/td&gt;&lt;td&gt;DP-750 Azure Databricks Data Engineer&lt;/td&gt;&lt;td&gt;DP-700 if you also use Fabric&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Database administrator&lt;/td&gt;&lt;td&gt;DP-300 Azure Database Administrator&lt;/td&gt;&lt;td&gt;DP-800 SQL AI Developer&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Database developer for AI apps&lt;/td&gt;&lt;td&gt;DP-800 SQL AI Developer&lt;/td&gt;&lt;td&gt;DP-420 Cosmos DB AI Developer&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;AI app and agent developer&lt;/td&gt;&lt;td&gt;AI-103 Azure AI Apps and Agents Developer&lt;/td&gt;&lt;td&gt;AB-100 Agentic AI Architect Expert&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;AI back-end developer&lt;/td&gt;&lt;td&gt;AI-200 Azure AI Cloud Developer&lt;/td&gt;&lt;td&gt;AI-103&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;MLOps engineer&lt;/td&gt;&lt;td&gt;AI-300 Machine Learning Operations Engineer&lt;/td&gt;&lt;td&gt;AI-103&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Cloud architect&lt;/td&gt;&lt;td&gt;AZ-104 Azure Administrator&lt;/td&gt;&lt;td&gt;AZ-305 Azure Solutions Architect Expert&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Current exams by role (October 2026)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;do-you-need-a-fundamentals-exam-first&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#do-you-need-a-fundamentals-exam-first&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Do you need a fundamentals exam first?&lt;/h2&gt;
&lt;p&gt;No. &lt;a href=&quot;/blog/dp-900-study-guide/&quot;&gt;DP-900&lt;/a&gt;, &lt;a href=&quot;/blog/az-900-study-guide/&quot;&gt;AZ-900&lt;/a&gt; and &lt;a href=&quot;/blog/ai-901-study-guide/&quot;&gt;AI-901&lt;/a&gt; are useful if the field is new to you, and they never expire, but no associate or expert exam requires them. &lt;a href=&quot;/blog/which-fundamentals-exam-first/&quot;&gt;Which fundamentals exam first?&lt;/a&gt; compares the three.&lt;/p&gt;
&lt;h2 id=&quot;which-exams-need-another-certification-first&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-exams-need-another-certification-first&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which exams need another certification first?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Expert certification&lt;/th&gt;&lt;th&gt;Exam&lt;/th&gt;&lt;th&gt;Also needs&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Azure Solutions Architect Expert&lt;/td&gt;&lt;td&gt;AZ-305&lt;/td&gt;&lt;td&gt;Azure Administrator Associate (AZ-104)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Agentic AI Business Solutions Architect Expert&lt;/td&gt;&lt;td&gt;AB-100&lt;/td&gt;&lt;td&gt;one associate from Microsoft's list, for example AI-103, AI-300 or PL-200&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Expert certifications and their prerequisites&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Associate exams have no prerequisite: you can book PL-300 or DP-700 directly.&lt;/p&gt;
&lt;h2 id=&quot;how-do-the-paths-connect&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-the-paths-connect&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do the paths connect?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;PL-300&lt;/b&gt;&lt;span&gt;Power BI models and reports&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;DP-600&lt;/b&gt;&lt;span&gt;the same models in Fabric, plus lakehouse and warehouse&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;DP-700&lt;/b&gt;&lt;span&gt;the pipelines that fill them&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;DP-800&lt;/b&gt;&lt;span&gt;SQL with AI on top&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One possible route for a BI developer&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Each exam reuses part of the last one. DP-600 repeats some of PL-300's modelling, and DP-700 shares Fabric itself with DP-600, so taking them close together saves study time.&lt;/p&gt;
&lt;h2 id=&quot;what-does-it-cost-to-keep-them&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-it-cost-to-keep-them&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does it cost to keep them?&lt;/h2&gt;
&lt;p&gt;Associate and expert certifications expire after a year and are renewed for free with an online assessment in the six months before. Fundamentals never expire. See &lt;a href=&quot;/blog/renew-microsoft-certification/&quot;&gt;How do you renew a Microsoft certification?&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/browse/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Browse credentials&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/azure-solutions-architect/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Microsoft Certified: Azure Solutions Architect Expert&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/exams/ab-100/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Exam AB-100&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/renew-your-microsoft-certification-faq&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Renewal FAQ&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Find your row in the first table and read that study guide. My own credentials, each checkable on Microsoft Learn, are on &lt;a href=&quot;/about/&quot;&gt;the About page&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Repeat purchase rate: formula, DAX and time to reorder</title>
    <link href="https://data.benibix.com/blog/repeat-purchase-rate-kpi/"/>
    <id>https://data.benibix.com/blog/repeat-purchase-rate-kpi/</id>
    <published>2026-11-07T12:00:00Z</published>
    <updated>2026-11-07T12:00:00Z</updated>
    <summary>How to calculate repeat purchase rate, the share of customers with more than one order, over all time and within a window such as 90 days of the first order, purchase frequency, time between orders, the DAX on an orders table, and why the window matters.</summary>
    <category term="KPIs"/>
    <category term="Customers"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;repeat purchase rate&lt;/strong&gt; = customers with &lt;strong&gt;two or more&lt;/strong&gt; orders / customers with at least one order. Over all time it only goes up, so measure it &lt;strong&gt;within a window&lt;/strong&gt;: the share of customers who ordered again within 90 days (or 180, matching your buying cycle) of their first order, by month of first order. Pair it with &lt;strong&gt;purchase frequency&lt;/strong&gt; (orders per customer per year) and the &lt;strong&gt;median days to second order&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;For shops, the second order is the hardest and most valuable one: customers who buy twice are far more likely to keep buying. This KPI shows whether first-time buyers come back.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;First order month&lt;/th&gt;&lt;th&gt;New customers&lt;/th&gt;&lt;th&gt;Ordered again within 90 days&lt;/th&gt;&lt;th&gt;90-day repeat rate&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;May&lt;/td&gt;&lt;td&gt;1,200&lt;/td&gt;&lt;td&gt;264&lt;/td&gt;&lt;td&gt;22.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Jun&lt;/td&gt;&lt;td&gt;1,150&lt;/td&gt;&lt;td&gt;276&lt;/td&gt;&lt;td&gt;24.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Jul&lt;/td&gt;&lt;td&gt;1,300&lt;/td&gt;&lt;td&gt;338&lt;/td&gt;&lt;td&gt;26.0%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Customers by first order month, 90-day repeat&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;column&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;column chart: 0-15 140; 16-30 210; 31-45 160; 46-60 110; 61-90 120; 91-180 150; over 180 110&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;628&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;50&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;628&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;628&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;150&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;628&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;200&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;628&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;250&lt;/text&gt;&lt;rect x=&quot;65.2&quot; y=&quot;124.9&quot; width=&quot;54&quot; height=&quot;141.1&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;93.1&quot; y=&quot;118.9&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;140&lt;/text&gt;&lt;text x=&quot;93.1&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0-15&lt;/text&gt;&lt;rect x=&quot;147.5&quot; y=&quot;54.3&quot; width=&quot;54&quot; height=&quot;211.7&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;175.4&quot; y=&quot;48.3&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;210&lt;/text&gt;&lt;text x=&quot;175.4&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;16-30&lt;/text&gt;&lt;rect x=&quot;229.7&quot; y=&quot;104.7&quot; width=&quot;54&quot; height=&quot;161.3&quot; rx=&quot;3&quot; class=&quot;m t-blue&quot;/&gt;&lt;text x=&quot;257.7&quot; y=&quot;98.7&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;160&lt;/text&gt;&lt;text x=&quot;257.7&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;31-45&lt;/text&gt;&lt;rect x=&quot;312&quot; y=&quot;155.1&quot; width=&quot;54&quot; height=&quot;110.9&quot; rx=&quot;3&quot; class=&quot;m t-blue&quot;/&gt;&lt;text x=&quot;340&quot; y=&quot;149.1&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;110&lt;/text&gt;&lt;text x=&quot;340&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;46-60&lt;/text&gt;&lt;rect x=&quot;394.3&quot; y=&quot;145&quot; width=&quot;54&quot; height=&quot;121&quot; rx=&quot;3&quot; class=&quot;m t-blue&quot;/&gt;&lt;text x=&quot;422.3&quot; y=&quot;139&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;120&lt;/text&gt;&lt;text x=&quot;422.3&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;61-90&lt;/text&gt;&lt;rect x=&quot;476.6&quot; y=&quot;114.8&quot; width=&quot;54&quot; height=&quot;151.2&quot; rx=&quot;3&quot; class=&quot;m t-grey&quot;/&gt;&lt;text x=&quot;504.6&quot; y=&quot;108.8&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;150&lt;/text&gt;&lt;text x=&quot;504.6&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;91-180&lt;/text&gt;&lt;rect x=&quot;558.9&quot; y=&quot;155.1&quot; width=&quot;54&quot; height=&quot;110.9&quot; rx=&quot;3&quot; class=&quot;m t-grey&quot;/&gt;&lt;text x=&quot;586.9&quot; y=&quot;149.1&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;110&lt;/text&gt;&lt;text x=&quot;586.9&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;over 180&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Days from first to second order (customers)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Most second orders here come within 60 days, so 90 days is a fair window; a seasonal product would need a year.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;Add the first and second order dates per customer as calculated columns on a Customer table (or in Power Query):&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- calculated columns on Customer&lt;/i&gt;
First Order Date = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( Orders&lt;i class=&quot;m&quot;&gt;[Order Date]&lt;/i&gt; ) )

Second Order Date =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; F = Customer&lt;i class=&quot;m&quot;&gt;[First Order Date]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( Orders&lt;i class=&quot;m&quot;&gt;[Order Date]&lt;/i&gt; ), Orders&lt;i class=&quot;m&quot;&gt;[Order Date]&lt;/i&gt; &amp;gt; F )

Days to Second Order =
&lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( NOT &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Second Order Date]&lt;/i&gt; ), Customer&lt;i class=&quot;m&quot;&gt;[Second Order Date]&lt;/i&gt; - Customer&lt;i class=&quot;m&quot;&gt;[First Order Date]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;CALCULATE&lt;/code&gt; in a calculated column turns the customer row into a filter (context transition), so each row sees only its own orders. Then the measures, with the Date table related to &lt;code&gt;Customer[First Order Date]&lt;/code&gt; (an inactive relationship, or a separate date table for cohorts):&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;New Customers = &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Customer )

Repeat within 90d =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Customer ), Customer&lt;i class=&quot;m&quot;&gt;[Days to Second Order]&lt;/i&gt; &amp;lt;= &lt;i class=&quot;n&quot;&gt;90&lt;/i&gt; )

Repeat Rate 90d = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Repeat within 90d]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[New Customers]&lt;/i&gt; )

Median Days to Second Order = &lt;i class=&quot;f&quot;&gt;MEDIAN&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Days to Second Order]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- all-time version&lt;/i&gt;
Repeat Customers = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Customer ), NOT &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Second Order Date]&lt;/i&gt; ) )
Repeat Rate All Time = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Repeat Customers]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Customer ), NOT &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[First Order Date]&lt;/i&gt; ) ) )

Purchase Frequency = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Orders&lt;i class=&quot;m&quot;&gt;[Order ID]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Orders&lt;i class=&quot;m&quot;&gt;[Customer ID]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Leave out the newest cohorts until 90 days have passed, or their rate looks low only because time has not run out.&lt;/p&gt;
&lt;h2 id=&quot;what-raises-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-raises-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What raises it?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;A good first experience: delivery on time, clear returns.&lt;/li&gt;&lt;li&gt;A follow-up email timed to the usual reorder gap (the chart above).&lt;/li&gt;&lt;li&gt;Consumables: subscriptions or reminders.&lt;/li&gt;&lt;li&gt;A reason to come back: a voucher for the second order, loyalty points.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Measure each change by the first-order cohort, like &lt;a href=&quot;/blog/customer-retention-cohort-kpi/&quot;&gt;cohort retention&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;All-time rate only.&lt;/strong&gt; It rises with time and hides recent changes.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Cohorts too young.&lt;/strong&gt; Customers from last week have had no chance to reorder.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Guest checkouts.&lt;/strong&gt; Without a customer ID, repeat buyers look new; match by email.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Same-day split orders.&lt;/strong&gt; Two orders in one session are not a repeat; require a gap of a day or more.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/calculate-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: CALCULATE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/median-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: MEDIAN function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/dax-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DAX overview&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add first and second order dates to your customer table and show the 90-day repeat rate by first-order month. &lt;a href=&quot;/blog/new-vs-returning-customers-kpi/&quot;&gt;New and returning customers&lt;/a&gt; splits revenue the same way.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Slicers in Power BI: the four kinds, sync and Select all</title>
    <link href="https://data.benibix.com/blog/slicer-power-bi/"/>
    <id>https://data.benibix.com/blog/slicer-power-bi/</id>
    <published>2026-11-07T12:00:00Z</published>
    <updated>2026-11-07T12:00:00Z</updated>
    <summary>The four slicers in Power BI (slicer, button, list and input), when a slicer beats the Filters pane, syncing slicers across pages and in groups, how Select all really filters, slicers that filter each other, and the DAX to show what is selected.</summary>
    <category term="Visuals"/>
    <category term="Filters and navigation"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;slicer&lt;/strong&gt; is a filter on the report page that readers click. Power BI has four: the classic &lt;strong&gt;Slicer&lt;/strong&gt; (vertical list, tiles, dropdown, date range and date picker), the &lt;strong&gt;Button slicer&lt;/strong&gt; (values as styled buttons in a grid), the &lt;strong&gt;List slicer&lt;/strong&gt; (list or dropdown with pictures, hierarchies and search, in preview) and the &lt;strong&gt;Input slicer&lt;/strong&gt; (type text or numbers to filter). Put the filters people use all the time on the page as slicers, and the rest in the &lt;strong&gt;Filters pane&lt;/strong&gt;. &lt;strong&gt;Sync slicers&lt;/strong&gt; carries a selection across pages.&lt;/p&gt;
&lt;p&gt;A report that opens on &amp;quot;all years, all regions, all products&amp;quot; makes every reader do the same three clicks. Slicers placed where people look, with sensible defaults and synced across pages, decide whether a report feels quick or tedious.&lt;/p&gt;
&lt;h2 id=&quot;which-slicer-for-which-field&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-slicer-for-which-field&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which slicer for which field?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Slicer&lt;/th&gt;&lt;th&gt;Shows values as&lt;/th&gt;&lt;th&gt;Best for&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Slicer&lt;/td&gt;&lt;td&gt;list, tiles, dropdown, between (range), date picker&lt;/td&gt;&lt;td&gt;dates and numeric ranges, long lists in a dropdown&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Button slicer&lt;/td&gt;&lt;td&gt;buttons in a row, column or grid, with images and icons&lt;/td&gt;&lt;td&gt;few values people switch often: year, region, channel&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;List slicer (preview)&lt;/td&gt;&lt;td&gt;list or dropdown with pictures, labels and hierarchy&lt;/td&gt;&lt;td&gt;long lists with search, product hierarchies&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Input slicer&lt;/td&gt;&lt;td&gt;a text box: typed values become filter pills&lt;/td&gt;&lt;td&gt;finding one order number, customer or SKU&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The four slicers&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;slicer-or-filters-pane&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#slicer-or-filters-pane&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Slicer or Filters pane?&lt;/h2&gt;
&lt;p&gt;Microsoft's reasons to use a slicer: common filters on the canvas for quick access, the current filter state visible at a glance, filtering by columns that are hidden in the data tables, and focused pages with slicers next to the visuals they affect. The &lt;strong&gt;Filters pane&lt;/strong&gt; is better for filters that rarely change, for many filters at once (it takes no canvas space), and for filters readers should not change (lock or hide them).&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-build-and-sync-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-and-sync-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build and sync one?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;Select the slicer type in &lt;strong&gt;Visualizations&lt;/strong&gt; and drag a field to it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Format visual, Slicer settings&lt;/strong&gt;: the &lt;strong&gt;Style&lt;/strong&gt; (for the classic slicer: vertical list, tile, dropdown, between, relative date) and &lt;strong&gt;Selection&lt;/strong&gt; (single select, multi-select with Ctrl, Show &amp;quot;Select all&amp;quot;).&lt;/li&gt;&lt;li&gt;To use the same slicer on several pages: &lt;strong&gt;View&lt;/strong&gt;, &lt;strong&gt;Sync slicers&lt;/strong&gt;. For each page, tick &lt;strong&gt;Sync&lt;/strong&gt; (the selection applies there) and &lt;strong&gt;Visible&lt;/strong&gt; (the slicer appears there). A slicer synced but not visible still filters that page.&lt;/li&gt;&lt;li&gt;To sync two different slicers (in composite models, for example, a Year from two sources), give both the same group name in &lt;strong&gt;Sync slicers, Advanced options&lt;/strong&gt;.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Slicers filter other slicers on the page by default, so picking &amp;quot;Austria&amp;quot; leaves only Austrian cities in the city slicer. &lt;strong&gt;Format, Edit interactions&lt;/strong&gt; changes which visuals a slicer filters.&lt;/p&gt;
&lt;h2 id=&quot;what-does-select-all-really-do&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-select-all-really-do&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does Select all really do?&lt;/h2&gt;
&lt;p&gt;Microsoft documents a behaviour that surprises many: selecting &lt;strong&gt;Select all&lt;/strong&gt; filters nothing, like clearing the slicer. Clearing one item after Select all creates an &lt;strong&gt;inverted&lt;/strong&gt; filter (&amp;quot;Segment is not Midmarket&amp;quot;) rather than a list of everything else. That means:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Values that another slicer filters out stay included when that other slicer changes.&lt;/li&gt;&lt;li&gt;New values arriving with the next refresh are included automatically.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;For &amp;quot;everything except X, now and in the future&amp;quot;, that is what you want. For &amp;quot;exactly these values&amp;quot;, select them one by one.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-show-what-is-selected&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-show-what-is-selected&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you show what is selected?&lt;/h2&gt;
&lt;p&gt;A title or a card can say which values the slicer holds:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Selected Regions =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; N = &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Region&lt;i class=&quot;m&quot;&gt;[Region]&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; All = &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( Region&lt;i class=&quot;m&quot;&gt;[Region]&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;SWITCH&lt;/i&gt; (
        &lt;i class=&quot;k&quot;&gt;TRUE&lt;/i&gt; (),
        NOT &lt;i class=&quot;f&quot;&gt;ISFILTERED&lt;/i&gt; ( Region&lt;i class=&quot;m&quot;&gt;[Region]&lt;/i&gt; ), &lt;i class=&quot;s&quot;&gt;&amp;quot;All regions&amp;quot;&lt;/i&gt;,
        N = &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( Region&lt;i class=&quot;m&quot;&gt;[Region]&lt;/i&gt; ),
        N &amp;lt;= &lt;i class=&quot;n&quot;&gt;3&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CONCATENATEX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Region&lt;i class=&quot;m&quot;&gt;[Region]&lt;/i&gt; ), Region&lt;i class=&quot;m&quot;&gt;[Region]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;, &amp;quot;&lt;/i&gt;, Region&lt;i class=&quot;m&quot;&gt;[Region]&lt;/i&gt; ),
        N &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot; of &amp;quot;&lt;/i&gt; &amp;amp; All &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot; regions&amp;quot;&lt;/i&gt;
    )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;It returns &amp;quot;All regions&amp;quot;, &amp;quot;North&amp;quot;, &amp;quot;North, South, West&amp;quot; or &amp;quot;5 of 8 regions&amp;quot;. Use it in a visual's title with &lt;strong&gt;Title, fx, Field value&lt;/strong&gt;: &amp;quot;Revenue by month: North, South&amp;quot;.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Slicers on every page that disagree.&lt;/strong&gt; Unsynced slicers with different selections confuse everyone; sync the shared ones.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A hierarchy column from auto date/time.&lt;/strong&gt; For relative date and range styles, use the date column itself, not the auto date hierarchy.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Slow pages.&lt;/strong&gt; Each slicer is a query, and slicers filtering each other add more. Keep five or fewer on a page; move the rest to the Filters pane.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Expecting Select all to list values.&lt;/strong&gt; It is &amp;quot;no filter&amp;quot;, and a cleared item is an &amp;quot;is not&amp;quot; filter (see above).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A slicer on a measure.&lt;/strong&gt; Slicers take columns; to slice by a measure's range (customers with revenue over 1,000), build a band column or a &lt;a href=&quot;/blog/generateseries-datatable-row-dax/&quot;&gt;what-if parameter&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-slicers&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Slicers overview in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/service-reports-visual-interactions&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Change how visuals interact in a Power BI report&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/concatenatex-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: CONCATENATEX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/isfiltered-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: ISFILTERED function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Pick the two or three filters people change most, make them slicers with good defaults, sync them across pages, and put the rest in the Filters pane. &lt;a href=&quot;/blog/button-slicer-power-bi/&quot;&gt;Button, list and input slicers&lt;/a&gt; covers the newer slicers, and the &lt;a href=&quot;/blog/relative-date-slicer-power-bi/&quot;&gt;relative date slicer&lt;/a&gt; keeps &amp;quot;last 30 days&amp;quot; up to date.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Sparklines in Power BI tables and matrices</title>
    <link href="https://data.benibix.com/blog/sparklines-power-bi/"/>
    <id>https://data.benibix.com/blog/sparklines-power-bi/</id>
    <published>2026-11-07T12:00:00Z</published>
    <updated>2026-11-07T12:00:00Z</updated>
    <summary>How to add sparklines to a table or matrix in Power BI, which measure and axis they take, line or column, markers for highest and last, the limits of five sparklines and 52 points, and how calculation groups affect them.</summary>
    <category term="Visuals"/>
    <category term="Trends"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;sparkline&lt;/strong&gt; is a tiny line or column chart inside a cell of a &lt;strong&gt;table&lt;/strong&gt; or &lt;strong&gt;matrix&lt;/strong&gt;, one per row. Add it from the measure in the &lt;strong&gt;Values&lt;/strong&gt; well: the arrow next to the measure, &lt;strong&gt;Add a sparkline&lt;/strong&gt;, then pick the measure (Y-axis) and the field that runs along it (X-axis, usually months). A visual can hold up to five sparklines, each with up to 52 points, and a matrix with sparklines is limited to 25 columns.&lt;/p&gt;
&lt;p&gt;A table of 40 products with this year's revenue says who sells most. It does not say who is growing and who is fading. A sparkline per row adds the shape of the last twelve months without a second visual.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-table-with-sparklines-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-table-with-sparklines-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a table with sparklines look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Product&lt;/th&gt;&lt;th&gt;Revenue 2026&lt;/th&gt;&lt;th&gt;Last 12 months&lt;/th&gt;&lt;th&gt;Trend&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Mountain-200&lt;/td&gt;&lt;td&gt;1,250 K&lt;/td&gt;&lt;td&gt;rising, highest in December&lt;/td&gt;&lt;td&gt;up&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Road-150&lt;/td&gt;&lt;td&gt;980 K&lt;/td&gt;&lt;td&gt;flat, dip in August&lt;/td&gt;&lt;td&gt;flat&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Touring-1000&lt;/td&gt;&lt;td&gt;760 K&lt;/td&gt;&lt;td&gt;falling since March&lt;/td&gt;&lt;td&gt;down&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sport-100 Helmet&lt;/td&gt;&lt;td&gt;220 K&lt;/td&gt;&lt;td&gt;rising after a slow spring&lt;/td&gt;&lt;td&gt;up&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Products with their revenue and the monthly trend, as the table shows them&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The trend column is the sparkline in Power BI; here is the shape of the first row drawn out:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;line&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;line chart: J 72; F 80; M 85; A 90; M 96; J 101; J 99; A 104; S 112; O 118; N 129; D 164&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;203&quot; x2=&quot;626&quot; y2=&quot;203&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;207&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;50&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;140&quot; x2=&quot;626&quot; y2=&quot;140&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;144&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;77&quot; x2=&quot;626&quot; y2=&quot;77&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;81&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;150&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;626&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;200&lt;/text&gt;&lt;polyline points=&quot;52,175.3 104.2,165.2 156.4,158.9 208.5,152.6 260.7,145 312.9,138.7 365.1,141.3 417.3,135 469.5,124.9 521.6,117.3 573.8,103.5 626,59.4&quot; class=&quot;ln ka&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;175.3&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;104.2&quot; cy=&quot;165.2&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;156.4&quot; cy=&quot;158.9&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;208.5&quot; cy=&quot;152.6&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;260.7&quot; cy=&quot;145&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;312.9&quot; cy=&quot;138.7&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;365.1&quot; cy=&quot;141.3&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;417.3&quot; cy=&quot;135&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;469.5&quot; cy=&quot;124.9&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;521.6&quot; cy=&quot;117.3&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;573.8&quot; cy=&quot;103.5&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;59.4&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;text x=&quot;52&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;J&lt;/text&gt;&lt;text x=&quot;104.2&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;F&lt;/text&gt;&lt;text x=&quot;156.4&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;M&lt;/text&gt;&lt;text x=&quot;208.5&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;A&lt;/text&gt;&lt;text x=&quot;260.7&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;M&lt;/text&gt;&lt;text x=&quot;312.9&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;J&lt;/text&gt;&lt;text x=&quot;365.1&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;J&lt;/text&gt;&lt;text x=&quot;417.3&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;A&lt;/text&gt;&lt;text x=&quot;469.5&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;S&lt;/text&gt;&lt;text x=&quot;521.6&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;O&lt;/text&gt;&lt;text x=&quot;573.8&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;N&lt;/text&gt;&lt;text x=&quot;626&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;D&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;The Mountain-200 sparkline, drawn large: twelve monthly points&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-add-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-add-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you add one?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;Build a &lt;strong&gt;table&lt;/strong&gt; or &lt;strong&gt;matrix&lt;/strong&gt; with the rows you want (for example &lt;code&gt;Product[Product]&lt;/code&gt;) and a measure such as &lt;code&gt;[Revenue]&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;In the &lt;strong&gt;Values&lt;/strong&gt; well, select the arrow next to the measure and &lt;strong&gt;Add a sparkline&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;In the dialog: &lt;strong&gt;Y-axis&lt;/strong&gt; is the measure and its summarisation, &lt;strong&gt;X-axis&lt;/strong&gt; the field along the line, for example &lt;code&gt;Date[Month]&lt;/code&gt;. Select &lt;strong&gt;Create&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;The sparkline appears as its own column. To change it, open the arrow next to it in the Values well and &lt;strong&gt;Edit sparkline&lt;/strong&gt;.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;The X-axis field decides the points: months of the selected year give 12 points; days of a quarter give about 90, and Power BI shows only 52 of them. Use weeks or months.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-format-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-format-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you format it?&lt;/h2&gt;
&lt;p&gt;In &lt;strong&gt;Format visual&lt;/strong&gt;, the &lt;strong&gt;Sparklines&lt;/strong&gt; card:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Chart type&lt;/strong&gt;: line or column.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Line&lt;/strong&gt;: colour and width.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Markers&lt;/strong&gt;: show markers for the highest, lowest, first and last value, with size, colour and shape. A red marker on the lowest point and a green one on the last tells most of the story.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;A sparkline is drawn per row on its own scale, from its own minimum to maximum. That makes the shape readable in every row and the heights incomparable between rows: a flat line on a small product and a flat line on a big one look the same.&lt;/p&gt;
&lt;h2 id=&quot;what-dax-feeds-a-sparkline&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-dax-feeds-a-sparkline&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What DAX feeds a sparkline?&lt;/h2&gt;
&lt;p&gt;Any measure, evaluated for each X-axis point within the row. A measure that is blank for future months keeps the line from dropping to zero:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )

Revenue to Date =
&lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) &amp;lt;= &lt;i class=&quot;f&quot;&gt;TODAY&lt;/i&gt; (), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;A rate works the same way: &lt;code&gt;Margin %&lt;/code&gt; as a sparkline shows each product's margin by month. The table's main column and the sparkline can use different measures: the total for this year in the cell, the monthly trend of the last twelve months beside it.&lt;/p&gt;
&lt;p&gt;Sparklines and &lt;strong&gt;calculation groups&lt;/strong&gt; meet in one setting: apply the calculation item to &lt;strong&gt;Individual values&lt;/strong&gt; (the default: each point is calculated with the item) or to the &lt;strong&gt;Entire sparkline&lt;/strong&gt; (the item applies to the sparkline as a whole). Calculation items that do arithmetic are not supported in the Entire sparkline mode and show an error; switch to Individual values.&lt;/p&gt;
&lt;h2 id=&quot;what-are-the-limits&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-limits&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the limits?&lt;/h2&gt;
&lt;p&gt;Microsoft lists them:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Up to five sparklines per visual, and up to 52 points per sparkline.&lt;/li&gt;&lt;li&gt;A matrix with sparklines shows at most 25 columns.&lt;/li&gt;&lt;li&gt;Supported on Azure Analysis Services, not on on-premises SQL Server Analysis Services.&lt;/li&gt;&lt;li&gt;A visual with sparklines cannot be pinned to a dashboard.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Comparing heights between rows.&lt;/strong&gt; Each sparkline has its own scale. Compare shapes, not heights; put the number in the cell next to it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too many points.&lt;/strong&gt; Daily dates get cut at 52 points; use weeks or months.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Zero for the future.&lt;/strong&gt; A measure returning 0 for months to come makes every line crash at the end.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A sparkline with no number.&lt;/strong&gt; Without the value in the next column, nobody knows if the trend is about 2 or 2 million.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-sparklines-tables&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create sparklines in a table or matrix in a Power BI report&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-tables&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Tables in Power BI reports&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add one line sparkline by month next to the main measure, with markers on the highest and last point. The &lt;a href=&quot;/blog/matrix-visual-power-bi/&quot;&gt;matrix visual&lt;/a&gt; and &lt;a href=&quot;/blog/table-visual-power-bi/&quot;&gt;table visual&lt;/a&gt; posts cover the rest of the grid, and &lt;a href=&quot;/blog/line-chart-power-bi/&quot;&gt;line charts&lt;/a&gt; cover the big version.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>VALUES vs DISTINCT in DAX, and the blank row</title>
    <link href="https://data.benibix.com/blog/values-vs-distinct-dax/"/>
    <id>https://data.benibix.com/blog/values-vs-distinct-dax/</id>
    <published>2026-11-07T12:00:00Z</published>
    <updated>2026-11-07T12:00:00Z</updated>
    <summary>The difference between VALUES and DISTINCT in DAX, the blank row added for keys missing from a dimension, VALUES on a table, FILTERS for direct filters, using VALUES as a scalar, iterating distinct values in measures, and how to find the keys behind (Blank).</summary>
    <category term="DAX"/>
    <category term="Table functions"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; both return the distinct values of a column visible in the current filter context. The difference is the &lt;strong&gt;blank row&lt;/strong&gt;: when a fact table has keys that do not exist in a dimension, the dimension gets a virtual blank row, and &lt;strong&gt;&lt;code&gt;VALUES&lt;/code&gt; includes it&lt;/strong&gt; while &lt;strong&gt;&lt;code&gt;DISTINCT&lt;/code&gt; does not&lt;/strong&gt;. &lt;code&gt;VALUES&lt;/code&gt; also accepts a table name (all its visible rows plus the blank row), and &lt;code&gt;DISTINCT&lt;/code&gt; accepts any table expression. In a model with clean keys they return the same thing.&lt;/p&gt;
&lt;p&gt;The difference shows up as a mysterious &lt;strong&gt;(Blank)&lt;/strong&gt; item in slicers and visuals, and as a count that is one higher than expected.&lt;/p&gt;
&lt;h2 id=&quot;when-do-they-differ&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-do-they-differ&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When do they differ?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Expression&lt;/th&gt;&lt;th&gt;Returns&lt;/th&gt;&lt;th&gt;Rows&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;VALUES ( 'Product'[Product] )&lt;/td&gt;&lt;td&gt;Bike, Helmet, Bottle, (Blank)&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DISTINCT ( 'Product'[Product] )&lt;/td&gt;&lt;td&gt;Bike, Helmet, Bottle&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;COUNTROWS ( VALUES ( 'Product'[Product] ) )&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DISTINCTCOUNT ( 'Product'[Product] )&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DISTINCTCOUNTNOBLANK ( 'Product'[Product] )&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Product has 3 products; Sales has keys 1, 2, 3 and 9 (9 is missing in Product)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The sales with key 9 show up under (Blank) in every visual by product. The blank row only exists when there is a relationship violation (or when a column contains real blanks).&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-find-the-keys-behind-blank&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-find-the-keys-behind-blank&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you find the keys behind (Blank)?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;EVALUATE
&lt;i class=&quot;f&quot;&gt;EXCEPT&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Product Key]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product Key]&lt;/i&gt; ) )

&lt;i class=&quot;c&quot;&gt;-- or as a measure&lt;/i&gt;
Sales without Product =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product Key]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Fix the source: add the missing products, or map unknown keys to an &amp;quot;Unknown&amp;quot; product row. Hiding the blank row hides missing revenue.&lt;/p&gt;
&lt;h2 id=&quot;how-are-values-and-distinct-used-in-measures&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-are-values-and-distinct-used-in-measures&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How are VALUES and DISTINCT used in measures?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- iterate the visible customers&lt;/i&gt;
Avg Revenue per Customer = &lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- the single selected value (or an error with several)&lt;/i&gt;
Selected Year Old = &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- better&lt;/i&gt;
Selected Year = &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- check membership&lt;/i&gt;
Is Bikes = &lt;i class=&quot;s&quot;&gt;&amp;quot;Bikes&amp;quot;&lt;/i&gt; IN &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;A one-column, one-row table can be used as a scalar, which is why &lt;code&gt;VALUES ( 'Date'[Year] )&lt;/code&gt; works when exactly one year is selected and errors when several are (&amp;quot;A table of multiple values was supplied where a single value was expected&amp;quot;). Microsoft's guidance is to use &lt;a href=&quot;/blog/selectedvalue-hasonevalue-dax/&quot;&gt;SELECTEDVALUE&lt;/a&gt; instead.&lt;/p&gt;
&lt;h2 id=&quot;what-is-filters&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-filters&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is FILTERS?&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;FILTERS ( column )&lt;/code&gt; returns the values &lt;strong&gt;directly&lt;/strong&gt; filtered on a column, while &lt;code&gt;VALUES&lt;/code&gt; returns the values &lt;strong&gt;visible&lt;/strong&gt;, also through filters on other columns or tables. With a slicer on Category = Bikes, &lt;code&gt;VALUES ( 'Product'[Product] )&lt;/code&gt; returns the bike products, but &lt;code&gt;FILTERS ( 'Product'[Product] )&lt;/code&gt; returns all products, because Product itself has no direct filter.&lt;/p&gt;
&lt;h2 id=&quot;which-to-use&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-to-use&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which to use?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Need&lt;/th&gt;&lt;th&gt;Use&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;iterate or count visible values, including unknown keys&lt;/td&gt;&lt;td&gt;&lt;code&gt;VALUES&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;distinct values without the blank row&lt;/td&gt;&lt;td&gt;&lt;code&gt;DISTINCT&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;distinct rows of a table expression&lt;/td&gt;&lt;td&gt;&lt;code&gt;DISTINCT ( table expression )&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;the one selected value&lt;/td&gt;&lt;td&gt;&lt;code&gt;SELECTEDVALUE&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;only directly filtered values&lt;/td&gt;&lt;td&gt;&lt;code&gt;FILTERS&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A count that is one too high.&lt;/strong&gt; The blank row; check referential integrity.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;VALUES as a scalar.&lt;/strong&gt; Errors with several values; use &lt;code&gt;SELECTEDVALUE&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;VALUES ( table ) in iterators.&lt;/strong&gt; Iterates whole rows plus a possible blank row; iterate a column unless you need the row.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/values-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: VALUES function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/distinct-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DISTINCT function (DAX) for a column&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/filters-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: FILTERS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Run the &lt;code&gt;EXCEPT&lt;/code&gt; query above for each fact-to-dimension relationship in &lt;a href=&quot;/blog/dax-query-view-evaluate/&quot;&gt;DAX query view&lt;/a&gt;; every key it returns is a (Blank) in your reports. &lt;a href=&quot;/blog/treatas-dax/&quot;&gt;TREATAS&lt;/a&gt; uses &lt;code&gt;VALUES&lt;/code&gt; to pass filters between tables.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Add the Microsoft Learn MCP server to Claude Code</title>
    <link href="https://data.benibix.com/blog/microsoft-learn-mcp-server-in-claude-code/"/>
    <id>https://data.benibix.com/blog/microsoft-learn-mcp-server-in-claude-code/</id>
    <published>2026-11-07T09:00:00Z</published>
    <updated>2026-11-07T09:00:00Z</updated>
    <summary>Microsoft runs a free, remote MCP server over its official documentation. Add it to Claude Code with one command and Claude can look up current Power BI, Fabric, SQL and Azure docs instead of relying on what it remembers.</summary>
    <category term="AI"/>
    <category term="MCP"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; run &lt;code&gt;claude mcp add --transport http microsoft-learn https://learn.microsoft.com/api/mcp&lt;/code&gt;, then type &lt;code&gt;/mcp&lt;/code&gt; in Claude Code to check it is connected. The &lt;strong&gt;Microsoft Learn MCP Server&lt;/strong&gt; is a &lt;strong&gt;remote&lt;/strong&gt; server over &lt;strong&gt;streamable HTTP&lt;/strong&gt;, it needs &lt;strong&gt;no sign-in&lt;/strong&gt;, and it is &lt;strong&gt;free&lt;/strong&gt;. It lets Claude &lt;strong&gt;search Microsoft's documentation, fetch a full article and search code samples&lt;/strong&gt;, so answers about DAX, Fabric or Azure come from the current docs.&lt;/p&gt;
&lt;p&gt;AI models learn from a snapshot. Power BI ships every month and Fabric changes even faster, so a model's memory of a feature can be months old. A documentation server closes that gap for one question at a time.&lt;/p&gt;
&lt;h2 id=&quot;how-does-it-fit-in&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-it-fit-in&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does it fit in?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;You ask&lt;/b&gt;&lt;span&gt;&amp;quot;Is the Gantt visual in Power BI generally available yet?&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Claude searches&lt;/b&gt;&lt;span&gt;the Learn docs through the MCP server&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;It reads&lt;/b&gt;&lt;span&gt;the current article, not its memory&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;It answers&lt;/b&gt;&lt;span&gt;with the article it used, so you can open it&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;A question with the Learn MCP server connected&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-can-it-do&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-can-it-do&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What can it do?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;It can&lt;/th&gt;&lt;th&gt;It cannot&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Search Microsoft Learn documentation&lt;/td&gt;&lt;td&gt;Read your tenant, your data or your reports&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Fetch a complete article&lt;/td&gt;&lt;td&gt;Show training or user profile information&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Search official code samples&lt;/td&gt;&lt;td&gt;Answer outside Microsoft's public docs&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;Microsoft notes the knowledge behind it refreshes after content updates and fully once a day.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-use-it-well&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-use-it-well&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you use it well?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Ask Claude to cite:&lt;/strong&gt; &amp;quot;Use the Microsoft Learn MCP server and give me the article link.&amp;quot;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Combine it with your files:&lt;/strong&gt; &amp;quot;Check my measure in @measures.dax against the current docs for SAMEPERIODLASTYEAR.&amp;quot;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Keep it for Microsoft questions:&lt;/strong&gt; for everything else it adds nothing.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/training/support/mcp&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Microsoft Learn MCP Server overview&lt;/a&gt;, the endpoint, no sign-in, free, and what it searches&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/mcp&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Connect Claude Code to tools via MCP&lt;/a&gt;, adding a remote HTTP server&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;See what MCP servers offer in &lt;a href=&quot;/blog/mcp-for-data-tools-resources-prompts/&quot;&gt;MCP for data&lt;/a&gt;, and keep up with what changes each month in &lt;a href=&quot;/blog/keep-up-with-power-bi-updates/&quot;&gt;how to keep up with Power BI updates&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Which page size should a Power BI report use?</title>
    <link href="https://data.benibix.com/blog/power-bi-page-size/"/>
    <id>https://data.benibix.com/blog/power-bi-page-size/</id>
    <published>2026-11-07T01:00:00Z</published>
    <updated>2026-11-07T01:00:00Z</updated>
    <summary>Say the shape first: a report page goes wrong when its shape is left to chance. The page sizes Power BI offers, which one fits a screen, a slide or a phone, and how to set a default in a theme.</summary>
    <category term="Visuals"/>
    <category term="Report design"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; keep the default &lt;strong&gt;16:9&lt;/strong&gt; for reports read on a screen or shown in a meeting; it matches laptops, monitors and slides. Power BI offers 16:9 at &lt;strong&gt;1280 × 720, 1920 × 1080, 2560 × 1440 or 3840 × 2160&lt;/strong&gt;, plus &lt;strong&gt;4:3&lt;/strong&gt;, &lt;strong&gt;Letter&lt;/strong&gt;, &lt;strong&gt;Tooltip&lt;/strong&gt; and &lt;strong&gt;Custom&lt;/strong&gt; sizes. For phones, do not shrink the page: build a &lt;strong&gt;mobile layout&lt;/strong&gt;, which the Power BI mobile apps show in portrait. Set it under &lt;strong&gt;Format, Canvas settings&lt;/strong&gt; (or &lt;strong&gt;Page size&lt;/strong&gt; on the Design ribbon), and put a default for new pages in your theme.&lt;/p&gt;
&lt;p&gt;Choose the shape of a report page before you place a single visual: changing it later moves everything, and a page built for a wide screen rarely survives a move to a slide or a phone.&lt;/p&gt;
&lt;h2 id=&quot;which-size-fits-which-use&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-size-fits-which-use&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which size fits which use?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Type&lt;/th&gt;&lt;th&gt;Size&lt;/th&gt;&lt;th&gt;Fits&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;16:9 (default)&lt;/td&gt;&lt;td&gt;1280 × 720&lt;/td&gt;&lt;td&gt;Screens, meetings, PowerPoint export&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;16:9&lt;/td&gt;&lt;td&gt;1920 × 1080&lt;/td&gt;&lt;td&gt;The same shape with more room; text looks smaller when fitted&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;4:3&lt;/td&gt;&lt;td&gt;Standard ratio&lt;/td&gt;&lt;td&gt;Older projectors, square-ish screens&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Letter&lt;/td&gt;&lt;td&gt;Letter page&lt;/td&gt;&lt;td&gt;Pages meant for printing&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Tooltip&lt;/td&gt;&lt;td&gt;Tooltip size&lt;/td&gt;&lt;td&gt;Report page tooltips&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Custom&lt;/td&gt;&lt;td&gt;Any width and height in pixels&lt;/td&gt;&lt;td&gt;A tall scrolling page, a kiosk screen&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Page sizes and where they fit&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;does-a-bigger-page-mean-a-sharper-report&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#does-a-bigger-page-mean-a-sharper-report&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Does a bigger page mean a sharper report?&lt;/h2&gt;
&lt;p&gt;No. The page is scaled to the window (&lt;strong&gt;Fit to page&lt;/strong&gt; is the default view), so 1920 × 1080 holds more visuals at the same window size, each one smaller. Most reports read best at 1280 × 720 with fewer, larger visuals.&lt;/p&gt;
&lt;h2 id=&quot;what-about-phones&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-about-phones&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What about phones?&lt;/h2&gt;
&lt;p&gt;A 16:9 page on a phone is tiny. Instead, open &lt;strong&gt;Mobile layout&lt;/strong&gt; on the View ribbon and arrange the most important visuals in a tall column. When a mobile layout exists, the Power BI mobile apps show it automatically when the phone is held upright; in a browser the report always shows its normal page.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-make-every-new-page-the-same-size&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-make-every-new-page-the-same-size&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you make every new page the same size?&lt;/h2&gt;
&lt;p&gt;Set the default page size in your report theme JSON. It applies to new pages, not to the ones that exist, so set it before you build, or change existing pages once by hand.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-report-display-settings&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Report display settings in Power BI&lt;/a&gt;, page types, sizes and the theme default&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-create-mobile-optimized-report-about&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create mobile-optimized Power BI reports&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Pick the size, then the layout: see &lt;a href=&quot;/blog/power-bi-report-design-pattern/&quot;&gt;how I design a Power BI report page&lt;/a&gt; and &lt;a href=&quot;/blog/report-theme-json-power-bi/&quot;&gt;the report theme JSON&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Copilot in Power BI: edit a report one change at a time</title>
    <link href="https://data.benibix.com/blog/copilot-in-power-bi-one-change-at-a-time/"/>
    <id>https://data.benibix.com/blog/copilot-in-power-bi-one-change-at-a-time/</id>
    <published>2026-11-06T17:00:00Z</published>
    <updated>2026-11-06T17:00:00Z</updated>
    <summary>Copilot in Power BI can create a report page and then add, delete or change visuals on request. Why one change per prompt works better than one long request, what it needs to run, and how to check what it built.</summary>
    <category term="AI"/>
    <category term="Prompts"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; in Power BI, open the &lt;strong&gt;Copilot&lt;/strong&gt; pane in a report (in edit view in the service), let it &lt;strong&gt;suggest content&lt;/strong&gt; or describe the page you want, and then improve it &lt;strong&gt;one change per prompt&lt;/strong&gt;: &amp;quot;Change the column chart to a line chart by month&amp;quot;, then &amp;quot;Add a card with total revenue&amp;quot;. Copilot needs a &lt;strong&gt;paid Fabric capacity (F2 or higher) or Power BI Premium (P1 or higher)&lt;/strong&gt;; trial capacities and free SKUs are not supported.&lt;/p&gt;
&lt;p&gt;Copilot works best in rounds: one change, look, then the next. A single prompt with eight requests gets a page where three of them went wrong and you cannot tell which instruction caused what.&lt;/p&gt;
&lt;h2 id=&quot;how-does-a-round-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-a-round-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does a round work?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Ask one thing&lt;/b&gt;&lt;span&gt;&amp;quot;Add a card with total revenue for the selected year&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Look&lt;/b&gt;&lt;span&gt;is it the right measure, the right filter, the right place?&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Keep or undo&lt;/b&gt;&lt;span&gt;undo the step, or keep it and go on&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Next change&lt;/b&gt;&lt;span&gt;&amp;quot;Sort the bar chart by revenue, highest first&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One change per round&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-can-copilot-change-on-a-report-page&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-can-copilot-change-on-a-report-page&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What can Copilot change on a report page?&lt;/h2&gt;
&lt;p&gt;According to Microsoft, Copilot can create a new report page from a prompt, and on existing pages it can add visuals, change a visual's type or fields, and delete visuals. That is enough to rough out a page quickly and then tidy it by hand.&lt;/p&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Good one-change prompts&lt;/th&gt;&lt;th&gt;Too much in one go&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&amp;quot;Show revenue by month as a line chart&amp;quot;&lt;/td&gt;&lt;td&gt;&amp;quot;Make a full sales dashboard with KPIs, trends, regions, products and a table&amp;quot;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;quot;Change the pie chart to a bar chart sorted by value&amp;quot;&lt;/td&gt;&lt;td&gt;&amp;quot;Fix the layout and make it look professional&amp;quot;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;quot;Add a slicer for Region&amp;quot;&lt;/td&gt;&lt;td&gt;&amp;quot;Add filters for everything&amp;quot;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-do-you-check-what-it-built&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-check-what-it-built&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you check what it built?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Open each visual's fields:&lt;/strong&gt; is it the measure you meant, or a similar one with another filter?&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Compare with a known number:&lt;/strong&gt; a total you already trust.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Watch the model:&lt;/strong&gt; Copilot works only as well as the names in your semantic model; &amp;quot;Measure 3&amp;quot; helps nobody.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;No Copilot button.&lt;/strong&gt; Your admin may not have enabled it in Fabric, or no semantic model is selected.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Vague names.&lt;/strong&gt; Rename columns and measures in business words before you ask.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Trusting the first page.&lt;/strong&gt; Treat it as a draft to edit, not a finished report.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/copilot-introduction&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Overview of Copilot for Power BI&lt;/a&gt;, the capacity requirements&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/copilot-create-report-service&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create and edit Power BI reports with Copilot&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Make the model easy to read first: clear names and a &lt;a href=&quot;/blog/star-schema-power-bi-explained/&quot;&gt;star schema&lt;/a&gt;. Then lay out what Copilot builds using &lt;a href=&quot;/blog/power-bi-report-design-pattern/&quot;&gt;how I design a Power BI report page&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>DAX time intelligence functions: every one with an example</title>
    <link href="https://data.benibix.com/blog/time-intelligence-dax-reference/"/>
    <id>https://data.benibix.com/blog/time-intelligence-dax-reference/</id>
    <published>2026-11-06T12:00:00Z</published>
    <updated>2026-11-06T12:00:00Z</updated>
    <summary>A reference of all DAX time intelligence functions, period to date (TOTALYTD, DATESYTD and more), shifts (SAMEPERIODLASTYEAR, DATEADD, PARALLELPERIOD, PREVIOUS and NEXT), ranges (DATESBETWEEN, DATESINPERIOD), period boundaries, and opening and closing balances, with examples.</summary>
    <category term="DAX"/>
    <category term="Reference"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; DAX time intelligence functions return &lt;strong&gt;sets of dates&lt;/strong&gt; to use as filters in &lt;code&gt;CALCULATE&lt;/code&gt; (&lt;code&gt;DATESYTD&lt;/code&gt;, &lt;code&gt;SAMEPERIODLASTYEAR&lt;/code&gt;, &lt;code&gt;DATEADD&lt;/code&gt;, &lt;code&gt;DATESINPERIOD&lt;/code&gt;), or &lt;strong&gt;values&lt;/strong&gt; at a point in time (&lt;code&gt;TOTALYTD&lt;/code&gt;, &lt;code&gt;CLOSINGBALANCEMONTH&lt;/code&gt;). They take the date column of a &lt;a href=&quot;/blog/date-table-dax/&quot;&gt;date table&lt;/a&gt;, or with &lt;a href=&quot;/blog/calendar-based-time-intelligence-dax/&quot;&gt;calendar-based time intelligence&lt;/a&gt; a calendar, which also enables the week functions.&lt;/p&gt;
&lt;p&gt;This page lists every function in the group, with one example each, in the order you are likely to need them.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-total-to-date&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-total-to-date&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions total to date?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Returns&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;TOTALYTD&lt;/td&gt;&lt;td&gt;the expression from the start of the year&lt;/td&gt;&lt;td&gt;TOTALYTD ( [Revenue], 'Date'[Date] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;TOTALQTD&lt;/td&gt;&lt;td&gt;from the start of the quarter&lt;/td&gt;&lt;td&gt;TOTALQTD ( [Revenue], 'Date'[Date] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;TOTALMTD&lt;/td&gt;&lt;td&gt;from the start of the month&lt;/td&gt;&lt;td&gt;TOTALMTD ( [Revenue], 'Date'[Date] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;TOTALWTD&lt;/td&gt;&lt;td&gt;from the start of the week (calendar only)&lt;/td&gt;&lt;td&gt;TOTALWTD ( [Revenue], 'Retail 445' )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DATESYTD&lt;/td&gt;&lt;td&gt;the dates from the start of the year&lt;/td&gt;&lt;td&gt;CALCULATE ( [Revenue], DATESYTD ( 'Date'[Date], &amp;quot;6-30&amp;quot; ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DATESQTD&lt;/td&gt;&lt;td&gt;the dates from the start of the quarter&lt;/td&gt;&lt;td&gt;CALCULATE ( [Revenue], DATESQTD ( 'Date'[Date] ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DATESMTD&lt;/td&gt;&lt;td&gt;the dates from the start of the month&lt;/td&gt;&lt;td&gt;CALCULATE ( [Revenue], DATESMTD ( 'Date'[Date] ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DATESWTD&lt;/td&gt;&lt;td&gt;the dates from the start of the week (calendar only)&lt;/td&gt;&lt;td&gt;CALCULATE ( [Revenue], DATESWTD ( 'Retail 445' ) )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Period to date&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In depth: &lt;a href=&quot;/blog/ytd-qtd-mtd-dax/&quot;&gt;YTD, QTD and MTD&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-shift-periods&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-shift-periods&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions shift periods?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Returns&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;SAMEPERIODLASTYEAR&lt;/td&gt;&lt;td&gt;the same dates one year back&lt;/td&gt;&lt;td&gt;CALCULATE ( [Revenue], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DATEADD&lt;/td&gt;&lt;td&gt;the dates shifted by n intervals&lt;/td&gt;&lt;td&gt;CALCULATE ( [Revenue], DATEADD ( 'Date'[Date], -1, MONTH ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PARALLELPERIOD&lt;/td&gt;&lt;td&gt;the whole period n intervals away&lt;/td&gt;&lt;td&gt;CALCULATE ( [Revenue], PARALLELPERIOD ( 'Date'[Date], -1, YEAR ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PREVIOUSDAY&lt;/td&gt;&lt;td&gt;the day before the first date in context&lt;/td&gt;&lt;td&gt;CALCULATE ( [Revenue], PREVIOUSDAY ( 'Date'[Date] ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PREVIOUSWEEK&lt;/td&gt;&lt;td&gt;the previous week (calendar only)&lt;/td&gt;&lt;td&gt;CALCULATE ( [Revenue], PREVIOUSWEEK ( 'Retail 445' ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PREVIOUSMONTH&lt;/td&gt;&lt;td&gt;all dates of the previous month&lt;/td&gt;&lt;td&gt;CALCULATE ( [Revenue], PREVIOUSMONTH ( 'Date'[Date] ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PREVIOUSQUARTER&lt;/td&gt;&lt;td&gt;all dates of the previous quarter&lt;/td&gt;&lt;td&gt;CALCULATE ( [Revenue], PREVIOUSQUARTER ( 'Date'[Date] ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PREVIOUSYEAR&lt;/td&gt;&lt;td&gt;all dates of the previous year&lt;/td&gt;&lt;td&gt;CALCULATE ( [Revenue], PREVIOUSYEAR ( 'Date'[Date] ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;NEXTDAY, NEXTWEEK, NEXTMONTH, NEXTQUARTER, NEXTYEAR&lt;/td&gt;&lt;td&gt;the following period&lt;/td&gt;&lt;td&gt;CALCULATE ( [Forecast], NEXTMONTH ( 'Date'[Date] ) )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Shifts&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In depth: &lt;a href=&quot;/blog/year-over-year-dax/&quot;&gt;year over year&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-return-a-range&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-return-a-range&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions return a range?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Returns&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;DATESBETWEEN&lt;/td&gt;&lt;td&gt;the dates from a start to an end date&lt;/td&gt;&lt;td&gt;CALCULATE ( [Revenue], DATESBETWEEN ( 'Date'[Date], DATE ( 2026, 1, 1 ), DATE ( 2026, 3, 31 ) ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DATESINPERIOD&lt;/td&gt;&lt;td&gt;the dates from a start, n intervals back or forward&lt;/td&gt;&lt;td&gt;CALCULATE ( [Revenue], DATESINPERIOD ( 'Date'[Date], MAX ( 'Date'[Date] ), -12, MONTH ) )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Ranges&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In depth: &lt;a href=&quot;/blog/rolling-12-months-dax/&quot;&gt;rolling 12 months&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-find-period-boundaries&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-find-period-boundaries&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions find period boundaries?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Returns&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;FIRSTDATE&lt;/td&gt;&lt;td&gt;the first date in context&lt;/td&gt;&lt;td&gt;FIRSTDATE ( 'Date'[Date] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;LASTDATE&lt;/td&gt;&lt;td&gt;the last date in context&lt;/td&gt;&lt;td&gt;CALCULATE ( [Units], LASTDATE ( 'Date'[Date] ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;STARTOFMONTH, STARTOFQUARTER, STARTOFYEAR, STARTOFWEEK&lt;/td&gt;&lt;td&gt;the first date of the period in context&lt;/td&gt;&lt;td&gt;STARTOFMONTH ( 'Date'[Date] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ENDOFMONTH, ENDOFQUARTER, ENDOFYEAR, ENDOFWEEK&lt;/td&gt;&lt;td&gt;the last date of the period in context&lt;/td&gt;&lt;td&gt;ENDOFYEAR ( 'Date'[Date], &amp;quot;6-30&amp;quot; )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;First, last, start and end&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;code&gt;FIRSTDATE&lt;/code&gt; and &lt;code&gt;LASTDATE&lt;/code&gt; return a one-row table, so they work as filters in &lt;code&gt;CALCULATE&lt;/code&gt;; &lt;code&gt;MIN&lt;/code&gt; and &lt;code&gt;MAX&lt;/code&gt; return a value. The week versions need a calendar.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-return-balances&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-return-balances&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions return balances?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Returns&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;CLOSINGBALANCEMONTH, CLOSINGBALANCEQUARTER, CLOSINGBALANCEYEAR, CLOSINGBALANCEWEEK&lt;/td&gt;&lt;td&gt;the expression at the last date of the period&lt;/td&gt;&lt;td&gt;CLOSINGBALANCEMONTH ( SUM ( Stock[Units] ), 'Date'[Date] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;OPENINGBALANCEMONTH, OPENINGBALANCEQUARTER, OPENINGBALANCEYEAR, OPENINGBALANCEWEEK&lt;/td&gt;&lt;td&gt;the expression at the end of the previous period&lt;/td&gt;&lt;td&gt;OPENINGBALANCEYEAR ( SUM ( Stock[Units] ), 'Date'[Date] )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Opening and closing balances&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In depth: &lt;a href=&quot;/blog/opening-closing-balance-dax/&quot;&gt;opening and closing balances&lt;/a&gt;. &lt;code&gt;FIRSTNONBLANK&lt;/code&gt; and &lt;code&gt;LASTNONBLANK&lt;/code&gt;, which find the first or last date with data, are in the filter group but belong with these.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A fact table date column as input.&lt;/strong&gt; Use the date table's column or a calendar.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Gaps in the date column.&lt;/strong&gt; Classic functions throw an error on missing dates; calendars allow them.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Week functions with a date column.&lt;/strong&gt; They need a calendar with a week category.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Nesting with calendars.&lt;/strong&gt; &lt;code&gt;PREVIOUSDAY ( PREVIOUSMONTH ( 'Calendar' ) )&lt;/code&gt; is not supported; use &lt;code&gt;CALCULATETABLE&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/time-intelligence-functions-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Time intelligence functions (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/datesbetween-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DATESBETWEEN function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/endofyear-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: ENDOFYEAR function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Learn &lt;code&gt;DATESYTD&lt;/code&gt;, &lt;code&gt;SAMEPERIODLASTYEAR&lt;/code&gt;, &lt;code&gt;DATEADD&lt;/code&gt; and &lt;code&gt;DATESINPERIOD&lt;/code&gt;; with &lt;code&gt;CALCULATE&lt;/code&gt; they cover nearly all time comparisons. &lt;a href=&quot;/blog/date-and-time-functions-dax-reference/&quot;&gt;Date and time functions&lt;/a&gt; covers building and splitting dates.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>PATH functions in DAX: parent-child hierarchies</title>
    <link href="https://data.benibix.com/blog/path-functions-dax/"/>
    <id>https://data.benibix.com/blog/path-functions-dax/</id>
    <published>2026-11-06T12:00:00Z</published>
    <updated>2026-11-06T12:00:00Z</updated>
    <summary>How the DAX parent and child functions flatten a parent-child hierarchy such as an org chart or chart of accounts, PATH, PATHITEM, PATHITEMREVERSE, PATHLENGTH and PATHCONTAINS, level columns for a matrix hierarchy, and row-level security for managers.</summary>
    <category term="DAX"/>
    <category term="Logic and information"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;parent-child&lt;/strong&gt; table has one row per item and a column with the parent's ID: employees and their managers, accounts and their parent accounts. &lt;code&gt;PATH ( id, parent_id )&lt;/code&gt; returns the chain from the top down as text (&lt;code&gt;&amp;quot;1|4|9&amp;quot;&lt;/code&gt;). From it, &lt;code&gt;PATHLENGTH&lt;/code&gt; gives the depth, &lt;code&gt;PATHITEM ( path, n )&lt;/code&gt; the ID at level n, &lt;code&gt;PATHITEMREVERSE&lt;/code&gt; counts from the bottom, and &lt;code&gt;PATHCONTAINS ( path, id )&lt;/code&gt; tests whether an ID is in the chain. Use them to build &lt;strong&gt;level columns&lt;/strong&gt; (Level 1, Level 2, Level 3) for a matrix hierarchy, and for manager security.&lt;/p&gt;
&lt;p&gt;Power BI hierarchies need one column per level. Org charts and account trees come as parent-child pairs with any depth. The PATH functions turn one into the other.&lt;/p&gt;
&lt;h2 id=&quot;what-do-the-functions-return&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-do-the-functions-return&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What do the functions return?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Employee ID&lt;/th&gt;&lt;th&gt;Name&lt;/th&gt;&lt;th&gt;Manager ID&lt;/th&gt;&lt;th&gt;PATH&lt;/th&gt;&lt;th&gt;PATHLENGTH&lt;/th&gt;&lt;th&gt;Level 1&lt;/th&gt;&lt;th&gt;Level 2&lt;/th&gt;&lt;th&gt;Level 3&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;Sara (CEO)&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;Sara&lt;/td&gt;&lt;td&gt;Sara&lt;/td&gt;&lt;td&gt;Sara&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;Omar&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1|4&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;Sara&lt;/td&gt;&lt;td&gt;Omar&lt;/td&gt;&lt;td&gt;Omar&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;9&lt;/td&gt;&lt;td&gt;Lena&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;1|4|9&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;Sara&lt;/td&gt;&lt;td&gt;Omar&lt;/td&gt;&lt;td&gt;Lena&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;7&lt;/td&gt;&lt;td&gt;Tom&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1|7&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;Sara&lt;/td&gt;&lt;td&gt;Tom&lt;/td&gt;&lt;td&gt;Tom&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;An employee table with PATH columns&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Returns&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;PATH ( id, parent )&lt;/td&gt;&lt;td&gt;the chain of IDs as text, top first&lt;/td&gt;&lt;td&gt;PATH ( Employee[Employee ID], Employee[Manager ID] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PATHLENGTH ( path )&lt;/td&gt;&lt;td&gt;the number of items&lt;/td&gt;&lt;td&gt;PATHLENGTH ( Employee[Path] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PATHITEM ( path, n [, type] )&lt;/td&gt;&lt;td&gt;the item at position n from the top&lt;/td&gt;&lt;td&gt;PATHITEM ( Employee[Path], 2, INTEGER )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PATHITEMREVERSE ( path, n [, type] )&lt;/td&gt;&lt;td&gt;the item at position n from the bottom&lt;/td&gt;&lt;td&gt;PATHITEMREVERSE ( Employee[Path], 1 )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PATHCONTAINS ( path, item )&lt;/td&gt;&lt;td&gt;TRUE if the item is in the path&lt;/td&gt;&lt;td&gt;PATHCONTAINS ( Employee[Path], 4 )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The five functions&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-build-level-columns&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-level-columns&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build level columns?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- calculated columns on Employee&lt;/i&gt;
Path = &lt;i class=&quot;f&quot;&gt;PATH&lt;/i&gt; ( Employee&lt;i class=&quot;m&quot;&gt;[Employee ID]&lt;/i&gt;, Employee&lt;i class=&quot;m&quot;&gt;[Manager ID]&lt;/i&gt; )
Depth = &lt;i class=&quot;f&quot;&gt;PATHLENGTH&lt;/i&gt; ( Employee&lt;i class=&quot;m&quot;&gt;[Path]&lt;/i&gt; )

Level &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; =
&lt;i class=&quot;f&quot;&gt;LOOKUPVALUE&lt;/i&gt; ( Employee&lt;i class=&quot;m&quot;&gt;[Name]&lt;/i&gt;, Employee&lt;i class=&quot;m&quot;&gt;[Employee ID]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;PATHITEM&lt;/i&gt; ( Employee&lt;i class=&quot;m&quot;&gt;[Path]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, INTEGER ) )

Level &lt;i class=&quot;n&quot;&gt;2&lt;/i&gt; =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Id = &lt;i class=&quot;f&quot;&gt;PATHITEM&lt;/i&gt; ( Employee&lt;i class=&quot;m&quot;&gt;[Path]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;2&lt;/i&gt;, INTEGER )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( Id ), Employee&lt;i class=&quot;m&quot;&gt;[Level 1]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;LOOKUPVALUE&lt;/i&gt; ( Employee&lt;i class=&quot;m&quot;&gt;[Name]&lt;/i&gt;, Employee&lt;i class=&quot;m&quot;&gt;[Employee ID]&lt;/i&gt;, Id ) )

Level &lt;i class=&quot;n&quot;&gt;3&lt;/i&gt; =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Id = &lt;i class=&quot;f&quot;&gt;PATHITEM&lt;/i&gt; ( Employee&lt;i class=&quot;m&quot;&gt;[Path]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;3&lt;/i&gt;, INTEGER )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( Id ), Employee&lt;i class=&quot;m&quot;&gt;[Level 2]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;LOOKUPVALUE&lt;/i&gt; ( Employee&lt;i class=&quot;m&quot;&gt;[Name]&lt;/i&gt;, Employee&lt;i class=&quot;m&quot;&gt;[Employee ID]&lt;/i&gt;, Id ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Filling empty levels with the parent's name avoids blank rows in the matrix. Create a hierarchy Level 1, Level 2, Level 3 and put it on the rows.&lt;/p&gt;
&lt;p&gt;To hide the repeated names when someone drills below their own level, blank the measure where the row is deeper than the person:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;f&quot;&gt;Revenue&lt;/i&gt; (hierarchy) =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; RowDepth = &lt;i class=&quot;f&quot;&gt;ISINSCOPE&lt;/i&gt; ( Employee&lt;i class=&quot;m&quot;&gt;[Level 1]&lt;/i&gt; ) + &lt;i class=&quot;f&quot;&gt;ISINSCOPE&lt;/i&gt; ( Employee&lt;i class=&quot;m&quot;&gt;[Level 2]&lt;/i&gt; ) + &lt;i class=&quot;f&quot;&gt;ISINSCOPE&lt;/i&gt; ( Employee&lt;i class=&quot;m&quot;&gt;[Level 3]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; MaxDepth = &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( Employee&lt;i class=&quot;m&quot;&gt;[Depth]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( RowDepth &amp;lt;= MaxDepth, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-are-they-used-for-security&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-are-they-used-for-security&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How are they used for security?&lt;/h2&gt;
&lt;p&gt;A role filter that lets a manager see everyone under them:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;f&quot;&gt;PATHCONTAINS&lt;/i&gt; (
    Employee&lt;i class=&quot;m&quot;&gt;[Path]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;LOOKUPVALUE&lt;/i&gt; ( Employee&lt;i class=&quot;m&quot;&gt;[Employee ID]&lt;/i&gt;, Employee&lt;i class=&quot;m&quot;&gt;[Email]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;USERPRINCIPALNAME&lt;/i&gt; ( ) )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Details in &lt;a href=&quot;/blog/userprincipalname-rls-dax/&quot;&gt;dynamic row-level security&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Circular parents.&lt;/strong&gt; An item that is its own ancestor makes &lt;code&gt;PATH&lt;/code&gt; fail; fix the data.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Missing parents.&lt;/strong&gt; A parent ID that does not exist in the table errors; clean or point it to a root.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Text paths.&lt;/strong&gt; &lt;code&gt;PATHITEM&lt;/code&gt; returns text by default; pass &lt;code&gt;INTEGER&lt;/code&gt; to compare with numeric IDs.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Calculated columns only.&lt;/strong&gt; &lt;code&gt;PATH&lt;/code&gt; works on the whole table at refresh; it is not a measure function.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Very deep trees.&lt;/strong&gt; One column per level; decide a maximum depth.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/understanding-functions-for-parent-child-hierarchies-in-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Understanding functions for parent-child hierarchies in DAX&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/path-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: PATH function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/pathitem-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: PATHITEM function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add Path, Depth and three Level columns to your employee or account table and build the hierarchy. &lt;a href=&quot;/blog/isinscope-dax/&quot;&gt;ISINSCOPE&lt;/a&gt; explains the depth test.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Python and R visuals in Power BI</title>
    <link href="https://data.benibix.com/blog/python-r-visuals-power-bi/"/>
    <id>https://data.benibix.com/blog/python-r-visuals-power-bi/</id>
    <published>2026-11-06T12:00:00Z</published>
    <updated>2026-11-06T12:00:00Z</updated>
    <summary>How Python and R visuals in Power BI draw charts with matplotlib, seaborn or ggplot2 from a dataset dataframe, the 150,000-row, 72 DPI and five-minute limits, supported packages in the service, licensing, and when a custom visual is better.</summary>
    <category term="Visuals"/>
    <category term="More visuals"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;Python visual&lt;/strong&gt; or &lt;strong&gt;R visual&lt;/strong&gt; runs a script on the fields you give it and shows the picture the script draws. The fields arrive as a dataframe called &lt;code&gt;dataset&lt;/code&gt;, grouped like a table visual (duplicate rows appear once unless you add an index). Use them for charts Power BI does not have: a box plot, a regression with confidence bands, a correlation matrix. They are images: no hover, no click to cross-filter. The limits are 150,000 rows, 72 DPI and five minutes; in the service only supported packages run.&lt;/p&gt;
&lt;p&gt;A violin plot of delivery times per carrier, or a correlation heatmap of twenty measures, are three lines of seaborn or ggplot2. In Power BI they are a script visual, and they still react to slicers.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-script-visual-do&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-script-visual-do&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a script visual do?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Fields&lt;/b&gt;&lt;span&gt;the columns and measures dragged into the visual&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;dataset&lt;/b&gt;&lt;span&gt;a pandas or R data frame, grouped, duplicates removed&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Script&lt;/b&gt;&lt;span&gt;your Python or R code draws a plot&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Image&lt;/b&gt;&lt;span&gt;Power BI shows the plot; filters re-run the script&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From fields to a picture&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-make-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-make-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you make one?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;In Power BI Desktop, set the Python or R installation in &lt;strong&gt;Options, Python scripting&lt;/strong&gt; or &lt;strong&gt;R scripting&lt;/strong&gt;. Install the packages you need (pandas and matplotlib for Python).&lt;/li&gt;&lt;li&gt;Select &lt;strong&gt;Python visual&lt;/strong&gt; (or &lt;strong&gt;R visual&lt;/strong&gt;) in &lt;strong&gt;Visualizations&lt;/strong&gt; and enable script visuals when asked.&lt;/li&gt;&lt;li&gt;Drag fields into &lt;strong&gt;Values&lt;/strong&gt;. The editor shows the generated code that builds &lt;code&gt;dataset&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;Write the script under it and run it.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;A box plot of delivery days by carrier in Python:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;python&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;import&lt;/i&gt; matplotlib.pyplot &lt;i class=&quot;k&quot;&gt;as&lt;/i&gt; plt

dataset.&lt;i class=&quot;f&quot;&gt;boxplot&lt;/i&gt;(column=&lt;i class=&quot;s&quot;&gt;&amp;quot;Delivery Days&amp;quot;&lt;/i&gt;, by=&lt;i class=&quot;s&quot;&gt;&amp;quot;Carrier&amp;quot;&lt;/i&gt;, grid=&lt;i class=&quot;k&quot;&gt;False&lt;/i&gt;)
plt.&lt;i class=&quot;f&quot;&gt;suptitle&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;&amp;quot;&lt;/i&gt;)
plt.&lt;i class=&quot;f&quot;&gt;title&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;Delivery days by carrier&amp;quot;&lt;/i&gt;)
plt.&lt;i class=&quot;f&quot;&gt;ylabel&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;Days&amp;quot;&lt;/i&gt;)
plt.&lt;i class=&quot;f&quot;&gt;show&lt;/i&gt;()&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The same in R with ggplot2:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;r&quot;&gt;&lt;code&gt;library(ggplot2)
ggplot(dataset, aes(x = Carrier, y = `Delivery Days`)) +
  geom_boxplot() +
  labs(title = &amp;quot;Delivery days by carrier&amp;quot;, y = &amp;quot;Days&amp;quot;)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Because fields are grouped, two orders with the same carrier and the same delivery days become one row. Add &lt;code&gt;Orders[Order ID]&lt;/code&gt; to the fields so every order is a row.&lt;/p&gt;
&lt;h2 id=&quot;what-are-the-limits&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-limits&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the limits?&lt;/h2&gt;
&lt;p&gt;Microsoft lists for both languages:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;150,000 rows&lt;/strong&gt;: more are cut to the top 150,000 and a message appears on the image.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;72 DPI&lt;/strong&gt;: the picture is a raster image at 72 DPI.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Five minutes&lt;/strong&gt;: a longer calculation times out with an error.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Service packages&lt;/strong&gt;: Power BI Desktop uses any package you install; the service runs only supported packages (for R, open-source packages from CRAN; no private packages).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Licensing&lt;/strong&gt;: viewing script visuals in the service needs a Pro or Premium Per User license, or a workspace on a Fabric capacity; script visuals in the service work in Fabric regions.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Interaction&lt;/strong&gt;: a script visual is filtered by others but cannot filter them.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;when-is-something-else-better&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-something-else-better&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is something else better?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Need&lt;/th&gt;&lt;th&gt;Better choice&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;A chart Power BI has (bar, line, scatter)&lt;/td&gt;&lt;td&gt;the built-in visual: interactive, fast, themeable&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;A common statistical chart (box plot, violin)&lt;/td&gt;&lt;td&gt;a certified custom visual from AppSource&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;A one-off analysis with a special library&lt;/td&gt;&lt;td&gt;Python or R visual, or a Fabric notebook&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Results needed as numbers in other visuals&lt;/td&gt;&lt;td&gt;compute them in Power Query or a notebook, not in a visual&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Grouped rows.&lt;/strong&gt; Statistics on deduplicated data are wrong; add a unique ID field.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A package missing in the service.&lt;/strong&gt; The visual works in Desktop and shows an error after publishing; use supported packages.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Slow pages.&lt;/strong&gt; Each script runs on every filter change; keep data small and scripts fast.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Expecting interactivity.&lt;/strong&gt; No tooltips, no selection; put a table next to it for details.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-python-visuals&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create Power BI visuals with Python&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-r-visuals&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create Power BI visuals by using R&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/service-r-visuals&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create and use R visuals in Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Use a script visual for the one chart Power BI cannot draw, add a unique ID field so no rows are merged, and check the packages are supported in the service before you publish. &lt;a href=&quot;/blog/custom-visuals-power-bi/&quot;&gt;Custom visuals&lt;/a&gt; are the interactive alternative for common special charts.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Small multiples in Power BI: one chart per category</title>
    <link href="https://data.benibix.com/blog/small-multiples-power-bi/"/>
    <id>https://data.benibix.com/blog/small-multiples-power-bi/</id>
    <published>2026-11-06T12:00:00Z</published>
    <updated>2026-11-06T12:00:00Z</updated>
    <summary>How small multiples in Power BI split one chart into a grid of small charts, one per value of a field, with a shared axis, the grid and title settings, when they beat a legend, the DAX that makes them fair, and the features they do not support yet.</summary>
    <category term="Visuals"/>
    <category term="Report features"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;small multiples&lt;/strong&gt; split one visual into a grid of small copies, one per value of the field in the &lt;strong&gt;Small multiples&lt;/strong&gt; well: one line chart per region, one column chart per product line. All copies share the same axes by default, so they can be compared at a glance. Use them instead of a legend when there are more than four or five series, or when the series overlap and hide each other. They work on bar, column, line, area and combo charts.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The chart, part by part:&lt;/strong&gt; &lt;a href=&quot;/visuals/small-multiples/&quot;&gt;What are small multiples?&lt;/a&gt; draws its parts and shows how to read one, its kinds and the mistakes to avoid.&lt;/p&gt;
&lt;p&gt;Six regions as six lines in one chart cross and tangle. Six small line charts in a 3 by 2 grid, all on the same scale, show at once which region grew, which fell and which is flat.&lt;/p&gt;
&lt;h2 id=&quot;what-do-small-multiples-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-do-small-multiples-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What do small multiples look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:4&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;North&lt;/b&gt;&lt;span&gt;rising all year, 120 to 171&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;South&lt;/b&gt;&lt;span&gt;flat, around 90&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;East&lt;/b&gt;&lt;span&gt;dip in summer, ends at 98&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;West&lt;/b&gt;&lt;span&gt;rising from May&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Online&lt;/b&gt;&lt;span&gt;doubling, 45 to 110&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Export&lt;/b&gt;&lt;span&gt;falling since March&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Monthly revenue as small multiples by region (shared Y-axis)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In Power BI each card above is a small line chart with the same months on the X-axis and the same Y range, with the region's name as its title.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-build-them&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-them&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build them?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;Build the visual as usual: &lt;code&gt;Date[Month]&lt;/code&gt; on the X-axis, &lt;code&gt;[Revenue]&lt;/code&gt; on the Y-axis.&lt;/li&gt;&lt;li&gt;Drag the splitting field, for example &lt;code&gt;Region[Region]&lt;/code&gt;, to &lt;strong&gt;Small multiples&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Format visual, Small multiples&lt;/strong&gt;: &lt;strong&gt;Layout&lt;/strong&gt; sets rows and columns of the grid (the rest scrolls), plus padding.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Small multiple title&lt;/strong&gt;: position, font, alignment.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Y-axis, Range&lt;/strong&gt;: by default all multiples share a scale; you can let each scale independently, which shows each shape better but breaks size comparisons.&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;shared-or-independent-axis&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#shared-or-independent-axis&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Shared or independent axis?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Axis&lt;/th&gt;&lt;th&gt;Shows&lt;/th&gt;&lt;th&gt;Use when&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;shared (default)&lt;/td&gt;&lt;td&gt;sizes and shapes comparable across all charts&lt;/td&gt;&lt;td&gt;comparing regions with each other&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;independent per multiple&lt;/td&gt;&lt;td&gt;each chart's own shape, using its full height&lt;/td&gt;&lt;td&gt;comparing trends of very different sizes (a big and a tiny region)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;With independent axes, put the axis values on, or readers will compare heights that mean different amounts.&lt;/p&gt;
&lt;h2 id=&quot;what-dax-makes-them-fair&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-dax-makes-them-fair&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What DAX makes them fair?&lt;/h2&gt;
&lt;p&gt;Small multiples are a filter per chart, so measures work as everywhere. To compare shapes of different-sized regions on a shared axis, index each to its own start:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue Index =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; FirstMonthRevenue =
    &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;FIRSTNONBLANK&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, FirstMonthRevenue ) * &lt;i class=&quot;n&quot;&gt;100&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Every region starts at 100; a region at 140 grew 40%. On a shared axis, growth is now comparable regardless of size. Another option is the share of the total per month, which shows which region gains weight:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Share of Month =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;REMOVEFILTERS&lt;/i&gt; ( Region&lt;i class=&quot;m&quot;&gt;[Region]&lt;/i&gt; ) ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-do-they-not-support-yet&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-do-they-not-support-yet&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What do they not support yet?&lt;/h2&gt;
&lt;p&gt;Microsoft's list of current limitations includes: trend lines, forecasting, zoom sliders, total labels for stacked charts, concatenated labels, high-density sampling for line charts, axis zoom, rectangular multi-select, and the Analyze and Summarize context menu items. &lt;strong&gt;Show items with no data&lt;/strong&gt; exists but may not behave as expected. With a live connection to Analysis Services, small multiples need a version that supports the second generation of DAX queries.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Too many multiples.&lt;/strong&gt; Fifty tiny charts are unreadable; filter to the top regions or group the rest.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Independent axes without labels.&lt;/strong&gt; Readers assume a shared scale; label the axes.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A legend and small multiples together.&lt;/strong&gt; Possible, but each small chart then has several series: keep it to two at most.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Order by name.&lt;/strong&gt; Sort the multiples by size or importance (sort the splitting field by a column), not alphabetically.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-small-multiples&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create small multiples in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-line-chart&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Line charts in Power BI (small multiples)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/firstnonblank-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: FIRSTNONBLANK function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Whenever a legend has more than four series, try the same chart with the field in Small multiples instead, on a shared axis. &lt;a href=&quot;/blog/line-chart-power-bi/&quot;&gt;Line charts&lt;/a&gt; cover the series options it replaces.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>SUMMARIZECOLUMNS, SUMMARIZE and ADDCOLUMNS in DAX</title>
    <link href="https://data.benibix.com/blog/summarize-summarizecolumns-addcolumns-dax/"/>
    <id>https://data.benibix.com/blog/summarize-summarizecolumns-addcolumns-dax/</id>
    <published>2026-11-06T12:00:00Z</published>
    <updated>2026-11-06T12:00:00Z</updated>
    <summary>How to group and summarise tables in DAX, SUMMARIZECOLUMNS for queries and measures, SUMMARIZE for grouping, ADDCOLUMNS for adding calculated columns, GROUPBY with CURRENTGROUP, subtotals with ROLLUPADDISSUBTOTAL, IGNORE and NONVISUAL, and which to use when.</summary>
    <category term="DAX"/>
    <category term="Table functions"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;&lt;code&gt;SUMMARIZECOLUMNS ( group columns, filters, &amp;quot;Name&amp;quot;, expression )&lt;/code&gt;&lt;/strong&gt; is the grouping function Power BI itself uses for visuals: it groups by columns from any tables, applies filters, adds measures, and drops rows where all measures are blank. Use it in queries and, where supported, in measures. &lt;strong&gt;&lt;code&gt;SUMMARIZE ( table, columns )&lt;/code&gt;&lt;/strong&gt; groups the rows of one table by its columns and related ones; use it only for grouping, and add calculations with &lt;strong&gt;&lt;code&gt;ADDCOLUMNS&lt;/code&gt;&lt;/strong&gt;, which adds expression columns to any table. &lt;strong&gt;&lt;code&gt;GROUPBY&lt;/code&gt;&lt;/strong&gt; with &lt;code&gt;CURRENTGROUP&lt;/code&gt; aggregates rows of a table variable.&lt;/p&gt;
&lt;p&gt;Grouping is behind &amp;quot;top customers&amp;quot;, &amp;quot;months above target&amp;quot;, &amp;quot;average per store&amp;quot; and every DAX query. The four functions overlap, and picking the right one avoids slow and wrong results.&lt;/p&gt;
&lt;h2 id=&quot;what-does-each-do&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-each-do&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does each do?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Groups by&lt;/th&gt;&lt;th&gt;Adds&lt;/th&gt;&lt;th&gt;Typical use&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;SUMMARIZECOLUMNS&lt;/td&gt;&lt;td&gt;columns of any tables&lt;/td&gt;&lt;td&gt;measures, with filters&lt;/td&gt;&lt;td&gt;DAX queries, visual-like tables&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SUMMARIZE&lt;/td&gt;&lt;td&gt;columns of one table and related ones&lt;/td&gt;&lt;td&gt;(avoid adding here)&lt;/td&gt;&lt;td&gt;distinct combinations&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ADDCOLUMNS&lt;/td&gt;&lt;td&gt;nothing: keeps the rows given&lt;/td&gt;&lt;td&gt;expression columns&lt;/td&gt;&lt;td&gt;add measures to a grouped table&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;GROUPBY&lt;/td&gt;&lt;td&gt;columns of a table or variable&lt;/td&gt;&lt;td&gt;aggregations over CURRENTGROUP&lt;/td&gt;&lt;td&gt;grouping a table variable&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Grouping functions&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-use-summarizecolumns&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-use-summarizecolumns&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you use SUMMARIZECOLUMNS?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;EVALUATE
&lt;i class=&quot;f&quot;&gt;SUMMARIZECOLUMNS&lt;/i&gt; (
    &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;TREATAS&lt;/i&gt; ( { &lt;i class=&quot;s&quot;&gt;&amp;quot;Online&amp;quot;&lt;/i&gt; }, Sales&lt;i class=&quot;m&quot;&gt;[Channel]&lt;/i&gt; ),
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Revenue&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Customers&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Customers]&lt;/i&gt;
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Year&lt;/th&gt;&lt;th&gt;Category&lt;/th&gt;&lt;th&gt;Revenue&lt;/th&gt;&lt;th&gt;Customers&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;2025&lt;/td&gt;&lt;td&gt;Bikes&lt;/td&gt;&lt;td&gt;1,840,000&lt;/td&gt;&lt;td&gt;3,120&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2025&lt;/td&gt;&lt;td&gt;Accessories&lt;/td&gt;&lt;td&gt;390,000&lt;/td&gt;&lt;td&gt;5,400&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2026&lt;/td&gt;&lt;td&gt;Bikes&lt;/td&gt;&lt;td&gt;2,100,000&lt;/td&gt;&lt;td&gt;3,450&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2026&lt;/td&gt;&lt;td&gt;Accessories&lt;/td&gt;&lt;td&gt;420,000&lt;/td&gt;&lt;td&gt;5,980&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Result&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Group columns can come from different tables (Year from Date, Category from Product); combinations with no data for every measure are dropped, like in a visual. The result has no guaranteed order; add &lt;code&gt;ORDER BY&lt;/code&gt; in a query.&lt;/p&gt;
&lt;p&gt;Options inside it:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;IGNORE ( expression )&lt;/code&gt;&lt;/strong&gt;: the expression does not count when deciding which rows are blank.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;NONVISUAL ( filter )&lt;/code&gt;&lt;/strong&gt;: the filter limits the group rows but not the measure values.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;ROLLUPADDISSUBTOTAL ( column, &amp;quot;IsSubtotal&amp;quot; )&lt;/code&gt;&lt;/strong&gt;: adds subtotal rows and a flag column.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-summarize-and-addcolumns-work-together&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-summarize-and-addcolumns-work-together&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do SUMMARIZE and ADDCOLUMNS work together?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- distinct customer and city pairs that have sales&lt;/i&gt;
Customer Cities = &lt;i class=&quot;f&quot;&gt;SUMMARIZE&lt;/i&gt; ( Sales, Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt;, Customer&lt;i class=&quot;m&quot;&gt;[City]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- add measures to them&lt;/i&gt;
Customer Table =
&lt;i class=&quot;f&quot;&gt;ADDCOLUMNS&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;SUMMARIZE&lt;/i&gt; ( Sales, Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt;, Customer&lt;i class=&quot;m&quot;&gt;[City]&lt;/i&gt; ),
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Revenue&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Orders&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Orders]&lt;/i&gt;
)

&lt;i class=&quot;c&quot;&gt;-- use it in a measure: customers whose average order is over 500&lt;/i&gt;
Big Basket Customers =
&lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;ADDCOLUMNS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ), &lt;i class=&quot;s&quot;&gt;&amp;quot;@AOV&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Orders]&lt;/i&gt; ) ),
        [@AOV] &amp;gt; &lt;i class=&quot;n&quot;&gt;500&lt;/i&gt;
    )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;SUMMARIZE&lt;/code&gt; can also add expression columns, but the common advice is &lt;code&gt;ADDCOLUMNS ( SUMMARIZE ( ... ) )&lt;/code&gt;: expressions calculated inside &lt;code&gt;SUMMARIZE&lt;/code&gt; can see unexpected filter contexts, while &lt;code&gt;ADDCOLUMNS&lt;/code&gt; evaluates each row with a clear context transition. Prefix helper column names with &lt;code&gt;@&lt;/code&gt; so they are not mistaken for measures.&lt;/p&gt;
&lt;h2 id=&quot;when-is-groupby-useful&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-groupby-useful&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is GROUPBY useful?&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;GROUPBY&lt;/code&gt; aggregates rows inside each group with the X functions over &lt;code&gt;CURRENTGROUP ( )&lt;/code&gt;, and it works on table variables. Here it finds each year's best month, then averages those best months:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Avg of Yearly Best Months =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Months =
    &lt;i class=&quot;f&quot;&gt;ADDCOLUMNS&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;SUMMARIZE&lt;/i&gt; ( Sales, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month]&lt;/i&gt; ),
        &lt;i class=&quot;s&quot;&gt;&amp;quot;@Rev&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;
    )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;GROUPBY&lt;/i&gt; ( Months, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;@Best&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;MAXX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;CURRENTGROUP&lt;/i&gt; ( ), [@Rev] ) ),
        [@Best]
    )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Expressions inside SUMMARIZE.&lt;/strong&gt; Use &lt;code&gt;ADDCOLUMNS&lt;/code&gt; around it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;SUMMARIZECOLUMNS in calculated columns or RLS in DirectQuery.&lt;/strong&gt; Not supported.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Expecting order.&lt;/strong&gt; Neither function sorts; sort in the query or the visual.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Blank rows.&lt;/strong&gt; &lt;code&gt;SUMMARIZECOLUMNS&lt;/code&gt; drops rows where every measure is blank; &lt;code&gt;ADDCOLUMNS ( VALUES ( ... ) )&lt;/code&gt; keeps them.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too fine a grain.&lt;/strong&gt; Grouping by date and customer on a large model produces millions of rows; group at the level you need.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/summarizecolumns-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SUMMARIZECOLUMNS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/summarize-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SUMMARIZE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/addcolumns-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: ADDCOLUMNS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Write one &lt;code&gt;SUMMARIZECOLUMNS&lt;/code&gt; query in &lt;a href=&quot;/blog/dax-query-view-evaluate/&quot;&gt;DAX query view&lt;/a&gt; that matches a table on your report, and compare the numbers. &lt;a href=&quot;/blog/topn-dax/&quot;&gt;TOPN&lt;/a&gt; keeps only the first rows of such a table.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Power BI now has a Gantt chart: what the preview does</title>
    <link href="https://data.benibix.com/blog/gantt-visual-power-bi/"/>
    <id>https://data.benibix.com/blog/gantt-visual-power-bi/</id>
    <published>2026-11-06T09:00:00Z</published>
    <updated>2026-11-18T12:00:00Z</updated>
    <summary>Since the October 2026 update, Power BI Desktop has a built-in Gantt visual in preview. The fields it needs, how it shows progress and milestones, how to turn it on, and what to keep in mind while it is a preview.</summary>
    <category term="Visuals"/>
    <category term="More visuals"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; yes. The &lt;strong&gt;October 2026&lt;/strong&gt; Power BI update added a built-in &lt;strong&gt;Gantt visual&lt;/strong&gt;, in &lt;strong&gt;preview&lt;/strong&gt;. Turn it on under &lt;strong&gt;Options, Preview features&lt;/strong&gt; in Power BI Desktop and restart. The only required field is the &lt;strong&gt;task label&lt;/strong&gt;; add &lt;strong&gt;Start&lt;/strong&gt; and &lt;strong&gt;End&lt;/strong&gt; for duration bars, leave End blank for a &lt;strong&gt;milestone&lt;/strong&gt;, and add a percentage measure to show &lt;strong&gt;progress&lt;/strong&gt; on each bar. Tasks group into up to &lt;strong&gt;three category levels&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The chart, part by part:&lt;/strong&gt; &lt;a href=&quot;/visuals/gantt-chart/&quot;&gt;What is a Gantt chart?&lt;/a&gt; draws its parts and shows how to read one, its kinds and the mistakes to avoid.&lt;/p&gt;
&lt;p&gt;Until now, a Gantt chart in Power BI meant an AppSource visual or a stacked bar chart with a hidden first series. A project report had to depend on a third-party visual or a workaround. The new core visual changes that, with one caveat: it is a preview.&lt;/p&gt;
&lt;h2 id=&quot;what-does-the-gantt-visual-need&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-the-gantt-visual-need&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does the Gantt visual need?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Field&lt;/th&gt;&lt;th&gt;What goes in&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Task label (required)&lt;/td&gt;&lt;td&gt;One row per task&lt;/td&gt;&lt;td&gt;Design the homepage&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Start&lt;/td&gt;&lt;td&gt;A date or a measure&lt;/td&gt;&lt;td&gt;2026-01-05&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;End&lt;/td&gt;&lt;td&gt;A date or a measure; blank draws a milestone&lt;/td&gt;&lt;td&gt;2026-01-23&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Progress&lt;/td&gt;&lt;td&gt;A measure, percentage complete&lt;/td&gt;&lt;td&gt;60%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Categories&lt;/td&gt;&lt;td&gt;Up to three levels to group tasks&lt;/td&gt;&lt;td&gt;Planning, Development, Testing&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Columns and tooltips&lt;/td&gt;&lt;td&gt;Owner, status, duration&lt;/td&gt;&lt;td&gt;Sam, On track, 15 days&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The Gantt visual's fields (made-up project)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Start and End can both be measures, which lets you decide how dates roll up to a phase: the earliest start and the latest end, for example.&lt;/p&gt;
&lt;h2 id=&quot;how-do-progress-and-milestones-show&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-progress-and-milestones-show&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do progress and milestones show?&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Progress&lt;/strong&gt; is drawn inside each bar, either as a lighter overlay or as a fill inside an outlined bar; the Format pane sets how much of the bar's height it takes. A &lt;strong&gt;milestone&lt;/strong&gt; is a task with a start date and no end: the visual draws it as a marker on that date. One way to get there is an End measure that returns blank when the task has a milestone flag.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-colour-and-scale-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-colour-and-scale-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you colour and scale it?&lt;/h2&gt;
&lt;p&gt;Set one colour under &lt;strong&gt;Rows, Color&lt;/strong&gt; and it cascades: bars and milestones in full colour, category backgrounds lighter (70%, 80% and 90% transparent for the three levels). Choose &lt;strong&gt;More granular&lt;/strong&gt; to colour by category or by task. The date axis can &lt;strong&gt;auto-scale&lt;/strong&gt; between years, months and days as you zoom, or show up to &lt;strong&gt;two fixed levels&lt;/strong&gt;, like months over years.&lt;/p&gt;
&lt;h2 id=&quot;what-did-the-november-update-add&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-did-the-november-update-add&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What did the November update add?&lt;/h2&gt;
&lt;p&gt;The November 2026 update (still preview) adds &lt;strong&gt;column totals&lt;/strong&gt; and &lt;strong&gt;row data labels&lt;/strong&gt;, fixes progress-bar formatting and keyboard navigation, and makes the default columns wider.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Totals:&lt;/strong&gt; Format visual pane, &lt;strong&gt;Columns, Totals&lt;/strong&gt;. Subtotals at a category level only appear for columns that use a measure or an aggregation, so put a duration measure in the column, not a plain text field.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Data labels:&lt;/strong&gt; Format visual pane, &lt;strong&gt;Rows, Data labels&lt;/strong&gt;, to write a value such as the progress or end date on each bar.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Per-level styling:&lt;/strong&gt; select a column and a level to style category subtotals differently from task rows.&lt;/li&gt;&lt;/ul&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Task&lt;/th&gt;&lt;th&gt;Category&lt;/th&gt;&lt;th&gt;Duration (days)&lt;/th&gt;&lt;th&gt;Progress&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Scope workshop&lt;/td&gt;&lt;td&gt;Planning&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;100%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Requirements&lt;/td&gt;&lt;td&gt;Planning&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;60%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Budget sign-off&lt;/td&gt;&lt;td&gt;Planning&lt;/td&gt;&lt;td&gt;15&lt;/td&gt;&lt;td&gt;0%&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Planning subtotal&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;A Planning phase with a Duration (days) column summed by a measure&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The subtotal is the measure's sum, 5 + 10 + 15 = 30 days; with a text column it would stay empty. The column area sizes itself to show all columns; set its width and each column's width yourself if you want a scrollbar instead.&lt;/p&gt;
&lt;p&gt;The axis can also &lt;strong&gt;shade days&lt;/strong&gt; of the week (weekends, for example), and readers can &lt;strong&gt;zoom&lt;/strong&gt; into a shorter window and back out.&lt;/p&gt;
&lt;h2 id=&quot;what-should-you-keep-in-mind-while-it-is-a-preview&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-should-you-keep-in-mind-while-it-is-a-preview&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What should you keep in mind while it is a preview?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Turn it on first:&lt;/strong&gt; Options, Preview features, then restart Desktop.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Check before you publish:&lt;/strong&gt; a preview can change before it is final, so test the report in the service before you share it widely.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Keep the data simple:&lt;/strong&gt; one row per task, real dates, and a percentage between 0 and 1 for progress.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Stay under 1,000 rows:&lt;/strong&gt; that is the visual's limit.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Formats in tooltips and columns:&lt;/strong&gt; measure formatting might not show there; set it under Data format on the General tab.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/fundamentals/desktop-latest-update&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What's new in Power BI&lt;/a&gt;, the Gantt chart preview (October 2026) and its updates (November 2026)&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-gantt&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Gantt visual in Power BI (preview)&lt;/a&gt;, fields, progress, milestones, colours and axis&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Build the task table first: one row per task with a start, an end and an owner. For other project numbers, see &lt;a href=&quot;/blog/order-cycle-time-kpi/&quot;&gt;order cycle time&lt;/a&gt;. To check which chart fits your data, paste it into &lt;a href=&quot;https://tools.benibix.com/data/chart-compass/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Chart Compass&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Your first Codex task on a data repository</title>
    <link href="https://data.benibix.com/blog/first-codex-task-on-a-data-repo/"/>
    <id>https://data.benibix.com/blog/first-codex-task-on-a-data-repo/</id>
    <published>2026-11-06T01:00:00Z</published>
    <updated>2026-11-06T01:00:00Z</updated>
    <summary>Install Codex, open the project, sign in, run /init, then ask. A safe first task for a data repo is adding tests, not changing logic. The four steps, the prompt, and how to check what it did with /review.</summary>
    <category term="AI"/>
    <category term="Codex"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; install Codex, open a terminal in your data repository, type &lt;code&gt;codex&lt;/code&gt; and &lt;strong&gt;sign in with ChatGPT&lt;/strong&gt;. Run &lt;strong&gt;&lt;code&gt;/init&lt;/code&gt;&lt;/strong&gt; so it writes an &lt;code&gt;AGENTS.md&lt;/code&gt; about the project. Then give it a task that adds safety without changing results, such as: &amp;quot;Add tests that check &lt;code&gt;order_id&lt;/code&gt; is unique and &lt;code&gt;amount&lt;/code&gt; is never negative in the orders model. Done when the tests run and pass.&amp;quot; Read the changes with &lt;strong&gt;&lt;code&gt;/review&lt;/code&gt;&lt;/strong&gt; before you keep them.&lt;/p&gt;
&lt;p&gt;A first task should be easy to check and hard to get badly wrong. Adding tests fits: if Codex writes a bad test, it fails or finds nothing; it does not change a single number in a report.&lt;/p&gt;
&lt;h2 id=&quot;what-are-the-four-steps&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-four-steps&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the four steps?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Install&lt;/b&gt;&lt;span&gt;one line from OpenAI's Codex docs&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Open and sign in&lt;/b&gt;&lt;span&gt;cd to the repo, type codex, sign in with ChatGPT&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;/init&lt;/b&gt;&lt;span&gt;Codex writes AGENTS.md: how to build and test, the folders&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Ask, then /review&lt;/b&gt;&lt;span&gt;one task with a clear &amp;quot;done when&amp;quot;, then read the diff&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From install to a first change&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;why-do-tests-make-a-good-first-task&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-do-tests-make-a-good-first-task&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why do tests make a good first task?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;First task&lt;/th&gt;&lt;th&gt;Risk&lt;/th&gt;&lt;th&gt;Easy to check?&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Add data tests to a model&lt;/td&gt;&lt;td&gt;Low: no logic changes&lt;/td&gt;&lt;td&gt;Yes: run them&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Document the models in a README&lt;/td&gt;&lt;td&gt;Low&lt;/td&gt;&lt;td&gt;Yes: read it&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Rename a column everywhere&lt;/td&gt;&lt;td&gt;Medium: many files&lt;/td&gt;&lt;td&gt;Needs a full test run&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Rewrite a transformation&lt;/td&gt;&lt;td&gt;High: numbers can change&lt;/td&gt;&lt;td&gt;Needs reconciliation&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-do-you-check-the-result&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-check-the-result&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you check the result?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;/review&lt;/code&gt;&lt;/strong&gt; shows the changes and points out issues, without editing files.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Run the tests yourself&lt;/strong&gt; and see them pass, then break one value on purpose and see a test fail.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Commit&lt;/strong&gt; only what you read.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.chatgpt.com/docs/codex/cli&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Codex CLI docs&lt;/a&gt;: install, sign in, &lt;code&gt;/init&lt;/code&gt;, &lt;code&gt;/review&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.chatgpt.com/docs/sandboxing&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Codex sandboxing&lt;/a&gt;: what the sandbox allows by default&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Make the habits stick with &lt;a href=&quot;/blog/codex-habits-for-sql-changes/&quot;&gt;Codex habits for SQL changes&lt;/a&gt;, and when the task should run on a schedule, see &lt;a href=&quot;/blog/codex-exec-in-a-data-pipeline/&quot;&gt;codex exec in a data pipeline&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>AI-103 in 2026: what the exam covers and how to study</title>
    <link href="https://data.benibix.com/blog/ai-103-study-guide/"/>
    <id>https://data.benibix.com/blog/ai-103-study-guide/</id>
    <published>2026-11-05T12:00:00Z</published>
    <updated>2026-11-05T12:00:00Z</updated>
    <summary>What the AI-103 Azure AI Apps and Agents Developer exam measures since April 2026, how its five areas are weighted, and the study plan I would follow again, built on one agent in Microsoft Foundry.</summary>
    <category term="Exams"/>
    <category term="AI"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; AI-103 earns &lt;strong&gt;Microsoft Certified: Azure AI Apps and Agents Developer Associate&lt;/strong&gt;. It weighs planning and managing an Azure AI solution at 25 to 30% and generative AI and agents at 30 to 35%; computer vision, text analysis and information extraction are 10 to 15% each. The exam runs 120 minutes, needs 700 out of 1,000, assumes Python and &lt;strong&gt;Microsoft Foundry&lt;/strong&gt;, and is renewed each year for free. AI-102, the earlier AI engineer exam, retired on 30 June 2026; AI-103 is now the Azure exam for building AI apps and agents.&lt;/p&gt;
&lt;p&gt;I passed AI-103 in June 2026. It is an agent exam first: choosing models, grounding them with RAG, giving agents tools and memory, and keeping them safe and measured.&lt;/p&gt;
&lt;h2 id=&quot;what-does-ai-103-cover&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-ai-103-cover&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does AI-103 cover?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;Plan and manage an Azure AI solution&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:85.7%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;25-30%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Generative AI and agentic solutions&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;30-35%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;b&gt;Computer vision&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:42.9%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;10-15%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;b&gt;Text analysis&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:42.9%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;10-15%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;b&gt;Information extraction&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:42.9%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;10-15%&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;AI-103 skills, by weight in the exam&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Plan and manage&lt;/strong&gt;: choosing models (large, small, multimodal) and Foundry services, infrastructure and deployment options, quotas, rate limits and cost, monitoring drift, safety and grounding quality, and responsible AI: filters, guardrails, evaluators.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Generative and agentic&lt;/strong&gt;: deploying models, retrieval-augmented generation (RAG), agents with roles, tools, retrieval and memory, prompt tuning, and evaluation loops.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Vision&lt;/strong&gt;: generating images and video, multimodal understanding and captions, and filtering unsafe visual content, including prompt injection hidden as text in images.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Text&lt;/strong&gt;: extracting entities, topics and summaries as structured JSON, sentiment and sensitive content, and speech in and out of agents.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Information extraction&lt;/strong&gt;: indexing documents, images, audio and video, semantic, hybrid and vector search for grounding, and OCR and field extraction with Content Understanding.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-would-i-study-for-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-would-i-study-for-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How would I study for it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:6&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Choose&lt;/b&gt;&lt;span&gt;a model and a deployment, with a quota and a cost estimate&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Ground&lt;/b&gt;&lt;span&gt;index a set of documents, answer from them with RAG&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Agent&lt;/b&gt;&lt;span&gt;add a tool (a function call) and conversation memory&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;red&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Safety&lt;/b&gt;&lt;span&gt;content filters, an evaluation run, a prompt-injection test&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Modalities&lt;/b&gt;&lt;span&gt;speech in, an image described, fields extracted from a form&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;6&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Monitor&lt;/b&gt;&lt;span&gt;trace a run, watch latency and grounding quality&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One agent, every area once&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Write it in Python with the Foundry SDK. The exam asks which service or setting fits a need; having wired each one makes those choices quick.&lt;/p&gt;
&lt;h2 id=&quot;what-helps-on-the-day&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-helps-on-the-day&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What helps on the day?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Grounding questions are about the index.&lt;/strong&gt; Know when to choose keyword, semantic, vector or hybrid search.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Safety appears in every area,&lt;/strong&gt; not just one: filters for text, for images, and evaluations for agents.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Microsoft Learn is open in the exam.&lt;/strong&gt; Use it for an SDK parameter or a limit, not to learn a service.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-keep-the-certification&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-keep-the-certification&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you keep the certification?&lt;/h2&gt;
&lt;p&gt;It expires after a year. Renew it with the free online assessment on Microsoft Learn in the six months before.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/ai-103&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam AI-103&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/exams/ai-103/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Microsoft Certified: Azure AI Apps and Agents Developer Associate&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/ai-102&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam AI-102 (retired)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Build the agent above. &lt;a href=&quot;/blog/vector-search-sql-embeddings-explained/&quot;&gt;Vector search with SQL embeddings&lt;/a&gt; explains embeddings and RAG retrieval in a database, and &lt;a href=&quot;/blog/ab-100-study-guide/&quot;&gt;AB-100&lt;/a&gt; is the expert exam that accepts AI-103 as its prerequisite. My credential is on &lt;a href=&quot;/about/&quot;&gt;the About page&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>TOPN in DAX: top N customers, products and Others</title>
    <link href="https://data.benibix.com/blog/topn-dax/"/>
    <id>https://data.benibix.com/blog/topn-dax/</id>
    <published>2026-11-05T12:00:00Z</published>
    <updated>2026-11-05T12:00:00Z</updated>
    <summary>How TOPN returns the top N rows of a table in DAX, ties that return more rows, revenue and share of the top 10, a dynamic N from a slicer, top N with an Others row, TOPN in queries with ORDER BY, and how it compares with the visual Top N filter.</summary>
    <category term="DAX"/>
    <category term="Table functions"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;code&gt;TOPN ( n, table, orderBy [, order] )&lt;/code&gt; returns the first &lt;code&gt;n&lt;/code&gt; rows of a table ranked by an expression, by default descending. Wrapped in &lt;code&gt;CALCULATE&lt;/code&gt;, it filters a measure to those rows: &lt;code&gt;CALCULATE ( [Revenue], TOPN ( 10, ALLSELECTED ( Customer[Customer] ), [Revenue] ) )&lt;/code&gt; is the revenue of the top 10 customers. Ties at the N-th place return all tied rows, so you can get more than N. The rows are not sorted; sort in the visual or with &lt;code&gt;ORDER BY&lt;/code&gt; in a query.&lt;/p&gt;
&lt;p&gt;&amp;quot;How much of our revenue comes from the top 10 customers?&amp;quot; is a question about concentration risk, and it needs &lt;code&gt;TOPN&lt;/code&gt;, not a filtered visual.&lt;/p&gt;
&lt;h2 id=&quot;what-does-topn-return&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-topn-return&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does TOPN return?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;bar&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;bar chart: Contoso 420; Fabrikam 310; Northwind 260; Adventure Works 190; Tailspin 150; All others (812 customers) 1,590&quot;&gt;&lt;line x1=&quot;200.8&quot; y1=&quot;8&quot; x2=&quot;200.8&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;200.8&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;299.6&quot; y1=&quot;8&quot; x2=&quot;299.6&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;299.6&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;500&lt;/text&gt;&lt;line x1=&quot;398.4&quot; y1=&quot;8&quot; x2=&quot;398.4&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;398.4&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;1,000&lt;/text&gt;&lt;line x1=&quot;497.2&quot; y1=&quot;8&quot; x2=&quot;497.2&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;497.2&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;1,500&lt;/text&gt;&lt;line x1=&quot;596&quot; y1=&quot;8&quot; x2=&quot;596&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;596&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;2,000&lt;/text&gt;&lt;rect x=&quot;200.8&quot; y=&quot;15.4&quot; width=&quot;83&quot; height=&quot;26.8&quot; rx=&quot;3&quot; class=&quot;m t-blue&quot;/&gt;&lt;text x=&quot;289.8&quot; y=&quot;33.8&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;420&lt;/text&gt;&lt;text x=&quot;190.8&quot; y=&quot;33.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Contoso&lt;/text&gt;&lt;rect x=&quot;200.8&quot; y=&quot;59.1&quot; width=&quot;61.3&quot; height=&quot;26.8&quot; rx=&quot;3&quot; class=&quot;m t-blue&quot;/&gt;&lt;text x=&quot;268.1&quot; y=&quot;77.5&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;310&lt;/text&gt;&lt;text x=&quot;190.8&quot; y=&quot;77.5&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Fabrikam&lt;/text&gt;&lt;rect x=&quot;200.8&quot; y=&quot;102.8&quot; width=&quot;51.4&quot; height=&quot;26.8&quot; rx=&quot;3&quot; class=&quot;m t-blue&quot;/&gt;&lt;text x=&quot;258.2&quot; y=&quot;121.2&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;260&lt;/text&gt;&lt;text x=&quot;190.8&quot; y=&quot;121.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Northwind&lt;/text&gt;&lt;rect x=&quot;200.8&quot; y=&quot;146.4&quot; width=&quot;37.5&quot; height=&quot;26.8&quot; rx=&quot;3&quot; class=&quot;m t-blue&quot;/&gt;&lt;text x=&quot;244.3&quot; y=&quot;164.8&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;190&lt;/text&gt;&lt;text x=&quot;190.8&quot; y=&quot;164.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Adventure Works&lt;/text&gt;&lt;rect x=&quot;200.8&quot; y=&quot;190.1&quot; width=&quot;29.6&quot; height=&quot;26.8&quot; rx=&quot;3&quot; class=&quot;m t-blue&quot;/&gt;&lt;text x=&quot;236.4&quot; y=&quot;208.5&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;150&lt;/text&gt;&lt;text x=&quot;190.8&quot; y=&quot;208.5&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Tailspin&lt;/text&gt;&lt;rect x=&quot;200.8&quot; y=&quot;233.8&quot; width=&quot;314.2&quot; height=&quot;26.8&quot; rx=&quot;3&quot; class=&quot;m t-grey&quot;/&gt;&lt;text x=&quot;521&quot; y=&quot;252.2&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;1,590&lt;/text&gt;&lt;text x=&quot;190.8&quot; y=&quot;252.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;All others (812 customers)&lt;/text&gt;&lt;line x1=&quot;200.8&quot; y1=&quot;8&quot; x2=&quot;200.8&quot; y2=&quot;270&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Revenue of the top 5 customers and the rest (thousands)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Top &lt;i class=&quot;n&quot;&gt;5&lt;/i&gt; Revenue =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;TOPN&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;5&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; ) )

Top &lt;i class=&quot;n&quot;&gt;5&lt;/i&gt; Share = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Top 5 Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ) ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Here the top 5 bring 1,330 of 2,920 thousand, a share of 46%.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-make-n-a-slicer&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-make-n-a-slicer&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you make N a slicer?&lt;/h2&gt;
&lt;p&gt;Create a what-if parameter &lt;strong&gt;Top N&lt;/strong&gt; (1 to 50) and use its value:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Top N Revenue =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; N = &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Top N'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Top N Value]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;10&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;TOPN&lt;/i&gt; ( N, &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-do-you-show-top-n-and-others&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-show-top-n-and-others&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you show top N and Others?&lt;/h2&gt;
&lt;p&gt;A bar chart with the top customers and one &amp;quot;Others&amp;quot; bar needs a table that contains an &amp;quot;Others&amp;quot; item. Add it to the customer list with a small calculated table:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Customer Names =
&lt;i class=&quot;f&quot;&gt;UNION&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;ROW&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;&amp;quot;Customer&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Others&amp;quot;&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Put &lt;code&gt;Customer Names[Customer]&lt;/code&gt; on the axis and use:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue Top N and Others =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; N = &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Top N'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Top N Value]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;10&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; TopList =
    &lt;i class=&quot;f&quot;&gt;TOPN&lt;/i&gt; ( N, &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Item = &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Customer Names'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; (
        Item = &lt;i class=&quot;s&quot;&gt;&amp;quot;Others&amp;quot;&lt;/i&gt;,
        &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;EXCEPT&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ), TopList ) ),
        &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; (
            Item IN &lt;i class=&quot;f&quot;&gt;SELECTCOLUMNS&lt;/i&gt; ( TopList, &lt;i class=&quot;s&quot;&gt;&amp;quot;C&amp;quot;&lt;/i&gt;, Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ),
            &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;TREATAS&lt;/i&gt; ( { Item }, Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ) )
        )
    )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;Customer Names&lt;/code&gt; has no relationship, so &lt;code&gt;TREATAS&lt;/code&gt; applies the name to the real customer column. Customers outside the top N return blank and disappear from the chart.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-use-topn-in-a-query&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-use-topn-in-a-query&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you use TOPN in a query?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;EVALUATE
&lt;i class=&quot;f&quot;&gt;TOPN&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;10&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;ADDCOLUMNS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ), &lt;i class=&quot;s&quot;&gt;&amp;quot;Revenue&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, DESC )
ORDER BY &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; DESC&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;TOPN&lt;/code&gt; picks the rows; &lt;code&gt;ORDER BY&lt;/code&gt; sorts them. Without it the order is not guaranteed.&lt;/p&gt;
&lt;h2 id=&quot;what-about-the-visual-top-n-filter&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-about-the-visual-top-n-filter&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What about the visual Top N filter?&lt;/h2&gt;
&lt;p&gt;In the filter pane, &lt;strong&gt;Filter type: Top N&lt;/strong&gt; on a field, by a measure, does the same for one visual without DAX. Use DAX &lt;code&gt;TOPN&lt;/code&gt; when you need the top N &lt;strong&gt;as a number&lt;/strong&gt; (share of top 10), as an &lt;strong&gt;Others&lt;/strong&gt; row, or inside other measures.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;More than N rows.&lt;/strong&gt; Ties at the cutoff are all returned; add a tie-breaker to the order, or accept it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;VALUES instead of ALLSELECTED.&lt;/strong&gt; Inside a row of the visual, &lt;code&gt;VALUES ( Customer[Customer] )&lt;/code&gt; has one customer; rank over all of them.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Expecting sorted output.&lt;/strong&gt; Sort in the visual or the query.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;N of 0 or less.&lt;/strong&gt; Returns an empty table.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/topn-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: TOPN function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-what-if&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Use what-if parameters to visualize variables&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/except-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: EXCEPT function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add &lt;code&gt;Top 5 Share&lt;/code&gt; to a card on your customer page: it is a one-number answer to concentration risk. &lt;a href=&quot;/blog/rankx-dax/&quot;&gt;RANKX&lt;/a&gt; gives each customer its position instead.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Treemaps in Power BI: many parts of a whole at once</title>
    <link href="https://data.benibix.com/blog/treemap-power-bi/"/>
    <id>https://data.benibix.com/blog/treemap-power-bi/</id>
    <published>2026-11-05T12:00:00Z</published>
    <updated>2026-11-05T12:00:00Z</updated>
    <summary>What a treemap in Power BI shows, branch and leaf nodes, the Category, Details and Values fields, when it beats a bar or pie chart, DAX for share and colour, and the limits of comparing rectangles.</summary>
    <category term="Visuals"/>
    <category term="Part of a whole"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;treemap&lt;/strong&gt; fills a rectangle with smaller rectangles, each sized by its value, so it shows many parts of a whole at once, and parts within parts. In Power BI, the &lt;strong&gt;Category&lt;/strong&gt; field makes the coloured &lt;strong&gt;branch nodes&lt;/strong&gt;, the optional &lt;strong&gt;Details&lt;/strong&gt; field splits each branch into &lt;strong&gt;leaf nodes&lt;/strong&gt;, and &lt;strong&gt;Values&lt;/strong&gt; sizes them. The largest branch sits at the top left, the smallest at the bottom right. Use it when there are too many categories for a pie and the question is &amp;quot;what are the big blocks?&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The chart, part by part:&lt;/strong&gt; &lt;a href=&quot;/visuals/treemap/&quot;&gt;What is a treemap?&lt;/a&gt; draws its parts and shows how to read one, its kinds and the mistakes to avoid.&lt;/p&gt;
&lt;p&gt;A pie with 30 slices is useless, and a bar chart with 30 bars shows the ranking but not that the top five make up 70% of the total. A treemap shows both: the big blocks dominate, the long tail shrinks to small tiles.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-treemap-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-treemap-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a treemap look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;treemap&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;treemap chart: Bikes 620; Accessories 180; Clothing 120; Components 80; Services 50; Spare parts 30&quot;&gt;&lt;rect x=&quot;1.5&quot; y=&quot;1.5&quot; width=&quot;364.4&quot; height=&quot;297&quot; rx=&quot;5&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;10&quot; y=&quot;22&quot; class=&quot;tin&quot; text-anchor=&quot;start&quot;&gt;Bikes&lt;/text&gt;&lt;text x=&quot;10&quot; y=&quot;38&quot; class=&quot;tin2&quot; text-anchor=&quot;start&quot;&gt;620&lt;/text&gt;&lt;rect x=&quot;368.9&quot; y=&quot;1.5&quot; width=&quot;160.6&quot; height=&quot;192.7&quot; rx=&quot;5&quot; class=&quot;m k1&quot;/&gt;&lt;text x=&quot;377.4&quot; y=&quot;22&quot; class=&quot;tin&quot; text-anchor=&quot;start&quot;&gt;Accessories&lt;/text&gt;&lt;text x=&quot;377.4&quot; y=&quot;38&quot; class=&quot;tin2&quot; text-anchor=&quot;start&quot;&gt;180&lt;/text&gt;&lt;rect x=&quot;532.5&quot; y=&quot;1.5&quot; width=&quot;106&quot; height=&quot;192.7&quot; rx=&quot;5&quot; class=&quot;m k2&quot;/&gt;&lt;text x=&quot;541&quot; y=&quot;22&quot; class=&quot;tin&quot; text-anchor=&quot;start&quot;&gt;Clothing&lt;/text&gt;&lt;text x=&quot;541&quot; y=&quot;38&quot; class=&quot;tin2&quot; text-anchor=&quot;start&quot;&gt;120&lt;/text&gt;&lt;rect x=&quot;368.9&quot; y=&quot;197.2&quot; width=&quot;133.3&quot; height=&quot;101.3&quot; rx=&quot;5&quot; class=&quot;m k3&quot;/&gt;&lt;text x=&quot;377.4&quot; y=&quot;217.7&quot; class=&quot;tin&quot; text-anchor=&quot;start&quot;&gt;Components&lt;/text&gt;&lt;text x=&quot;377.4&quot; y=&quot;233.7&quot; class=&quot;tin2&quot; text-anchor=&quot;start&quot;&gt;80&lt;/text&gt;&lt;rect x=&quot;505.2&quot; y=&quot;197.2&quot; width=&quot;82.2&quot; height=&quot;101.3&quot; rx=&quot;5&quot; class=&quot;m k4&quot;/&gt;&lt;text x=&quot;513.7&quot; y=&quot;217.7&quot; class=&quot;tin&quot; text-anchor=&quot;start&quot;&gt;Services&lt;/text&gt;&lt;text x=&quot;513.7&quot; y=&quot;233.7&quot; class=&quot;tin2&quot; text-anchor=&quot;start&quot;&gt;50&lt;/text&gt;&lt;rect x=&quot;590.4&quot; y=&quot;197.2&quot; width=&quot;48.1&quot; height=&quot;101.3&quot; rx=&quot;5&quot; class=&quot;m k5&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Revenue by product category (in thousands), largest top left&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;when-is-it-the-right-chart&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-it-the-right-chart&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is it the right chart?&lt;/h2&gt;
&lt;p&gt;Microsoft lists the cases: large amounts of hierarchical data; more values than a bar chart can show well; proportions between each part and the whole; how the measure is spread across each level of a hierarchy; size and colour as two attributes at once; and spotting the biggest contributors, outliers and exceptions.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;The data&lt;/th&gt;&lt;th&gt;Chart&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;2 to 5 parts&lt;/td&gt;&lt;td&gt;pie or donut&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Up to about 15 parts, exact ranking matters&lt;/td&gt;&lt;td&gt;bar chart&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Many parts, or parts within parts, the big picture matters&lt;/td&gt;&lt;td&gt;treemap&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Parts compared precisely with each other&lt;/td&gt;&lt;td&gt;bar chart (areas are hard to compare)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Treemap, pie or bar&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-build-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build one?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;In &lt;strong&gt;Visualizations&lt;/strong&gt; pick &lt;strong&gt;Treemap&lt;/strong&gt;. The wells are &lt;strong&gt;Category&lt;/strong&gt;, &lt;strong&gt;Details&lt;/strong&gt;, &lt;strong&gt;Values&lt;/strong&gt; and &lt;strong&gt;Tooltips&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Drag the measure to &lt;strong&gt;Values&lt;/strong&gt; and the top level, for example &lt;code&gt;Product[Category]&lt;/code&gt;, to &lt;strong&gt;Category&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;For leaves, drag a second field to &lt;strong&gt;Details&lt;/strong&gt;, for example &lt;code&gt;Store[Chain]&lt;/code&gt;: each category is split into chains, coloured as their category.&lt;/li&gt;&lt;li&gt;Turn on &lt;strong&gt;Data labels&lt;/strong&gt; and &lt;strong&gt;Category labels&lt;/strong&gt; in &lt;strong&gt;Format visual&lt;/strong&gt;; small tiles hide their labels when they do not fit, so the hover tooltip carries the rest.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;A treemap highlights and cross-filters like other visuals: selecting a tile filters or highlights the other visuals on the page, and selecting elsewhere highlights the matching part of each tile.&lt;/p&gt;
&lt;h2 id=&quot;what-dax-goes-with-a-treemap&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-dax-goes-with-a-treemap&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What DAX goes with a treemap?&lt;/h2&gt;
&lt;p&gt;The share of each tile, for the tooltip:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Share of Revenue =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;REMOVEFILTERS&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt; ) ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Size and colour can say two different things. Size by revenue, colour by margin: &lt;strong&gt;Format visual, Colors, fx&lt;/strong&gt;, &lt;strong&gt;Gradient&lt;/strong&gt; based on &lt;code&gt;Margin %&lt;/code&gt;, so a big pale tile is a big seller with a thin margin.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Margin % =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Cost]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;With colour by a measure, the tiles no longer share their category colour; that is the point, but say so in the title (&amp;quot;size: revenue, colour: margin&amp;quot;).&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Comparing similar tiles.&lt;/strong&gt; Two tiles of 12% and 14% look the same, and a tall thin tile looks smaller than a square one of the same area. Put the numbers in labels or tooltips, or use bars for the comparison.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Negative values.&lt;/strong&gt; A tile cannot be negative; categories with net returns vanish.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too many levels.&lt;/strong&gt; Category and details are plenty; a third level turns tiles into confetti. Drill instead.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Colour that means nothing.&lt;/strong&gt; Default colours per category are decoration; if colour carries a measure, add a legend that says so.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-treemaps&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Treemaps in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Apply conditional formatting in tables and matrixes&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Use a treemap for &amp;quot;what are the big blocks?&amp;quot; across many categories, add a Details level only if it helps, and keep exact comparisons for a bar chart. The &lt;a href=&quot;/blog/pie-chart-power-bi/&quot;&gt;pie chart&lt;/a&gt; post covers the small-whole case, and the &lt;a href=&quot;/blog/decomposition-tree-power-bi/&quot;&gt;decomposition tree&lt;/a&gt; breaks a total down level by level.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Visual calculation functions in DAX: all of them</title>
    <link href="https://data.benibix.com/blog/visual-calculation-functions-dax/"/>
    <id>https://data.benibix.com/blog/visual-calculation-functions-dax/</id>
    <published>2026-11-05T12:00:00Z</published>
    <updated>2026-11-05T12:00:00Z</updated>
    <summary>Every DAX function made for visual calculations, RUNNINGSUM, MOVINGAVERAGE, PREVIOUS, NEXT, FIRST, LAST, RANGE, COLLAPSE, COLLAPSEALL, EXPAND, EXPANDALL, LOOKUP, LOOKUPWITHTOTALS and ISATLEVEL, with the window function each is a shortcut to, and examples.</summary>
    <category term="DAX"/>
    <category term="Window functions"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;a href=&quot;/blog/visual-calculations-power-bi/&quot;&gt;visual calculations&lt;/a&gt; have their own functions that work on the &lt;strong&gt;visual matrix&lt;/strong&gt;: the rows and columns the visual shows. &lt;strong&gt;Moving along an axis&lt;/strong&gt;: &lt;code&gt;PREVIOUS&lt;/code&gt;, &lt;code&gt;NEXT&lt;/code&gt;, &lt;code&gt;FIRST&lt;/code&gt;, &lt;code&gt;LAST&lt;/code&gt;, &lt;code&gt;RANGE&lt;/code&gt;, &lt;code&gt;RUNNINGSUM&lt;/code&gt;, &lt;code&gt;MOVINGAVERAGE&lt;/code&gt; (shortcuts to &lt;code&gt;OFFSET&lt;/code&gt;, &lt;code&gt;INDEX&lt;/code&gt; and &lt;code&gt;WINDOW&lt;/code&gt;). &lt;strong&gt;Moving between levels&lt;/strong&gt;: &lt;code&gt;COLLAPSE&lt;/code&gt;, &lt;code&gt;COLLAPSEALL&lt;/code&gt;, &lt;code&gt;EXPAND&lt;/code&gt;, &lt;code&gt;EXPANDALL&lt;/code&gt;. &lt;strong&gt;Looking up a cell&lt;/strong&gt;: &lt;code&gt;LOOKUP&lt;/code&gt;, &lt;code&gt;LOOKUPWITHTOTALS&lt;/code&gt;. &lt;strong&gt;Testing the level&lt;/strong&gt;: &lt;code&gt;ISATLEVEL&lt;/code&gt;. Most take an optional &lt;strong&gt;Axis&lt;/strong&gt; (ROWS, COLUMNS, ...) and &lt;strong&gt;Reset&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;They make the calculations people used to fight with in DAX (running totals, percent of parent, difference to previous) one short formula, on one visual.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-move-along-an-axis&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-move-along-an-axis&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions move along an axis?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Does&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;th&gt;Shortcut to&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;PREVIOUS&lt;/td&gt;&lt;td&gt;the previous row's value&lt;/td&gt;&lt;td&gt;ProfitVSPrevious = [Profit] - PREVIOUS ( [Profit] )&lt;/td&gt;&lt;td&gt;OFFSET ( -1 )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;NEXT&lt;/td&gt;&lt;td&gt;the next row's value&lt;/td&gt;&lt;td&gt;ProfitVSNext = [Profit] - NEXT ( [Profit] )&lt;/td&gt;&lt;td&gt;OFFSET ( 1 )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;FIRST&lt;/td&gt;&lt;td&gt;the first row's value&lt;/td&gt;&lt;td&gt;ProfitVSFirst = [Profit] - FIRST ( [Profit] )&lt;/td&gt;&lt;td&gt;INDEX ( 1 )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;LAST&lt;/td&gt;&lt;td&gt;the last row's value&lt;/td&gt;&lt;td&gt;ProfitVSLast = [Profit] - LAST ( [Profit] )&lt;/td&gt;&lt;td&gt;INDEX ( -1 )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;RUNNINGSUM&lt;/td&gt;&lt;td&gt;a running total&lt;/td&gt;&lt;td&gt;RunningSumSales = RUNNINGSUM ( [Sales Amount] )&lt;/td&gt;&lt;td&gt;WINDOW&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;MOVINGAVERAGE&lt;/td&gt;&lt;td&gt;a moving average over a window&lt;/td&gt;&lt;td&gt;MovingAverageSales = MOVINGAVERAGE ( [Sales Amount], 2 )&lt;/td&gt;&lt;td&gt;WINDOW&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;RANGE&lt;/td&gt;&lt;td&gt;a slice of rows around the current one&lt;/td&gt;&lt;td&gt;AverageSales = AVERAGEX ( RANGE ( 1 ), [Sales Amount] )&lt;/td&gt;&lt;td&gt;WINDOW&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Axis functions (Microsoft's examples)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;code&gt;RANGE ( step [, includeCurrent] [, axis] ... )&lt;/code&gt; returns rows before (or after) the current one, for your own aggregation: &lt;code&gt;SUMX ( RANGE ( 2 ), [Sales Amount] )&lt;/code&gt; adds the current and the two previous rows.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-move-between-levels&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-move-between-levels&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions move between levels?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Evaluated at&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;COLLAPSE&lt;/td&gt;&lt;td&gt;one level up (the parent)&lt;/td&gt;&lt;td&gt;Percent of parent = DIVIDE ( [Sales Amount], COLLAPSE ( [Sales Amount], ROWS ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;COLLAPSEALL&lt;/td&gt;&lt;td&gt;the total of the axis&lt;/td&gt;&lt;td&gt;Percent of grand total = DIVIDE ( [Sales Amount], COLLAPSEALL ( [Sales Amount], ROWS ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;EXPAND&lt;/td&gt;&lt;td&gt;one level down (the children)&lt;/td&gt;&lt;td&gt;Average of children = EXPAND ( AVERAGE ( [Sales Amount] ), ROWS )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;EXPANDALL&lt;/td&gt;&lt;td&gt;the lowest level&lt;/td&gt;&lt;td&gt;Average of leaf level = EXPANDALL ( AVERAGE ( [Sales Amount] ), ROWS )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ISATLEVEL&lt;/td&gt;&lt;td&gt;TRUE if a column is present at the current level&lt;/td&gt;&lt;td&gt;IsFiscalYearAtLevel = ISATLEVEL ( [Fiscal Year] )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Level functions&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In a matrix with Category and Product on rows, &lt;code&gt;Percent of parent&lt;/code&gt; shows each product's share of its category and each category's share of the total.&lt;/p&gt;
&lt;h2 id=&quot;how-do-lookup-and-lookupwithtotals-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-lookup-and-lookupwithtotals-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do LOOKUP and LOOKUPWITHTOTALS work?&lt;/h2&gt;
&lt;p&gt;They evaluate an expression at another cell of the visual matrix, named by its values:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- sales of 2025 on every row (the current row's other filters still apply)&lt;/i&gt;
LookupSalesFor2025WithContext = &lt;i class=&quot;f&quot;&gt;LOOKUP&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sales]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;2025&amp;quot;&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- the same, but unspecified columns are taken at total level&lt;/i&gt;
LookupSalesFor2025WithTotals = &lt;i class=&quot;f&quot;&gt;LOOKUPWITHTOTALS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sales]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;2025&amp;quot;&lt;/i&gt; )

Index vs &lt;i class=&quot;n&quot;&gt;2025&lt;/i&gt; = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sales]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[LookupSalesFor2025WithContext]&lt;/i&gt; ) * &lt;i class=&quot;n&quot;&gt;100&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;LOOKUP&lt;/code&gt; keeps the current row's other columns (for a matrix with Year and Quarter, it looks up 2025 in the same quarter); &lt;code&gt;LOOKUPWITHTOTALS&lt;/code&gt; uses totals for any column you do not name.&lt;/p&gt;
&lt;h2 id=&quot;what-do-axis-and-reset-change&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-do-axis-and-reset-change&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What do Axis and Reset change?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- across columns instead of rows (a matrix with months on columns)&lt;/i&gt;
Running across months = &lt;i class=&quot;f&quot;&gt;RUNNINGSUM&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sales Amount]&lt;/i&gt;, COLUMNS )

&lt;i class=&quot;c&quot;&gt;-- restart at each year in a Year, Month hierarchy on rows&lt;/i&gt;
Running per year = &lt;i class=&quot;f&quot;&gt;RUNNINGSUM&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sales Amount]&lt;/i&gt;, HIGHESTPARENT )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Axis values are &lt;code&gt;ROWS&lt;/code&gt;, &lt;code&gt;COLUMNS&lt;/code&gt;, &lt;code&gt;ROWS COLUMNS&lt;/code&gt;, &lt;code&gt;COLUMNS ROWS&lt;/code&gt; and versions with &lt;code&gt;ROWPAGES&lt;/code&gt; and &lt;code&gt;COLUMNPAGES&lt;/code&gt; for small multiples. Reset accepts &lt;code&gt;NONE&lt;/code&gt;, &lt;code&gt;HIGHESTPARENT&lt;/code&gt;, &lt;code&gt;LOWESTPARENT&lt;/code&gt;, an integer or a field. Details in &lt;a href=&quot;/blog/visual-calculations-power-bi/&quot;&gt;visual calculations&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Using them in measures.&lt;/strong&gt; These functions work only in visual calculations (&lt;code&gt;RANK&lt;/code&gt;, &lt;code&gt;ROWNUMBER&lt;/code&gt;, &lt;code&gt;OFFSET&lt;/code&gt;, &lt;code&gt;INDEX&lt;/code&gt; and &lt;code&gt;WINDOW&lt;/code&gt; work in both).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Order.&lt;/strong&gt; They follow the visual's sort on the axis; sort by the right field.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Hidden levels.&lt;/strong&gt; &lt;code&gt;COLLAPSE&lt;/code&gt; needs a parent level on the axis; with one level it returns the total.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Fields not on the visual.&lt;/strong&gt; A visual calculation can only use fields added to the visual (hide them if they should not show).&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-visual-calculations-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Visual calculations overview&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/lookupwithtotals-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: LOOKUPWITHTOTALS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/collapse-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: COLLAPSE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;In a matrix by category and product, add &lt;code&gt;Percent of parent&lt;/code&gt; and &lt;code&gt;Running sum&lt;/code&gt; as visual calculations. &lt;a href=&quot;/blog/offset-dax/&quot;&gt;OFFSET&lt;/a&gt; and &lt;a href=&quot;/blog/window-dax/&quot;&gt;WINDOW&lt;/a&gt; are the model-level versions.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Visual calculations in Power BI: DAX on the visual</title>
    <link href="https://data.benibix.com/blog/visual-calculations-power-bi/"/>
    <id>https://data.benibix.com/blog/visual-calculations-power-bi/</id>
    <published>2026-11-05T12:00:00Z</published>
    <updated>2026-11-05T12:00:00Z</updated>
    <summary>What visual calculations in Power BI are, how they differ from measures, RUNNINGSUM, MOVINGAVERAGE, PREVIOUS, COLLAPSE and EXPAND, the Axis and Reset parameters, templates, hiding helper fields, and when a measure is still the better choice.</summary>
    <category term="Visuals"/>
    <category term="Report features"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;visual calculation&lt;/strong&gt; is a DAX formula stored on one visual, calculated on the numbers the visual already shows. &lt;code&gt;Running sum = RUNNINGSUM([Sales Amount])&lt;/code&gt; adds up the rows of the visual from top to bottom, with no date table logic. They can refer to the visual's structure: the previous row, the parent level, the grand total. Because they work on aggregated data, they are often faster than the equivalent measure. They live on the visual, not in the model, so other visuals cannot reuse them.&lt;/p&gt;
&lt;p&gt;A running total by month as a measure needs a date table, &lt;code&gt;DATESYTD&lt;/code&gt; or a &lt;code&gt;FILTER&lt;/code&gt; over &lt;code&gt;ALLSELECTED&lt;/code&gt;, and care with the sort order. As a visual calculation it is one word: &lt;code&gt;RUNNINGSUM&lt;/code&gt;. The trade is reuse: the measure works everywhere, the visual calculation only where it was written.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-visual-calculation-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-visual-calculation-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a visual calculation look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Month&lt;/th&gt;&lt;th&gt;Sales Amount&lt;/th&gt;&lt;th&gt;Running sum&lt;/th&gt;&lt;th&gt;Versus previous&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Jan&lt;/td&gt;&lt;td&gt;80&lt;/td&gt;&lt;td&gt;80&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Feb&lt;/td&gt;&lt;td&gt;95&lt;/td&gt;&lt;td&gt;175&lt;/td&gt;&lt;td&gt;+15&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Mar&lt;/td&gt;&lt;td&gt;90&lt;/td&gt;&lt;td&gt;265&lt;/td&gt;&lt;td&gt;-5&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Apr&lt;/td&gt;&lt;td&gt;118&lt;/td&gt;&lt;td&gt;383&lt;/td&gt;&lt;td&gt;+28&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;May&lt;/td&gt;&lt;td&gt;130&lt;/td&gt;&lt;td&gt;513&lt;/td&gt;&lt;td&gt;+12&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;A matrix by month with two visual calculations&lt;/figcaption&gt;&lt;/figure&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Running sum = &lt;i class=&quot;f&quot;&gt;RUNNINGSUM&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sales Amount]&lt;/i&gt; )

Versus previous = &lt;i class=&quot;m&quot;&gt;[Sales Amount]&lt;/i&gt; - &lt;i class=&quot;f&quot;&gt;PREVIOUS&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sales Amount]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-do-you-add-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-add-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you add one?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;Select a visual (a table, matrix or chart with the fields you need).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Home&lt;/strong&gt;, &lt;strong&gt;New visual calculation&lt;/strong&gt;, or right-click the visual, &lt;strong&gt;New calculation&lt;/strong&gt;. The visual calculations editor opens with the visual matrix on top.&lt;/li&gt;&lt;li&gt;Type the formula, or pick a &lt;strong&gt;template&lt;/strong&gt;: Running sum, Moving average, Percent of parent, Percent of grand total, Average of children, Versus previous, Versus next, Versus first, Versus last, and two lookup templates.&lt;/li&gt;&lt;li&gt;Fields used only to feed a calculation can be &lt;strong&gt;hidden&lt;/strong&gt; on the visual: they stay available to the calculation but do not show.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;A visual calculation can refer to columns, measures, or other visual calculations that are in the same visual. A model field must be on the visual before a calculation can use it.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-are-made-for-them&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-are-made-for-them&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions are made for them?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Does&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;RUNNINGSUM&lt;/td&gt;&lt;td&gt;running total along an axis&lt;/td&gt;&lt;td&gt;RUNNINGSUM([Sales Amount])&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;MOVINGAVERAGE&lt;/td&gt;&lt;td&gt;average over a window&lt;/td&gt;&lt;td&gt;MOVINGAVERAGE([Sales Amount], 2)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PREVIOUS, NEXT&lt;/td&gt;&lt;td&gt;the row before or after&lt;/td&gt;&lt;td&gt;[Sales Amount] - PREVIOUS([Sales Amount])&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;FIRST, LAST&lt;/td&gt;&lt;td&gt;the first or last row of the axis&lt;/td&gt;&lt;td&gt;DIVIDE([Sales Amount], FIRST([Sales Amount]))&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;COLLAPSE&lt;/td&gt;&lt;td&gt;the value one level up&lt;/td&gt;&lt;td&gt;DIVIDE([Sales Amount], COLLAPSE([Sales Amount], ROWS))&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;COLLAPSEALL&lt;/td&gt;&lt;td&gt;the grand total of the axis&lt;/td&gt;&lt;td&gt;DIVIDE([Sales Amount], COLLAPSEALL([Sales Amount], ROWS))&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;EXPAND, EXPANDALL&lt;/td&gt;&lt;td&gt;evaluate one level down, or at the leaf level&lt;/td&gt;&lt;td&gt;EXPAND(AVERAGE([Sales Amount]), ROWS)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;RANGE&lt;/td&gt;&lt;td&gt;a slice of rows of the axis&lt;/td&gt;&lt;td&gt;SUMX(RANGE(3), [Sales Amount])&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;LOOKUP, LOOKUPWITHTOTALS&lt;/td&gt;&lt;td&gt;a value at another place in the visual matrix&lt;/td&gt;&lt;td&gt;LOOKUP(SUM([Sales Amount]), [Category], &amp;quot;Bikes&amp;quot;)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Functions for visual calculations&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-do-axis-and-reset-do&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-do-axis-and-reset-do&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What do Axis and Reset do?&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Axis&lt;/strong&gt; says which way to go through the visual matrix: &lt;code&gt;ROWS&lt;/code&gt;, &lt;code&gt;COLUMNS&lt;/code&gt;, &lt;code&gt;ROWS COLUMNS&lt;/code&gt;, &lt;code&gt;COLUMNS ROWS&lt;/code&gt;, or including small multiples (&lt;code&gt;ROWS ROWPAGES&lt;/code&gt;). The default is the first axis of the visual.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Reset&lt;/strong&gt; restarts the calculation at a level of the hierarchy. With Year and Month on rows:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Running sum per year = &lt;i class=&quot;f&quot;&gt;RUNNINGSUM&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sales Amount]&lt;/i&gt;, HIGHESTPARENT )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;HIGHESTPARENT&lt;/code&gt; (equivalent to 1) restarts at each year; &lt;code&gt;LOWESTPARENT&lt;/code&gt; (-1) restarts at the immediate parent; &lt;code&gt;NONE&lt;/code&gt; (0, the default) never restarts. Reset needs several levels on the axis; with a single field, use &lt;strong&gt;PartitionBy&lt;/strong&gt; instead. Microsoft's advice: prefer Axis and Reset to follow the visual's structure, and use OrderBy and PartitionBy to pin a calculation to specific fields whatever the layout.&lt;/p&gt;
&lt;h2 id=&quot;visual-calculation-or-measure&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#visual-calculation-or-measure&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Visual calculation or measure?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Choose&lt;/th&gt;&lt;th&gt;When&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;visual calculation&lt;/td&gt;&lt;td&gt;the result belongs to one visual: running totals, differences between rows, percent of parent in this matrix&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;measure&lt;/td&gt;&lt;td&gt;the number is reused in several visuals, in tooltips, cards, other measures, or by other report authors&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;measure&lt;/td&gt;&lt;td&gt;the logic depends on the model, not on the visual: year over year with a date table, customer counts across tables&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;The &lt;a href=&quot;/blog/matrix-visual-power-bi/&quot;&gt;custom totals&lt;/a&gt; of tables and matrices are built on visual calculations: picking &amp;quot;Sum&amp;quot; for a total creates one.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Reusing a visual calculation elsewhere.&lt;/strong&gt; It exists only on its visual; copy the visual or write a measure.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Sort order.&lt;/strong&gt; &lt;code&gt;PREVIOUS&lt;/code&gt; and &lt;code&gt;RUNNINGSUM&lt;/code&gt; follow the visual's order on the axis; a visual sorted by value runs the total in value order.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Fields missing from the visual.&lt;/strong&gt; A calculation can only use fields placed on the visual; add them and hide them.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Format.&lt;/strong&gt; Field formatting does not carry over; format the visual calculation itself.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Reset on one level.&lt;/strong&gt; It needs a hierarchy; with one field use PartitionBy.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-visual-calculations-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Visual calculations in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/runningsum-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: RUNNINGSUM function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/movingaverage-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: MOVINGAVERAGE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add a Running sum and a Versus previous template to one matrix, then compare the time it took with writing the measures. &lt;a href=&quot;/blog/visual-calculation-functions-dax/&quot;&gt;Visual calculation functions in DAX&lt;/a&gt; goes through each function with its parameters.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>What is data visualization? Start with the question</title>
    <link href="https://data.benibix.com/blog/what-is-data-visualization/"/>
    <id>https://data.benibix.com/blog/what-is-data-visualization/</id>
    <published>2026-11-05T12:00:00Z</published>
    <updated>2026-11-05T12:00:00Z</updated>
    <summary>Data visualization shows numbers as a picture so the pattern is seen at once. In Power BI, pick the visual by the question the page answers, and keep one message per visual.</summary>
    <category term="Visuals"/>
    <category term="Report design"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; data visualization means showing numbers as a picture so the reader sees the pattern &lt;strong&gt;in one look&lt;/strong&gt; instead of reading rows. In Power BI, choose the visual from the &lt;strong&gt;question&lt;/strong&gt; the page answers: a &lt;strong&gt;line chart&lt;/strong&gt; for change over time, a &lt;strong&gt;bar or column chart&lt;/strong&gt; to compare, a &lt;strong&gt;donut&lt;/strong&gt; for two to five parts of a whole, a &lt;strong&gt;histogram&lt;/strong&gt; for how values spread, a &lt;strong&gt;scatter chart&lt;/strong&gt; for two numbers that move together.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;All the charts in one place:&lt;/strong&gt; &lt;a href=&quot;/visuals/&quot;&gt;Visuals&lt;/a&gt; sorts every chart by the question it answers, each with its parts, how to read it and the mistakes to avoid.&lt;/p&gt;
&lt;p&gt;A matrix with 12 months and 8 regions holds the answer to &amp;quot;where did sales drop?&amp;quot;, but the reader has to hunt for it. A line per region shows the drop in one second. That is the only job of a visual: make the one thing that matters impossible to miss.&lt;/p&gt;
&lt;p&gt;The short video below shows how to pick the chart by the question you are answering.&lt;/p&gt;
&lt;h2 id=&quot;which-power-bi-visual-answers-which-question&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-power-bi-visual-answers-which-question&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which Power BI visual answers which question?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Your question&lt;/th&gt;&lt;th&gt;Power BI visual&lt;/th&gt;&lt;th&gt;Why it works&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;How did it change over time?&lt;/td&gt;&lt;td&gt;Line chart&lt;/td&gt;&lt;td&gt;the slope shows the direction&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Which is bigger?&lt;/td&gt;&lt;td&gt;Clustered bar or column chart&lt;/td&gt;&lt;td&gt;lengths side by side are easy to compare&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;What share is each part?&lt;/td&gt;&lt;td&gt;Donut or pie chart, two to five slices&lt;/td&gt;&lt;td&gt;slices of one whole&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;How are the values spread?&lt;/td&gt;&lt;td&gt;Column chart of bins&lt;/td&gt;&lt;td&gt;counts per range show the shape&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Do two numbers move together?&lt;/td&gt;&lt;td&gt;Scatter chart&lt;/td&gt;&lt;td&gt;each dot is one item on two scales&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Are we on target?&lt;/td&gt;&lt;td&gt;KPI visual or card&lt;/td&gt;&lt;td&gt;one number against its goal&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The question picks the visual&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The Financial Times' &lt;em&gt;Visual Vocabulary&lt;/em&gt; sorts charts the same way, by what the reader should see: change over time, magnitude, part to whole, distribution, correlation and more.&lt;/p&gt;
&lt;h2 id=&quot;why-start-with-the-question-not-the-visual&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-start-with-the-question-not-the-visual&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why start with the question, not the visual?&lt;/h2&gt;
&lt;p&gt;The visualizations pane shows dozens of icons, so it is tempting to pick by look. A pie with twelve slices or a line through regions (which have no order) hides the answer. Write the page's question as its title first, for example &amp;quot;Which region sold most this quarter?&amp;quot;, and the visual follows: bars, sorted.&lt;/p&gt;
&lt;h2 id=&quot;what-else-decides-the-visual&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-else-decides-the-visual&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What else decides the visual?&lt;/h2&gt;
&lt;p&gt;The shape of the data:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:4&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Two to five&lt;/b&gt;&lt;ul&gt;&lt;li&gt;bars, columns or a donut&lt;/li&gt;&lt;li&gt;all labels fit&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Six to fifteen&lt;/b&gt;&lt;ul&gt;&lt;li&gt;sorted bars&lt;/li&gt;&lt;li&gt;a donut stops working&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;More than fifteen&lt;/b&gt;&lt;span&gt;Top N bars plus Other, or a table&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Two numbers&lt;/b&gt;&lt;span&gt;a card each, or one sentence&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;How many items you show&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Two messages in one visual.&lt;/strong&gt; A combo chart with four series and two axes asks the reader to work. Split it into two visuals.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Unsorted bars.&lt;/strong&gt; Sort by the value unless the order means something (months, sizes).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Colour as decoration.&lt;/strong&gt; One highlight colour, the rest grey; colour should carry meaning. The &lt;a href=&quot;/blog/conditional-formatting-power-bi/&quot;&gt;conditional formatting&lt;/a&gt; post shows how.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A legend far from the data.&lt;/strong&gt; Label the series directly where there is room.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://github.com/Financial-Times/chart-doctor/tree/main/visual-vocabulary&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Financial Times: Visual Vocabulary&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-types-for-reports-and-q-and-a&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Visualization types in Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/blog/which-power-bi-chart/&quot;&gt;Which Power BI chart should you use?&lt;/a&gt; goes through the questions visual by visual. To try it with your own numbers, &lt;a href=&quot;https://tools.benibix.com/data/chart-compass/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Chart Compass&lt;/a&gt; takes a pasted table and what the chart should say, draws the charts that fit, ranks them with the reason for each, and names them in Power BI, Tableau and Excel.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Prompt engineering for SQL: the four parts that work</title>
    <link href="https://data.benibix.com/blog/prompt-engineering-for-sql/"/>
    <id>https://data.benibix.com/blog/prompt-engineering-for-sql/</id>
    <published>2026-11-05T09:00:00Z</published>
    <updated>2026-11-05T09:00:00Z</updated>
    <summary>Role, task, context and format: the four parts of a good prompt, applied to SQL. What to put in each for a query that runs on your database and answers the right question, with one example that sets the pattern.</summary>
    <category term="AI"/>
    <category term="Prompts"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; write the prompt in four parts. &lt;strong&gt;Role:&lt;/strong&gt; &amp;quot;You write T-SQL for SQL Server.&amp;quot; &lt;strong&gt;Task:&lt;/strong&gt; the question in business words. &lt;strong&gt;Context:&lt;/strong&gt; the table definitions, keys and what a row means. &lt;strong&gt;Format:&lt;/strong&gt; one query, with the columns you want back and their order. Add &lt;strong&gt;one example&lt;/strong&gt; of a query you like, and the AI copies its style. Then run it on a small sample and check one number by hand.&lt;/p&gt;
&lt;p&gt;Asking an AI for SQL without the schema is asking it to guess your table names. Asking without the dialect gets you &lt;code&gt;LIMIT&lt;/code&gt; on a SQL Server that wants &lt;code&gt;TOP&lt;/code&gt;. The four parts close both gaps.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-into-each-part&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-into-each-part&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes into each part?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;layers&quot;&gt;&lt;ol class=&quot;dfig-stack&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Role&lt;/b&gt;&lt;span&gt;the database and dialect: &amp;quot;You write T-SQL for SQL Server 2022&amp;quot;&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Task&lt;/b&gt;&lt;span&gt;the question: &amp;quot;the 10 customers with the highest revenue in 2026, with their country&amp;quot;&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Context&lt;/b&gt;&lt;span&gt;CREATE TABLE lines, keys, and what one row means (&amp;quot;one row per order line&amp;quot;)&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;bronze&quot;&gt;&lt;b&gt;Format&lt;/b&gt;&lt;span&gt;&amp;quot;one query, columns CustomerName, Country, Revenue, sorted by Revenue, no comments&amp;quot;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;The four parts, in order&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-does-a-full-prompt-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-full-prompt-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a full prompt look like?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot;&gt;&lt;code&gt;You write T-SQL for SQL Server 2022.
Task: the 10 customers with the highest revenue in 2026, with their country.
Tables:
  Sales(OrderID, OrderDate, CustomerID, Amount) -- one row per order line
  Customer(CustomerID, CustomerName, Country)
Return one query with the columns CustomerName, Country, Revenue, sorted by Revenue descending.
Example of the style I want:
  SELECT TOP (5) p.ProductName, SUM(s.Amount) AS Revenue
  FROM Sales AS s JOIN Product AS p ON p.ProductID = s.ProductID
  GROUP BY p.ProductName ORDER BY Revenue DESC;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The example teaches more than a paragraph of rules: aliases, &lt;code&gt;TOP&lt;/code&gt; in brackets, the join style, the sort.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-check-the-query&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-check-the-query&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you check the query?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Run it on a sample&lt;/strong&gt; or a test copy, never first on production.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Check one row by hand:&lt;/strong&gt; pick the top customer and sum their 2026 orders yourself.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Read the joins:&lt;/strong&gt; a join on the wrong key repeats rows and inflates every total.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Look at the dates:&lt;/strong&gt; &lt;code&gt;OrderDate &amp;gt;= '2026-01-01' AND OrderDate &amp;lt; '2027-01-01'&lt;/code&gt; keeps the whole last day; &lt;code&gt;BETWEEN&lt;/code&gt; with a datetime can lose it.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;No dialect.&lt;/strong&gt; You get &lt;code&gt;LIMIT 10&lt;/code&gt; on SQL Server, or &lt;code&gt;TOP&lt;/code&gt; on PostgreSQL.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;No row meaning.&lt;/strong&gt; &amp;quot;Amount&amp;quot; per order or per order line changes every sum.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Real customer data in the prompt.&lt;/strong&gt; Send the schema and made-up rows, not the data itself, unless your company allows it.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/queries/top-transact-sql&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: TOP (Transact-SQL)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/queries/select-transact-sql&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SELECT (Transact-SQL)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;The same four parts work for DAX: see &lt;a href=&quot;/blog/ai-prompt-for-dax/&quot;&gt;how to prompt an AI to write a DAX measure&lt;/a&gt;. For queries with running totals and ranks, read &lt;a href=&quot;/blog/sql-window-functions-explained/&quot;&gt;SQL window functions explained&lt;/a&gt; first, so you can check what the AI writes.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Google Trends explained: what the 0 to 100 means</title>
    <link href="https://data.benibix.com/blog/google-trends-index-explained/"/>
    <id>https://data.benibix.com/blog/google-trends-index-explained/</id>
    <published>2026-11-05T01:00:00Z</published>
    <updated>2026-11-05T01:00:00Z</updated>
    <summary>Google Trends is where people go to see whether a topic is rising or fading. Why its numbers are not search counts, how they are normalised and scaled to 0 to 100, and how to use them without fooling yourself.</summary>
    <category term="KPIs"/>
    <category term="Marketing"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; Google Trends does not show how many people searched. Each data point is &lt;strong&gt;divided by all searches&lt;/strong&gt; in that place and time, and the result is &lt;strong&gt;scaled from 0 to 100&lt;/strong&gt;. So the line shows &lt;strong&gt;relative interest&lt;/strong&gt;: a fall from 80 to 40 means the topic's share of searches halved, not that searches halved. Terms with very low volume show as &lt;strong&gt;0&lt;/strong&gt;. Compare terms in the &lt;strong&gt;same chart&lt;/strong&gt;, and never add Trends numbers up as if they were counts.&lt;/p&gt;
&lt;p&gt;When a topic takes off, everyone checks the Trends chart to see how big it is and whether it is still growing. The curve is real. The numbers on it are easy to misread.&lt;/p&gt;
&lt;h2 id=&quot;how-is-a-trends-number-made&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-a-trends-number-made&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is a Trends number made?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;A sample of searches&lt;/b&gt;&lt;span&gt;a largely unfiltered sample of real Google searches&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Normalise&lt;/b&gt;&lt;span&gt;each point divided by all searches in that place and time&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Scale&lt;/b&gt;&lt;span&gt;the result scaled to 0 to 100&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;The chart&lt;/b&gt;&lt;span&gt;relative interest, not counts&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From raw searches to a Trends number&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Normalising is what makes a small country comparable with a big one: without it, the place with the most people would always come first.&lt;/p&gt;
&lt;h2 id=&quot;what-can-you-read-from-it-and-what-not&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-can-you-read-from-it-and-what-not&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What can you read from it, and what not?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;You can read&lt;/th&gt;&lt;th&gt;You cannot read&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;When interest peaked, and how fast it fell&lt;/td&gt;&lt;td&gt;How many people searched&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Which of two terms had more interest, in the same chart&lt;/td&gt;&lt;td&gt;Totals by adding points together&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Where in the world a topic is most popular, relative to all searches there&lt;/td&gt;&lt;td&gt;That a region with a lower number had fewer searches in total&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Seasonal patterns that repeat every year&lt;/td&gt;&lt;td&gt;Exact small changes: it is a sample&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-do-you-use-it-in-a-report&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-use-it-in-a-report&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you use it in a report?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Compare inside one query.&lt;/strong&gt; Put the terms you want to compare in the same chart; two separate downloads are each scaled on their own.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Show it as an index.&lt;/strong&gt; Label the axis &amp;quot;relative interest (0 to 100)&amp;quot;, not &amp;quot;searches&amp;quot;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Pair it with your own numbers.&lt;/strong&gt; Trends tells you interest outside; your sales or sign-ups tell you what it did for you.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://support.google.com/trends/answer/4365533&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Google Trends Help: FAQ about Google Trends data&lt;/a&gt;, normalisation, the 0 to 100 scale and low-volume zeros&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Put outside interest next to your own funnel: &lt;a href=&quot;/blog/conversion-rate-kpi/&quot;&gt;conversion rate&lt;/a&gt; and &lt;a href=&quot;/blog/ctr-cpc-cpm-kpi/&quot;&gt;CTR, CPC and CPM&lt;/a&gt;. For trends over time in Power BI, see &lt;a href=&quot;/blog/line-chart-power-bi/&quot;&gt;the line chart&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>OpenAI Codex for data engineers: what it does in a repo</title>
    <link href="https://data.benibix.com/blog/codex-for-data-engineers/"/>
    <id>https://data.benibix.com/blog/codex-for-data-engineers/</id>
    <published>2026-11-04T17:00:00Z</published>
    <updated>2026-11-04T17:00:00Z</updated>
    <summary>Codex is OpenAI's coding agent: it reads your code, edits files and runs commands, inside a sandbox, with an AGENTS.md for your rules. What that means in a repository of SQL, Python and pipeline definitions, and how to start safely.</summary>
    <category term="AI"/>
    <category term="Codex"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; Codex is OpenAI's coding agent. In a data repository it can &lt;strong&gt;read&lt;/strong&gt; your SQL, Python and pipeline files, &lt;strong&gt;edit&lt;/strong&gt; them and &lt;strong&gt;run&lt;/strong&gt; commands such as tests or a dbt build, in your terminal (Codex CLI), your editor, the ChatGPT desktop app or the cloud. Locally it works inside a &lt;strong&gt;sandbox&lt;/strong&gt; that limits what it may touch, and an &lt;strong&gt;&lt;code&gt;AGENTS.md&lt;/code&gt;&lt;/strong&gt; file tells it your project's rules. Start with read-only questions, then small changes you review with &lt;code&gt;/review&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Data engineering repositories are full of jobs an agent is good at: renaming a column across forty models, adding tests to transformations, writing the boring half of a pipeline. They are also full of things it must not touch, like production connections. The sandbox and AGENTS.md are how you draw that line.&lt;/p&gt;
&lt;h2 id=&quot;what-can-it-do-in-a-data-repo&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-can-it-do-in-a-data-repo&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What can it do in a data repo?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:4&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Refactor&lt;/b&gt;&lt;span&gt;rename a column across every SQL model and its tests&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Test&lt;/b&gt;&lt;span&gt;add tests for nulls, unique keys and accepted values to transformations&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Explain&lt;/b&gt;&lt;span&gt;&amp;quot;what does this 400-line stored procedure do, step by step?&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Scaffold&lt;/b&gt;&lt;span&gt;a new pipeline from an existing one as the pattern&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Review&lt;/b&gt;&lt;span&gt;/review on your changes before you commit&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Data engineering jobs for Codex&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-set-the-rules&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-set-the-rules&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you set the rules?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;layers&quot;&gt;&lt;ol class=&quot;dfig-stack&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Sandbox&lt;/b&gt;&lt;span&gt;limits where it can write and whether it can use the network&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Approvals&lt;/b&gt;&lt;span&gt;/permissions: what it may do without asking&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;AGENTS.md&lt;/b&gt;&lt;span&gt;the project's rules: how to test, naming, never touch prod&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;Git&lt;/b&gt;&lt;span&gt;a checkpoint before each task, so any change can be undone&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;What keeps Codex in bounds&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-should-go-in-agents-md-for-data&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-should-go-in-agents-md-for-data&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What should go in AGENTS.md for data?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;The test command and the build command, exactly.&lt;/li&gt;&lt;li&gt;Which folders hold sources, models and tests.&lt;/li&gt;&lt;li&gt;The naming rules for tables and columns.&lt;/li&gt;&lt;li&gt;&amp;quot;Never connect to production; use the dev profile.&amp;quot;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Run &lt;code&gt;/init&lt;/code&gt; once and Codex writes a first version you then edit.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.chatgpt.com/docs/codex/cli&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Codex docs: Codex CLI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.chatgpt.com/docs/sandboxing&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Codex docs: Sandbox&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.chatgpt.com/docs/agent-configuration/agents-md&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Codex docs: Custom instructions with AGENTS.md&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Take a first small task with &lt;a href=&quot;/blog/first-codex-task-on-a-data-repo/&quot;&gt;your first Codex task on a data repo&lt;/a&gt;, and compare it with the Anthropic agent in &lt;a href=&quot;/blog/claude-code-vs-codex-for-data-work/&quot;&gt;Claude Code vs Codex for data work&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>AZ-900 in 2026: what the exam covers and how to study</title>
    <link href="https://data.benibix.com/blog/az-900-study-guide/"/>
    <id>https://data.benibix.com/blog/az-900-study-guide/</id>
    <published>2026-11-04T12:00:00Z</published>
    <updated>2026-11-04T12:00:00Z</updated>
    <summary>What the AZ-900 Azure Fundamentals exam measures since July 2026, how its three areas are weighted, who it helps, and a one-week study plan with a free Azure account.</summary>
    <category term="Exams"/>
    <category term="Azure"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; AZ-900 earns &lt;strong&gt;Microsoft Certified: Azure Fundamentals&lt;/strong&gt;. It covers cloud concepts (25 to 30%), Azure architecture and services (35 to 40%), and Azure management and governance (30 to 35%). It is a 45-minute fundamentals exam, you need 700 out of 1,000, and the certification does not expire. It is not a prerequisite for anything, but it gives the shared vocabulary that every other Azure exam assumes.&lt;/p&gt;
&lt;p&gt;AZ-900 suits anyone who works with Azure without building it daily: analysts, project leads, sales and support, and engineers coming from another cloud.&lt;/p&gt;
&lt;h2 id=&quot;what-does-az-900-cover&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-az-900-cover&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does AZ-900 cover?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Cloud concepts&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:75.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;25-30%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Azure architecture and services&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;35-40%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Management and governance&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:87.5%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;30-35%&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;AZ-900 skills, by weight in the exam&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Cloud concepts&lt;/strong&gt;: the shared responsibility model, public, private and hybrid clouds, IaaS, PaaS and SaaS, and the benefits (availability, scalability, reliability, security, manageability).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Architecture and services&lt;/strong&gt;: regions, region pairs, availability zones, resource groups and subscriptions; compute (VMs, containers, functions, app hosting), networking, storage tiers and redundancy; Microsoft Entra ID, MFA, passwordless and Conditional Access.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Management and governance&lt;/strong&gt;: cost factors, the pricing calculator, tags, Microsoft Purview, Azure Policy, resource locks, the portal, Cloud Shell, CLI and PowerShell, Azure Arc, infrastructure as code, Advisor, Service Health and Azure Monitor.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;which-words-does-it-test&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-words-does-it-test&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which words does it test?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;This&lt;/th&gt;&lt;th&gt;Against that&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;IaaS (you manage the OS)&lt;/td&gt;&lt;td&gt;PaaS (the platform does)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Scalability (handle more load)&lt;/td&gt;&lt;td&gt;Elasticity (scale out and back automatically)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Availability zone (datacenters in one region)&lt;/td&gt;&lt;td&gt;Region pair (two regions far apart)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Azure Policy (what may be created)&lt;/td&gt;&lt;td&gt;Resource lock (what may not be deleted or changed)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Tags (organise and report costs)&lt;/td&gt;&lt;td&gt;Management groups (organise subscriptions)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Pairs AZ-900 likes to contrast&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-would-you-study-for-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-would-you-study-for-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How would you study for it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Study guide&lt;/b&gt;&lt;span&gt;read the skills list once&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Learn path&lt;/b&gt;&lt;span&gt;the free AZ-900 modules on Microsoft Learn&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Click through&lt;/b&gt;&lt;span&gt;create a resource group, a VM, a storage account; add a tag, a lock and a policy&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Pricing calculator&lt;/b&gt;&lt;span&gt;price one small setup&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Practice assessment&lt;/b&gt;&lt;span&gt;the free one, twice&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One week with a free account&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Clicking through once makes words like resource group, lock and policy concrete. Delete the resource group at the end so nothing keeps costing.&lt;/p&gt;
&lt;h2 id=&quot;what-helps-on-the-day&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-helps-on-the-day&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What helps on the day?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Answer every question.&lt;/strong&gt; There is no penalty for wrong answers.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;No Microsoft Learn during the exam.&lt;/strong&gt; Open-book access is for associate and expert exams only.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Watch &amp;quot;which service&amp;quot; questions.&lt;/strong&gt; Read the one requirement that rules out the other options.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-keep-the-certification&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-keep-the-certification&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you keep the certification?&lt;/h2&gt;
&lt;p&gt;You do not need to: fundamentals certifications do not expire.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/az-900&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam AZ-900&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/exams/az-900/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Microsoft Certified: Azure Fundamentals&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/exam-scoring-reports&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Exam scoring and score reports&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Do the click-through above in one evening. &lt;a href=&quot;/blog/which-fundamentals-exam-first/&quot;&gt;Which fundamentals exam first?&lt;/a&gt; compares AZ-900 with DP-900 and AI-901, and &lt;a href=&quot;/blog/az-104-study-guide/&quot;&gt;AZ-104&lt;/a&gt; is the step after it for administrators.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Cash conversion cycle: DSO, DIO and DPO in DAX</title>
    <link href="https://data.benibix.com/blog/cash-conversion-cycle-kpi/"/>
    <id>https://data.benibix.com/blog/cash-conversion-cycle-kpi/</id>
    <published>2026-11-04T12:00:00Z</published>
    <updated>2026-11-04T12:00:00Z</updated>
    <summary>How to calculate the cash conversion cycle, days inventory outstanding plus days sales outstanding minus days payables outstanding, each part's formula with a worked example, the DAX with closing balances, a waterfall of the cycle, and what shortens it.</summary>
    <category term="KPIs"/>
    <category term="Finance"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; the &lt;strong&gt;cash conversion cycle (CCC)&lt;/strong&gt; is the number of days cash is tied up between paying suppliers and collecting from customers: &lt;strong&gt;CCC = DIO + DSO - DPO&lt;/strong&gt;. &lt;strong&gt;DIO&lt;/strong&gt; (days inventory outstanding) = inventory / cost of goods sold × days; &lt;strong&gt;DSO&lt;/strong&gt; (days sales outstanding) = receivables / revenue × days; &lt;strong&gt;DPO&lt;/strong&gt; (days payables outstanding) = payables / cost of goods sold × days. With DIO 55, DSO 38 and DPO 41, the cycle is &lt;strong&gt;52 days&lt;/strong&gt;: each euro spent on stock comes back 52 days later than it left.&lt;/p&gt;
&lt;p&gt;A growing company can be profitable and still run out of cash because the cycle is long. Shortening it by ten days frees cash without selling more.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Item&lt;/th&gt;&lt;th&gt;Value&lt;/th&gt;&lt;th&gt;Formula&lt;/th&gt;&lt;th&gt;Days&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Revenue&lt;/td&gt;&lt;td&gt;12,000&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Cost of goods sold&lt;/td&gt;&lt;td&gt;8,000&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Inventory at year end&lt;/td&gt;&lt;td&gt;1,205&lt;/td&gt;&lt;td&gt;1,205 / 8,000 × 365&lt;/td&gt;&lt;td&gt;DIO 55.0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Receivables at year end&lt;/td&gt;&lt;td&gt;1,249&lt;/td&gt;&lt;td&gt;1,249 / 12,000 × 365&lt;/td&gt;&lt;td&gt;DSO 38.0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Payables at year end&lt;/td&gt;&lt;td&gt;899&lt;/td&gt;&lt;td&gt;899 / 8,000 × 365&lt;/td&gt;&lt;td&gt;DPO 41.0&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Cash conversion cycle&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;55 + 38 - 41&lt;/td&gt;&lt;td&gt;52&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;A year with 365 days (k)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;waterfall&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;waterfall chart: Days inventory 55; Days sales outstanding 38; Days payables -41; Cycle total&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;628&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;20&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;628&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;40&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;628&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;60&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;628&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;80&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;628&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;rect x=&quot;77.9&quot; y=&quot;127.4&quot; width=&quot;92.2&quot; height=&quot;138.6&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;124&quot; y=&quot;121.4&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;55&lt;/text&gt;&lt;line x1=&quot;170.1&quot; y1=&quot;127.4&quot; x2=&quot;221.9&quot; y2=&quot;127.4&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;124&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Days inventory&lt;/text&gt;&lt;rect x=&quot;221.9&quot; y=&quot;31.6&quot; width=&quot;92.2&quot; height=&quot;95.8&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;268&quot; y=&quot;25.6&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;+38&lt;/text&gt;&lt;line x1=&quot;314.1&quot; y1=&quot;31.6&quot; x2=&quot;365.9&quot; y2=&quot;31.6&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;268&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Days sales outstanding&lt;/text&gt;&lt;rect x=&quot;365.9&quot; y=&quot;31.6&quot; width=&quot;92.2&quot; height=&quot;103.3&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;412&quot; y=&quot;25.6&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;-41&lt;/text&gt;&lt;line x1=&quot;458.1&quot; y1=&quot;135&quot; x2=&quot;509.9&quot; y2=&quot;135&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;412&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Days payables&lt;/text&gt;&lt;rect x=&quot;509.9&quot; y=&quot;135&quot; width=&quot;92.2&quot; height=&quot;131&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;556&quot; y=&quot;129&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;52&lt;/text&gt;&lt;text x=&quot;556&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Cycle&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Cash conversion cycle in days&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;Inventory, receivables and payables are balances (closing values), revenue and COGS are flows (sums):&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Closing Inventory =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Balances&lt;i class=&quot;m&quot;&gt;[Inventory]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;LASTNONBLANK&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Balances&lt;i class=&quot;m&quot;&gt;[Inventory]&lt;/i&gt; ) ) ) )
Closing AR =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Balances&lt;i class=&quot;m&quot;&gt;[Receivables]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;LASTNONBLANK&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Balances&lt;i class=&quot;m&quot;&gt;[Receivables]&lt;/i&gt; ) ) ) )
Closing AP =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Balances&lt;i class=&quot;m&quot;&gt;[Payables]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;LASTNONBLANK&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Balances&lt;i class=&quot;m&quot;&gt;[Payables]&lt;/i&gt; ) ) ) )

Days in Period = &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt; )

DIO = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Closing Inventory]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[COGS]&lt;/i&gt; ) * &lt;i class=&quot;m&quot;&gt;[Days in Period]&lt;/i&gt;
DSO = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Closing AR]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; ) * &lt;i class=&quot;m&quot;&gt;[Days in Period]&lt;/i&gt;
DPO = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Closing AP]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[COGS]&lt;/i&gt; ) * &lt;i class=&quot;m&quot;&gt;[Days in Period]&lt;/i&gt;

CCC = &lt;i class=&quot;m&quot;&gt;[DIO]&lt;/i&gt; + &lt;i class=&quot;m&quot;&gt;[DSO]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[DPO]&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Some teams use the &lt;strong&gt;average&lt;/strong&gt; balance of the period (opening plus closing, divided by two) instead of the closing one; it smooths seasonal peaks. Pick one and write it in the KPI definition. See &lt;a href=&quot;/blog/days-sales-outstanding-kpi/&quot;&gt;DSO&lt;/a&gt; and &lt;a href=&quot;/blog/inventory-turnover-kpi/&quot;&gt;inventory turnover&lt;/a&gt; for the parts.&lt;/p&gt;
&lt;h2 id=&quot;how-can-the-cycle-be-shortened&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-can-the-cycle-be-shortened&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How can the cycle be shortened?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;DIO down&lt;/b&gt;&lt;span&gt;buy smaller batches, clear slow movers, better forecasts&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;DSO down&lt;/b&gt;&lt;span&gt;invoice on delivery, shorter terms, follow up overdue invoices, card or direct debit&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;DPO up&lt;/b&gt;&lt;span&gt;negotiate longer supplier terms, pay on the due date, not early&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Levers on each part&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Each day of cycle ties up roughly (COGS / 365) of cash: here 8,000 / 365 ≈ 22k per day, so ten days shorter frees about 220k.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Summing balances over months.&lt;/strong&gt; Take closing or average balances.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Revenue for DIO or DPO.&lt;/strong&gt; Inventory and payables are at cost; divide by COGS.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Stretching DPO too far.&lt;/strong&gt; Paying late damages supplier terms and prices.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A single company-wide number.&lt;/strong&gt; The cycle differs by product line and region; break it down where inventory sits.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/lastnonblank-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: LASTNONBLANK function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/openingbalanceyear-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: OPENINGBALANCEYEAR function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-waterfall-charts&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Waterfall charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Build the three closing balances and DIO, DSO, DPO by quarter, then the waterfall. &lt;a href=&quot;/blog/current-and-quick-ratio-kpi/&quot;&gt;Current and quick ratio&lt;/a&gt; shows the same balances as liquidity.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Column charts in Power BI: clustered, stacked and 100%</title>
    <link href="https://data.benibix.com/blog/column-chart-power-bi/"/>
    <id>https://data.benibix.com/blog/column-chart-power-bi/</id>
    <published>2026-11-04T12:00:00Z</published>
    <updated>2026-11-04T12:00:00Z</updated>
    <summary>When a column chart is the right visual in Power BI, how clustered, stacked and 100% stacked columns differ, the fields each needs, the DAX behind them and the mistakes that make them lie.</summary>
    <category term="Visuals"/>
    <category term="Comparison"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; use a &lt;strong&gt;column chart&lt;/strong&gt; to compare a number across a handful of categories or periods: one column per category, its height the value. &lt;strong&gt;Clustered&lt;/strong&gt; columns put series side by side to compare them with each other, &lt;strong&gt;stacked&lt;/strong&gt; columns pile them up to show the total and its parts, and &lt;strong&gt;100% stacked&lt;/strong&gt; columns show only the shares. Every column chart needs a field on the &lt;strong&gt;X-axis&lt;/strong&gt; and a measure on the &lt;strong&gt;Y-axis&lt;/strong&gt;; a &lt;strong&gt;Legend&lt;/strong&gt; field splits each column into series.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The chart, part by part:&lt;/strong&gt; &lt;a href=&quot;/visuals/column-chart/&quot;&gt;What is a column chart?&lt;/a&gt; draws its parts and shows how to read one, its kinds and the mistakes to avoid.&lt;/p&gt;
&lt;p&gt;Column charts are the most used visual in Power BI because a height is the easiest thing for the eye to compare. They still go wrong in three ways: the wrong one of the three types, an axis that does not start at zero, and too many categories for the width.&lt;/p&gt;
&lt;h2 id=&quot;when-is-a-column-chart-the-right-visual&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-a-column-chart-the-right-visual&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is a column chart the right visual?&lt;/h2&gt;
&lt;p&gt;When the question is &amp;quot;which is bigger, and by how much?&amp;quot; across up to about 12 categories, or across periods where each period is its own bar (months of a year, quarters). Take this sample: sales of an online shop by region, two years.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Region&lt;/th&gt;&lt;th&gt;2025&lt;/th&gt;&lt;th&gt;2026&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;North&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;td&gt;140&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;South&lt;/td&gt;&lt;td&gt;95&lt;/td&gt;&lt;td&gt;88&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;East&lt;/td&gt;&lt;td&gt;70&lt;/td&gt;&lt;td&gt;92&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;West&lt;/td&gt;&lt;td&gt;60&lt;/td&gt;&lt;td&gt;75&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Online&lt;/td&gt;&lt;td&gt;45&lt;/td&gt;&lt;td&gt;110&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The sample data used in this post (Sales Amount, in thousands)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;One measure on one axis gives the plainest chart: five columns, sorted by value.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;column&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;column chart: North 140; Online 110; East 92; South 88; West 75&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;182&quot; x2=&quot;628&quot; y2=&quot;182&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;186&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;50&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;98&quot; x2=&quot;628&quot; y2=&quot;98&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;102&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;628&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;150&lt;/text&gt;&lt;rect x=&quot;70.4&quot; y=&quot;30.8&quot; width=&quot;76.3&quot; height=&quot;235.2&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;109.6&quot; y=&quot;24.8&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;140&lt;/text&gt;&lt;text x=&quot;109.6&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;North&lt;/text&gt;&lt;rect x=&quot;185.6&quot; y=&quot;81.2&quot; width=&quot;76.3&quot; height=&quot;184.8&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;224.8&quot; y=&quot;75.2&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;110&lt;/text&gt;&lt;text x=&quot;224.8&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Online&lt;/text&gt;&lt;rect x=&quot;300.8&quot; y=&quot;111.4&quot; width=&quot;76.3&quot; height=&quot;154.6&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;340&quot; y=&quot;105.4&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;92&lt;/text&gt;&lt;text x=&quot;340&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;East&lt;/text&gt;&lt;rect x=&quot;416&quot; y=&quot;118.2&quot; width=&quot;76.3&quot; height=&quot;147.8&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;455.2&quot; y=&quot;112.2&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;88&lt;/text&gt;&lt;text x=&quot;455.2&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;South&lt;/text&gt;&lt;rect x=&quot;531.2&quot; y=&quot;140&quot; width=&quot;76.3&quot; height=&quot;126&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;570.4&quot; y=&quot;134&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;75&lt;/text&gt;&lt;text x=&quot;570.4&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;West&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Sales 2026 by region, one measure, sorted descending&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;For a long time axis (daily data, 60 points or more) a &lt;a href=&quot;/blog/line-chart-power-bi/&quot;&gt;line chart&lt;/a&gt; reads better: the columns get thin and the eye follows the outline anyway. For long category names, or more than 12 categories, turn the chart on its side as a &lt;a href=&quot;/blog/bar-chart-power-bi/&quot;&gt;bar chart&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-difference-between-clustered-stacked-and-100-stacked&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-difference-between-clustered-stacked-and-100-stacked&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the difference between clustered, stacked and 100% stacked?&lt;/h2&gt;
&lt;p&gt;All three take the same fields. What changes is how the series in the Legend are placed.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;column&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;2025&lt;/li&gt;&lt;li class=&quot;k1&quot;&gt;2026&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;column chart: North 120, 140; South 95, 88; East 70, 92; West 60, 75; Online 45, 110&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;182&quot; x2=&quot;628&quot; y2=&quot;182&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;186&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;50&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;98&quot; x2=&quot;628&quot; y2=&quot;98&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;102&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;628&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;150&lt;/text&gt;&lt;rect x=&quot;70.4&quot; y=&quot;64.4&quot; width=&quot;37.2&quot; height=&quot;201.6&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;109.6&quot; y=&quot;30.8&quot; width=&quot;37.2&quot; height=&quot;235.2&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;text x=&quot;109.6&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;North&lt;/text&gt;&lt;rect x=&quot;185.6&quot; y=&quot;106.4&quot; width=&quot;37.2&quot; height=&quot;159.6&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;224.8&quot; y=&quot;118.2&quot; width=&quot;37.2&quot; height=&quot;147.8&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;text x=&quot;224.8&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;South&lt;/text&gt;&lt;rect x=&quot;300.8&quot; y=&quot;148.4&quot; width=&quot;37.2&quot; height=&quot;117.6&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;340&quot; y=&quot;111.4&quot; width=&quot;37.2&quot; height=&quot;154.6&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;text x=&quot;340&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;East&lt;/text&gt;&lt;rect x=&quot;416&quot; y=&quot;165.2&quot; width=&quot;37.2&quot; height=&quot;100.8&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;455.2&quot; y=&quot;140&quot; width=&quot;37.2&quot; height=&quot;126&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;text x=&quot;455.2&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;West&lt;/text&gt;&lt;rect x=&quot;531.2&quot; y=&quot;190.4&quot; width=&quot;37.2&quot; height=&quot;75.6&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;570.4&quot; y=&quot;81.2&quot; width=&quot;37.2&quot; height=&quot;184.8&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;text x=&quot;570.4&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Online&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Clustered: each region's two years side by side, to compare years&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;stacked-column&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;Store&lt;/li&gt;&lt;li class=&quot;k1&quot;&gt;Online orders&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;stacked column chart: Q1 62, 18; Q2 70, 24; Q3 66, 31; Q4 88, 47&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;182&quot; x2=&quot;628&quot; y2=&quot;182&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;186&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;50&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;98&quot; x2=&quot;628&quot; y2=&quot;98&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;102&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;628&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;150&lt;/text&gt;&lt;rect x=&quot;75&quot; y=&quot;161.8&quot; width=&quot;97.9&quot; height=&quot;104.2&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;75&quot; y=&quot;131.6&quot; width=&quot;97.9&quot; height=&quot;30.2&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;text x=&quot;124&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q1&lt;/text&gt;&lt;rect x=&quot;219&quot; y=&quot;148.4&quot; width=&quot;97.9&quot; height=&quot;117.6&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;219&quot; y=&quot;108.1&quot; width=&quot;97.9&quot; height=&quot;40.3&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;text x=&quot;268&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q2&lt;/text&gt;&lt;rect x=&quot;363&quot; y=&quot;155.1&quot; width=&quot;97.9&quot; height=&quot;110.9&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;363&quot; y=&quot;103&quot; width=&quot;97.9&quot; height=&quot;52.1&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;text x=&quot;412&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q3&lt;/text&gt;&lt;rect x=&quot;507&quot; y=&quot;118.2&quot; width=&quot;97.9&quot; height=&quot;147.8&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;507&quot; y=&quot;39.2&quot; width=&quot;97.9&quot; height=&quot;79&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;text x=&quot;556&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q4&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Stacked: the column is the total, the pieces are the parts&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;pct-column&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;Store&lt;/li&gt;&lt;li class=&quot;k1&quot;&gt;Online orders&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;pct column chart: Q1 62, 18; Q2 70, 24; Q3 66, 31; Q4 88, 47&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0%&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;628&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;20%&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;628&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;40%&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;628&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;60%&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;628&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;80%&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;628&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100%&lt;/text&gt;&lt;rect x=&quot;75&quot; y=&quot;70.7&quot; width=&quot;97.9&quot; height=&quot;195.3&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;75&quot; y=&quot;14&quot; width=&quot;97.9&quot; height=&quot;56.7&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;text x=&quot;124&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q1&lt;/text&gt;&lt;rect x=&quot;219&quot; y=&quot;78.3&quot; width=&quot;97.9&quot; height=&quot;187.7&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;219&quot; y=&quot;14&quot; width=&quot;97.9&quot; height=&quot;64.3&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;text x=&quot;268&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q2&lt;/text&gt;&lt;rect x=&quot;363&quot; y=&quot;94.5&quot; width=&quot;97.9&quot; height=&quot;171.5&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;363&quot; y=&quot;14&quot; width=&quot;97.9&quot; height=&quot;80.5&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;text x=&quot;412&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q3&lt;/text&gt;&lt;rect x=&quot;507&quot; y=&quot;101.7&quot; width=&quot;97.9&quot; height=&quot;164.3&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;507&quot; y=&quot;14&quot; width=&quot;97.9&quot; height=&quot;87.7&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;text x=&quot;556&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q4&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;100% stacked: every column is 100%, so only the share shows&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Type&lt;/th&gt;&lt;th&gt;Answers&lt;/th&gt;&lt;th&gt;Easy to read&lt;/th&gt;&lt;th&gt;Hard to read&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Clustered&lt;/td&gt;&lt;td&gt;how do the series compare in each category?&lt;/td&gt;&lt;td&gt;every series against every other&lt;/td&gt;&lt;td&gt;the total&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Stacked&lt;/td&gt;&lt;td&gt;what is the total, and roughly what is it made of?&lt;/td&gt;&lt;td&gt;the total, the bottom series&lt;/td&gt;&lt;td&gt;middle series (no common baseline)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;100% stacked&lt;/td&gt;&lt;td&gt;how does the mix change?&lt;/td&gt;&lt;td&gt;shares, the bottom and top series&lt;/td&gt;&lt;td&gt;any absolute number&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Which of the three answers which question&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The stacked chart above shows Q4 as the biggest quarter. The 100% chart shows something the stacked one hides: online orders grew from 23% to 35% of the quarter.&lt;/p&gt;
&lt;h2 id=&quot;which-fields-does-each-chart-need&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-fields-does-each-chart-need&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which fields does each chart need?&lt;/h2&gt;
&lt;p&gt;Microsoft lists three valid combinations for a column chart:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;One or more fields on the &lt;strong&gt;X-axis&lt;/strong&gt; and one measure on the &lt;strong&gt;Y-axis&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;One field on the &lt;strong&gt;X-axis&lt;/strong&gt;, one measure on the &lt;strong&gt;Y-axis&lt;/strong&gt; and exactly one field in the &lt;strong&gt;Legend&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;One or more fields on the &lt;strong&gt;X-axis&lt;/strong&gt; and several measures on the &lt;strong&gt;Y-axis&lt;/strong&gt;. A chart with several measures cannot also have a Legend.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;The two ways to get two series give the same picture but behave differently. A Legend field (&lt;code&gt;Date[Year]&lt;/code&gt;) adds series as the data grows: a new year appears by itself. Several measures (&lt;code&gt;Sales 2025&lt;/code&gt;, &lt;code&gt;Sales 2026&lt;/code&gt;) are fixed series you named, with their own format and colour each.&lt;/p&gt;
&lt;h2 id=&quot;what-dax-sits-behind-the-chart&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-dax-sits-behind-the-chart&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What DAX sits behind the chart?&lt;/h2&gt;
&lt;p&gt;The Y-axis should be a measure, not a dragged column, so the number means the same in every visual:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Sales Amount = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The 2025 against 2026 chart without a Legend uses two measures:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Sales This Year =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sales Amount]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt; = &lt;i class=&quot;f&quot;&gt;YEAR&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;TODAY&lt;/i&gt; () ) )

Sales Last Year =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sales Amount]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;Sales Last Year&lt;/code&gt; follows the slicer: with 2026 selected it returns 2025. Data labels on a 100% chart show the share only if the measure is a share, so for a table or tooltip next to it:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Share of Quarter =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; (
    &lt;i class=&quot;m&quot;&gt;[Sales Amount]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sales Amount]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;REMOVEFILTERS&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Channel]&lt;/i&gt; ) )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quarter&lt;/th&gt;&lt;th&gt;Channel&lt;/th&gt;&lt;th&gt;Sales Amount&lt;/th&gt;&lt;th&gt;Share of Quarter&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Q1&lt;/td&gt;&lt;td&gt;Store&lt;/td&gt;&lt;td&gt;62&lt;/td&gt;&lt;td&gt;77.5%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Q1&lt;/td&gt;&lt;td&gt;Online orders&lt;/td&gt;&lt;td&gt;18&lt;/td&gt;&lt;td&gt;22.5%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Q4&lt;/td&gt;&lt;td&gt;Store&lt;/td&gt;&lt;td&gt;88&lt;/td&gt;&lt;td&gt;65.2%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Q4&lt;/td&gt;&lt;td&gt;Online orders&lt;/td&gt;&lt;td&gt;47&lt;/td&gt;&lt;td&gt;34.8%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;To colour columns by a rule, a measure returns a colour and &lt;strong&gt;Columns, Color, fx, Field value&lt;/strong&gt; uses it:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Column Colour =
&lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sales Amount]&lt;/i&gt; &amp;gt;= &lt;i class=&quot;m&quot;&gt;[Sales Target]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#20C997&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#F2696B&amp;quot;&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-do-you-build-one-step-by-step&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-one-step-by-step&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build one, step by step?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;In the &lt;strong&gt;Visualizations&lt;/strong&gt; pane pick &lt;strong&gt;Clustered column chart&lt;/strong&gt; (or stacked, or 100% stacked).&lt;/li&gt;&lt;li&gt;Drag the category, for example &lt;code&gt;Region[Region]&lt;/code&gt;, to &lt;strong&gt;X-axis&lt;/strong&gt; and &lt;code&gt;[Sales Amount]&lt;/code&gt; to &lt;strong&gt;Y-axis&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;For series, drag &lt;code&gt;Date[Year]&lt;/code&gt; to &lt;strong&gt;Legend&lt;/strong&gt;, or add a second measure to &lt;strong&gt;Y-axis&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Sort: the &lt;strong&gt;More options (...)&lt;/strong&gt; menu of the visual, &lt;strong&gt;Sort axis&lt;/strong&gt;, by &lt;code&gt;Sales Amount&lt;/code&gt;, descending. Months and other ordered categories stay in their own order: sort the column by a number column in the model (&lt;code&gt;Month Name&lt;/code&gt; by &lt;code&gt;Month Number&lt;/code&gt;).&lt;/li&gt;&lt;li&gt;In &lt;strong&gt;Format visual&lt;/strong&gt;: turn on &lt;strong&gt;Data labels&lt;/strong&gt; when there are few columns, set the &lt;strong&gt;Y-axis&lt;/strong&gt; start to 0, and drop the gridlines if labels carry the values.&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;what-else-can-a-column-chart-do&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-else-can-a-column-chart-do&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What else can a column chart do?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Drill down&lt;/strong&gt;: put a hierarchy (Year, Quarter, Month) on the X-axis and the drill icons appear above the visual: drill up, drill down on one column, go to the next level, or expand all down one level.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Zoom slider&lt;/strong&gt;: with the X-axis &lt;strong&gt;Type&lt;/strong&gt; set to &lt;strong&gt;Continuous&lt;/strong&gt;, the &lt;strong&gt;Zoom slider&lt;/strong&gt; card adds handles on the X and Y axes to look at a range without a filter.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Cross-filter and cross-highlight&lt;/strong&gt;: clicking a column filters or highlights the other visuals on the page; &lt;strong&gt;Format, Edit interactions&lt;/strong&gt; sets which, per visual.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Conditional formatting&lt;/strong&gt;: &lt;strong&gt;Gradient&lt;/strong&gt;, &lt;strong&gt;Rules&lt;/strong&gt; or &lt;strong&gt;Field value&lt;/strong&gt; on the column colour.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Small multiples&lt;/strong&gt;: one small chart per value of a field, all on the same axis. See &lt;a href=&quot;/blog/small-multiples-power-bi/&quot;&gt;small multiples&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Analytics pane&lt;/strong&gt;: constant, average, min, max lines and error bars. See &lt;a href=&quot;/blog/analytics-pane-power-bi/&quot;&gt;the Analytics pane&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;An axis that does not start at zero.&lt;/strong&gt; A column's height is its value; start the axis at 80 and a column of 90 looks half the size of one of 100. Columns always start at zero (a line chart may zoom in).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Stacked when the question is a comparison.&lt;/strong&gt; In a stacked column only the bottom series sits on a common baseline. If people need to compare the middle series, use clustered columns or small multiples.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too many series.&lt;/strong&gt; More than four or five colours in a legend and nobody finds their series; group the small ones into &amp;quot;Other&amp;quot; or use small multiples.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Dates as categories when they are continuous.&lt;/strong&gt; With a categorical date axis the scroll bar starts on the left; Microsoft recommends a continuous axis for dates.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Dragged numeric columns instead of measures.&lt;/strong&gt; Power BI sums them by default, which is wrong for prices, percentages and averages. Write the measure.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Several measures and a Legend.&lt;/strong&gt; Not allowed together; use one measure and a Legend field, or several measures and no Legend.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-column-charts&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create and use column charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-types-for-reports-and-q-and-a&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Visualization types in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/calculate-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: CALCULATE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Build the plain one-measure chart first, sorted, starting at zero, and only add a Legend when the question needs a second series. &lt;a href=&quot;/blog/bar-chart-power-bi/&quot;&gt;Bar charts&lt;/a&gt; are the same visual on its side, and &lt;a href=&quot;/blog/which-power-bi-chart/&quot;&gt;which chart for which question&lt;/a&gt; puts the column chart next to the others.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>CSAT and Customer Effort Score: formulas and DAX</title>
    <link href="https://data.benibix.com/blog/csat-and-ces-kpi/"/>
    <id>https://data.benibix.com/blog/csat-and-ces-kpi/</id>
    <published>2026-11-04T12:00:00Z</published>
    <updated>2026-11-04T12:00:00Z</updated>
    <summary>How to calculate customer satisfaction (CSAT) as the share of satisfied answers, Customer Effort Score (CES) as an average or a share of easy answers, how they differ from NPS, survey scales, response rate, CSAT by agent and channel, the DAX, and a distribution chart of answers.</summary>
    <category term="KPIs"/>
    <category term="Customers"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;CSAT&lt;/strong&gt; (customer satisfaction) asks &amp;quot;How satisfied were you with ...?&amp;quot; on a 1 to 5 scale right after an interaction, and is usually reported as the &lt;strong&gt;share of 4 and 5 answers&lt;/strong&gt;: 340 satisfied of 400 = &lt;strong&gt;85%&lt;/strong&gt;. &lt;strong&gt;CES&lt;/strong&gt; (Customer Effort Score) asks how easy it was to get the issue solved, often on a 1 to 7 scale, reported as the &lt;strong&gt;average&lt;/strong&gt; or as the &lt;strong&gt;share of 5 to 7&lt;/strong&gt; answers. Both measure one interaction (a ticket, a delivery, a checkout); &lt;a href=&quot;/blog/net-promoter-score-kpi/&quot;&gt;NPS&lt;/a&gt; measures the whole relationship.&lt;/p&gt;
&lt;p&gt;Support and operations teams need feedback per ticket and per agent, fast. CSAT and CES give it; NPS changes too slowly to coach an agent.&lt;/p&gt;
&lt;h2 id=&quot;how-are-they-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-are-they-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How are they calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Answer&lt;/th&gt;&lt;th&gt;Label&lt;/th&gt;&lt;th&gt;Count&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;very satisfied&lt;/td&gt;&lt;td&gt;220&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;satisfied&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;neutral&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;dissatisfied&lt;/td&gt;&lt;td&gt;18&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;very dissatisfied&lt;/td&gt;&lt;td&gt;12&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;400 CSAT answers after support tickets&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;CSAT = (220 + 120) / 400 = &lt;strong&gt;85%&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;Average score = (5×220 + 4×120 + 3×30 + 2×18 + 1×12) / 400 = &lt;strong&gt;4.30&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;column&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;column chart: 1 12; 2 18; 3 30; 4 120; 5 220&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;628&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;50&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;628&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;628&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;150&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;628&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;200&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;628&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;250&lt;/text&gt;&lt;rect x=&quot;70.4&quot; y=&quot;253.9&quot; width=&quot;76.3&quot; height=&quot;12.1&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;109.6&quot; y=&quot;247.9&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;12&lt;/text&gt;&lt;text x=&quot;109.6&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;1&lt;/text&gt;&lt;rect x=&quot;185.6&quot; y=&quot;247.9&quot; width=&quot;76.3&quot; height=&quot;18.1&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;224.8&quot; y=&quot;241.9&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;18&lt;/text&gt;&lt;text x=&quot;224.8&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;2&lt;/text&gt;&lt;rect x=&quot;300.8&quot; y=&quot;235.8&quot; width=&quot;76.3&quot; height=&quot;30.2&quot; rx=&quot;3&quot; class=&quot;m t-grey&quot;/&gt;&lt;text x=&quot;340&quot; y=&quot;229.8&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;30&lt;/text&gt;&lt;text x=&quot;340&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;3&lt;/text&gt;&lt;rect x=&quot;416&quot; y=&quot;145&quot; width=&quot;76.3&quot; height=&quot;121&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;455.2&quot; y=&quot;139&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;120&lt;/text&gt;&lt;text x=&quot;455.2&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;4&lt;/text&gt;&lt;rect x=&quot;531.2&quot; y=&quot;44.2&quot; width=&quot;76.3&quot; height=&quot;221.8&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;570.4&quot; y=&quot;38.2&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;220&lt;/text&gt;&lt;text x=&quot;570.4&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;5&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;CSAT answers by score&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;KPI&lt;/th&gt;&lt;th&gt;Question&lt;/th&gt;&lt;th&gt;Scale&lt;/th&gt;&lt;th&gt;Reported as&lt;/th&gt;&lt;th&gt;Measures&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;CSAT&lt;/td&gt;&lt;td&gt;How satisfied were you with ...?&lt;/td&gt;&lt;td&gt;1 to 5&lt;/td&gt;&lt;td&gt;% of 4 and 5&lt;/td&gt;&lt;td&gt;one interaction&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CES&lt;/td&gt;&lt;td&gt;How easy was it to ...?&lt;/td&gt;&lt;td&gt;1 to 7&lt;/td&gt;&lt;td&gt;average, or % of 5 to 7&lt;/td&gt;&lt;td&gt;effort in one interaction&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;NPS&lt;/td&gt;&lt;td&gt;How likely are you to recommend us?&lt;/td&gt;&lt;td&gt;0 to 10&lt;/td&gt;&lt;td&gt;% 9-10 minus % 0-6&lt;/td&gt;&lt;td&gt;the relationship&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;CSAT, CES and NPS side by side&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;A Feedback table with Ticket ID, Date, Agent, Channel, Survey (CSAT or CES), Score.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Answers CSAT = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Feedback ), Feedback&lt;i class=&quot;m&quot;&gt;[Survey]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;CSAT&amp;quot;&lt;/i&gt; )
Satisfied = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Feedback ), Feedback&lt;i class=&quot;m&quot;&gt;[Survey]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;CSAT&amp;quot;&lt;/i&gt;, Feedback&lt;i class=&quot;m&quot;&gt;[Score]&lt;/i&gt; &amp;gt;= &lt;i class=&quot;n&quot;&gt;4&lt;/i&gt; )

CSAT % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Satisfied]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Answers CSAT]&lt;/i&gt; )

CSAT Average = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;AVERAGE&lt;/i&gt; ( Feedback&lt;i class=&quot;m&quot;&gt;[Score]&lt;/i&gt; ), Feedback&lt;i class=&quot;m&quot;&gt;[Survey]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;CSAT&amp;quot;&lt;/i&gt; )

CES Average = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;AVERAGE&lt;/i&gt; ( Feedback&lt;i class=&quot;m&quot;&gt;[Score]&lt;/i&gt; ), Feedback&lt;i class=&quot;m&quot;&gt;[Survey]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;CES&amp;quot;&lt;/i&gt; )
CES Easy % =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Feedback ), Feedback&lt;i class=&quot;m&quot;&gt;[Survey]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;CES&amp;quot;&lt;/i&gt;, Feedback&lt;i class=&quot;m&quot;&gt;[Score]&lt;/i&gt; &amp;gt;= &lt;i class=&quot;n&quot;&gt;5&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Feedback ), Feedback&lt;i class=&quot;m&quot;&gt;[Survey]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;CES&amp;quot;&lt;/i&gt; )
)

Response Rate = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Answers CSAT]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Tickets&lt;i class=&quot;m&quot;&gt;[Ticket ID]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-should-you-break-it-down&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-should-you-break-it-down&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How should you break it down?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;By agent&lt;/strong&gt;: for coaching, with at least 20 answers per agent before ranking.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;By channel&lt;/strong&gt;: chat, email, phone.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;By reason and resolution&lt;/strong&gt;: unresolved tickets drive most low scores.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Against response rate&lt;/strong&gt;: a CSAT of 95% from a 3% response rate tells you little about the 97% who did not answer.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Mixing scales.&lt;/strong&gt; A 1 to 5 survey and a 1 to 10 survey cannot share one CSAT; normalise or keep them apart.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Averages only.&lt;/strong&gt; 4.2 hides a group of 1s; show the distribution.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Survey bias.&lt;/strong&gt; Unhappy or very happy customers answer more; watch the response rate.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Blaming agents for process.&lt;/strong&gt; Low effort scores often come from policies (returns, identity checks), not people.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/calculate-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: CALCULATE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/average-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: AVERAGE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-types-for-reports-and-q-and-a&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Visualization types in Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Send a one-question CSAT survey after each closed ticket and show CSAT %, response rate and the score distribution by channel. &lt;a href=&quot;/blog/repeat-purchase-rate-kpi/&quot;&gt;Repeat purchase rate&lt;/a&gt; shows whether satisfied customers come back.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Drill down vs drillthrough in Power BI</title>
    <link href="https://data.benibix.com/blog/drill-down-drill-through-power-bi/"/>
    <id>https://data.benibix.com/blog/drill-down-drill-through-power-bi/</id>
    <published>2026-11-04T12:00:00Z</published>
    <updated>2026-11-04T12:00:00Z</updated>
    <summary>The difference between drill down and drillthrough in Power BI, the four drill actions on a hierarchy, setting up a drillthrough page with Keep all filters and a Back button, cross-report drillthrough, and the DAX that shows what was drilled.</summary>
    <category term="Visuals"/>
    <category term="Filters and navigation"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;drill down&lt;/strong&gt; goes one level deeper &lt;strong&gt;inside the same visual&lt;/strong&gt;: from years to quarters to months, from category to product. &lt;strong&gt;Drillthrough&lt;/strong&gt; goes &lt;strong&gt;to another page&lt;/strong&gt; made for detail, filtered to what the reader right-clicked: from a customer in a chart to that customer's detail page. Drill down needs a hierarchy (several fields) on the axis; drillthrough needs a page with a field in its &lt;strong&gt;Drill through&lt;/strong&gt; well.&lt;/p&gt;
&lt;p&gt;Both answer &amp;quot;show me more about this&amp;quot;, at different scales. Drill down keeps the reader in the chart they are looking at. Drillthrough opens a whole page about one thing: one customer's orders, contacts, open invoices and trend.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-difference&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-difference&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the difference?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;A bar for &amp;quot;Bikes&amp;quot; in a column chart&lt;/b&gt;&lt;span&gt;the reader wants more detail&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Drill down&lt;/b&gt;&lt;span&gt;the same chart now shows Mountain, Road and Touring bikes&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Drillthrough&lt;/b&gt;&lt;span&gt;the &amp;quot;Category detail&amp;quot; page opens, filtered to Bikes: products, margins, top customers&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;One click, two ways to see more&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-does-drill-down-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-drill-down-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does drill down work?&lt;/h2&gt;
&lt;p&gt;Put a hierarchy on the axis, for example &lt;code&gt;Date[Year]&lt;/code&gt;, &lt;code&gt;Date[Quarter]&lt;/code&gt;, &lt;code&gt;Date[Month]&lt;/code&gt;, or &lt;code&gt;Product[Category]&lt;/code&gt;, &lt;code&gt;Product[Subcategory]&lt;/code&gt;. The visual shows four drill icons:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Drill up&lt;/strong&gt;: back to the level above.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Drill down&lt;/strong&gt; (turn on drill mode): click one data point to see its children only.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Go to the next level&lt;/strong&gt;: all points move one level down (all quarters of all years).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Expand all down one level&lt;/strong&gt;: show the next level grouped under the current one (2026 Q1, 2026 Q2...).&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;By default, drilling one visual does not filter the others. &lt;strong&gt;Format, Edit interactions&lt;/strong&gt;, then the &lt;strong&gt;Visual interactions&lt;/strong&gt; drop-down, &lt;strong&gt;Drilling filters other visuals: On&lt;/strong&gt;, changes that.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-set-up-drillthrough&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-set-up-drillthrough&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you set up drillthrough?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;Create a page for the detail, for example &amp;quot;Customer detail&amp;quot;, with the visuals about one customer.&lt;/li&gt;&lt;li&gt;In that page's &lt;strong&gt;Visualizations&lt;/strong&gt; pane, drag &lt;code&gt;Customer[Customer]&lt;/code&gt; to &lt;strong&gt;Drill through&lt;/strong&gt; (the &lt;strong&gt;Build&lt;/strong&gt; section's drill-through well). Power BI adds a &lt;strong&gt;Back&lt;/strong&gt; button.&lt;/li&gt;&lt;li&gt;Choose &lt;strong&gt;Keep all filters&lt;/strong&gt;: on, the target page also gets every filter the source visual had (year, region); off, only the customer.&lt;/li&gt;&lt;li&gt;Hide the page in the page tabs if it only makes sense with a customer selected.&lt;/li&gt;&lt;li&gt;On any page, right-click a customer in a visual, &lt;strong&gt;Drill through&lt;/strong&gt;, &lt;strong&gt;Customer detail&lt;/strong&gt;. Or add a &lt;strong&gt;Drill through&lt;/strong&gt; button that uses the selection.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Drillthrough also works across reports in the same workspace: turn on &lt;strong&gt;Cross-report drillthrough&lt;/strong&gt; in the target report's settings, and set the drillthrough page to &lt;strong&gt;Cross-report&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&quot;how-does-the-detail-page-know-what-was-picked&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-the-detail-page-know-what-was-picked&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does the detail page know what was picked?&lt;/h2&gt;
&lt;p&gt;A title measure tells readers where they are:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Detail Title =
&lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;HASONEVALUE&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ) &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot;: &amp;quot;&lt;/i&gt; &amp;amp; &lt;i class=&quot;f&quot;&gt;FORMAT&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#,0&amp;quot;&lt;/i&gt; ) &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot; revenue&amp;quot;&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Drill through from a customer to see their detail&amp;quot;&lt;/i&gt;
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;On the page reached from &amp;quot;Alpine Sports&amp;quot;, the title reads &amp;quot;Alpine Sports: 182,400 revenue&amp;quot;. Opened directly, without a drillthrough filter, it explains how to use the page.&lt;/p&gt;
&lt;p&gt;When the drillthrough field is a measure-based category (a &amp;quot;top customer&amp;quot; flag), use a column for it: the &lt;strong&gt;Drill through&lt;/strong&gt; well takes fields, and the measures on the page are evaluated with that field filtered.&lt;/p&gt;
&lt;h2 id=&quot;when-do-you-use-which&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-do-you-use-which&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When do you use which?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;The question&lt;/th&gt;&lt;th&gt;Use&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;the same measure, one level deeper&lt;/td&gt;&lt;td&gt;drill down&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;a different set of visuals about one item&lt;/td&gt;&lt;td&gt;drillthrough&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;detail in another report&lt;/td&gt;&lt;td&gt;cross-report drillthrough&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;a quick look without leaving the page&lt;/td&gt;&lt;td&gt;a &lt;a href=&quot;/blog/report-page-tooltips-power-bi/&quot;&gt;report page tooltip&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;The drillthrough option is missing.&lt;/strong&gt; The field in the source visual must match the drillthrough field (same column, or a related one); check that the page has it in the well.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Wrong numbers on the detail page.&lt;/strong&gt; With &lt;strong&gt;Keep all filters&lt;/strong&gt; off, slicers from the source page are not carried; with it on, they are. Decide which the page needs.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Drill down that changes nothing elsewhere.&lt;/strong&gt; By default drilling does not filter other visuals; set &lt;strong&gt;Drilling filters other visuals&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Hierarchies that are not hierarchies.&lt;/strong&gt; Year and month as two independent fields drill fine; a &amp;quot;Month name&amp;quot; without year mixes all Januaries. Include the year.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-drillthrough&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Drillthrough in Power BI reports&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/service-reports-visual-interactions&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Change how visuals interact in a Power BI report&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-column-charts&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create and use column charts in Power BI (drill)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add a date hierarchy to the main trend chart for drill down, and build one drillthrough page for the item people ask about most (customer, product, store), with a title measure that names it. &lt;a href=&quot;/blog/buttons-bookmarks-navigators-power-bi/&quot;&gt;Buttons, bookmarks and navigators&lt;/a&gt; adds drillthrough buttons.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>RANKX in DAX: rank products, customers and months</title>
    <link href="https://data.benibix.com/blog/rankx-dax/"/>
    <id>https://data.benibix.com/blog/rankx-dax/</id>
    <published>2026-11-04T12:00:00Z</published>
    <updated>2026-11-04T12:00:00Z</updated>
    <summary>How RANKX ranks in DAX, the table, expression, value, order and ties arguments, ranking over ALL or ALLSELECTED, dense against skip ties, ranking within a category, top N with a rank, hiding the total, and common RANKX mistakes.</summary>
    <category term="DAX"/>
    <category term="Iterators and aggregation"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;code&gt;RANKX ( table, expression [, value [, order [, ties ]]] )&lt;/code&gt; evaluates the expression for every row of the table, then returns the position of the current value among them. To rank products by revenue in a visual, use &lt;code&gt;RANKX ( ALL ( 'Product'[Product] ), [Revenue] )&lt;/code&gt; (rank among all products) or &lt;code&gt;ALLSELECTED&lt;/code&gt; (among the selected ones). Order is descending by default (largest is 1). Ties are &lt;strong&gt;Skip&lt;/strong&gt; by default (1, 2, 2, 4); pass &lt;code&gt;DENSE&lt;/code&gt; for 1, 2, 2, 3.&lt;/p&gt;
&lt;p&gt;&amp;quot;Top 10 customers&amp;quot; and &amp;quot;where does this product rank&amp;quot; are among the most asked report questions, and &lt;code&gt;RANKX&lt;/code&gt; returns the wrong number in a surprisingly common way: everything ranks 1.&lt;/p&gt;
&lt;h2 id=&quot;why-does-everything-rank-1&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-does-everything-rank-1&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why does everything rank 1?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Rank Wrong = &lt;i class=&quot;f&quot;&gt;RANKX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )

Rank = &lt;i class=&quot;f&quot;&gt;RANKX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;On each row of a table by product, &lt;code&gt;VALUES ( 'Product'[Product] )&lt;/code&gt; contains only that product, so it is first of one. The table argument must list &lt;strong&gt;all&lt;/strong&gt; the products to compare with, so filters on the product must be removed: &lt;code&gt;ALL&lt;/code&gt; or &lt;code&gt;ALLSELECTED&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-do-the-arguments-do&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-do-the-arguments-do&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What do the arguments do?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Argument&lt;/th&gt;&lt;th&gt;Meaning&lt;/th&gt;&lt;th&gt;Default&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;table&lt;/td&gt;&lt;td&gt;the rows to rank among&lt;/td&gt;&lt;td&gt;required&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;expression&lt;/td&gt;&lt;td&gt;evaluated per row of table, the values to rank&lt;/td&gt;&lt;td&gt;required&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;value&lt;/td&gt;&lt;td&gt;the value whose rank you want&lt;/td&gt;&lt;td&gt;expression in the current context&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;order&lt;/td&gt;&lt;td&gt;DESC (0, FALSE): largest is 1; ASC (1, TRUE): smallest is 1&lt;/td&gt;&lt;td&gt;DESC&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ties&lt;/td&gt;&lt;td&gt;Skip: 1, 2, 2, 4; Dense: 1, 2, 2, 3&lt;/td&gt;&lt;td&gt;Skip&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;RANKX arguments&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Skip arguments with empty commas: &lt;code&gt;RANKX ( ALL ( 'Product'[Product] ), [Revenue], , , DENSE )&lt;/code&gt;. If &lt;code&gt;value&lt;/code&gt; is not among the values, &lt;code&gt;RANKX&lt;/code&gt; adds it temporarily to find where it would rank.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-rank-within-a-group&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-rank-within-a-group&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you rank within a group?&lt;/h2&gt;
&lt;p&gt;Rank products within their category, so each category has its own 1:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Rank in Category =
&lt;i class=&quot;f&quot;&gt;RANKX&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;ALLEXCEPT&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; ),
    &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;ALLEXCEPT&lt;/code&gt; removes the product filter but keeps the filter on Category, so each product is compared with the products of its own category. That needs Category on the rows or in a filter: with only Product on the rows there is no category filter to keep, and the rank is among all products. A version that works either way:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Rank in Category =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Cat = &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;RANKX&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; ), &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; = Cat ),
        &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;
    )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-do-you-hide-the-total-and-show-top-n&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-hide-the-total-and-show-top-n&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you hide the total and show top N?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Product Rank =
&lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;ISINSCOPE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;RANKX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, , DESC, DENSE )
)

Is Top &lt;i class=&quot;n&quot;&gt;10&lt;/i&gt; = &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Product Rank]&lt;/i&gt; &amp;lt;= &lt;i class=&quot;n&quot;&gt;10&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;ISINSCOPE&lt;/code&gt; blanks the rank on the total row, where it means nothing. Use &lt;code&gt;Is Top 10&lt;/code&gt; as a visual filter (is 1), or use the visual's &lt;strong&gt;Top N&lt;/strong&gt; filter type, which does the same without DAX. To keep the rest as one line, see &lt;a href=&quot;/blog/topn-dax/&quot;&gt;TOPN&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-does-the-result-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-the-result-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does the result look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Product&lt;/th&gt;&lt;th&gt;Revenue&lt;/th&gt;&lt;th&gt;Rank (Skip)&lt;/th&gt;&lt;th&gt;Rank (Dense)&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Road-150&lt;/td&gt;&lt;td&gt;1,200&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Mountain-200&lt;/td&gt;&lt;td&gt;900&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Touring-1000&lt;/td&gt;&lt;td&gt;900&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Helmet&lt;/td&gt;&lt;td&gt;500&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bottle&lt;/td&gt;&lt;td&gt;320&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Products ranked with Skip and Dense&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;VALUES in the table argument.&lt;/strong&gt; Everything ranks 1; use &lt;code&gt;ALL&lt;/code&gt; or &lt;code&gt;ALLSELECTED&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Blank revenue.&lt;/strong&gt; BLANK is treated as 0, so products without sales still get a rank (last); filter them out with &lt;code&gt;IF ( NOT ISBLANK ( [Revenue] ), ... )&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Decimal comparisons.&lt;/strong&gt; Microsoft warns that comparisons of Decimal Number values can give unexpected results because of precision; round the expression if ties look wrong.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Ranking over the fact table.&lt;/strong&gt; &lt;code&gt;RANKX ( Sales, ... )&lt;/code&gt; ranks sales lines; rank the column you show.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Slow ranks.&lt;/strong&gt; The expression runs once per row of the table, for every cell; keep the table small.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/rankx-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: RANKX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/isinscope-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: ISINSCOPE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/rank-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: RANK function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Write &lt;code&gt;Product Rank&lt;/code&gt; with &lt;code&gt;ALLSELECTED&lt;/code&gt;, &lt;code&gt;DENSE&lt;/code&gt; and &lt;code&gt;ISINSCOPE&lt;/code&gt;, and add it to your product table. &lt;a href=&quot;/blog/index-rank-rownumber-dax/&quot;&gt;INDEX, RANK and ROWNUMBER&lt;/a&gt; covers the newer window-function way to rank by columns.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>A Claude Code skill that checks SQL before you run it</title>
    <link href="https://data.benibix.com/blog/claude-code-skill-that-checks-sql/"/>
    <id>https://data.benibix.com/blog/claude-code-skill-that-checks-sql/</id>
    <published>2026-11-04T01:00:00Z</published>
    <updated>2026-11-04T01:00:00Z</updated>
    <summary>Your first Claude Code skill can be the checklist you already run in your head before a query touches real data: joins, filters, limits, dates. The folder, the SKILL.md, and how to run it with one slash command.</summary>
    <category term="AI"/>
    <category term="Claude Code"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; make a folder &lt;code&gt;.claude/skills/sql-check/&lt;/code&gt; with one file, &lt;code&gt;SKILL.md&lt;/code&gt;: a &lt;code&gt;name&lt;/code&gt; and a &lt;code&gt;description&lt;/code&gt; between &lt;code&gt;---&lt;/code&gt; lines, then your checklist. Run it with &lt;strong&gt;&lt;code&gt;/sql-check&lt;/code&gt;&lt;/strong&gt; and the file name, or just ask &amp;quot;check this query before I run it&amp;quot; and Claude loads it because the description matches. A good checklist covers &lt;strong&gt;joins that multiply rows&lt;/strong&gt;, &lt;strong&gt;missing date filters&lt;/strong&gt;, &lt;strong&gt;no row limit&lt;/strong&gt;, &lt;strong&gt;NULL handling&lt;/strong&gt; and &lt;strong&gt;writes&lt;/strong&gt; (UPDATE, DELETE) that need a WHERE.&lt;/p&gt;
&lt;p&gt;Most bad SQL is not exotic. It is a join on a non-unique key, a filter on the wrong date, or a DELETE without a WHERE. A checklist catches them, but only if someone runs it every time. A skill runs it every time.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-in-the-checklist&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-in-the-checklist&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes in the checklist?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Check&lt;/th&gt;&lt;th&gt;What goes wrong&lt;/th&gt;&lt;th&gt;What the skill looks for&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Join keys&lt;/td&gt;&lt;td&gt;Rows repeat and every total grows&lt;/td&gt;&lt;td&gt;Joins on columns that are not unique on one side&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Dates&lt;/td&gt;&lt;td&gt;Last day lost, or the wrong period&lt;/td&gt;&lt;td&gt;BETWEEN on datetimes; filters on the wrong date column&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Row limits&lt;/td&gt;&lt;td&gt;A query returns 40 million rows&lt;/td&gt;&lt;td&gt;No TOP or LIMIT on exploratory queries&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;NULLs&lt;/td&gt;&lt;td&gt;Rows vanish from counts and joins&lt;/td&gt;&lt;td&gt;= NULL instead of IS NULL; NOT IN with NULLs&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Writes&lt;/td&gt;&lt;td&gt;Data changed for every row&lt;/td&gt;&lt;td&gt;UPDATE or DELETE without WHERE; no transaction&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Five checks before a query runs&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-does-the-skill-md-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-the-skill-md-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does the SKILL.md look like?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot;&gt;&lt;code&gt;---
name: sql-check
description: Use before running or committing any SQL query, or when asked to review SQL.
---

Check the query against these points and report each as OK or PROBLEM with the line:
1. Join keys: is each join on a unique key on at least one side? If not, rows may repeat.
2. Dates: BETWEEN on a datetime column? Filter on the right date column?
3. Limits: an exploratory SELECT without TOP or LIMIT?
4. NULLs: &amp;quot;= NULL&amp;quot;, or NOT IN on a column that can be NULL?
5. Writes: UPDATE or DELETE without WHERE, or outside a transaction?
Do not run the query. Suggest the fixed line for every PROBLEM.&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&amp;quot;Do not run the query&amp;quot; keeps the check a check.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-use-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-use-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you use it?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Before running:&lt;/strong&gt; &lt;code&gt;/sql-check queries/monthly_revenue.sql&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Automatically:&lt;/strong&gt; ask for a query and add &amp;quot;then check it&amp;quot;; the description makes Claude load the skill.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;For the team:&lt;/strong&gt; commit the folder; everyone who opens the project gets the same check.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/skills&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Extend Claude with skills&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;For DAX instead of SQL, see &lt;a href=&quot;/blog/claude-skill-for-dax-conventions/&quot;&gt;a skill for your DAX conventions&lt;/a&gt;. For a reviewer that works in its own context, see &lt;a href=&quot;/blog/custom-sql-reviewer-agent/&quot;&gt;a custom SQL reviewer agent&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Alt text for Power BI visuals: describe what to see</title>
    <link href="https://data.benibix.com/blog/alt-text-for-power-bi-visuals/"/>
    <id>https://data.benibix.com/blog/alt-text-for-power-bi-visuals/</id>
    <published>2026-11-03T17:00:00Z</published>
    <updated>2026-11-03T17:00:00Z</updated>
    <summary>Plain, specific words make good alt text. How to add alt text to a Power BI visual, what to write in 250 characters, and how a DAX measure makes it change with the data.</summary>
    <category term="Visuals"/>
    <category term="Report features"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; select the visual, open &lt;strong&gt;Format, General&lt;/strong&gt;, scroll to the bottom and fill in &lt;strong&gt;Alt Text&lt;/strong&gt; (up to &lt;strong&gt;250 characters&lt;/strong&gt;). A screen reader already reads the visual's title and type, so write &lt;strong&gt;what the reader should take away&lt;/strong&gt;: &amp;quot;Revenue by month for 2026, rising from January to a peak in June.&amp;quot; For text that follows the slicers, set the alt text with &lt;strong&gt;conditional formatting&lt;/strong&gt; from a DAX measure.&lt;/p&gt;
&lt;p&gt;Alt text describes a visual so that someone who cannot see it still gets the point. Microsoft asks report authors to add it to every object that carries meaning.&lt;/p&gt;
&lt;h2 id=&quot;what-should-the-alt-text-say&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-should-the-alt-text-say&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What should the alt text say?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Visual&lt;/th&gt;&lt;th&gt;Weak&lt;/th&gt;&lt;th&gt;Better&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Line chart of revenue&lt;/td&gt;&lt;td&gt;Line chart&lt;/td&gt;&lt;td&gt;Revenue by month in 2026, rising from January to a June peak, then flat&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bar chart by region&lt;/td&gt;&lt;td&gt;Chart showing regions&lt;/td&gt;&lt;td&gt;Revenue by region; North leads, South is less than half of North&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;KPI card&lt;/td&gt;&lt;td&gt;1.2M&lt;/td&gt;&lt;td&gt;Revenue this quarter, 4% above target&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Decorative shape&lt;/td&gt;&lt;td&gt;(a description of the shape)&lt;/td&gt;&lt;td&gt;Remove it from the tab order instead&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Alt text that helps, and alt text that does not&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The title and the visual type are read out already, so do not repeat them; add the insight and the context.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-make-it-change-with-the-data&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-make-it-change-with-the-data&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you make it change with the data?&lt;/h2&gt;
&lt;p&gt;Static alt text that says &amp;quot;North leads&amp;quot; is wrong the moment someone filters to another year. Instead, write a measure and use it for the alt text with conditional formatting (the &lt;strong&gt;fx&lt;/strong&gt; button next to Alt Text):&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Alt Revenue by Region =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; TopRegion = &lt;i class=&quot;f&quot;&gt;TOPN&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Region&lt;i class=&quot;m&quot;&gt;[Name]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;s&quot;&gt;&amp;quot;Revenue by region. Highest: &amp;quot;&lt;/i&gt; &amp;amp; &lt;i class=&quot;f&quot;&gt;CONCATENATEX&lt;/i&gt; ( TopRegion, Region&lt;i class=&quot;m&quot;&gt;[Name]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;, &amp;quot;&lt;/i&gt; )
    &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot; with &amp;quot;&lt;/i&gt; &amp;amp; &lt;i class=&quot;f&quot;&gt;FORMAT&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MAXX&lt;/i&gt; ( TopRegion, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; ), &lt;i class=&quot;s&quot;&gt;&amp;quot;#,0&amp;quot;&lt;/i&gt; ) &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot;.&amp;quot;&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Now the screen reader announces the top region for whatever the reader has filtered.&lt;/p&gt;
&lt;h2 id=&quot;what-else-makes-a-report-readable-without-sight&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-else-makes-a-report-readable-without-sight&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What else makes a report readable without sight?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Tab order:&lt;/strong&gt; on the View ribbon open the &lt;strong&gt;Selection&lt;/strong&gt; pane, choose &lt;strong&gt;Tab order&lt;/strong&gt;, and put the visuals in reading order. Take decorative shapes and images out of it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Titles that say something&lt;/strong&gt;, since they are read first.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Not colour alone:&lt;/strong&gt; add labels or markers so the meaning survives without the colour.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-accessibility-creating-reports&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Design Power BI reports for accessibility&lt;/a&gt;, alt text, the 250-character limit, dynamic alt text and tab order&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Pair this with &lt;a href=&quot;/blog/conditional-formatting-power-bi/&quot;&gt;conditional formatting&lt;/a&gt; and the functions above: &lt;a href=&quot;/blog/topn-dax/&quot;&gt;TOPN&lt;/a&gt;, &lt;a href=&quot;/blog/concatenatex-dax/&quot;&gt;CONCATENATEX&lt;/a&gt; and &lt;a href=&quot;/blog/format-function-dax/&quot;&gt;FORMAT&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>DAX text functions: every one with an example</title>
    <link href="https://data.benibix.com/blog/text-functions-dax-reference/"/>
    <id>https://data.benibix.com/blog/text-functions-dax-reference/</id>
    <published>2026-11-03T12:00:00Z</published>
    <updated>2026-11-03T12:00:00Z</updated>
    <summary>A reference of all DAX text functions, LEFT, RIGHT, MID, LEN, FIND, SEARCH, SUBSTITUTE, REPLACE, TRIM, UPPER, LOWER, REPT, EXACT, VALUE, FIXED, FORMAT, UNICHAR, UNICODE, CONCATENATE, CONCATENATEX and COMBINEVALUES, with examples and when to do text work in Power Query instead.</summary>
    <category term="DAX"/>
    <category term="Reference"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; DAX text functions cut, find, replace, convert and join text. Most work like their Excel namesakes: &lt;code&gt;LEFT&lt;/code&gt;, &lt;code&gt;RIGHT&lt;/code&gt;, &lt;code&gt;MID&lt;/code&gt; and &lt;code&gt;LEN&lt;/code&gt; cut, &lt;code&gt;FIND&lt;/code&gt; (case-sensitive) and &lt;code&gt;SEARCH&lt;/code&gt; (not case-sensitive, with wildcards) locate, &lt;code&gt;SUBSTITUTE&lt;/code&gt; and &lt;code&gt;REPLACE&lt;/code&gt; change, &lt;code&gt;VALUE&lt;/code&gt;, &lt;code&gt;FIXED&lt;/code&gt; and &lt;code&gt;FORMAT&lt;/code&gt; convert, and &lt;code&gt;CONCATENATE&lt;/code&gt;, &lt;code&gt;&amp;amp;&lt;/code&gt;, &lt;code&gt;CONCATENATEX&lt;/code&gt; and &lt;code&gt;COMBINEVALUES&lt;/code&gt; join. Cleaning text columns is usually better done in Power Query, before the data reaches the model; in DAX, text functions shine in measures for labels and titles.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-cut-and-measure-text&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-cut-and-measure-text&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions cut and measure text?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;th&gt;Result&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;LEFT ( text, n )&lt;/td&gt;&lt;td&gt;LEFT ( &amp;quot;PRD-2026-0042&amp;quot;, 3 )&lt;/td&gt;&lt;td&gt;PRD&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;RIGHT ( text, n )&lt;/td&gt;&lt;td&gt;RIGHT ( &amp;quot;PRD-2026-0042&amp;quot;, 4 )&lt;/td&gt;&lt;td&gt;0042&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;MID ( text, start, n )&lt;/td&gt;&lt;td&gt;MID ( &amp;quot;PRD-2026-0042&amp;quot;, 5, 4 )&lt;/td&gt;&lt;td&gt;2026&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;LEN ( text )&lt;/td&gt;&lt;td&gt;LEN ( &amp;quot;PRD-2026-0042&amp;quot; )&lt;/td&gt;&lt;td&gt;13&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;TRIM ( text )&lt;/td&gt;&lt;td&gt;TRIM ( &amp;quot;  a   b &amp;quot; )&lt;/td&gt;&lt;td&gt;a b&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;UPPER, LOWER&lt;/td&gt;&lt;td&gt;LOWER ( &amp;quot;PRD&amp;quot; )&lt;/td&gt;&lt;td&gt;prd&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Cutting (on &amp;quot;PRD-2026-0042&amp;quot;)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;code&gt;TRIM&lt;/code&gt; removes leading and trailing spaces and reduces inner runs to one space; Microsoft notes it trims the ordinary space character, not the nonbreaking space (UNICHAR 160).&lt;/p&gt;
&lt;h2 id=&quot;which-functions-find-and-replace&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-find-and-replace&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions find and replace?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;th&gt;Result&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;FIND ( find, within [, start] [, notfound] )&lt;/td&gt;&lt;td&gt;FIND ( &amp;quot;-&amp;quot;, &amp;quot;PRD-2026-0042&amp;quot; )&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SEARCH ( find, within [, start] [, notfound] )&lt;/td&gt;&lt;td&gt;SEARCH ( &amp;quot;prd*2026&amp;quot;, &amp;quot;PRD-2026-0042&amp;quot; )&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SUBSTITUTE ( text, old, new [, instance] )&lt;/td&gt;&lt;td&gt;SUBSTITUTE ( &amp;quot;PRD-2026-0042&amp;quot;, &amp;quot;-&amp;quot;, &amp;quot;/&amp;quot; )&lt;/td&gt;&lt;td&gt;PRD/2026/0042&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;REPLACE ( text, start, n, new )&lt;/td&gt;&lt;td&gt;REPLACE ( &amp;quot;PRD-2026-0042&amp;quot;, 1, 3, &amp;quot;ITM&amp;quot; )&lt;/td&gt;&lt;td&gt;ITM-2026-0042&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;EXACT ( a, b )&lt;/td&gt;&lt;td&gt;EXACT ( &amp;quot;Prd&amp;quot;, &amp;quot;PRD&amp;quot; )&lt;/td&gt;&lt;td&gt;FALSE&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Finding and replacing&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Give &lt;code&gt;FIND&lt;/code&gt; and &lt;code&gt;SEARCH&lt;/code&gt; a &lt;strong&gt;not found value&lt;/strong&gt; (&lt;code&gt;FIND ( &amp;quot;x&amp;quot;, T[Code], 1, 0 )&lt;/code&gt;): without it, a missing text is an error. &lt;code&gt;FIND&lt;/code&gt; is case-sensitive and has no wildcards; &lt;code&gt;SEARCH&lt;/code&gt; ignores case and supports &lt;code&gt;?&lt;/code&gt; and &lt;code&gt;*&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- text after the last dash: the number at the end&lt;/i&gt;
Code Number =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; T = Items&lt;i class=&quot;m&quot;&gt;[Code]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Dashes = &lt;i class=&quot;f&quot;&gt;LEN&lt;/i&gt; ( T ) - &lt;i class=&quot;f&quot;&gt;LEN&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUBSTITUTE&lt;/i&gt; ( T, &lt;i class=&quot;s&quot;&gt;&amp;quot;-&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;&amp;quot;&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Pos = &lt;i class=&quot;f&quot;&gt;FIND&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;&amp;quot;|&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SUBSTITUTE&lt;/i&gt; ( T, &lt;i class=&quot;s&quot;&gt;&amp;quot;-&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;|&amp;quot;&lt;/i&gt;, Dashes ), &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;VALUE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MID&lt;/i&gt; ( T, Pos + &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;LEN&lt;/i&gt; ( T ) ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;which-functions-convert&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-convert&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions convert?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;th&gt;Result&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;VALUE ( text )&lt;/td&gt;&lt;td&gt;VALUE ( &amp;quot;0042&amp;quot; )&lt;/td&gt;&lt;td&gt;42&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;FIXED ( n [, decimals] [, no_commas] )&lt;/td&gt;&lt;td&gt;FIXED ( 1234.567, 1 )&lt;/td&gt;&lt;td&gt;1,234.6 (text)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;FORMAT ( value, format )&lt;/td&gt;&lt;td&gt;FORMAT ( 0.256, &amp;quot;0.0%&amp;quot; )&lt;/td&gt;&lt;td&gt;25.6% (text)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;REPT ( text, n )&lt;/td&gt;&lt;td&gt;REPT ( &amp;quot;■&amp;quot;, 4 )&lt;/td&gt;&lt;td&gt;■■■■&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;UNICHAR ( code )&lt;/td&gt;&lt;td&gt;UNICHAR ( 9650 )&lt;/td&gt;&lt;td&gt;▲&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;UNICODE ( text )&lt;/td&gt;&lt;td&gt;UNICODE ( &amp;quot;A&amp;quot; )&lt;/td&gt;&lt;td&gt;65&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Converting&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;code&gt;REPT&lt;/code&gt; and &lt;code&gt;UNICHAR&lt;/code&gt; make small text visuals in tables: a bar of blocks, or a coloured triangle with conditional formatting. In depth: &lt;a href=&quot;/blog/format-function-dax/&quot;&gt;FORMAT&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Trend Icon = &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; &amp;gt;= &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;UNICHAR&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;9650&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;UNICHAR&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;9660&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;which-functions-join-text&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-join-text&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions join text?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;th&gt;Result&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&amp;amp;&lt;/td&gt;&lt;td&gt;&amp;quot;Q&amp;quot; &amp;amp; 4 &amp;amp; &amp;quot; &amp;quot; &amp;amp; 2026&lt;/td&gt;&lt;td&gt;Q4 2026&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CONCATENATE ( a, b )&lt;/td&gt;&lt;td&gt;CONCATENATE ( &amp;quot;Q&amp;quot;, 4 )&lt;/td&gt;&lt;td&gt;Q4&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CONCATENATEX ( table, expr, delim )&lt;/td&gt;&lt;td&gt;CONCATENATEX ( VALUES ( C[Country] ), C[Country], &amp;quot;, &amp;quot; )&lt;/td&gt;&lt;td&gt;AT, DE&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;COMBINEVALUES ( delim, e1, e2, ... )&lt;/td&gt;&lt;td&gt;COMBINEVALUES ( &amp;quot;|&amp;quot;, T[Year], T[Store] )&lt;/td&gt;&lt;td&gt;2026|S12&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Joining&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;code&gt;COMBINEVALUES&lt;/code&gt; builds key columns for relationships on two columns; Microsoft notes it assumes different inputs give different outputs, which lets DirectQuery optimise joins. In depth: &lt;a href=&quot;/blog/concatenatex-dax/&quot;&gt;CONCATENATEX&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Text cleanup in DAX columns.&lt;/strong&gt; Splitting and trimming every row at refresh belongs in Power Query, where it folds to the source and keeps the model small.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;FIND without a not-found value.&lt;/strong&gt; One row without the text breaks the column.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;VALUE on locale-formatted text.&lt;/strong&gt; &amp;quot;1.234,5&amp;quot; may not convert; clean it in Power Query with the right locale.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Numbers converted to text.&lt;/strong&gt; Text columns of numbers sort as text (&amp;quot;10&amp;quot; before &amp;quot;9&amp;quot;).&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/text-functions-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Text functions (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/search-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SEARCH function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/combinevalues-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: COMBINEVALUES function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Move any text-cleaning calculated columns into Power Query, and keep DAX text work for labels and titles. &lt;a href=&quot;/blog/math-and-trig-functions-dax-reference/&quot;&gt;Math and trig functions&lt;/a&gt; are the next reference.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Dynamic row-level security with USERPRINCIPALNAME</title>
    <link href="https://data.benibix.com/blog/userprincipalname-rls-dax/"/>
    <id>https://data.benibix.com/blog/userprincipalname-rls-dax/</id>
    <published>2026-11-03T12:00:00Z</published>
    <updated>2026-11-03T12:00:00Z</updated>
    <summary>How dynamic row-level security works in Power BI with USERPRINCIPALNAME, a user mapping table, DAX role filters, managers who see their team, USERNAME against USERPRINCIPALNAME, CUSTOMDATA for embedding, testing with View as, and who RLS applies to.</summary>
    <category term="DAX"/>
    <category term="Logic and information"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;row-level security (RLS)&lt;/strong&gt; filters the rows a user can see through &lt;strong&gt;roles&lt;/strong&gt; with DAX filter expressions. &lt;strong&gt;Dynamic&lt;/strong&gt; RLS uses one role for everyone: a mapping table lists which user may see which region (or customer, or cost centre), and the role filter &lt;code&gt;[Email] = USERPRINCIPALNAME ( )&lt;/code&gt; keeps only the signed-in user's rows, which then filter the facts through relationships. Define roles in Power BI Desktop (&lt;strong&gt;Modeling, Manage roles&lt;/strong&gt;), assign members in the service (&lt;strong&gt;Security&lt;/strong&gt; on the semantic model), and test with &lt;strong&gt;View as&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;One role per region means one role to maintain per region and a new role for every change. A mapping table moves the rules into data: adding a user is adding a row.&lt;/p&gt;
&lt;h2 id=&quot;how-is-dynamic-rls-built&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-dynamic-rls-built&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is dynamic RLS built?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Signed-in user&lt;/b&gt;&lt;span&gt;USERPRINCIPALNAME ( ) returns ana@contoso.com&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;User Access table&lt;/b&gt;&lt;span&gt;role filter keeps the rows for ana: North, East&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Region table&lt;/b&gt;&lt;span&gt;filtered to North and East through the relationship&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Sales&lt;/b&gt;&lt;span&gt;only North and East rows reach every visual&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Dynamic RLS through a mapping table&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ol&gt;&lt;li&gt;Add a table &lt;strong&gt;User Access&lt;/strong&gt; with Email and Region (one row per user and region).&lt;/li&gt;&lt;li&gt;Relate &lt;code&gt;User Access[Region]&lt;/code&gt; to &lt;code&gt;Region[Region]&lt;/code&gt;. For the filter to flow from User Access to Region, the relationship must filter in that direction: either User Access is on the one side, or set the relationship to both directions with &lt;strong&gt;Apply security filter in both directions&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Modeling, Manage roles&lt;/strong&gt;, new role &lt;strong&gt;By user&lt;/strong&gt;, on table User Access, DAX filter:&lt;/li&gt;&lt;/ol&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;m&quot;&gt;[Email]&lt;/i&gt; = &lt;i class=&quot;f&quot;&gt;USERPRINCIPALNAME&lt;/i&gt; ( )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;ol&gt;&lt;li&gt;Publish, then in the service: semantic model, &lt;strong&gt;Security&lt;/strong&gt;, add users or groups to &lt;strong&gt;By user&lt;/strong&gt;.&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;how-do-managers-see-their-team&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-managers-see-their-team&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do managers see their team?&lt;/h2&gt;
&lt;p&gt;Use a parent-child employee table and the &lt;a href=&quot;/blog/path-functions-dax/&quot;&gt;PATH functions&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- calculated column on Employee&lt;/i&gt;
Manager Path = &lt;i class=&quot;f&quot;&gt;PATH&lt;/i&gt; ( Employee&lt;i class=&quot;m&quot;&gt;[Employee ID]&lt;/i&gt;, Employee&lt;i class=&quot;m&quot;&gt;[Manager ID]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- role filter on Employee&lt;/i&gt;
&lt;i class=&quot;f&quot;&gt;PATHCONTAINS&lt;/i&gt; (
    Employee&lt;i class=&quot;m&quot;&gt;[Manager Path]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;LOOKUPVALUE&lt;/i&gt; ( Employee&lt;i class=&quot;m&quot;&gt;[Employee ID]&lt;/i&gt;, Employee&lt;i class=&quot;m&quot;&gt;[Email]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;USERPRINCIPALNAME&lt;/i&gt; ( ) )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Each employee row is visible when the signed-in user appears anywhere in its management path: managers see everyone below them.&lt;/p&gt;
&lt;h2 id=&quot;which-user-functions-are-there&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-user-functions-are-there&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which user functions are there?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Returns&lt;/th&gt;&lt;th&gt;Use&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;USERPRINCIPALNAME ( )&lt;/td&gt;&lt;td&gt;the user principal name, usually the sign-in email&lt;/td&gt;&lt;td&gt;dynamic RLS (the usual choice)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;USERNAME ( )&lt;/td&gt;&lt;td&gt;DOMAIN\user in Desktop; the UPN in the service and Report Server&lt;/td&gt;&lt;td&gt;older models&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;USEROBJECTID ( )&lt;/td&gt;&lt;td&gt;the Microsoft Entra object ID (or SID for SSAS)&lt;/td&gt;&lt;td&gt;mapping by stable IDs&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CUSTOMDATA ( )&lt;/td&gt;&lt;td&gt;the CustomData string of the connection&lt;/td&gt;&lt;td&gt;embedding for customers&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;USERCULTURE ( )&lt;/td&gt;&lt;td&gt;the user's locale, such as en-US&lt;/td&gt;&lt;td&gt;translated labels, not security&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;User functions&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;code&gt;USERNAME&lt;/code&gt; behaves differently in Desktop and the service, which is why &lt;code&gt;USERPRINCIPALNAME&lt;/code&gt; is preferred. When embedding for customers (app owns data), the app passes an effective identity and roles in the embed token, often with &lt;code&gt;CUSTOMDATA&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;who-does-rls-apply-to&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#who-does-rls-apply-to&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Who does RLS apply to?&lt;/h2&gt;
&lt;p&gt;Microsoft's documentation: RLS roles apply to users with the &lt;strong&gt;Viewer&lt;/strong&gt; role in the workspace, also when they have Build permission on the semantic model. Workspace &lt;strong&gt;Admins, Members and Contributors&lt;/strong&gt; can edit the model and are not restricted by RLS. Share reports with restricted users as Viewers or through an app.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-test-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-test-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you test it?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;In Desktop: &lt;strong&gt;Modeling, View as&lt;/strong&gt;, pick the role and &lt;strong&gt;Other user&lt;/strong&gt; with an email.&lt;/li&gt;&lt;li&gt;In the service: semantic model, &lt;strong&gt;Security&lt;/strong&gt;, &lt;strong&gt;...&lt;/strong&gt; next to the role, &lt;strong&gt;Test as role&lt;/strong&gt;, and enter a user.&lt;/li&gt;&lt;li&gt;Add a card with &lt;code&gt;USERPRINCIPALNAME ( )&lt;/code&gt; to a hidden test page to see what the function returns.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Case and aliases.&lt;/strong&gt; The UPN may differ from the email users know (an alias, a guest account with #EXT#); map the UPN, and compare in lowercase if needed.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Filter direction.&lt;/strong&gt; The mapping filters nothing if the relationship does not carry the filter to the facts; check with View as.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Admins see everything.&lt;/strong&gt; Testing as yourself in a workspace where you are Admin shows all data.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;USERELATIONSHIP.&lt;/strong&gt; It cannot be used on tables with RLS (see &lt;a href=&quot;/blog/dax-relationship-functions/&quot;&gt;relationship functions&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Performance.&lt;/strong&gt; Complex role filters run on every query; keep them simple and on small tables.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/security/service-admin-row-level-security&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Row-level security (RLS) with Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/userprincipalname-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: USERPRINCIPALNAME function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/guidance/rls-guidance&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Row-level security guidance&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Create the User Access table with three test users, the &lt;strong&gt;By user&lt;/strong&gt; role, and check each with View as before you publish. &lt;a href=&quot;/blog/path-functions-dax/&quot;&gt;PATH functions&lt;/a&gt; extend it to management hierarchies.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>How to make a chart in Power BI in 3 steps</title>
    <link href="https://data.benibix.com/blog/how-to-make-a-chart-power-bi/"/>
    <id>https://data.benibix.com/blog/how-to-make-a-chart-power-bi/</id>
    <published>2026-11-03T12:00:00Z</published>
    <updated>2026-11-03T12:00:00Z</updated>
    <summary>Make a Power BI chart in three steps. Write the one sentence it should say, pick the visual that says it, then switch off what does not help and make the sentence the title, fixed or from a measure.</summary>
    <category term="Visuals"/>
    <category term="Report design"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; 1. Write &lt;strong&gt;the one sentence&lt;/strong&gt; the chart should say. 2. Pick the &lt;strong&gt;visual&lt;/strong&gt; that says it: a &lt;strong&gt;bar or column chart&lt;/strong&gt; to compare, a &lt;strong&gt;line chart&lt;/strong&gt; for change over time, a &lt;strong&gt;donut&lt;/strong&gt; for two to five parts. 3. In &lt;strong&gt;Format visual&lt;/strong&gt;, switch off what does not help that sentence (legend, gridlines, extra decimals) and type the sentence into &lt;strong&gt;General &amp;gt; Title&lt;/strong&gt;, or let a &lt;strong&gt;measure&lt;/strong&gt; write it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;All the charts in one place:&lt;/strong&gt; &lt;a href=&quot;/visuals/&quot;&gt;Visuals&lt;/a&gt; sorts every chart by the question it answers, each with its parts, how to read it and the mistakes to avoid.&lt;/p&gt;
&lt;p&gt;The usual way to make a Power BI chart is to tick a few fields in the Data pane and let Power BI choose a visual. It always draws something. Whether the reader sees the point is another matter, and the default title (&amp;quot;Sales by Month&amp;quot;) does not help: it names the data, not what happened to it.&lt;/p&gt;
&lt;p&gt;The short video below shows the three steps in under a minute.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:3&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;The sentence&lt;/b&gt;&lt;span&gt;what should the reader see?&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;The visual&lt;/b&gt;&lt;span&gt;the one that says it&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;The cut&lt;/b&gt;&lt;span&gt;everything else off, the sentence on top&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Three steps, in this order&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;step-1-what-should-the-chart-say&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#step-1-what-should-the-chart-say&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Step 1: what should the chart say?&lt;/h2&gt;
&lt;p&gt;A sentence with a verb, written before you open the Visualizations pane: &amp;quot;Sales doubled between March and June&amp;quot;, &amp;quot;The North sells twice as much as the South&amp;quot;, &amp;quot;Two products make half of all returns&amp;quot;. If you cannot write it, you may need two visuals, or a &lt;a href=&quot;/blog/table-visual-power-bi/&quot;&gt;table&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;step-2-which-power-bi-visual-says-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#step-2-which-power-bi-visual-says-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Step 2: which Power BI visual says it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Your sentence is about&lt;/th&gt;&lt;th&gt;Power BI visual&lt;/th&gt;&lt;th&gt;Fields&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Comparing items&lt;/td&gt;&lt;td&gt;Clustered bar or column chart, sorted&lt;/td&gt;&lt;td&gt;category on the Y-axis (bar) or X-axis (column), measure as the value&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Change over time&lt;/td&gt;&lt;td&gt;Line chart&lt;/td&gt;&lt;td&gt;date or month on the X-axis, measure on the Y-axis&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Two to five parts of one whole&lt;/td&gt;&lt;td&gt;Donut chart&lt;/td&gt;&lt;td&gt;category in Legend, measure in Values&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Two numbers moving together&lt;/td&gt;&lt;td&gt;Scatter chart&lt;/td&gt;&lt;td&gt;one measure on each axis, the item in Values&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;One number against a goal&lt;/td&gt;&lt;td&gt;Card or KPI visual&lt;/td&gt;&lt;td&gt;the measure, and the goal for a KPI&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The sentence picks the visual&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;To change the visual after Power BI picked one, select it and click another icon in the Visualizations pane; the fields move with it as far as they fit. More on choosing: &lt;a href=&quot;/blog/which-power-bi-chart/&quot;&gt;which Power BI chart for which question?&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;step-3-what-do-you-switch-off&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#step-3-what-do-you-switch-off&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Step 3: what do you switch off?&lt;/h2&gt;
&lt;p&gt;Select the visual and open &lt;strong&gt;Format visual&lt;/strong&gt; (the paint brush in the Visualizations pane):&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:4&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Legend&lt;/b&gt;&lt;span&gt;Visual &amp;gt; Legend off when there is one series, or label the lines directly&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Gridlines&lt;/b&gt;&lt;span&gt;Visual &amp;gt; Gridlines (or the axis that has them): off, or light grey&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Decimals&lt;/b&gt;&lt;span&gt;Data labels or axis: display units in thousands, no decimals&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Colour&lt;/b&gt;&lt;span&gt;one colour for the series, one highlight for the item that matters&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Title&lt;/b&gt;&lt;span&gt;General &amp;gt; Title: replace the field names with the sentence&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;What to cut, and where&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-does-that-look-like-with-real-numbers&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-that-look-like-with-real-numbers&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does that look like with real numbers?&lt;/h2&gt;
&lt;p&gt;Monthly sales in thousands: 40, 41, 42, then 70, 82 and 86. From March (42) to June (86) is &lt;strong&gt;2.05 times&lt;/strong&gt;, so the sentence is &amp;quot;Sales doubled between March and June&amp;quot;. It is change over time, so a line chart, one series, no legend, with the two months that matter picked out:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;line&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;line chart: Jan 40; Feb 41; Mar 42; Apr 70; May 82; Jun 86&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;626&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;20&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;626&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;40&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;626&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;60&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;626&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;80&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;626&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;polyline points=&quot;52,165.2 166.8,162.7 281.6,160.2 396.4,89.6 511.2,59.4 626,49.3&quot; class=&quot;ln ka&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;165.2&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;166.8&quot; cy=&quot;162.7&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;281.6&quot; cy=&quot;160.2&quot; r=&quot;3.5&quot; class=&quot;dt t-gold&quot;/&gt;&lt;circle cx=&quot;396.4&quot; cy=&quot;89.6&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;511.2&quot; cy=&quot;59.4&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;49.3&quot; r=&quot;3.5&quot; class=&quot;dt t-gold&quot;/&gt;&lt;text x=&quot;52&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jan&lt;/text&gt;&lt;text x=&quot;166.8&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Feb&lt;/text&gt;&lt;text x=&quot;281.6&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Mar&lt;/text&gt;&lt;text x=&quot;396.4&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Apr&lt;/text&gt;&lt;text x=&quot;511.2&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;May&lt;/text&gt;&lt;text x=&quot;626&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jun&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Sales doubled between March and June (in thousands)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;can-the-title-update-itself&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#can-the-title-update-itself&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Can the title update itself?&lt;/h2&gt;
&lt;p&gt;Yes. Under &lt;strong&gt;General &amp;gt; Title&lt;/strong&gt;, the &lt;strong&gt;fx&lt;/strong&gt; button next to the title text lets a measure write it, so the sentence follows the slicers. The measure must return text (Microsoft Learn: numbers and dates are not supported there):&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Sales Growth Title =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; StartSales = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sales]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Mar&amp;quot;&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; EndSales = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sales]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Jun&amp;quot;&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Sales grew &amp;quot;&lt;/i&gt;
        &amp;amp; &lt;i class=&quot;f&quot;&gt;FORMAT&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( EndSales, StartSales ), &lt;i class=&quot;s&quot;&gt;&amp;quot;0.0&amp;quot;&lt;/i&gt; )
        &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot; times between March and June&amp;quot;&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;With the numbers above it returns &amp;quot;Sales grew 2.0 times between March and June&amp;quot;. Pick a region in a slicer, and the title tells that region's story.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Letting the default visual stand.&lt;/strong&gt; Power BI picks a visual from the field types, not from your sentence. A stacked column for months of one region says less than a line.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A title that names the fields.&lt;/strong&gt; &amp;quot;Sales by Month and Region&amp;quot; is a label. The reader still has to find the point.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Two messages in one visual.&lt;/strong&gt; Two measures on two axes, or four series, ask the reader to work. Split it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Unsorted bars.&lt;/strong&gt; Sort by the value (the visual's &lt;strong&gt;More options &amp;gt; Sort axis&lt;/strong&gt;) unless the order means something, like months.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-report-add-visualizations-i&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Add visualizations to a Power BI report&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-customize-title-background-and-legend&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Customize titles, backgrounds and legends&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-format-visual-titles&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Expression-based titles in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/consumer/end-user-change-sort&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Change how a chart is sorted&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://github.com/Financial-Times/chart-doctor/tree/main/visual-vocabulary&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Financial Times: Visual Vocabulary&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Take the busiest visual on your report and write its sentence; the visual and the cuts usually follow. &lt;a href=&quot;/blog/what-is-data-visualization/&quot;&gt;What is data visualization?&lt;/a&gt; explains the idea behind it, and &lt;a href=&quot;/blog/power-bi-report-design-pattern/&quot;&gt;a Power BI report layout people read&lt;/a&gt; arranges the finished visuals on a page. To try the choice with your own numbers first, &lt;a href=&quot;https://tools.benibix.com/data/chart-compass/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Chart Compass&lt;/a&gt; takes a pasted table and what the chart should say, draws the charts that fit and names them in Power BI, Tableau and Excel.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Profit vs cash flow: why a profitable month can run dry</title>
    <link href="https://data.benibix.com/blog/profit-vs-cash-flow-kpi/"/>
    <id>https://data.benibix.com/blog/profit-vs-cash-flow-kpi/</id>
    <published>2026-11-03T12:00:00Z</published>
    <updated>2026-11-03T12:00:00Z</updated>
    <summary>Profit counts a sale when it is invoiced, cash flow when the money arrives. How the two differ, the three kinds of cash flow, operating and free cash flow in DAX, and how to show both in one report.</summary>
    <category term="KPIs"/>
    <category term="Finance"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;cash flow&lt;/strong&gt; is cash in minus cash out in a period; &lt;strong&gt;profit&lt;/strong&gt; is revenue minus costs when they are earned and incurred. An invoice counts as profit the day it is sent, but as cash only the day it is paid. So a business can show &lt;strong&gt;+4,000 profit&lt;/strong&gt; in a month and &lt;strong&gt;-6,000 cash&lt;/strong&gt; in the same month, and run out of money while growing.&lt;/p&gt;
&lt;p&gt;A finance dashboard that shows only net profit tells the owner March went well. The bank account says otherwise. Both numbers are right; they measure different things, and a report needs both.&lt;/p&gt;
&lt;p&gt;The short video below explains why profit and cash are not the same thing, and the three kinds of cash flow.&lt;/p&gt;
&lt;h2 id=&quot;why-can-profit-and-cash-disagree&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-can-profit-and-cash-disagree&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why can profit and cash disagree?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Month&lt;/th&gt;&lt;th&gt;Profit&lt;/th&gt;&lt;th&gt;Cash&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;March: invoice sent, wages and rent paid&lt;/td&gt;&lt;td&gt;+4,000&lt;/td&gt;&lt;td&gt;-6,000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;April: waiting for the customer&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;May: the customer pays&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;+10,000&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;+4,000&lt;/td&gt;&lt;td&gt;+4,000&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;One invoice of 10,000, costs of 6,000&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;By May both agree. For two months the business is 6,000 short while its profit looks fine. Customers who pay in 60 days and fast growth stack these gaps on top of each other.&lt;/p&gt;
&lt;h2 id=&quot;what-are-the-three-kinds-of-cash-flow&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-three-kinds-of-cash-flow&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the three kinds of cash flow?&lt;/h2&gt;
&lt;p&gt;IAS 7, the IFRS standard for the cash flow statement, splits cash into three activities:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Operating&lt;/b&gt;&lt;ul&gt;&lt;li&gt;running the business&lt;/li&gt;&lt;li&gt;cash from customers&lt;/li&gt;&lt;li&gt;wages, rent, suppliers&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Investing&lt;/b&gt;&lt;ul&gt;&lt;li&gt;long-term assets&lt;/li&gt;&lt;li&gt;machines, software, buildings&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Financing&lt;/b&gt;&lt;ul&gt;&lt;li&gt;owners and lenders&lt;/li&gt;&lt;li&gt;loans and repayments&lt;/li&gt;&lt;li&gt;dividends&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;The cash flow statement&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-calculate-operating-and-free-cash-flow-in-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-calculate-operating-and-free-cash-flow-in-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you calculate operating and free cash flow in DAX?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Operating Cash Flow =
    &lt;i class=&quot;m&quot;&gt;[Net Income]&lt;/i&gt; + &lt;i class=&quot;m&quot;&gt;[Non Cash Expenses]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Change in Working Capital]&lt;/i&gt;

Free Cash Flow =
    &lt;i class=&quot;m&quot;&gt;[Operating Cash Flow]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Capex]&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;[Change in Working Capital]&lt;/code&gt; is the change in receivables plus inventory minus payables between the opening and closing balance of the period. Free cash flow is what is left to repay debt, pay owners or grow.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-show-both-in-one-report&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-show-both-in-one-report&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you show both in one report?&lt;/h2&gt;
&lt;p&gt;Put profit and operating cash flow as two lines on one line chart by month, with the same axis. Where the cash line runs below the profit line, cash is tied up in receivables or stock; the &lt;a href=&quot;/blog/cash-conversion-cycle-kpi/&quot;&gt;cash conversion cycle&lt;/a&gt; says how many days. Add the closing cash balance as a card.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;One period only.&lt;/strong&gt; Paying suppliers late at month end makes one month's cash flow look strong. Read several periods.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Cutting investment to lift free cash flow.&lt;/strong&gt; It looks better now and costs growth later.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Mixing cash and profit measures&lt;/strong&gt; on one card without saying which is which.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://www.ifrs.org/issued-standards/list-of-standards/ias-7-statement-of-cash-flows/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;IFRS: IAS 7 Statement of Cash Flows&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Pair this with &lt;a href=&quot;/blog/burn-rate-and-runway-kpi/&quot;&gt;burn rate and runway&lt;/a&gt; for how long the cash lasts, and &lt;a href=&quot;/blog/profit-margin-kpis/&quot;&gt;profit margin KPIs&lt;/a&gt; for the profit side. &lt;a href=&quot;https://tools.benibix.com/data/kpi-atlas/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;KPI Atlas&lt;/a&gt; has operating and free cash flow with DAX, SQL and Excel formulas.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Time to hire and time to fill: recruiting KPIs in DAX</title>
    <link href="https://data.benibix.com/blog/time-to-hire-kpi/"/>
    <id>https://data.benibix.com/blog/time-to-hire-kpi/</id>
    <published>2026-11-03T12:00:00Z</published>
    <updated>2026-11-03T12:00:00Z</updated>
    <summary>How to measure time to fill (job opened to offer accepted) and time to hire (candidate applied to offer accepted), the recruiting funnel from applicants to hires, offer acceptance rate, source of hire, median against average, the DAX on requisition and candidate tables, and a stage chart.</summary>
    <category term="KPIs"/>
    <category term="People"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;time to fill&lt;/strong&gt; = days from a job being opened (requisition approved) to an offer accepted; it measures the business's wait for a new person. &lt;strong&gt;Time to hire&lt;/strong&gt; = days from a candidate applying to accepting the offer; it measures how fast the process moves for the candidate who was hired. Report the &lt;strong&gt;median&lt;/strong&gt; and the slow tail by role, and add the &lt;strong&gt;recruiting funnel&lt;/strong&gt; (applicants, screened, interviewed, offered, hired) and the &lt;strong&gt;offer acceptance rate&lt;/strong&gt; (accepted / offers made).&lt;/p&gt;
&lt;p&gt;Good candidates take other offers while a process stalls. Time to hire by stage shows which step waits longest, often scheduling interviews or approving the offer.&lt;/p&gt;
&lt;h2 id=&quot;how-are-they-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-are-they-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How are they calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Role family&lt;/th&gt;&lt;th&gt;Hires&lt;/th&gt;&lt;th&gt;Time to fill&lt;/th&gt;&lt;th&gt;Time to hire&lt;/th&gt;&lt;th&gt;Offer acceptance&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Engineering&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;td&gt;62&lt;/td&gt;&lt;td&gt;38&lt;/td&gt;&lt;td&gt;73%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sales&lt;/td&gt;&lt;td&gt;12&lt;/td&gt;&lt;td&gt;41&lt;/td&gt;&lt;td&gt;24&lt;/td&gt;&lt;td&gt;86%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Operations&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;25&lt;/td&gt;&lt;td&gt;14&lt;/td&gt;&lt;td&gt;91%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Hires in Q3, median days&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;funnel&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;funnel chart: Applicants 640; Screened 160; Interviewed 48; Offered 11; Hired 8&quot;&gt;&lt;rect x=&quot;150&quot; y=&quot;13.5&quot; width=&quot;420&quot; height=&quot;42.6&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;360&quot; y=&quot;38.8&quot; class=&quot;tin3&quot; text-anchor=&quot;middle&quot;&gt;640&lt;/text&gt;&lt;text x=&quot;12&quot; y=&quot;38.8&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Applicants&lt;/text&gt;&lt;rect x=&quot;307.5&quot; y=&quot;71.1&quot; width=&quot;105&quot; height=&quot;42.6&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;360&quot; y=&quot;96.4&quot; class=&quot;tin3&quot; text-anchor=&quot;middle&quot;&gt;160&lt;/text&gt;&lt;text x=&quot;12&quot; y=&quot;96.4&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Screened&lt;/text&gt;&lt;text x=&quot;632&quot; y=&quot;96.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;25%&lt;/text&gt;&lt;rect x=&quot;344.3&quot; y=&quot;128.7&quot; width=&quot;31.5&quot; height=&quot;42.6&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;383.8&quot; y=&quot;154&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;48&lt;/text&gt;&lt;text x=&quot;12&quot; y=&quot;154&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Interviewed&lt;/text&gt;&lt;text x=&quot;632&quot; y=&quot;154&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;8%&lt;/text&gt;&lt;rect x=&quot;356.4&quot; y=&quot;186.3&quot; width=&quot;7.2&quot; height=&quot;42.6&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;371.6&quot; y=&quot;211.6&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;11&lt;/text&gt;&lt;text x=&quot;12&quot; y=&quot;211.6&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Offered&lt;/text&gt;&lt;text x=&quot;632&quot; y=&quot;211.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;2%&lt;/text&gt;&lt;rect x=&quot;357.4&quot; y=&quot;243.9&quot; width=&quot;5.3&quot; height=&quot;42.6&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;370.6&quot; y=&quot;269.2&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;8&lt;/text&gt;&lt;text x=&quot;12&quot; y=&quot;269.2&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Hired&lt;/text&gt;&lt;text x=&quot;632&quot; y=&quot;269.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;1%&lt;/text&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Engineering recruiting funnel, Q3&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;stacked-bar&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;Applied to screened&lt;/li&gt;&lt;li class=&quot;k1&quot;&gt;Screened to interview&lt;/li&gt;&lt;li class=&quot;k2&quot;&gt;Interview to offer&lt;/li&gt;&lt;li class=&quot;k3&quot;&gt;Offer to accepted&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;stacked bar chart: Q2 6, 14, 12, 7; Q3 5, 10, 16, 7&quot;&gt;&lt;line x1=&quot;37.6&quot; y1=&quot;8&quot; x2=&quot;37.6&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;37.6&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;177.2&quot; y1=&quot;8&quot; x2=&quot;177.2&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;177.2&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;10&lt;/text&gt;&lt;line x1=&quot;316.8&quot; y1=&quot;8&quot; x2=&quot;316.8&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;316.8&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;20&lt;/text&gt;&lt;line x1=&quot;456.4&quot; y1=&quot;8&quot; x2=&quot;456.4&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;456.4&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;30&lt;/text&gt;&lt;line x1=&quot;596&quot; y1=&quot;8&quot; x2=&quot;596&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;596&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;40&lt;/text&gt;&lt;rect x=&quot;37.6&quot; y=&quot;30.3&quot; width=&quot;83.8&quot; height=&quot;86.5&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;121.4&quot; y=&quot;30.3&quot; width=&quot;195.4&quot; height=&quot;86.5&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;rect x=&quot;316.8&quot; y=&quot;30.3&quot; width=&quot;167.5&quot; height=&quot;86.5&quot; rx=&quot;3&quot; class=&quot;m k2&quot;/&gt;&lt;rect x=&quot;484.3&quot; y=&quot;30.3&quot; width=&quot;97.7&quot; height=&quot;86.5&quot; rx=&quot;3&quot; class=&quot;m k3&quot;/&gt;&lt;text x=&quot;27.6&quot; y=&quot;77.5&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Q2&lt;/text&gt;&lt;rect x=&quot;37.6&quot; y=&quot;161.3&quot; width=&quot;69.8&quot; height=&quot;86.5&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;107.4&quot; y=&quot;161.3&quot; width=&quot;139.6&quot; height=&quot;86.5&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;rect x=&quot;247&quot; y=&quot;161.3&quot; width=&quot;223.4&quot; height=&quot;86.5&quot; rx=&quot;3&quot; class=&quot;m k2&quot;/&gt;&lt;rect x=&quot;470.4&quot; y=&quot;161.3&quot; width=&quot;97.7&quot; height=&quot;86.5&quot; rx=&quot;3&quot; class=&quot;m k3&quot;/&gt;&lt;text x=&quot;27.6&quot; y=&quot;208.5&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Q3&lt;/text&gt;&lt;line x1=&quot;37.6&quot; y1=&quot;8&quot; x2=&quot;37.6&quot; y2=&quot;270&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Median days per stage, engineering&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Interview-to-offer grew from 12 to 16 days in Q3: decisions after the last interview slowed down.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;A Requisitions table (Req ID, Role Family, Opened Date, Filled Date) and a Candidates table (Candidate ID, Req ID, Applied Date, Stage dates, Offer Date, Offer Status, Hired Date, Source):&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Hires = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Candidates ), NOT &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( Candidates&lt;i class=&quot;m&quot;&gt;[Hired Date]&lt;/i&gt; ) )

Time to Fill Median =
&lt;i class=&quot;f&quot;&gt;MEDIANX&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( Requisitions, NOT &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( Requisitions&lt;i class=&quot;m&quot;&gt;[Filled Date]&lt;/i&gt; ) ),
    Requisitions&lt;i class=&quot;m&quot;&gt;[Filled Date]&lt;/i&gt; - Requisitions&lt;i class=&quot;m&quot;&gt;[Opened Date]&lt;/i&gt;
)

Time to Hire Median =
&lt;i class=&quot;f&quot;&gt;MEDIANX&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( Candidates, NOT &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( Candidates&lt;i class=&quot;m&quot;&gt;[Hired Date]&lt;/i&gt; ) ),
    Candidates&lt;i class=&quot;m&quot;&gt;[Hired Date]&lt;/i&gt; - Candidates&lt;i class=&quot;m&quot;&gt;[Applied Date]&lt;/i&gt;
)

Offers = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Candidates ), NOT &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( Candidates&lt;i class=&quot;m&quot;&gt;[Offer Date]&lt;/i&gt; ) )
Offers Accepted = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Candidates ), Candidates&lt;i class=&quot;m&quot;&gt;[Offer Status]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Accepted&amp;quot;&lt;/i&gt; )
Offer Acceptance Rate = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Offers Accepted]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Offers]&lt;/i&gt; )

Hires by Source % =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Hires]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Hires]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( Candidates&lt;i class=&quot;m&quot;&gt;[Source]&lt;/i&gt; ) ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Relate the Date table to the hire (or filled) date so a period shows the hires made in it. Open requisitions need their own view: days open so far, by role, so the oldest ones get attention.&lt;/p&gt;
&lt;h2 id=&quot;which-sources-work-best&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-sources-work-best&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which sources work best?&lt;/h2&gt;
&lt;p&gt;Show by source (referral, job board, agency, careers page, sourcing): hires, time to hire, offer acceptance and cost per hire. Referrals are often faster and stay longer; check this against &lt;a href=&quot;/blog/employee-turnover-kpi/&quot;&gt;first-year turnover&lt;/a&gt; by source.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Mixing the two definitions.&lt;/strong&gt; Time to fill and time to hire differ by weeks; label which.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Averages only.&lt;/strong&gt; One role open for a year skews the average; use the median and show the oldest open roles.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Paused requisitions.&lt;/strong&gt; Hiring freezes inflate time to fill; subtract paused days or flag them.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Missing stage dates.&lt;/strong&gt; If the applicant system does not record stage changes, the stage chart is guesswork; make stage dates required.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/medianx-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: MEDIANX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-funnel-charts&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Funnel charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/all-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: ALL function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Export requisitions and candidates with stage dates, and show median time to hire by stage and role family. &lt;a href=&quot;/blog/revenue-per-employee-kpi/&quot;&gt;Revenue per employee&lt;/a&gt; links headcount to output.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>What a histogram shows, and why its bars touch</title>
    <link href="https://data.benibix.com/blog/what-is-a-histogram/"/>
    <id>https://data.benibix.com/blog/what-is-a-histogram/</id>
    <published>2026-11-03T12:00:00Z</published>
    <updated>2026-11-03T12:00:00Z</updated>
    <summary>A histogram shows how one set of numbers is spread out, by counting values in equal ranges. Its bars touch and stay in order, which is what makes it different from a bar chart.</summary>
    <category term="Visuals"/>
    <category term="Distribution"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;histogram&lt;/strong&gt; splits the range of one number into &lt;strong&gt;equal bins&lt;/strong&gt; and counts how many values fall into each. It looks like a column chart, but its columns are &lt;strong&gt;ranges of a number&lt;/strong&gt;, so they &lt;strong&gt;touch&lt;/strong&gt;, stay &lt;strong&gt;in order from low to high&lt;/strong&gt;, and are never sorted by size. It answers &amp;quot;how are the values spread?&amp;quot;, not &amp;quot;which is bigger?&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The chart, part by part:&lt;/strong&gt; &lt;a href=&quot;/visuals/histogram/&quot;&gt;What is a histogram?&lt;/a&gt; draws its parts and shows how to read one, its kinds and the mistakes to avoid.&lt;/p&gt;
&lt;p&gt;An average order value of 64 euros says nothing about whether most orders are around 60, or half are 20 and half are 110. A histogram shows which one it is, and those two shops need very different plans.&lt;/p&gt;
&lt;p&gt;The short video below shows why a histogram is not a bar chart, and how trying a few bin sizes reveals the real shape of your data.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-read-a-histogram&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-read-a-histogram&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you read a histogram?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;histogram&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;histogram chart: 0-20 40; 20-40 95; 40-60 180; 60-80 150; 80-100 70; 100-120 35; 120+ 30&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;203&quot; x2=&quot;628&quot; y2=&quot;203&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;207&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;50&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;140&quot; x2=&quot;628&quot; y2=&quot;140&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;144&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;77&quot; x2=&quot;628&quot; y2=&quot;77&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;81&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;150&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;628&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;200&lt;/text&gt;&lt;rect x=&quot;51.5&quot; y=&quot;215.6&quot; width=&quot;81.3&quot; height=&quot;50.4&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;93.1&quot; y=&quot;209.6&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;40&lt;/text&gt;&lt;text x=&quot;93.1&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0-20&lt;/text&gt;&lt;rect x=&quot;133.8&quot; y=&quot;146.3&quot; width=&quot;81.3&quot; height=&quot;119.7&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;175.4&quot; y=&quot;140.3&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;95&lt;/text&gt;&lt;text x=&quot;175.4&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;20-40&lt;/text&gt;&lt;rect x=&quot;216.1&quot; y=&quot;39.2&quot; width=&quot;81.3&quot; height=&quot;226.8&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;257.7&quot; y=&quot;33.2&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;180&lt;/text&gt;&lt;text x=&quot;257.7&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;40-60&lt;/text&gt;&lt;rect x=&quot;298.4&quot; y=&quot;77&quot; width=&quot;81.3&quot; height=&quot;189&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;340&quot; y=&quot;71&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;150&lt;/text&gt;&lt;text x=&quot;340&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;60-80&lt;/text&gt;&lt;rect x=&quot;380.6&quot; y=&quot;177.8&quot; width=&quot;81.3&quot; height=&quot;88.2&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;422.3&quot; y=&quot;171.8&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;70&lt;/text&gt;&lt;text x=&quot;422.3&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;80-100&lt;/text&gt;&lt;rect x=&quot;462.9&quot; y=&quot;221.9&quot; width=&quot;81.3&quot; height=&quot;44.1&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;504.6&quot; y=&quot;215.9&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;35&lt;/text&gt;&lt;text x=&quot;504.6&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;100-120&lt;/text&gt;&lt;rect x=&quot;545.2&quot; y=&quot;228.2&quot; width=&quot;81.3&quot; height=&quot;37.8&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;586.9&quot; y=&quot;222.2&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;30&lt;/text&gt;&lt;text x=&quot;586.9&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;120+&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Orders by order value, 20-euro bins&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The X-axis is the value cut into ranges, the Y-axis the number of values in each. Here most orders land between 40 and 80 euros, and a tail of large orders runs to the right. NIST's handbook lists what a histogram reveals: the centre, the spread, skew, outliers, and whether there is more than one peak.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-different-from-a-bar-chart&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-different-from-a-bar-chart&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it different from a bar chart?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Point&lt;/th&gt;&lt;th&gt;Histogram&lt;/th&gt;&lt;th&gt;Bar chart&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;The bars are&lt;/td&gt;&lt;td&gt;ranges of one number&lt;/td&gt;&lt;td&gt;separate categories&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Gaps between bars&lt;/td&gt;&lt;td&gt;none, the ranges touch&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Order&lt;/td&gt;&lt;td&gt;fixed, low to high&lt;/td&gt;&lt;td&gt;free, often sorted by size&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;It answers&lt;/td&gt;&lt;td&gt;how are the values spread?&lt;/td&gt;&lt;td&gt;which category is bigger?&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Histogram or bar chart?&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;A quick test: if you could reorder the bars and lose nothing, it is a bar chart. If reordering breaks it, it is a histogram.&lt;/p&gt;
&lt;h2 id=&quot;how-many-bins-should-you-use&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-many-bins-should-you-use&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How many bins should you use?&lt;/h2&gt;
&lt;p&gt;There is no single right number; NIST mentions rules such as Scott's for the bin width. In practice, try three sizes. Too few bins hide the shape, too many turn it into noise. Keep the size where the shape is clear and stays when you nudge it.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Unequal bins.&lt;/strong&gt; &amp;quot;0-10, 10-50, 50+&amp;quot; makes the wide bin look tall only because it is wide.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Sorting the bars.&lt;/strong&gt; Sorting by count destroys the shape.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too few values.&lt;/strong&gt; With ten numbers, show the numbers.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://www.itl.nist.gov/div898/handbook/eda/section3/histogra.htm&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;NIST/SEMATECH e-Handbook of Statistical Methods: Histogram&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Power BI has no histogram visual, so you build one from bins: &lt;a href=&quot;/blog/histogram-power-bi/&quot;&gt;histograms in Power BI with bins and DAX&lt;/a&gt; shows both ways, with groups and with a DAX table. For categories instead of ranges, see &lt;a href=&quot;/blog/bar-chart-power-bi/&quot;&gt;bar charts in Power BI&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Four Claude Code keys that make SQL work faster</title>
    <link href="https://data.benibix.com/blog/claude-code-keys-for-sql-work/"/>
    <id>https://data.benibix.com/blog/claude-code-keys-for-sql-work/</id>
    <published>2026-11-03T09:00:00Z</published>
    <updated>2026-11-03T09:00:00Z</updated>
    <summary>@ points Claude at a file, ! runs a command yourself, Esc stops it, and Esc twice rewinds. How each one helps when the work is queries and schemas: point at the right table, run the query yourself, stop a wrong join early.</summary>
    <category term="AI"/>
    <category term="Claude Code"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; type &lt;strong&gt;&lt;code&gt;@&lt;/code&gt;&lt;/strong&gt; to point Claude at the exact file (&lt;code&gt;@schema/sales.sql&lt;/code&gt;), so it reads your real table definitions instead of guessing. Start a line with &lt;strong&gt;&lt;code&gt;!&lt;/code&gt;&lt;/strong&gt; to run a command yourself (&lt;code&gt;! sqlcmd -i check_totals.sql&lt;/code&gt;), and Claude sees the output. Press &lt;strong&gt;&lt;code&gt;Esc&lt;/code&gt;&lt;/strong&gt; to stop it the moment it heads for the wrong table, and &lt;strong&gt;&lt;code&gt;Esc&lt;/code&gt; twice&lt;/strong&gt; on an empty prompt to rewind to an earlier message and try again.&lt;/p&gt;
&lt;p&gt;SQL work goes wrong in quiet ways: a column name that almost exists, a join on the wrong key, a filter on the wrong date. These four keys keep you steering instead of waiting for a long answer that started wrong.&lt;/p&gt;
&lt;h2 id=&quot;what-does-each-key-do-in-sql-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-each-key-do-in-sql-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does each key do in SQL work?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Key&lt;/th&gt;&lt;th&gt;What it does&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;@&lt;/td&gt;&lt;td&gt;Points Claude at a file&lt;/td&gt;&lt;td&gt;&amp;quot;Use @schema/orders.sql and @schema/customers.sql to write the join&amp;quot;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;!&lt;/td&gt;&lt;td&gt;Runs a command yourself; Claude sees the output&lt;/td&gt;&lt;td&gt;! python run_query.py top_customers.sql&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Esc&lt;/td&gt;&lt;td&gt;Stops Claude mid-step&lt;/td&gt;&lt;td&gt;It starts editing the production view: stop, redirect&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Esc Esc&lt;/td&gt;&lt;td&gt;Opens the rewind menu to go back to an earlier message&lt;/td&gt;&lt;td&gt;Undo a long wrong turn and ask again&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Four keys, used on a data project&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;why-is-the-most-useful-one-for-data&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-is-the-most-useful-one-for-data&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why is @ the most useful one for data?&lt;/h2&gt;
&lt;p&gt;Because the most common AI SQL mistake is an invented column. With &lt;code&gt;@&lt;/code&gt; the table definition is in the conversation, so Claude writes &lt;code&gt;OrderDate&lt;/code&gt; because that is the column, not &lt;code&gt;order_date&lt;/code&gt; because that is common. Point at the schema file, the view you are changing and the test query, and leave the rest out.&lt;/p&gt;
&lt;h2 id=&quot;when-should-you-run-a-command-yourself-with&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-should-you-run-a-command-yourself-with&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When should you run a command yourself with !?&lt;/h2&gt;
&lt;p&gt;When you want to see the result before Claude acts on it: row counts, a quick total, a dry run. It is also how you show Claude a real error message instead of describing it.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;No schema in the folder.&lt;/strong&gt; Export your table definitions to files first, so there is something to point at.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Letting it run long.&lt;/strong&gt; If the first step is wrong, &lt;code&gt;Esc&lt;/code&gt; early; every later step builds on it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Rewinding without saying why.&lt;/strong&gt; After a rewind, add one sentence about what was wrong.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/interactive-mode&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Interactive mode&lt;/a&gt;, keyboard shortcuts and shell mode&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/checkpointing&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Checkpointing&lt;/a&gt;, the rewind menu&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Write the queries Claude checks with &lt;a href=&quot;/blog/sql-window-functions-explained/&quot;&gt;SQL window functions explained&lt;/a&gt;, and plan a bigger change with &lt;a href=&quot;/blog/claude-code-workflow-for-a-pipeline-change/&quot;&gt;the workflow for a pipeline change&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Subagents keep a big schema out of your main chat</title>
    <link href="https://data.benibix.com/blog/claude-code-subagents-for-big-schemas/"/>
    <id>https://data.benibix.com/blog/claude-code-subagents-for-big-schemas/</id>
    <published>2026-11-02T17:00:00Z</published>
    <updated>2026-11-02T17:00:00Z</updated>
    <summary>A data warehouse has hundreds of tables. Reading them all fills Claude Code's context before the real work starts. A subagent searches in its own context window and hands back only the summary. When to use one and how to write it.</summary>
    <category term="AI"/>
    <category term="Claude Code"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;subagent&lt;/strong&gt; is a helper Claude Code hands a job to. It works in &lt;strong&gt;its own context window&lt;/strong&gt; with its own tools, and only its &lt;strong&gt;summary comes back&lt;/strong&gt;. On a data project, send it to search: &amp;quot;find every view that uses the orders table and list the columns they use&amp;quot;. It reads the hundred files; your main conversation gets the twenty lines that matter. Make one with &lt;code&gt;/agents&lt;/code&gt;, or a Markdown file in &lt;code&gt;.claude/agents/&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Context is the working memory of a conversation. Ask Claude to read a whole warehouse's DDL and that memory is full of tables you will never touch, which makes the rest of the session slower and less precise.&lt;/p&gt;
&lt;h2 id=&quot;why-does-a-subagent-help-with-big-schemas&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-does-a-subagent-help-with-big-schemas&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why does a subagent help with big schemas?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;The question&lt;/b&gt;&lt;span&gt;&amp;quot;Which views depend on dbo.Orders, and which columns do they use?&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;red&quot;&gt;&lt;b&gt;Without a subagent&lt;/b&gt;&lt;span&gt;300 files read into the main chat; the context fills up&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;With a subagent&lt;/b&gt;&lt;span&gt;it reads in its own context and returns a 20-line list&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Where the reading happens&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-does-a-schema-search-subagent-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-schema-search-subagent-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a schema-search subagent look like?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot;&gt;&lt;code&gt;---
name: schema-scout
description: Use to find tables, views and columns in the warehouse schema files. Read-only.
tools: Read, Grep, Glob
---
Search the files under schema/ for what you are asked.
Answer with a list: object name, file path, and the columns that matter.
Never edit files. Do not include whole file contents in the answer.&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;tools&lt;/code&gt; line limits it to reading and searching, so it cannot change anything. The description says &lt;strong&gt;when&lt;/strong&gt; to use it, which is how Claude decides to hand it the job.&lt;/p&gt;
&lt;h2 id=&quot;when-is-it-worth-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-it-worth-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is it worth it?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Task&lt;/th&gt;&lt;th&gt;Subagent?&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Find every use of a column across 300 files&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Summarise what each of 40 stored procedures does&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Change one measure in one file&lt;/td&gt;&lt;td&gt;No: do it in the main chat&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;A question about one table you already pointed at with @&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/sub-agents&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Subagents&lt;/a&gt;, file locations, the description and the tools field&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Claude Code already has a read-only &lt;strong&gt;Explore&lt;/strong&gt; agent for searching; build your own when you want a fixed answer format. For an agent that reviews queries, see &lt;a href=&quot;/blog/custom-sql-reviewer-agent/&quot;&gt;a custom SQL reviewer agent&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>DAX math and trig functions: every one with an example</title>
    <link href="https://data.benibix.com/blog/math-and-trig-functions-dax-reference/"/>
    <id>https://data.benibix.com/blog/math-and-trig-functions-dax-reference/</id>
    <published>2026-11-02T12:00:00Z</published>
    <updated>2026-11-02T12:00:00Z</updated>
    <summary>A reference of all DAX math and trig functions, rounding (ROUND, ROUNDUP, ROUNDDOWN, MROUND, INT, TRUNC, CEILING, FLOOR, ISO.CEILING), division (DIVIDE, MOD, QUOTIENT), powers and logs, random numbers, CONVERT and CURRENCY, and the trigonometric functions, with examples.</summary>
    <category term="DAX"/>
    <category term="Reference"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; DAX math functions &lt;strong&gt;round&lt;/strong&gt; (&lt;code&gt;ROUND&lt;/code&gt;, &lt;code&gt;MROUND&lt;/code&gt;, &lt;code&gt;INT&lt;/code&gt;, &lt;code&gt;TRUNC&lt;/code&gt;, &lt;code&gt;CEILING&lt;/code&gt;, &lt;code&gt;FLOOR&lt;/code&gt;), &lt;strong&gt;divide&lt;/strong&gt; (&lt;code&gt;DIVIDE&lt;/code&gt;, &lt;code&gt;MOD&lt;/code&gt;, &lt;code&gt;QUOTIENT&lt;/code&gt;), raise &lt;strong&gt;powers and logs&lt;/strong&gt; (&lt;code&gt;POWER&lt;/code&gt;, &lt;code&gt;SQRT&lt;/code&gt;, &lt;code&gt;EXP&lt;/code&gt;, &lt;code&gt;LN&lt;/code&gt;, &lt;code&gt;LOG&lt;/code&gt;), make &lt;strong&gt;random&lt;/strong&gt; numbers (&lt;code&gt;RAND&lt;/code&gt;, &lt;code&gt;RANDBETWEEN&lt;/code&gt;), &lt;strong&gt;convert types&lt;/strong&gt; (&lt;code&gt;CONVERT&lt;/code&gt;, &lt;code&gt;CURRENCY&lt;/code&gt;) and do &lt;strong&gt;trigonometry&lt;/strong&gt; (&lt;code&gt;SIN&lt;/code&gt;, &lt;code&gt;COS&lt;/code&gt;, &lt;code&gt;ATAN&lt;/code&gt; and more). They work like Excel's functions of the same name, with one difference to remember: negative numbers round differently in &lt;code&gt;INT&lt;/code&gt; and &lt;code&gt;TRUNC&lt;/code&gt;, and in &lt;code&gt;CEILING&lt;/code&gt; and &lt;code&gt;ISO.CEILING&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-round&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-round&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions round?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;th&gt;Result&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;ROUND ( n, digits )&lt;/td&gt;&lt;td&gt;ROUND ( 1234.567, 1 )&lt;/td&gt;&lt;td&gt;1234.6&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ROUND with negative digits&lt;/td&gt;&lt;td&gt;ROUND ( 1234.567, -2 )&lt;/td&gt;&lt;td&gt;1200&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ROUNDUP ( n, digits )&lt;/td&gt;&lt;td&gt;ROUNDUP ( 1234.561, 2 )&lt;/td&gt;&lt;td&gt;1234.57&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ROUNDDOWN ( n, digits )&lt;/td&gt;&lt;td&gt;ROUNDDOWN ( 1234.567, 0 )&lt;/td&gt;&lt;td&gt;1234&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;MROUND ( n, multiple )&lt;/td&gt;&lt;td&gt;MROUND ( 1.3, 0.2 )&lt;/td&gt;&lt;td&gt;1.4&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;INT ( n )&lt;/td&gt;&lt;td&gt;INT ( -2.5 )&lt;/td&gt;&lt;td&gt;-3 (down to the next integer)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;TRUNC ( n [, digits] )&lt;/td&gt;&lt;td&gt;TRUNC ( -2.5 )&lt;/td&gt;&lt;td&gt;-2 (cuts the decimals)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CEILING ( n, significance )&lt;/td&gt;&lt;td&gt;CEILING ( 4.42, 0.05 )&lt;/td&gt;&lt;td&gt;4.45&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;FLOOR ( n, significance )&lt;/td&gt;&lt;td&gt;FLOOR ( 4.42, 0.05 )&lt;/td&gt;&lt;td&gt;4.4&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ISO.CEILING ( n [, significance] )&lt;/td&gt;&lt;td&gt;ISO.CEILING ( -4.3, 2 )&lt;/td&gt;&lt;td&gt;-4&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;EVEN, ODD&lt;/td&gt;&lt;td&gt;EVEN ( 1.5 ), ODD ( 1.5 )&lt;/td&gt;&lt;td&gt;2, 3&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Rounding 1234.567 and -2.5&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Microsoft notes &lt;code&gt;CEILING&lt;/code&gt; follows Excel and &lt;code&gt;ISO.CEILING&lt;/code&gt; the ISO definition; they agree for positive numbers. &lt;code&gt;MROUND&lt;/code&gt; errors when the number and the multiple have different signs.&lt;/p&gt;
&lt;p&gt;Round in the &lt;strong&gt;last step&lt;/strong&gt; of a measure, or better not at all and let the format string show fewer decimals: rounding each row before summing changes totals.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- price bands of 50 for a histogram column&lt;/i&gt;
Price Band = &lt;i class=&quot;f&quot;&gt;FLOOR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[List Price]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;50&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;which-functions-divide&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-divide&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions divide?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;th&gt;Result&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;DIVIDE ( a, b [, alt] )&lt;/td&gt;&lt;td&gt;DIVIDE ( 10, 0 )&lt;/td&gt;&lt;td&gt;BLANK&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;MOD ( n, d )&lt;/td&gt;&lt;td&gt;MOD ( 17, 5 )&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;MOD with a negative number&lt;/td&gt;&lt;td&gt;MOD ( -3, 2 )&lt;/td&gt;&lt;td&gt;1 (the sign of the divisor)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;QUOTIENT ( a, b )&lt;/td&gt;&lt;td&gt;QUOTIENT ( 17, 5 )&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;GCD, LCM&lt;/td&gt;&lt;td&gt;GCD ( 12, 18 ), LCM ( 4, 6 )&lt;/td&gt;&lt;td&gt;6, 12&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Division&lt;/figcaption&gt;&lt;/figure&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- every 7th day flag&lt;/i&gt;
Is Week Start = &lt;i class=&quot;f&quot;&gt;MOD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Day Index]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;7&lt;/i&gt; ) = &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;

&lt;i class=&quot;c&quot;&gt;-- hours and minutes from minutes&lt;/i&gt;
Duration Label = &lt;i class=&quot;f&quot;&gt;QUOTIENT&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Minutes]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;60&lt;/i&gt; ) &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot;h &amp;quot;&lt;/i&gt; &amp;amp; &lt;i class=&quot;f&quot;&gt;MOD&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Minutes]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;60&lt;/i&gt; ) &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot;m&amp;quot;&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;In depth: &lt;a href=&quot;/blog/divide-dax/&quot;&gt;DIVIDE&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-do-powers-logs-and-signs&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-do-powers-logs-and-signs&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions do powers, logs and signs?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;th&gt;Result&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;POWER ( n, p ) or n ^ p&lt;/td&gt;&lt;td&gt;POWER ( 1.05, 3 )&lt;/td&gt;&lt;td&gt;1.157625&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SQRT ( n )&lt;/td&gt;&lt;td&gt;SQRT ( 16 )&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SQRTPI ( n )&lt;/td&gt;&lt;td&gt;SQRTPI ( 1 )&lt;/td&gt;&lt;td&gt;1.7725 (square root of n times pi)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;EXP ( n )&lt;/td&gt;&lt;td&gt;EXP ( 1 )&lt;/td&gt;&lt;td&gt;2.71828&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;LN ( n )&lt;/td&gt;&lt;td&gt;LN ( EXP ( 2 ) )&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;LOG ( n [, base] )&lt;/td&gt;&lt;td&gt;LOG ( 8, 2 )&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;LOG10 ( n )&lt;/td&gt;&lt;td&gt;LOG10 ( 1000 )&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ABS ( n )&lt;/td&gt;&lt;td&gt;ABS ( -12 )&lt;/td&gt;&lt;td&gt;12&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SIGN ( n )&lt;/td&gt;&lt;td&gt;SIGN ( -12 )&lt;/td&gt;&lt;td&gt;-1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;FACT ( n )&lt;/td&gt;&lt;td&gt;FACT ( 5 )&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PI ( )&lt;/td&gt;&lt;td&gt;PI ( )&lt;/td&gt;&lt;td&gt;3.14159&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Powers, logs and signs&lt;/figcaption&gt;&lt;/figure&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- compound annual growth rate over the selected years&lt;/i&gt;
CAGR =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; FirstY = &lt;i class=&quot;m&quot;&gt;[First Year Revenue]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; LastY = &lt;i class=&quot;m&quot;&gt;[Last Year Revenue]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Years = &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt; ) - &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( Years &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;POWER&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( LastY, FirstY ), &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; / Years ) - &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;which-functions-convert-randomise-and-do-trigonometry&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-convert-randomise-and-do-trigonometry&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions convert, randomise and do trigonometry?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;th&gt;Result&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;CONVERT ( value, type )&lt;/td&gt;&lt;td&gt;CONVERT ( &amp;quot;42&amp;quot;, INTEGER )&lt;/td&gt;&lt;td&gt;42&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CURRENCY ( value )&lt;/td&gt;&lt;td&gt;CURRENCY ( 1234.56789 )&lt;/td&gt;&lt;td&gt;1234.5679 (4 decimals)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;RAND ( )&lt;/td&gt;&lt;td&gt;RAND ( )&lt;/td&gt;&lt;td&gt;a number from 0 to under 1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;RANDBETWEEN ( a, b )&lt;/td&gt;&lt;td&gt;RANDBETWEEN ( 1, 6 )&lt;/td&gt;&lt;td&gt;1 to 6&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DEGREES, RADIANS&lt;/td&gt;&lt;td&gt;DEGREES ( PI ( ) )&lt;/td&gt;&lt;td&gt;180&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SIN, COS, TAN, COT&lt;/td&gt;&lt;td&gt;SIN ( RADIANS ( 30 ) )&lt;/td&gt;&lt;td&gt;0.5&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ASIN, ACOS, ATAN, ACOT&lt;/td&gt;&lt;td&gt;ATAN ( 1 )&lt;/td&gt;&lt;td&gt;0.7854&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SINH, COSH, TANH, COTH and inverses&lt;/td&gt;&lt;td&gt;COSH ( 0 )&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Other math functions&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;code&gt;CONVERT&lt;/code&gt; types are BOOLEAN, CURRENCY, DATETIME, DOUBLE, INTEGER and STRING; it errors when the value cannot convert. Trigonometry is rare in reports; one real use is distance between two coordinates (the haversine formula) for store and customer locations.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;INT on negatives.&lt;/strong&gt; &lt;code&gt;INT ( -2.5 )&lt;/code&gt; is -3; use &lt;code&gt;TRUNC&lt;/code&gt; to cut toward zero.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Rounding before summing.&lt;/strong&gt; Sum of rounded rows differs from the rounded sum; round once at the end, or format instead.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;RAND in calculated columns.&lt;/strong&gt; Changes on every refresh; seed data in Power Query instead.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;MROUND with mixed signs.&lt;/strong&gt; An error; keep number and multiple the same sign.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/math-and-trig-functions-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Math and Trig functions (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/ceiling-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: CEILING function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/convert-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: CONVERT function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Check your measures for &lt;code&gt;ROUND&lt;/code&gt; inside an iterator and move the rounding to the format string. &lt;a href=&quot;/blog/statistical-functions-dax-reference/&quot;&gt;Statistical functions&lt;/a&gt; cover medians, percentiles and distributions.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Fill rate and stockout rate: formulas and DAX</title>
    <link href="https://data.benibix.com/blog/fill-rate-and-stockout-kpi/"/>
    <id>https://data.benibix.com/blog/fill-rate-and-stockout-kpi/</id>
    <published>2026-11-02T12:00:00Z</published>
    <updated>2026-11-02T12:00:00Z</updated>
    <summary>How to calculate fill rate by units, lines and orders, stockout rate as the share of product-days out of stock, lost sales estimates, the link to inventory turnover, the DAX on order lines and daily stock snapshots, and a heat map of stockouts by product and week.</summary>
    <category term="KPIs"/>
    <category term="Operations"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;fill rate&lt;/strong&gt; is the share of demand shipped from stock at the first attempt. &lt;strong&gt;Unit fill rate&lt;/strong&gt; = units shipped / units ordered; &lt;strong&gt;line fill rate&lt;/strong&gt; = lines shipped complete / lines ordered; &lt;strong&gt;order fill rate&lt;/strong&gt; = orders shipped complete / orders, the strictest. &lt;strong&gt;Stockout rate&lt;/strong&gt; = product-days with zero stock / all product-days (for products meant to be in stock). With 9,700 of 10,000 units shipped, unit fill rate is &lt;strong&gt;97%&lt;/strong&gt;, while order fill rate can be far lower, because one missing line spoils a whole order.&lt;/p&gt;
&lt;p&gt;Fill rate is the customer's view of inventory, the counterpart to &lt;a href=&quot;/blog/inventory-turnover-kpi/&quot;&gt;inventory turnover&lt;/a&gt;: turnover pushes stock down, fill rate shows when it went too low.&lt;/p&gt;
&lt;h2 id=&quot;how-do-the-three-fill-rates-differ&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-the-three-fill-rates-differ&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do the three fill rates differ?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Level&lt;/th&gt;&lt;th&gt;Ordered&lt;/th&gt;&lt;th&gt;Shipped complete&lt;/th&gt;&lt;th&gt;Fill rate&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Units&lt;/td&gt;&lt;td&gt;10,000&lt;/td&gt;&lt;td&gt;9,700&lt;/td&gt;&lt;td&gt;97.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Lines&lt;/td&gt;&lt;td&gt;2,500&lt;/td&gt;&lt;td&gt;2,350&lt;/td&gt;&lt;td&gt;94.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Orders&lt;/td&gt;&lt;td&gt;1,000&lt;/td&gt;&lt;td&gt;870&lt;/td&gt;&lt;td&gt;87.0%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;September, 1,000 orders with 2,500 lines and 10,000 units&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The 300 missing units hit 150 lines spread over 130 orders: 3% of units become 13% of orders.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;line&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;Unit fill rate&lt;/li&gt;&lt;li class=&quot;k1&quot;&gt;Order fill rate&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;line chart: W36 98.1, 90.5; W37 97.5, 88.2; W38 96.2, 84.9; W39 96.8, 86.4&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;626&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;20&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;626&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;40&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;626&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;60&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;626&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;80&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;626&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;polyline points=&quot;52,37.9 243.3,43.7 434.7,52.1 626,48.3&quot; class=&quot;ln k1&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;37.9&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;243.3&quot; cy=&quot;43.7&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;434.7&quot; cy=&quot;52.1&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;48.3&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;polyline points=&quot;52,18.8 243.3,20.3 434.7,23.6 626,22.1&quot; class=&quot;ln k0&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;18.8&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;243.3&quot; cy=&quot;20.3&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;434.7&quot; cy=&quot;23.6&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;22.1&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;text x=&quot;52&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;W36&lt;/text&gt;&lt;text x=&quot;243.3&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;W37&lt;/text&gt;&lt;text x=&quot;434.7&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;W38&lt;/text&gt;&lt;text x=&quot;626&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;W39&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Unit and order fill rate by week (%)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;From order lines with Ordered Qty and Shipped Qty (shipped at the first attempt):&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Units Ordered = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( OrderLines&lt;i class=&quot;m&quot;&gt;[Ordered Qty]&lt;/i&gt; )
Units Shipped = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( OrderLines&lt;i class=&quot;m&quot;&gt;[Shipped Qty]&lt;/i&gt; )
Unit Fill Rate = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Units Shipped]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Units Ordered]&lt;/i&gt; )

Lines Complete =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( OrderLines ), &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( OrderLines, OrderLines&lt;i class=&quot;m&quot;&gt;[Shipped Qty]&lt;/i&gt; &amp;gt;= OrderLines&lt;i class=&quot;m&quot;&gt;[Ordered Qty]&lt;/i&gt; ) )
Line Fill Rate = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Lines Complete]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( OrderLines ) )

Order Fill Rate =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Orders = &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( OrderLines&lt;i class=&quot;m&quot;&gt;[Order ID]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Complete = &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( Orders, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Lines Complete]&lt;/i&gt; = &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( OrderLines ) ) )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Complete ), &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Orders ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-do-you-measure-stockouts&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-measure-stockouts&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you measure stockouts?&lt;/h2&gt;
&lt;p&gt;From daily stock snapshots (one row per product per day, including zero stock), for active products:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Product Days = &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Stock )
Stockout Days = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Product Days]&lt;/i&gt;, Stock&lt;i class=&quot;m&quot;&gt;[On Hand]&lt;/i&gt; &amp;lt;= &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; )
Stockout Rate = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Stockout Days]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Product Days]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- rough lost sales: average daily units on days in stock × days out of stock&lt;/i&gt;
Lost Units Estimate =
&lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ),
    &lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; InStockDates = &lt;i class=&quot;f&quot;&gt;CALCULATETABLE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Stock&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), Stock&lt;i class=&quot;m&quot;&gt;[On Hand]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; )
    &lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; UnitsInStock = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Quantity]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;TREATAS&lt;/i&gt; ( InStockDates, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
    &lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( UnitsInStock, &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( InStockDates ) ) * &lt;i class=&quot;m&quot;&gt;[Stockout Days]&lt;/i&gt;
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;For each product, &lt;code&gt;InStockDates&lt;/code&gt; lists the days it had stock, and &lt;a href=&quot;/blog/treatas-dax/&quot;&gt;TREATAS&lt;/a&gt; applies them to Sales through the Date table, so sales count only on in-stock days. A matrix of products by week with Stockout Days and a red colour scale shows patterns, such as the same products running out every month end.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Unit fill rate only.&lt;/strong&gt; Looks fine while many orders are incomplete; show order fill rate.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Backorders shipped later counted as filled.&lt;/strong&gt; Fill rate is about the first shipment.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Missing zero-stock rows.&lt;/strong&gt; If snapshots skip products with no stock, stockouts disappear; generate a row per product per day.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Discontinued products.&lt;/strong&gt; Leave them out of stockout rate, or it rises for products no one plans to stock.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/filter-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: FILTER function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/treatas-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: TREATAS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Apply conditional formatting in tables and matrixes&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Report unit, line and order fill rate together by week, then the stockout heat map for the products behind the gap. &lt;a href=&quot;/blog/forecast-accuracy-mape-kpi/&quot;&gt;Forecast accuracy&lt;/a&gt; is often the cause.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>IF and SWITCH in DAX: conditions with examples</title>
    <link href="https://data.benibix.com/blog/if-switch-dax/"/>
    <id>https://data.benibix.com/blog/if-switch-dax/</id>
    <published>2026-11-02T12:00:00Z</published>
    <updated>2026-11-02T12:00:00Z</updated>
    <summary>How IF, IF.EAGER and SWITCH work in DAX, nested conditions, SWITCH TRUE for ranges, measure switching from a slicer, data types of the result, AND, OR, NOT and IN, COALESCE and IFERROR, blanks in conditions, and performance.</summary>
    <category term="DAX"/>
    <category term="Logic and information"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;code&gt;IF ( condition, then [, else] )&lt;/code&gt; returns one of two results; without &lt;code&gt;else&lt;/code&gt; it returns BLANK. &lt;code&gt;SWITCH ( expression, value1, result1, value2, result2, ..., else )&lt;/code&gt; compares one expression with many values, and &lt;strong&gt;&lt;code&gt;SWITCH ( TRUE (), condition1, result1, condition2, result2, ..., else )&lt;/code&gt;&lt;/strong&gt; tests conditions in order, which replaces nested &lt;code&gt;IF&lt;/code&gt;s for ranges and bands. Combine tests with &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; (and), &lt;code&gt;||&lt;/code&gt; (or), &lt;code&gt;NOT&lt;/code&gt; and &lt;code&gt;IN { ... }&lt;/code&gt;. &lt;code&gt;IF.EAGER&lt;/code&gt; computes both branches up front, which can be faster in some cases.&lt;/p&gt;
&lt;p&gt;Status labels, price bands, traffic lights and measure switches are all conditions. Written as five nested &lt;code&gt;IF&lt;/code&gt;s they are hard to read and easy to break; as one &lt;code&gt;SWITCH ( TRUE () )&lt;/code&gt; they read like a table.&lt;/p&gt;
&lt;h2 id=&quot;what-does-each-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-each-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does each look like?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- IF: two outcomes&lt;/i&gt;
Margin Status = &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Margin %]&lt;/i&gt; &amp;gt;= &lt;i class=&quot;n&quot;&gt;0.3&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Healthy&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Low&amp;quot;&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- SWITCH: one expression, many values&lt;/i&gt;
Region Group =
&lt;i class=&quot;f&quot;&gt;SWITCH&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Country]&lt;/i&gt; ),
    &lt;i class=&quot;s&quot;&gt;&amp;quot;DE&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;DACH&amp;quot;&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;AT&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;DACH&amp;quot;&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;CH&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;DACH&amp;quot;&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;FR&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;West&amp;quot;&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Other&amp;quot;&lt;/i&gt;
)

&lt;i class=&quot;c&quot;&gt;-- SWITCH TRUE: ordered conditions for ranges&lt;/i&gt;
Attainment Band =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; A = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Target]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;SWITCH&lt;/i&gt; (
        &lt;i class=&quot;k&quot;&gt;TRUE&lt;/i&gt; (),
        &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( A ), &lt;i class=&quot;f&quot;&gt;BLANK&lt;/i&gt; (),
        A &amp;gt;= &lt;i class=&quot;n&quot;&gt;1.1&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Above plan&amp;quot;&lt;/i&gt;,
        A &amp;gt;= &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;On plan&amp;quot;&lt;/i&gt;,
        A &amp;gt;= &lt;i class=&quot;n&quot;&gt;0.9&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Close&amp;quot;&lt;/i&gt;,
        &lt;i class=&quot;s&quot;&gt;&amp;quot;Behind&amp;quot;&lt;/i&gt;
    )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;SWITCH ( TRUE () )&lt;/code&gt; returns the result of the &lt;strong&gt;first&lt;/strong&gt; condition that is TRUE, so order matters: test the highest band first.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-combine-conditions&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-combine-conditions&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you combine conditions?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Write&lt;/th&gt;&lt;th&gt;Means&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&amp;amp;&amp;amp; or AND ( a, b )&lt;/td&gt;&lt;td&gt;both true&lt;/td&gt;&lt;td&gt;[Revenue] &amp;gt; 0 &amp;amp;&amp;amp; [Margin] &amp;gt; 0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;|| or OR ( a, b )&lt;/td&gt;&lt;td&gt;at least one true&lt;/td&gt;&lt;td&gt;Customer[Country] = &amp;quot;DE&amp;quot; || Customer[Country] = &amp;quot;AT&amp;quot;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;NOT ( x )&lt;/td&gt;&lt;td&gt;the opposite&lt;/td&gt;&lt;td&gt;NOT ISBLANK ( [Revenue LY] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;IN { ... }&lt;/td&gt;&lt;td&gt;equals one of a list&lt;/td&gt;&lt;td&gt;Customer[Country] IN { &amp;quot;DE&amp;quot;, &amp;quot;AT&amp;quot;, &amp;quot;CH&amp;quot; }&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Logical operators and functions&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;code&gt;AND&lt;/code&gt; and &lt;code&gt;OR&lt;/code&gt; take exactly two arguments; &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; and &lt;code&gt;||&lt;/code&gt; can be chained.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-switch-measures-with-a-slicer&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-switch-measures-with-a-slicer&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you switch measures with a slicer?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Metric =
&lt;i class=&quot;f&quot;&gt;SWITCH&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Metric Picker'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Metric]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Revenue&amp;quot;&lt;/i&gt; ),
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Revenue&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Margin&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Margin]&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Orders&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Orders]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;BLANK&lt;/i&gt; ()
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;'Metric Picker'&lt;/code&gt; is a small disconnected table of names. &lt;a href=&quot;/blog/field-parameters-power-bi/&quot;&gt;Field parameters&lt;/a&gt; now do this with formats included; the &lt;code&gt;SWITCH&lt;/code&gt; version is still useful inside other measures.&lt;/p&gt;
&lt;h2 id=&quot;what-type-does-the-result-have&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-type-does-the-result-have&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What type does the result have?&lt;/h2&gt;
&lt;p&gt;Microsoft notes that &lt;code&gt;IF&lt;/code&gt; can return a variant if the branches have different types, and tries to return one type when both are numeric: &lt;code&gt;IF ( condition, 1.0, 0 )&lt;/code&gt; returns decimals only. Mixing text and numbers (&lt;code&gt;IF ( x, &amp;quot;n/a&amp;quot;, 0 )&lt;/code&gt;) makes the result a variant, which visuals cannot sum and which can break sorting; return BLANK instead of a text placeholder in numeric measures.&lt;/p&gt;
&lt;h2 id=&quot;what-about-errors-and-blanks&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-about-errors-and-blanks&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What about errors and blanks?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- first non-blank&lt;/i&gt;
Revenue or Zero = &lt;i class=&quot;f&quot;&gt;COALESCE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- catch an error (use sparingly)&lt;/i&gt;
Rate Safe = &lt;i class=&quot;f&quot;&gt;IFERROR&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUE&lt;/i&gt; ( Settings&lt;i class=&quot;m&quot;&gt;[Rate Text]&lt;/i&gt; ), &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;In conditions, BLANK behaves like 0 or FALSE: &lt;code&gt;IF ( [Revenue] &amp;gt; 0, ... )&lt;/code&gt; is FALSE for BLANK, and &lt;code&gt;IF ( [Revenue] = 0, ... )&lt;/code&gt; is TRUE for BLANK. Test &lt;code&gt;ISBLANK&lt;/code&gt; first when it matters (see &lt;a href=&quot;/blog/dax-blank-handling/&quot;&gt;BLANK handling&lt;/a&gt;). &lt;code&gt;IFERROR&lt;/code&gt; hides problems and can be slow; prefer &lt;code&gt;DIVIDE&lt;/code&gt; and checks that avoid the error.&lt;/p&gt;
&lt;h2 id=&quot;is-if-eager-faster&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#is-if-eager-faster&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Is IF.EAGER faster?&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;IF&lt;/code&gt; evaluates the branch the condition picks. &lt;code&gt;IF.EAGER&lt;/code&gt; evaluates both branches first, like two variables, then picks one. Microsoft says the result is the same and performance may differ because of different execution plans. Try it only when a profiler shows &lt;code&gt;IF&lt;/code&gt; is slow, typically when both branches use the same expensive measure.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Nested IFs ten deep.&lt;/strong&gt; Use &lt;code&gt;SWITCH ( TRUE () )&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Band order.&lt;/strong&gt; Test the strictest condition first in &lt;code&gt;SWITCH ( TRUE () )&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Text in numeric measures.&lt;/strong&gt; &amp;quot;n/a&amp;quot; turns the measure into a variant; use BLANK.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;IF without else.&lt;/strong&gt; Returns BLANK, which is often right, but say so in the measure's description.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Conditions on columns in measures.&lt;/strong&gt; &lt;code&gt;IF ( Sales[Amount] &amp;gt; 100, ... )&lt;/code&gt; in a measure has no row; use an aggregate or an iterator.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/if-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: IF function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/switch-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SWITCH function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/if-eager-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: IF.EAGER function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Find your deepest nested &lt;code&gt;IF&lt;/code&gt; and rewrite it as &lt;code&gt;SWITCH ( TRUE () )&lt;/code&gt; with the bands in order. &lt;a href=&quot;/blog/divide-dax/&quot;&gt;DIVIDE&lt;/a&gt; handles the most common condition of all: a zero denominator.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Microsoft exam retake policy: waits, limits and waivers</title>
    <link href="https://data.benibix.com/blog/microsoft-exam-retake-policy/"/>
    <id>https://data.benibix.com/blog/microsoft-exam-retake-policy/</id>
    <published>2026-11-02T12:00:00Z</published>
    <updated>2026-11-02T12:00:00Z</updated>
    <summary>The Microsoft certification exam retake rules in 2026, 24 hours after the first fail, 14 days between later attempts, at most five tries in 12 months, paying for each retake, the waiver for technical failures, and the different rules for renewal assessments and beta exams.</summary>
    <category term="Exams"/>
    <category term="Exam tips"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; after a failed attempt at a role-based, specialty or fundamentals exam, wait &lt;strong&gt;24 hours&lt;/strong&gt; before the second try and &lt;strong&gt;14 days&lt;/strong&gt; before each try after that. You can take one exam at most &lt;strong&gt;five times in 12 months&lt;/strong&gt; from your first attempt, and you &lt;strong&gt;pay&lt;/strong&gt; for each retake. You cannot retake an exam you passed unless the certification has expired. Renewal assessments are different: unlimited, free, and immediate for the second try.&lt;/p&gt;
&lt;h2 id=&quot;how-do-the-waits-add-up&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-the-waits-add-up&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do the waits add up?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Attempt&lt;/th&gt;&lt;th&gt;Earliest date&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1st&lt;/td&gt;&lt;td&gt;day 0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2nd&lt;/td&gt;&lt;td&gt;24 hours after the 1st&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;3rd&lt;/td&gt;&lt;td&gt;14 days after the 2nd&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;4th&lt;/td&gt;&lt;td&gt;14 days after the 3rd&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;5th&lt;/td&gt;&lt;td&gt;14 days after the 4th&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;After a 5th fail&lt;/td&gt;&lt;td&gt;12 months after the 1st attempt&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Attempts on one exam&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;can-the-wait-be-waived&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#can-the-wait-be-waived&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Can the wait be waived?&lt;/h2&gt;
&lt;p&gt;Only for technical failures: if your internet connection or equipment failed during the exam and &lt;strong&gt;Pearson VUE opened a case&lt;/strong&gt;, you can ask Microsoft's certification support to waive the waiting period, quoting the case number. No other reason qualifies.&lt;/p&gt;
&lt;h2 id=&quot;how-do-other-exams-differ&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-other-exams-differ&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do other exams differ?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Kind&lt;/th&gt;&lt;th&gt;Rule&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Role-based, specialty, fundamentals&lt;/td&gt;&lt;td&gt;24 hours, then 14 days, five tries in 12 months, paid&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Renewal assessment&lt;/td&gt;&lt;td&gt;unlimited, free; second try at once, then 24 hours between tries&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Microsoft Office Specialist&lt;/td&gt;&lt;td&gt;24 hours, then 48 hours; no yearly limit; may retake after passing&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Microsoft Certified Educator&lt;/td&gt;&lt;td&gt;24 hours, then 7 days; five tries in 12 months&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Beta exam&lt;/td&gt;&lt;td&gt;once during the beta; a fail means waiting for the live exam&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Retake rules by kind&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-use-the-wait-well&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-use-the-wait-well&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you use the wait well?&lt;/h2&gt;
&lt;p&gt;Fourteen days is enough to fix two weak areas properly. Read the bars on &lt;a href=&quot;/blog/microsoft-exam-score-report/&quot;&gt;your score report&lt;/a&gt;, practise those skills hands-on, and take the free practice assessment again before booking.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/support/retake-policy&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Exam retake policy&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/beta-exams&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Beta exams&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;If you just failed, open the score report first. If you have not taken the exam yet, &lt;a href=&quot;/blog/how-to-book-a-microsoft-exam/&quot;&gt;book it&lt;/a&gt; with a date that leaves two weeks spare before any deadline you have.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>New vs returning customers in Power BI with DAX</title>
    <link href="https://data.benibix.com/blog/new-vs-returning-customers-kpi/"/>
    <id>https://data.benibix.com/blog/new-vs-returning-customers-kpi/</id>
    <published>2026-11-02T12:00:00Z</published>
    <updated>2026-11-02T12:00:00Z</updated>
    <summary>How to split customers and revenue into new and returning for any period, the definition by first purchase date, new customer share, revenue from returning customers, reactivated customers, the DAX with a dynamic period, a stacked column chart, and common definition mistakes.</summary>
    <category term="KPIs"/>
    <category term="Customers"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; in a period, a customer is &lt;strong&gt;new&lt;/strong&gt; if their first purchase ever falls in that period, and &lt;strong&gt;returning&lt;/strong&gt; if they bought in the period and had bought before it. Optionally split returning into &lt;strong&gt;active&lt;/strong&gt; (bought in the last 12 months before) and &lt;strong&gt;reactivated&lt;/strong&gt; (came back after a longer gap). Count customers and revenue in each group: a business growing only through new customers while returning revenue shrinks has a retention problem the total hides.&lt;/p&gt;
&lt;p&gt;The split has to work for any period the reader picks: a month, a quarter, a custom range. That rules out a fixed &amp;quot;is new&amp;quot; column and calls for measures.&lt;/p&gt;
&lt;h2 id=&quot;how-does-the-split-look&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-the-split-look&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does the split look?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;stacked-column&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;New&lt;/li&gt;&lt;li class=&quot;k1&quot;&gt;Returning&lt;/li&gt;&lt;li class=&quot;k2&quot;&gt;Reactivated&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;stacked column chart: Q1 220, 610, 40; Q2 260, 590, 35; Q3 310, 570, 30&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;628&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;200&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;628&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;400&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;628&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;600&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;628&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;800&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;628&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;1,000&lt;/text&gt;&lt;rect x=&quot;82.7&quot; y=&quot;210.6&quot; width=&quot;130.6&quot; height=&quot;55.4&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;82.7&quot; y=&quot;56.8&quot; width=&quot;130.6&quot; height=&quot;153.7&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;rect x=&quot;82.7&quot; y=&quot;46.8&quot; width=&quot;130.6&quot; height=&quot;10.1&quot; rx=&quot;3&quot; class=&quot;m k2&quot;/&gt;&lt;text x=&quot;148&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q1&lt;/text&gt;&lt;rect x=&quot;274.7&quot; y=&quot;200.5&quot; width=&quot;130.6&quot; height=&quot;65.5&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;274.7&quot; y=&quot;51.8&quot; width=&quot;130.6&quot; height=&quot;148.7&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;rect x=&quot;274.7&quot; y=&quot;43&quot; width=&quot;130.6&quot; height=&quot;8.8&quot; rx=&quot;3&quot; class=&quot;m k2&quot;/&gt;&lt;text x=&quot;340&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q2&lt;/text&gt;&lt;rect x=&quot;466.7&quot; y=&quot;187.9&quot; width=&quot;130.6&quot; height=&quot;78.1&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;466.7&quot; y=&quot;44.2&quot; width=&quot;130.6&quot; height=&quot;143.6&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;rect x=&quot;466.7&quot; y=&quot;36.7&quot; width=&quot;130.6&quot; height=&quot;7.6&quot; rx=&quot;3&quot; class=&quot;m k2&quot;/&gt;&lt;text x=&quot;532&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q3&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Revenue by customer type (k)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Group&lt;/th&gt;&lt;th&gt;Customers&lt;/th&gt;&lt;th&gt;Revenue (k)&lt;/th&gt;&lt;th&gt;Revenue per customer&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;New&lt;/td&gt;&lt;td&gt;2,480&lt;/td&gt;&lt;td&gt;310&lt;/td&gt;&lt;td&gt;125&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Returning (active)&lt;/td&gt;&lt;td&gt;3,170&lt;/td&gt;&lt;td&gt;570&lt;/td&gt;&lt;td&gt;180&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Reactivated&lt;/td&gt;&lt;td&gt;260&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;td&gt;115&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;All&lt;/td&gt;&lt;td&gt;5,910&lt;/td&gt;&lt;td&gt;910&lt;/td&gt;&lt;td&gt;154&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Q3&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Total revenue grows slightly each quarter, but returning revenue falls from 610 to 570: growth depends on ever more new customers.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;Each customer's first purchase ever is &lt;code&gt;CALCULATE ( MIN ( Sales[Date] ), ALL ( 'Date' ) )&lt;/code&gt; evaluated for that customer. For the selected period:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Customers = &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Customer ID]&lt;/i&gt; )

New Customers =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; PStart = &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; PEnd = &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; (
            &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Customer ID]&lt;/i&gt; ),
            &lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; F = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt; ) )
            &lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; F &amp;gt;= PStart &amp;amp;&amp;amp; F &amp;lt;= PEnd
        )
    )

Returning Customers = &lt;i class=&quot;m&quot;&gt;[Customers]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[New Customers]&lt;/i&gt;

New Customer Revenue =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; PStart = &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Customer ID]&lt;/i&gt; ),
        &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt; ) ) &amp;gt;= PStart, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )
    )

Returning Customer Revenue = &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[New Customer Revenue]&lt;/i&gt;

New Customer Share = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[New Customers]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Customers]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Inside the iterator, &lt;code&gt;CALCULATE&lt;/code&gt; turns the current customer ID into a filter (context transition) and &lt;code&gt;ALL ( 'Date' )&lt;/code&gt; removes the period, so it returns that customer's first purchase ever. A calculated column on the Customer table, &lt;code&gt;First Purchase Date = CALCULATE ( MIN ( Sales[Date] ) )&lt;/code&gt;, is the faster alternative on large data. For reactivated customers, add a test that the customer had no purchase in the 365 days before &lt;code&gt;PStart&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Reactivated Customers =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; PStart = &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; (
            &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Customer ID]&lt;/i&gt; ),
            &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt; ) ) &amp;lt; PStart
                &amp;amp;&amp;amp; &lt;i class=&quot;f&quot;&gt;ISEMPTY&lt;/i&gt; (
                    &lt;i class=&quot;f&quot;&gt;CALCULATETABLE&lt;/i&gt; ( Sales, &lt;i class=&quot;f&quot;&gt;DATESBETWEEN&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, PStart - &lt;i class=&quot;n&quot;&gt;365&lt;/i&gt;, PStart - &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; ) )
                )
        )
    )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;which-definitions-must-be-settled&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-definitions-must-be-settled&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which definitions must be settled?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;What is &amp;quot;first purchase&amp;quot;&lt;/strong&gt;: the first order ever, or the first in this channel or brand?&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Returns&lt;/strong&gt;: does a customer whose only order was returned count?&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Customer identity&lt;/strong&gt;: guest checkouts and several accounts per person turn returning customers into new ones.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Reactivation gap&lt;/strong&gt;: 12 months suits most shops; use the buying cycle.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A fixed &amp;quot;new&amp;quot; flag by calendar year.&lt;/strong&gt; Breaks when the reader selects a quarter; compute per period.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;New customers in a long period.&lt;/strong&gt; In a full year, someone who first bought in January and again in June is &amp;quot;new&amp;quot; for the year; that is correct for the year, but surprising next to monthly numbers.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Data that starts late.&lt;/strong&gt; If the history starts in 2024, every customer looks new in 2024; hide periods without a full look-back.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/filter-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: FILTER function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/isempty-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: ISEMPTY function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/datesbetween-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DATESBETWEEN function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Build New Customers and New Customer Revenue and show new and returning revenue as a stacked column chart by quarter. &lt;a href=&quot;/blog/customer-acquisition-cost-kpi/&quot;&gt;Customer acquisition cost&lt;/a&gt; puts a price on each new customer.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Ribbon charts in Power BI: who leads each period</title>
    <link href="https://data.benibix.com/blog/ribbon-chart-power-bi/"/>
    <id>https://data.benibix.com/blog/ribbon-chart-power-bi/</id>
    <published>2026-11-02T12:00:00Z</published>
    <updated>2026-11-02T12:00:00Z</updated>
    <summary>What a ribbon chart in Power BI shows, how it ranks categories in every period with the largest on top, the fields it needs, its format options, a DAX rank to label it, and when a line chart is clearer.</summary>
    <category term="Visuals"/>
    <category term="Comparison"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;ribbon chart&lt;/strong&gt; is a stacked column chart that sorts each column by value, largest on top, and joins the same category across columns with a ribbon. It answers &amp;quot;who is number one in each period, and when did the order change?&amp;quot; It needs a time field on the &lt;strong&gt;X-axis&lt;/strong&gt;, a category in &lt;strong&gt;Legend&lt;/strong&gt; and a measure on the &lt;strong&gt;Y-axis&lt;/strong&gt;. It has no Y-axis labels, so turn on data labels when the numbers matter.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The chart, part by part:&lt;/strong&gt; &lt;a href=&quot;/visuals/ribbon-chart/&quot;&gt;What is a ribbon chart?&lt;/a&gt; draws its parts and shows how to read one, its kinds and the mistakes to avoid.&lt;/p&gt;
&lt;p&gt;A stacked column chart keeps the series in one fixed order, so a category that climbs from fourth to first is hard to spot. In a ribbon chart the climbing ribbon crosses the others: the change of rank is the picture.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-ribbon-chart-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-ribbon-chart-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a ribbon chart look like?&lt;/h2&gt;
&lt;p&gt;Monthly sales of three product lines. Alpha leads in January, Beta takes over in February and March, and Gamma ends on top in April:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;ribbon&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;Alpha&lt;/li&gt;&lt;li class=&quot;k1&quot;&gt;Beta&lt;/li&gt;&lt;li class=&quot;k2&quot;&gt;Gamma&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;ribbon chart: Jan 30, 20, 10; Feb 25, 28, 12; Mar 18, 30, 26; Apr 22, 24, 31&quot;&gt;&lt;polygon points=&quot;126.5,10 213.5,102.8 213.5,183 126.5,106.2&quot; class=&quot;rb k0&quot;/&gt;&lt;polygon points=&quot;126.5,109.2 213.5,10 213.5,99.8 126.5,173.4&quot; class=&quot;rb k1&quot;/&gt;&lt;polygon points=&quot;126.5,176.4 213.5,186 213.5,224.5 126.5,208.5&quot; class=&quot;rb k2&quot;/&gt;&lt;rect x=&quot;63.5&quot; y=&quot;10&quot; width=&quot;63&quot; height=&quot;96.2&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;63.5&quot; y=&quot;109.2&quot; width=&quot;63&quot; height=&quot;64.2&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;rect x=&quot;63.5&quot; y=&quot;176.4&quot; width=&quot;63&quot; height=&quot;32.1&quot; rx=&quot;3&quot; class=&quot;m k2&quot;/&gt;&lt;text x=&quot;95&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jan&lt;/text&gt;&lt;polygon points=&quot;276.5,102.8 363.5,195.6 363.5,253.4 276.5,183&quot; class=&quot;rb k0&quot;/&gt;&lt;polygon points=&quot;276.5,10 363.5,10 363.5,106.2 276.5,99.8&quot; class=&quot;rb k1&quot;/&gt;&lt;polygon points=&quot;276.5,186 363.5,109.2 363.5,192.6 276.5,224.5&quot; class=&quot;rb k2&quot;/&gt;&lt;rect x=&quot;213.5&quot; y=&quot;102.8&quot; width=&quot;63&quot; height=&quot;80.2&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;213.5&quot; y=&quot;10&quot; width=&quot;63&quot; height=&quot;89.8&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;rect x=&quot;213.5&quot; y=&quot;186&quot; width=&quot;63&quot; height=&quot;38.5&quot; rx=&quot;3&quot; class=&quot;m k2&quot;/&gt;&lt;text x=&quot;245&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Feb&lt;/text&gt;&lt;polygon points=&quot;426.5,195.6 513.5,192.4 513.5,263 426.5,253.4&quot; class=&quot;rb k0&quot;/&gt;&lt;polygon points=&quot;426.5,10 513.5,112.4 513.5,189.4 426.5,106.2&quot; class=&quot;rb k1&quot;/&gt;&lt;polygon points=&quot;426.5,109.2 513.5,10 513.5,109.4 426.5,192.6&quot; class=&quot;rb k2&quot;/&gt;&lt;rect x=&quot;363.5&quot; y=&quot;195.6&quot; width=&quot;63&quot; height=&quot;57.7&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;363.5&quot; y=&quot;10&quot; width=&quot;63&quot; height=&quot;96.2&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;rect x=&quot;363.5&quot; y=&quot;109.2&quot; width=&quot;63&quot; height=&quot;83.4&quot; rx=&quot;3&quot; class=&quot;m k2&quot;/&gt;&lt;text x=&quot;395&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Mar&lt;/text&gt;&lt;rect x=&quot;513.5&quot; y=&quot;192.4&quot; width=&quot;63&quot; height=&quot;70.6&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;513.5&quot; y=&quot;112.4&quot; width=&quot;63&quot; height=&quot;77&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;rect x=&quot;513.5&quot; y=&quot;10&quot; width=&quot;63&quot; height=&quot;99.4&quot; rx=&quot;3&quot; class=&quot;m k2&quot;/&gt;&lt;text x=&quot;545&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Apr&lt;/text&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Sales by product line per month; in each month the largest is on top&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The same numbers as a stacked column chart always show Alpha at the bottom, Beta in the middle and Gamma on top, whatever their size: the overtaking is there, but nobody sees it.&lt;/p&gt;
&lt;h2 id=&quot;when-is-it-the-right-chart&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-it-the-right-chart&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is it the right chart?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;The question&lt;/th&gt;&lt;th&gt;Chart&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Who leads in each period, and when does the order change?&lt;/td&gt;&lt;td&gt;ribbon chart&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;How does each category trend over time?&lt;/td&gt;&lt;td&gt;line chart&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;What is the total, and what is it made of?&lt;/td&gt;&lt;td&gt;stacked column chart&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;How has the mix changed?&lt;/td&gt;&lt;td&gt;100% stacked column or area&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Ribbon chart or something else&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;It works best with three to seven categories and up to about twelve periods. With more, the ribbons cross so often that the chart turns into a tangle.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-build-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build one?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;In &lt;strong&gt;Visualizations&lt;/strong&gt; pick &lt;strong&gt;Ribbon chart&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Drag the date (or month) to &lt;strong&gt;X-axis&lt;/strong&gt;, the category to &lt;strong&gt;Legend&lt;/strong&gt; and the measure to &lt;strong&gt;Y-axis&lt;/strong&gt;. With a date hierarchy, keep only the level you need, for example Month.&lt;/li&gt;&lt;li&gt;In &lt;strong&gt;Format visual&lt;/strong&gt;, turn on &lt;strong&gt;Data labels&lt;/strong&gt; (the chart has no Y-axis labels) and set display units, for example thousands.&lt;/li&gt;&lt;li&gt;Under the ribbon settings: &lt;strong&gt;Spacing&lt;/strong&gt; sets the space between ribbons as a percentage of the column's height, &lt;strong&gt;Match series color&lt;/strong&gt; colours the ribbons like their series (off makes them grey), &lt;strong&gt;Transparency&lt;/strong&gt; is 30 by default, and &lt;strong&gt;Border&lt;/strong&gt; draws a dark edge above and below each ribbon.&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;how-do-you-show-the-rank-as-a-number&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-show-the-rank-as-a-number&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you show the rank as a number?&lt;/h2&gt;
&lt;p&gt;The ribbon shows the order, a measure can say it. In a tooltip or a table next to the chart:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Line Rank in Month =
&lt;i class=&quot;f&quot;&gt;RANKX&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product Line]&lt;/i&gt; ),
    &lt;i class=&quot;m&quot;&gt;[Sales Amount]&lt;/i&gt;,
    ,
    DESC,
    DENSE
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;With the month on rows and the product line on columns, this returns:&lt;/p&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Month&lt;/th&gt;&lt;th&gt;Alpha&lt;/th&gt;&lt;th&gt;Beta&lt;/th&gt;&lt;th&gt;Gamma&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Jan&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Feb&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Mar&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Apr&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;A measure for &amp;quot;moved up since last month&amp;quot; compares the rank with the previous month's:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Rank Change =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; ThisMonth = &lt;i class=&quot;m&quot;&gt;[Line Rank in Month]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; LastMonth = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Line Rank in Month]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DATEADD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, -&lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, MONTH ) )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( NOT &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( LastMonth ), LastMonth - ThisMonth )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;A positive &lt;code&gt;Rank Change&lt;/code&gt; means the line climbed. Put it in the tooltip of the ribbon chart (&lt;strong&gt;Tooltips&lt;/strong&gt; well) and hovering a ribbon says how far it moved.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Too many categories.&lt;/strong&gt; Ten ribbons crossing twelve times is not readable. Keep the top five and group the rest, or filter to a Top N.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;No data labels.&lt;/strong&gt; Without a Y-axis, nobody knows whether first place means 30 or 3,000.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Reading thickness as change.&lt;/strong&gt; A ribbon's thickness between columns is drawn to join two values; read the columns, not the ribbon's slope.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A category that disappears.&lt;/strong&gt; A category with no value in a period has no block there; its ribbon breaks. That is right, but explain it if it surprises readers.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/desktop-ribbon-charts&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create ribbon charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/rankx-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: RANKX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/dateadd-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DATEADD function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Use a ribbon chart when the order matters more than the trend, keep it to a handful of categories and turn on data labels. &lt;a href=&quot;/blog/column-chart-power-bi/&quot;&gt;Column charts&lt;/a&gt; cover the stacked chart it grew from, and &lt;a href=&quot;/blog/rankx-dax/&quot;&gt;RANKX in DAX&lt;/a&gt; explains the rank measure.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>A prompt library for data work: stop starting from scratch</title>
    <link href="https://data.benibix.com/blog/prompt-library-for-analysts/"/>
    <id>https://data.benibix.com/blog/prompt-library-for-analysts/</id>
    <published>2026-11-02T01:00:00Z</published>
    <updated>2026-11-02T01:00:00Z</updated>
    <summary>The fastest good prompt is one that already worked. How to keep a small library of prompts for the jobs analysts repeat (explain a query, write a measure, summarise a chart), what each entry needs, and where to keep it.</summary>
    <category term="AI"/>
    <category term="Prompts"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; keep the prompts that worked, with blanks where the details change, in one shared place your team already uses. Each entry needs a &lt;strong&gt;name&lt;/strong&gt;, the &lt;strong&gt;job&lt;/strong&gt; it does, the &lt;strong&gt;prompt with placeholders&lt;/strong&gt; like &lt;code&gt;{table}&lt;/code&gt; and &lt;code&gt;{question}&lt;/code&gt;, and &lt;strong&gt;one example&lt;/strong&gt; of a good answer. Five to ten prompts cover most of an analyst's week: explain a query, write a measure, review SQL, summarise a chart, draft a data dictionary entry.&lt;/p&gt;
&lt;p&gt;Image creators copy the prompt behind a picture they like and swap in their own subject. Analysts can do the same: the structure of a good prompt for &amp;quot;explain this query&amp;quot; does not change from one query to the next. Only the query does.&lt;/p&gt;
&lt;h2 id=&quot;which-prompts-are-worth-keeping&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-prompts-are-worth-keeping&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which prompts are worth keeping?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Name&lt;/th&gt;&lt;th&gt;Job&lt;/th&gt;&lt;th&gt;The part that changes&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Explain query&lt;/td&gt;&lt;td&gt;Explain a SQL query in plain English, step by step&lt;/td&gt;&lt;td&gt;{query}&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Write measure&lt;/td&gt;&lt;td&gt;Write one DAX measure with variables and DIVIDE&lt;/td&gt;&lt;td&gt;{meaning}, {tables}, {filters}&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Review SQL&lt;/td&gt;&lt;td&gt;Find wrong joins, missing filters and slow patterns&lt;/td&gt;&lt;td&gt;{query}, {table sizes}&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Summarise chart&lt;/td&gt;&lt;td&gt;Three sentences on what a chart shows, for an email&lt;/td&gt;&lt;td&gt;{numbers}, {audience}&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Dictionary entry&lt;/td&gt;&lt;td&gt;Name, definition, formula and owner of a metric&lt;/td&gt;&lt;td&gt;{metric}, {formula}&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;A starter library for data work&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-does-one-entry-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-one-entry-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does one entry look like?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot;&gt;&lt;code&gt;Name: Explain query
Job: explain a SQL query to someone who does not write SQL
Prompt:
  Explain this {dialect} query in plain English for a business reader.
  Say what one row of the result means, then each step in order.
  Point out anything that could make the numbers wrong.
  Query: {query}
Good answer: (paste one you were happy with)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The &amp;quot;good answer&amp;quot; line is what makes the entry reusable by a colleague: it shows what success looks like.&lt;/p&gt;
&lt;h2 id=&quot;where-should-the-library-live&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-should-the-library-live&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where should the library live?&lt;/h2&gt;
&lt;p&gt;Where your team already looks: a page in your wiki, a folder in your repository, or a shared document. A coding agent can read it too: Claude Code loads skills from a project's &lt;code&gt;.claude/skills/&lt;/code&gt; folder, so a prompt you repeat daily can become a skill. Keep one owner, so entries get fixed when they stop working.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Saving every prompt.&lt;/strong&gt; Keep only the ones you used more than twice and liked the result of.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;No placeholders.&lt;/strong&gt; A prompt with last month's table name baked in fails quietly next month.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Company data in the examples.&lt;/strong&gt; Use made-up rows in the &amp;quot;good answer&amp;quot;.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/skills&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Extend Claude with skills&lt;/a&gt;, turning a repeated prompt into a skill&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Anthropic: Prompt engineering overview&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Write your first two entries from &lt;a href=&quot;/blog/ai-prompt-for-dax/&quot;&gt;the DAX prompt&lt;/a&gt; and &lt;a href=&quot;/blog/prompt-engineering-for-sql/&quot;&gt;the SQL prompt&lt;/a&gt;. When one becomes a daily habit, see &lt;a href=&quot;/blog/claude-skill-for-dax-conventions/&quot;&gt;a Claude skill for your DAX conventions&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>MCP for data: tools, resources and prompts explained</title>
    <link href="https://data.benibix.com/blog/mcp-for-data-tools-resources-prompts/"/>
    <id>https://data.benibix.com/blog/mcp-for-data-tools-resources-prompts/</id>
    <published>2026-11-01T17:00:00Z</published>
    <updated>2026-11-01T17:00:00Z</updated>
    <summary>An MCP server offers an AI app three things: tools it can call, resources it can read and prompts it can reuse. What each one looks like when the server sits in front of a database or a BI model, and what to allow.</summary>
    <category term="AI"/>
    <category term="MCP"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; the Model Context Protocol (MCP) is an open standard for connecting AI apps to outside systems. A server offers three kinds of thing. &lt;strong&gt;Tools&lt;/strong&gt; are actions the AI can call, like &amp;quot;run this read-only query&amp;quot;. &lt;strong&gt;Resources&lt;/strong&gt; are data it can read, like a table's schema. &lt;strong&gt;Prompts&lt;/strong&gt; are reusable templates, like &amp;quot;explain this query&amp;quot;. For data, put the &lt;strong&gt;schema in resources&lt;/strong&gt;, keep &lt;strong&gt;tools read-only&lt;/strong&gt; unless there is a reason, and use &lt;strong&gt;prompts&lt;/strong&gt; for the questions your team asks every week.&lt;/p&gt;
&lt;p&gt;Without MCP, an AI assistant knows your database only from what you paste in. With an MCP server in front of it, the assistant can look up the schema itself and run the query you approved, through one standard any MCP client understands.&lt;/p&gt;
&lt;h2 id=&quot;what-are-the-three-parts-for-data&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-three-parts-for-data&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the three parts, for data?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Tools&lt;/b&gt;&lt;span&gt;actions with inputs: run_query(sql), list_tables(), sample_rows(table, n)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Resources&lt;/b&gt;&lt;span&gt;things to read: each table's schema, the data dictionary, the metric definitions&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Prompts&lt;/b&gt;&lt;span&gt;templates the user picks: &amp;quot;explain this query&amp;quot;, &amp;quot;write a monthly summary&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;An MCP server in front of a database&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;where-does-the-server-run&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-does-the-server-run&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where does the server run?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;An MCP client&lt;/b&gt;&lt;span&gt;Claude Code, an IDE, a desktop app&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Local server&lt;/b&gt;&lt;span&gt;runs on your machine as a program the client starts (stdio); good for a database on your network&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Remote server&lt;/b&gt;&lt;span&gt;runs online, reached by URL (HTTP); good for a shared service with its own sign-in&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Two ways a server runs&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-should-a-data-server-allow&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-should-a-data-server-allow&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What should a data server allow?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Allow&lt;/th&gt;&lt;th&gt;Be careful with&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Reading schemas and the data dictionary&lt;/td&gt;&lt;td&gt;Write access of any kind&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Read-only queries with a row limit&lt;/td&gt;&lt;td&gt;Queries without a limit on a big table&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;A sample of rows from a test database&lt;/td&gt;&lt;td&gt;Production data with personal information&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Running saved, reviewed queries&lt;/td&gt;&lt;td&gt;Free-form SQL against the warehouse&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;The safest setup uses a &lt;strong&gt;database login that can only read&lt;/strong&gt;, so even a wrong tool call cannot change data.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://modelcontextprotocol.io/docs/getting-started/intro&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Model Context Protocol: What is MCP?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://modelcontextprotocol.io/specification/2025-06-18/server&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Model Context Protocol specification: Server features&lt;/a&gt;, tools, resources and prompts&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Connect one to Claude Code with &lt;a href=&quot;/blog/connect-claude-code-to-a-database/&quot;&gt;connect Claude Code to a database&lt;/a&gt;, or start with a public, read-only one: &lt;a href=&quot;/blog/microsoft-learn-mcp-server-in-claude-code/&quot;&gt;the Microsoft Learn MCP server&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Calendar-based time intelligence in DAX (preview)</title>
    <link href="https://data.benibix.com/blog/calendar-based-time-intelligence-dax/"/>
    <id>https://data.benibix.com/blog/calendar-based-time-intelligence-dax/</id>
    <published>2026-11-01T12:00:00Z</published>
    <updated>2026-11-01T12:00:00Z</updated>
    <summary>How calendar-based time intelligence in Power BI works, defining calendars with column categories on a date table, retail 4-4-5, 13-month and fiscal calendars, week-to-date with TOTALWTD, sparse dates, DATEADD extension options, TMDL, and the current preview limits.</summary>
    <category term="DAX"/>
    <category term="Time intelligence"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;calendar-based time intelligence&lt;/strong&gt; (preview) lets you define &lt;strong&gt;calendars&lt;/strong&gt; on a table: you tell Power BI which column is the year, the quarter, the month, the week and the date. Time intelligence functions then take the calendar instead of a date column: &lt;code&gt;TOTALYTD ( [Sales], 'Fiscal Calendar' )&lt;/code&gt;. It works with any calendar (Gregorian, shifted fiscal, retail 4-4-5, 13-month, lunar), supports &lt;strong&gt;week&lt;/strong&gt; calculations (&lt;code&gt;TOTALWTD&lt;/code&gt;), tolerates gaps in dates, and Microsoft names it the recommended approach for its performance and flexibility. Turn it on under &lt;strong&gt;Preview features, Enhanced DAX Time Intelligence&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Classic time intelligence assumes the Gregorian calendar, needs every date present, and has no week functions. Retailers with 4-4-5 quarters and 53-week years had to write their own logic for every measure. Calendars move that logic into the model, once.&lt;/p&gt;
&lt;h2 id=&quot;how-do-classic-and-calendar-based-differ&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-classic-and-calendar-based-differ&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do classic and calendar-based differ?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Point&lt;/th&gt;&lt;th&gt;Classic&lt;/th&gt;&lt;th&gt;Calendar-based (preview)&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Input to functions&lt;/td&gt;&lt;td&gt;a date column ('Date'[Date])&lt;/td&gt;&lt;td&gt;a calendar ('Fiscal Calendar')&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Calendars supported&lt;/td&gt;&lt;td&gt;Gregorian, shifted Gregorian (fiscal year end)&lt;/td&gt;&lt;td&gt;any: retail 445/454/544, 13-month, lunar&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Missing dates&lt;/td&gt;&lt;td&gt;error&lt;/td&gt;&lt;td&gt;allowed (sparse dates)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Week functions&lt;/td&gt;&lt;td&gt;none&lt;/td&gt;&lt;td&gt;TOTALWTD, DATESWTD, WEEK in DATEADD and DATESINPERIOD&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Setup&lt;/td&gt;&lt;td&gt;mark as date table&lt;/td&gt;&lt;td&gt;define calendars and column categories&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Classic against calendar-based time intelligence&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-define-a-calendar&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-define-a-calendar&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you define a calendar?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;&lt;strong&gt;File, Options and settings, Options, Preview features&lt;/strong&gt;: select &lt;strong&gt;Enhanced DAX Time Intelligence&lt;/strong&gt;, restart Desktop.&lt;/li&gt;&lt;li&gt;Right-click the date table, &lt;strong&gt;Calendar options&lt;/strong&gt; (or &lt;strong&gt;Table tools, Calendar options&lt;/strong&gt;), &lt;strong&gt;New calendar&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Name it, then assign columns to &lt;strong&gt;categories&lt;/strong&gt;: for each, a &lt;strong&gt;primary column&lt;/strong&gt; and optional &lt;strong&gt;associated columns&lt;/strong&gt; (for example Month Name as associated to Month).&lt;/li&gt;&lt;li&gt;Fix the validation messages and save.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;A calendar can only use columns of its own table, a column can be in one category only, and one table can hold several calendars (Gregorian and Fiscal on the same Date table).&lt;/p&gt;
&lt;h2 id=&quot;which-categories-exist&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-categories-exist&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which categories exist?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Category&lt;/th&gt;&lt;th&gt;Type&lt;/th&gt;&lt;th&gt;Example values&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Year&lt;/td&gt;&lt;td&gt;complete&lt;/td&gt;&lt;td&gt;2025, 2026&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Quarter&lt;/td&gt;&lt;td&gt;complete&lt;/td&gt;&lt;td&gt;Q1 2026&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Month&lt;/td&gt;&lt;td&gt;complete&lt;/td&gt;&lt;td&gt;January 2026, 2026 Feb&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Week&lt;/td&gt;&lt;td&gt;complete&lt;/td&gt;&lt;td&gt;W50-2026&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Date&lt;/td&gt;&lt;td&gt;complete&lt;/td&gt;&lt;td&gt;12/31/2026&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Quarter of Year&lt;/td&gt;&lt;td&gt;partial&lt;/td&gt;&lt;td&gt;Q1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Month of Year&lt;/td&gt;&lt;td&gt;partial&lt;/td&gt;&lt;td&gt;January, 11&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Month of Quarter&lt;/td&gt;&lt;td&gt;partial&lt;/td&gt;&lt;td&gt;1, 2, 3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Week of Year, Week of Quarter, Week of Month&lt;/td&gt;&lt;td&gt;partial&lt;/td&gt;&lt;td&gt;W50, 10, 2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Day of Year, Day of Quarter, Day of Month, Day of Week&lt;/td&gt;&lt;td&gt;partial&lt;/td&gt;&lt;td&gt;365, 92, 30, 5&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Column categories (from Microsoft's list)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;strong&gt;Complete&lt;/strong&gt; columns identify a period on their own (January 2026); &lt;strong&gt;partial&lt;/strong&gt; ones do not (January). A function needs the categories of its level: &lt;code&gt;TOTALWTD&lt;/code&gt; fails on a calendar without a week category.&lt;/p&gt;
&lt;p&gt;Columns can also be tagged &lt;strong&gt;time-related&lt;/strong&gt; (for example a working-day flag); their filters are cleared by time intelligence functions except &lt;code&gt;DATEADD&lt;/code&gt; and &lt;code&gt;SAMEPERIODLASTYEAR&lt;/code&gt;. This is set in TMDL or external tools.&lt;/p&gt;
&lt;h2 id=&quot;what-do-the-measures-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-do-the-measures-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What do the measures look like?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Sales YTD Fiscal = &lt;i class=&quot;f&quot;&gt;TOTALYTD&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sales]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Fiscal Calendar'&lt;/i&gt; )
Sales WTD = &lt;i class=&quot;f&quot;&gt;TOTALWTD&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sales]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Retail 445'&lt;/i&gt; )
Sales MTD &lt;i class=&quot;n&quot;&gt;445&lt;/i&gt; = &lt;i class=&quot;f&quot;&gt;TOTALMTD&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sales]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Retail 445'&lt;/i&gt; )
Sales LY &lt;i class=&quot;n&quot;&gt;445&lt;/i&gt; = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sales]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Retail 445'&lt;/i&gt; ) )
Sales Last &lt;i class=&quot;n&quot;&gt;13&lt;/i&gt; Weeks =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sales]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DATESINPERIOD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Retail 445'&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), -&lt;i class=&quot;n&quot;&gt;13&lt;/i&gt;, WEEK ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;In TMDL a calendar looks like this (simplified from Microsoft's example):&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot;&gt;&lt;code&gt;calendar 'Gregorian'
    calendarColumnGroup = year
        primaryColumn: Year
    calendarColumnGroup = month
        primaryColumn: Month
        associatedColumn: MonthName
    calendarColumnGroup = date
        primaryColumn: Date&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-do-shifts-between-months-of-different-length-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-shifts-between-months-of-different-length-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do shifts between months of different length work?&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;DATEADD&lt;/code&gt; with a calendar takes an &lt;strong&gt;extension&lt;/strong&gt; option for shifts into a longer period: with 25 to 28 February selected, a one-month shift gives 25 to 28 March (&lt;code&gt;precise&lt;/code&gt;), 25 to 31 March (&lt;code&gt;extended&lt;/code&gt;), or with &lt;code&gt;endaligned&lt;/code&gt; an end-of-month selection ends at the end of March. A &lt;strong&gt;truncation&lt;/strong&gt; option controls shifts into a shorter period. &lt;code&gt;DATESINPERIOD&lt;/code&gt; has &lt;code&gt;PRECISE&lt;/code&gt; and &lt;code&gt;ENDALIGNED&lt;/code&gt; end behaviour. Microsoft notes IntelliSense does not recognise these parameters yet.&lt;/p&gt;
&lt;h2 id=&quot;what-are-the-limits-of-the-preview&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-limits-of-the-preview&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the limits of the preview?&lt;/h2&gt;
&lt;p&gt;From Microsoft's considerations:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Calendars cannot be authored in the Power BI service yet, and cannot be used with live-connected or composite models.&lt;/li&gt;&lt;li&gt;Do not use auto date/time tables with custom calendars.&lt;/li&gt;&lt;li&gt;The table must have fewer than 200 columns; above 20,000 rows validations are not available.&lt;/li&gt;&lt;li&gt;Time intelligence functions that use calendars cannot be nested: &lt;code&gt;PREVIOUSDAY ( PREVIOUSMONTH ( 'Calendar' ) )&lt;/code&gt; is not supported; use &lt;code&gt;CALCULATETABLE ( PREVIOUSDAY ( 'Calendar' ), PREVIOUSMONTH ( 'Calendar' ) )&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;Calculations on a fact table with a calendar and row-level security can give unexpected results.&lt;/li&gt;&lt;li&gt;Preview performance is not representative of the final product.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Missing category.&lt;/strong&gt; A week function on a calendar without weeks returns an error; add the category.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too many associated columns.&lt;/strong&gt; Associate only the columns used in time calculations, as Microsoft recommends.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Mixing classic and calendar measures.&lt;/strong&gt; Both can live in one model, but keep one approach per report page so numbers line up.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-time-intelligence&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Implement time-based calculations in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/totalwtd-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: TOTALWTD function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/dateadd-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DATEADD function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Turn on the preview in a copy of your model, define a Gregorian calendar on your date table, and rewrite one YTD measure with the calendar. Then try a fiscal or retail calendar. &lt;a href=&quot;/blog/date-table-dax/&quot;&gt;Date table&lt;/a&gt; covers the table the calendars sit on.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Customer churn rate: formula, DAX and pitfalls</title>
    <link href="https://data.benibix.com/blog/customer-churn-rate-kpi/"/>
    <id>https://data.benibix.com/blog/customer-churn-rate-kpi/</id>
    <published>2026-11-01T12:00:00Z</published>
    <updated>2026-11-01T12:00:00Z</updated>
    <summary>How to calculate customer churn rate, customers lost in a period divided by customers at the start, for subscriptions and for shops without contracts, monthly against annual churn, revenue churn, the DAX on a subscriptions table and on orders, and how to see why customers leave.</summary>
    <category term="KPIs"/>
    <category term="Customers"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;customer churn rate&lt;/strong&gt; = customers lost during a period / customers at the &lt;strong&gt;start&lt;/strong&gt; of the period. New customers who joined and left in the same period are usually left out of both. With 2,000 customers on 1 September and 50 cancellations, monthly churn is &lt;strong&gt;2.5%&lt;/strong&gt;. Monthly and annual churn do not convert by multiplying by 12: annual = 1 - (1 - monthly)^12, so 2.5% a month is &lt;strong&gt;26%&lt;/strong&gt; a year. Without contracts (a shop), define churn by inactivity: no order for a set number of days.&lt;/p&gt;
&lt;p&gt;Churn is the leak in the bucket: growth means winning customers faster than you lose them. A 1-point drop in monthly churn is often worth more than a big acquisition campaign.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Month&lt;/th&gt;&lt;th&gt;At start&lt;/th&gt;&lt;th&gt;New&lt;/th&gt;&lt;th&gt;Churned&lt;/th&gt;&lt;th&gt;At end&lt;/th&gt;&lt;th&gt;Churn rate&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Jul&lt;/td&gt;&lt;td&gt;1,900&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;td&gt;52&lt;/td&gt;&lt;td&gt;1,968&lt;/td&gt;&lt;td&gt;2.7%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Aug&lt;/td&gt;&lt;td&gt;1,968&lt;/td&gt;&lt;td&gt;110&lt;/td&gt;&lt;td&gt;48&lt;/td&gt;&lt;td&gt;2,030&lt;/td&gt;&lt;td&gt;2.4%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sep&lt;/td&gt;&lt;td&gt;2,030&lt;/td&gt;&lt;td&gt;105&lt;/td&gt;&lt;td&gt;50&lt;/td&gt;&lt;td&gt;2,085&lt;/td&gt;&lt;td&gt;2.5%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Subscribers by month&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;line&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;line chart: Apr 3.1; May 2.9; Jun 2.8; Jul 2.7; Aug 2.4; Sep 2.5&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;203&quot; x2=&quot;626&quot; y2=&quot;203&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;207&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;1&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;140&quot; x2=&quot;626&quot; y2=&quot;140&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;144&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;2&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;77&quot; x2=&quot;626&quot; y2=&quot;77&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;81&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;3&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;626&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;4&lt;/text&gt;&lt;polyline points=&quot;52,70.7 166.8,83.3 281.6,89.6 396.4,95.9 511.2,114.8 626,108.5&quot; class=&quot;ln ka&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;70.7&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;166.8&quot; cy=&quot;83.3&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;281.6&quot; cy=&quot;89.6&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;396.4&quot; cy=&quot;95.9&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;511.2&quot; cy=&quot;114.8&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;108.5&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;text x=&quot;52&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Apr&lt;/text&gt;&lt;text x=&quot;166.8&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;May&lt;/text&gt;&lt;text x=&quot;281.6&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jun&lt;/text&gt;&lt;text x=&quot;396.4&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jul&lt;/text&gt;&lt;text x=&quot;511.2&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Aug&lt;/text&gt;&lt;text x=&quot;626&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Sep&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Monthly churn rate (%)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-is-the-dax-for-subscriptions&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax-for-subscriptions&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX for subscriptions?&lt;/h2&gt;
&lt;p&gt;A Subscriptions table has one row per customer subscription with Start Date and End Date (blank while active). Neither date is related to the Date table; the measures read the selected period:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Customers at Start =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; PStart = &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Subscriptions&lt;i class=&quot;m&quot;&gt;[Customer ID]&lt;/i&gt; ),
        Subscriptions&lt;i class=&quot;m&quot;&gt;[Start Date]&lt;/i&gt; &amp;lt; PStart,
        &lt;i class=&quot;f&quot;&gt;OR&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( Subscriptions&lt;i class=&quot;m&quot;&gt;[End Date]&lt;/i&gt; ), Subscriptions&lt;i class=&quot;m&quot;&gt;[End Date]&lt;/i&gt; &amp;gt;= PStart )
    )

Churned Customers =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; PStart = &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; PEnd = &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Subscriptions&lt;i class=&quot;m&quot;&gt;[Customer ID]&lt;/i&gt; ),
        Subscriptions&lt;i class=&quot;m&quot;&gt;[Start Date]&lt;/i&gt; &amp;lt; PStart,
        Subscriptions&lt;i class=&quot;m&quot;&gt;[End Date]&lt;/i&gt; &amp;gt;= PStart,
        Subscriptions&lt;i class=&quot;m&quot;&gt;[End Date]&lt;/i&gt; &amp;lt;= PEnd
    )

Churn Rate = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Churned Customers]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Customers at Start]&lt;/i&gt; )

Annual Churn from Monthly = &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; - &lt;i class=&quot;f&quot;&gt;POWER&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Churn Rate]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;12&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The filters on Start Date and End Date are boolean filters on one column each; &lt;code&gt;OR&lt;/code&gt; keeps them in one filter on End Date. A customer with several subscriptions counts as churned only when all end: handle that by building a customer-level table (first start, last end) first.&lt;/p&gt;
&lt;h2 id=&quot;what-is-churn-for-a-shop-without-contracts&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-churn-for-a-shop-without-contracts&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is churn for a shop without contracts?&lt;/h2&gt;
&lt;p&gt;Define an &lt;strong&gt;inactivity window&lt;/strong&gt; that fits the buying cycle, for example 180 days:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Active Customers 180d =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; D = &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Customer ID]&lt;/i&gt; ),
        &lt;i class=&quot;f&quot;&gt;DATESBETWEEN&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, D - &lt;i class=&quot;n&quot;&gt;179&lt;/i&gt;, D )
    )

&lt;i class=&quot;c&quot;&gt;-- active in the 180 days before the period, not active in the 180 days up to its end&lt;/i&gt;
Lapsed Customers =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; PStart = &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; PEnd = &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Before = &lt;i class=&quot;f&quot;&gt;CALCULATETABLE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Customer ID]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;DATESBETWEEN&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, PStart - &lt;i class=&quot;n&quot;&gt;180&lt;/i&gt;, PStart - &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Recent = &lt;i class=&quot;f&quot;&gt;CALCULATETABLE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Customer ID]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;DATESBETWEEN&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, PEnd - &lt;i class=&quot;n&quot;&gt;179&lt;/i&gt;, PEnd ) )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;EXCEPT&lt;/i&gt; ( Before, Recent ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href=&quot;/blog/union-except-intersect-crossjoin-dax/&quot;&gt;EXCEPT&lt;/a&gt; keeps the customers who bought before and not recently.&lt;/p&gt;
&lt;h2 id=&quot;what-about-revenue-churn&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-about-revenue-churn&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What about revenue churn?&lt;/h2&gt;
&lt;p&gt;Customer churn counts heads; &lt;strong&gt;revenue churn&lt;/strong&gt; (lost recurring revenue / recurring revenue at start) weighs them. Losing ten small customers and one large one can be 1% customer churn and 8% revenue churn. Subscription businesses track both, plus &lt;a href=&quot;/blog/net-revenue-retention-kpi/&quot;&gt;net revenue retention&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-find-out-why-customers-leave&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-find-out-why-customers-leave&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you find out why customers leave?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;Churn by &lt;strong&gt;cohort&lt;/strong&gt; (when they joined): see &lt;a href=&quot;/blog/customer-retention-cohort-kpi/&quot;&gt;cohort retention&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;By &lt;strong&gt;plan, channel, region&lt;/strong&gt;: where is it highest?&lt;/li&gt;&lt;li&gt;By &lt;strong&gt;cancellation reason&lt;/strong&gt; from the cancel form.&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;/blog/key-influencers-power-bi/&quot;&gt;Key influencers&lt;/a&gt; on a customer table with a Churned column.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Dividing by customers at the end.&lt;/strong&gt; The end includes new customers; divide by the start.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Multiplying monthly churn by 12.&lt;/strong&gt; Use 1 - (1 - monthly)^12.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Counting paused or downgraded customers as churned.&lt;/strong&gt; Define it once and write it down.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Small bases.&lt;/strong&gt; 2 of 40 is 5%; show counts next to rates.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/except-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: EXCEPT function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/datesbetween-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DATESBETWEEN function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-influencers&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Key influencers visualizations&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Write down your churn definition (who counts, from when), build Customers at Start and Churned Customers, and show the monthly rate with counts. &lt;a href=&quot;/blog/customer-retention-cohort-kpi/&quot;&gt;Cohort retention&lt;/a&gt; shows when in the lifetime customers leave.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>DP-750 in 2026: what the exam covers and how to study</title>
    <link href="https://data.benibix.com/blog/dp-750-study-guide/"/>
    <id>https://data.benibix.com/blog/dp-750-study-guide/</id>
    <published>2026-11-01T12:00:00Z</published>
    <updated>2026-11-01T12:00:00Z</updated>
    <summary>What the DP-750 Azure Databricks data engineering exam measures, how its four areas are weighted, how it compares with the Fabric exam DP-700, and a study plan built on one Unity Catalog pipeline from ingestion to a scheduled job.</summary>
    <category term="Exams"/>
    <category term="Data and BI"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; DP-750 earns &lt;strong&gt;Microsoft Certified: Azure Databricks Data Engineer Associate&lt;/strong&gt;. It weighs setting up the Databricks environment (15 to 20%), securing and governing Unity Catalog (15 to 20%), preparing and processing data (30 to 35%), and deploying and maintaining pipelines (30 to 35%). You need 700 out of 1,000 and renew it yearly for free. Choose it over &lt;a href=&quot;/blog/dp-700-study-guide/&quot;&gt;DP-700&lt;/a&gt; if your data platform is Databricks rather than Microsoft Fabric.&lt;/p&gt;
&lt;p&gt;DP-750 is a hands-on engineering exam: compute, Unity Catalog, ingestion with Lakeflow, data quality, jobs, Git and debugging Spark.&lt;/p&gt;
&lt;h2 id=&quot;what-does-dp-750-cover&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-dp-750-cover&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does DP-750 cover?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Set up and configure the environment&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:57.1%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;15-20%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Secure and govern Unity Catalog&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:57.1%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;15-20%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Prepare and process data&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;30-35%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Deploy and maintain pipelines&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;30-35%&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;DP-750 skills, by weight in the exam&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Environment&lt;/strong&gt;: choosing compute (job, serverless, SQL warehouse, classic, shared), its settings (autoscaling, termination, Photon), libraries, and catalogs, schemas and volumes in Unity Catalog.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Governance&lt;/strong&gt;: privileges, table and column access, row filters and column masks, attribute-based access with tags, Key Vault secrets, service principals, descriptions and retention.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Prepare and process&lt;/strong&gt;: ingestion with Lakeflow Connect, notebooks, SQL (CTAS) and change data capture; profiling, cleaning and transforming; data quality checks, schema enforcement and pipeline expectations.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Pipelines&lt;/strong&gt;: notebooks against Lakeflow Spark Declarative Pipelines, Lakeflow Jobs with triggers, schedules and alerts, Git and testing, Databricks Asset Bundles, and fixing slow Spark jobs (skew, spill, shuffle) with the Spark UI.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-is-dp-750-different-from-dp-700&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-dp-750-different-from-dp-700&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is DP-750 different from DP-700?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;DP-750&lt;/th&gt;&lt;th&gt;DP-700&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Platform&lt;/td&gt;&lt;td&gt;Azure Databricks&lt;/td&gt;&lt;td&gt;Microsoft Fabric&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Governance&lt;/td&gt;&lt;td&gt;Unity Catalog&lt;/td&gt;&lt;td&gt;OneLake, workspace roles&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Pipelines&lt;/td&gt;&lt;td&gt;Lakeflow Jobs, declarative pipelines&lt;/td&gt;&lt;td&gt;Data Factory pipelines, notebooks&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Real time&lt;/td&gt;&lt;td&gt;streaming ingestion&lt;/td&gt;&lt;td&gt;Eventstream, Eventhouse, KQL&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Deploy&lt;/td&gt;&lt;td&gt;Git, Asset Bundles&lt;/td&gt;&lt;td&gt;Git, deployment pipelines&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Two data engineering exams&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Spark, Delta tables and the &lt;a href=&quot;/blog/medallion-architecture-fabric-lakehouse/&quot;&gt;medallion architecture&lt;/a&gt; are common to both, so studying one makes the other easier.&lt;/p&gt;
&lt;h2 id=&quot;how-would-you-study-for-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-would-you-study-for-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How would you study for it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:6&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Set up&lt;/b&gt;&lt;span&gt;a workspace, a catalog per environment, a schema per layer&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Ingest&lt;/b&gt;&lt;span&gt;files with Auto Loader or Lakeflow Connect, a CDC feed&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Clean&lt;/b&gt;&lt;span&gt;types, duplicates, nulls, expectations that quarantine bad rows&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Govern&lt;/b&gt;&lt;span&gt;grants, a row filter and a column mask&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Run&lt;/b&gt;&lt;span&gt;a Lakeflow Job on a schedule, deployed with an Asset Bundle from Git&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;6&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Break it&lt;/b&gt;&lt;span&gt;create skew, read the Spark UI, fix it&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One pipeline in Unity Catalog&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-helps-on-the-day&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-helps-on-the-day&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What helps on the day?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Know which compute fits which job.&lt;/strong&gt; Several questions ask for the cheapest or simplest compute for a workload.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Row filters and column masks&lt;/strong&gt; are Unity Catalog functions applied to a table; know how they differ from views.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Read the Spark UI words.&lt;/strong&gt; Skew, spill and shuffle appear by name in the skills list.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-keep-the-certification&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-keep-the-certification&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you keep the certification?&lt;/h2&gt;
&lt;p&gt;It expires after a year; the free online renewal assessment on Microsoft Learn opens in the six months before.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/dp-750&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam DP-750&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/exam-scoring-reports&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Exam scoring and score reports&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/renew-your-microsoft-certification&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Renew your Microsoft Certification&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Build the pipeline above end to end. &lt;a href=&quot;/blog/delta-tables-and-v-order-fabric/&quot;&gt;Delta tables and V-Order&lt;/a&gt; and &lt;a href=&quot;/blog/slowly-changing-dimensions-type-1-type-2/&quot;&gt;Slowly changing dimensions&lt;/a&gt; cover two ideas the processing area leans on; &lt;a href=&quot;/blog/dp-600-vs-dp-700/&quot;&gt;DP-600 or DP-700?&lt;/a&gt; helps if you are weighing the Fabric exams too.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Every KPI once, with measures and calculation groups</title>
    <link href="https://data.benibix.com/blog/calculation-groups-power-bi-time-intelligence/"/>
    <id>https://data.benibix.com/blog/calculation-groups-power-bi-time-intelligence/</id>
    <published>2026-11-01T12:00:00Z</published>
    <updated>2026-11-01T12:00:00Z</updated>
    <summary>Define each KPI as one measure in the semantic model, and add year to date, last year and the change for all of them at once with one calculation group in Power BI.</summary>
    <category term="DAX"/>
    <category term="Concepts"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; write each KPI exactly once, as a measure in the semantic model with a description and a format. Then add one &lt;strong&gt;calculation group&lt;/strong&gt; with items for current, year to date, last year and the change. Each item uses &lt;code&gt;SELECTEDMEASURE()&lt;/code&gt;, so it works for every KPI: ten KPIs need ten measures plus four items, not fifty measures.&lt;/p&gt;
&lt;p&gt;When each report builds its own revenue, two reports show two numbers for the same month, and a meeting starts with an argument about whose is right. When every KPI also needs a year-to-date and a last-year version, the measure list grows five times over, and one fix has to be made five times.&lt;/p&gt;
&lt;h2 id=&quot;what-does-the-model-hold&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-the-model-hold&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does the model hold?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;KPI&lt;/th&gt;&lt;th&gt;You write&lt;/th&gt;&lt;th&gt;The group adds&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Revenue&lt;/td&gt;&lt;td&gt;one measure&lt;/td&gt;&lt;td&gt;YTD, PY, Change %&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Orders&lt;/td&gt;&lt;td&gt;one measure&lt;/td&gt;&lt;td&gt;YTD, PY, Change %&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Average order&lt;/td&gt;&lt;td&gt;one measure&lt;/td&gt;&lt;td&gt;YTD, PY, Change %&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;Revenue YTD, Orders PY, ...&lt;/td&gt;&lt;td&gt;nine copies&lt;/td&gt;&lt;td&gt;no longer needed&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Three KPIs, four time views: three measures and one group instead of twelve measures&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-write-the-measures&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-write-the-measures&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you write the measures?&lt;/h2&gt;
&lt;p&gt;One measure per KPI, named the way the business says it. Ratios divide two measures instead of repeating their logic:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )

Orders = &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[OrderID]&lt;/i&gt; )

Average order = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Orders]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Give each one a &lt;strong&gt;description&lt;/strong&gt; (it shows when someone points at the field) and a &lt;strong&gt;format string&lt;/strong&gt;, and put them in display folders. The model is now the one place a KPI is defined.&lt;/p&gt;
&lt;h2 id=&quot;how-does-the-calculation-group-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-the-calculation-group-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does the calculation group work?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Measure&lt;/b&gt;&lt;span&gt;Revenue, Orders, Average order&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Item&lt;/b&gt;&lt;span&gt;Current, YTD, PY, Change %&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;SELECTEDMEASURE()&lt;/b&gt;&lt;span&gt;the measure in the visual, with the item's filter&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Visual&lt;/b&gt;&lt;span&gt;a column per item, or a slicer&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One calculation group serves every measure&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Each item is a small DAX expression around whatever measure the visual uses:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- Calculation group &amp;quot;Time&amp;quot;, column &amp;quot;View&amp;quot;&lt;/i&gt;
Current   = &lt;i class=&quot;f&quot;&gt;SELECTEDMEASURE&lt;/i&gt; ()
YTD       = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SELECTEDMEASURE&lt;/i&gt; (), &lt;i class=&quot;f&quot;&gt;DATESYTD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
PY        = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SELECTEDMEASURE&lt;/i&gt; (), &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
Change %  =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Now  = &lt;i class=&quot;f&quot;&gt;SELECTEDMEASURE&lt;/i&gt; ()
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Then = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SELECTEDMEASURE&lt;/i&gt; (), &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( Now - Then, Then )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;In Power BI Desktop, create it in &lt;strong&gt;Model view&lt;/strong&gt; with &lt;strong&gt;Calculation group&lt;/strong&gt;; external tools such as Tabular Editor work too. Put the group's column on the columns of a matrix and every KPI on the rows shows all four views.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Change %&lt;/code&gt; should show as a percentage even when the KPI is a currency. A &lt;strong&gt;dynamic format string&lt;/strong&gt; on that item does it: set its format to &lt;code&gt;&amp;quot;0.0%&amp;quot;&lt;/code&gt;, and leave the others on &lt;code&gt;SELECTEDMEASUREFORMATSTRING ()&lt;/code&gt; so they keep the measure's own format.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Implicit measures stop working.&lt;/strong&gt; Adding a calculation group turns on &lt;strong&gt;Discourage implicit measures&lt;/strong&gt;, so dragging a raw column into a visual no longer sums it. That is the point: every number comes from a measure.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;No date table.&lt;/strong&gt; &lt;code&gt;DATESYTD&lt;/code&gt; and &lt;code&gt;SAMEPERIODLASTYEAR&lt;/code&gt; need a proper date table, marked as one, with a row for every day. Without it the time items return blanks or wrong numbers.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Items applied to the wrong measures.&lt;/strong&gt; A ratio like &lt;code&gt;Average order&lt;/code&gt; is fine, but a measure that already has its own time logic gets it twice. Keep time logic only in the group.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/calculation-groups&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create calculation groups in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/selectedmeasure-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SELECTEDMEASURE (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-date-tables&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Set and use date tables in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;The open course &lt;a href=&quot;/courses/dax-measures-that-add-up/&quot;&gt;DAX measures that add up&lt;/a&gt; starts with measures instead of columns, then CALCULATE and the date table these items need. For the KPIs themselves, with their formulas in DAX, SQL and Excel, &lt;a href=&quot;https://tools.benibix.com/data/kpi-atlas/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;KPI Atlas&lt;/a&gt; has 455 of them. The pattern sits on &lt;a href=&quot;/work/#every-kpi-once&quot;&gt;the map of my work&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>OEE: availability, performance and quality in DAX</title>
    <link href="https://data.benibix.com/blog/oee-kpi/"/>
    <id>https://data.benibix.com/blog/oee-kpi/</id>
    <published>2026-11-01T12:00:00Z</published>
    <updated>2026-11-01T12:00:00Z</updated>
    <summary>How to calculate overall equipment effectiveness (OEE) as availability times performance times quality, a worked shift example, the simple formula good count times ideal cycle time divided by planned time, the six big losses, OEE across machines without averaging percentages, the DAX on production logs, and a loss waterfall.</summary>
    <category term="KPIs"/>
    <category term="Operations"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;overall equipment effectiveness (OEE)&lt;/strong&gt; = &lt;strong&gt;availability × performance × quality&lt;/strong&gt;. Availability = run time / planned production time (stops lower it); performance = (ideal cycle time × total count) / run time (running slower than ideal lowers it); quality = good count / total count (scrap and rework lower it). The three multiply out to the simple form &lt;strong&gt;OEE = (good count × ideal cycle time) / planned production time&lt;/strong&gt;: the share of planned time spent making good parts at full speed. A shift with 87.5% × 90.5% × 95% has an OEE of &lt;strong&gt;75.2%&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;OEE turns &amp;quot;the line was busy all day&amp;quot; into a number that separates stops, slow running and scrap, the three places to look for capacity before buying a new machine.&lt;/p&gt;
&lt;h2 id=&quot;how-is-a-shift-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-a-shift-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is a shift calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Item&lt;/th&gt;&lt;th&gt;Value&lt;/th&gt;&lt;th&gt;Calculation&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Planned production time&lt;/td&gt;&lt;td&gt;480 min&lt;/td&gt;&lt;td&gt;8 hours, breaks excluded&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Stop time&lt;/td&gt;&lt;td&gt;60 min&lt;/td&gt;&lt;td&gt;breakdowns, changeovers&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Run time&lt;/td&gt;&lt;td&gt;420 min&lt;/td&gt;&lt;td&gt;480 - 60&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ideal cycle time&lt;/td&gt;&lt;td&gt;1.0 min per part&lt;/td&gt;&lt;td&gt;the machine's design speed&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Total count&lt;/td&gt;&lt;td&gt;380 parts&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Good count&lt;/td&gt;&lt;td&gt;361 parts&lt;/td&gt;&lt;td&gt;19 scrapped&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Availability&lt;/td&gt;&lt;td&gt;87.5%&lt;/td&gt;&lt;td&gt;420 / 480&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Performance&lt;/td&gt;&lt;td&gt;90.5%&lt;/td&gt;&lt;td&gt;380 × 1.0 / 420&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Quality&lt;/td&gt;&lt;td&gt;95.0%&lt;/td&gt;&lt;td&gt;361 / 380&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;OEE&lt;/td&gt;&lt;td&gt;75.2%&lt;/td&gt;&lt;td&gt;361 × 1.0 / 480&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;One 8-hour shift on line 1&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;waterfall&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;waterfall chart: Planned time 480; Stops -60; Slow running -40; Scrap -19; Good parts at ideal speed total&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;628&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;628&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;200&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;628&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;300&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;628&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;400&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;628&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;500&lt;/text&gt;&lt;rect x=&quot;72.7&quot; y=&quot;24.1&quot; width=&quot;73.7&quot; height=&quot;241.9&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;109.6&quot; y=&quot;18.1&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;480&lt;/text&gt;&lt;line x1=&quot;146.5&quot; y1=&quot;24.1&quot; x2=&quot;187.9&quot; y2=&quot;24.1&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;109.6&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Planned time&lt;/text&gt;&lt;rect x=&quot;187.9&quot; y=&quot;24.1&quot; width=&quot;73.7&quot; height=&quot;30.2&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;224.8&quot; y=&quot;18.1&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;-60&lt;/text&gt;&lt;line x1=&quot;261.7&quot; y1=&quot;54.3&quot; x2=&quot;303.1&quot; y2=&quot;54.3&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;224.8&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Stops&lt;/text&gt;&lt;rect x=&quot;303.1&quot; y=&quot;54.3&quot; width=&quot;73.7&quot; height=&quot;20.2&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;340&quot; y=&quot;48.3&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;-40&lt;/text&gt;&lt;line x1=&quot;376.9&quot; y1=&quot;74.5&quot; x2=&quot;418.3&quot; y2=&quot;74.5&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;340&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Slow running&lt;/text&gt;&lt;rect x=&quot;418.3&quot; y=&quot;74.5&quot; width=&quot;73.7&quot; height=&quot;9.6&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;455.2&quot; y=&quot;68.5&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;-19&lt;/text&gt;&lt;line x1=&quot;492.1&quot; y1=&quot;84.1&quot; x2=&quot;533.5&quot; y2=&quot;84.1&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;455.2&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Scrap&lt;/text&gt;&lt;rect x=&quot;533.5&quot; y=&quot;84.1&quot; width=&quot;73.7&quot; height=&quot;181.9&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;570.4&quot; y=&quot;78.1&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;361&lt;/text&gt;&lt;text x=&quot;570.4&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Good parts at ideal speed&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Where the 480 planned minutes went&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The waterfall shows losses in minutes: 60 to stops, 40 to running slower than ideal (420 - 380), 19 to scrap. 361 good minutes / 480 = 75.2%.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;A production log with one row per machine and shift: Planned Minutes, Stop Minutes, Ideal Cycle Min, Total Count, Good Count.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Planned Time = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Production&lt;i class=&quot;m&quot;&gt;[Planned Minutes]&lt;/i&gt; )
Run Time = &lt;i class=&quot;m&quot;&gt;[Planned Time]&lt;/i&gt; - &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Production&lt;i class=&quot;m&quot;&gt;[Stop Minutes]&lt;/i&gt; )
Ideal Time Total = &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Production, Production&lt;i class=&quot;m&quot;&gt;[Ideal Cycle Min]&lt;/i&gt; * Production&lt;i class=&quot;m&quot;&gt;[Total Count]&lt;/i&gt; )
Ideal Time Good = &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Production, Production&lt;i class=&quot;m&quot;&gt;[Ideal Cycle Min]&lt;/i&gt; * Production&lt;i class=&quot;m&quot;&gt;[Good Count]&lt;/i&gt; )

Availability = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Run Time]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Planned Time]&lt;/i&gt; )
Performance = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Ideal Time Total]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Run Time]&lt;/i&gt; )
Quality = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Ideal Time Good]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Ideal Time Total]&lt;/i&gt; )

OEE = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Ideal Time Good]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Planned Time]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Quality is written in ideal minutes so that, with several products of different cycle times, availability × performance × quality still equals OEE exactly. For one product it is the same as good count / total count.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-combine-machines-and-days&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-combine-machines-and-days&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you combine machines and days?&lt;/h2&gt;
&lt;p&gt;Sum the minutes and counts first, then divide, as the measures above do. Averaging the OEE % of a machine that ran 8 hours with one that ran 1 hour treats them as equal. The same applies across days and plants.&lt;/p&gt;
&lt;h2 id=&quot;which-losses-sit-behind-each-factor&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-losses-sit-behind-each-factor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which losses sit behind each factor?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Factor&lt;/th&gt;&lt;th&gt;Loss&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Availability&lt;/td&gt;&lt;td&gt;equipment failure&lt;/td&gt;&lt;td&gt;breakdown, unplanned maintenance&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Availability&lt;/td&gt;&lt;td&gt;setup and adjustments&lt;/td&gt;&lt;td&gt;changeovers, warm-up&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Performance&lt;/td&gt;&lt;td&gt;idling and minor stops&lt;/td&gt;&lt;td&gt;jams, sensor stops under a few minutes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Performance&lt;/td&gt;&lt;td&gt;reduced speed&lt;/td&gt;&lt;td&gt;running below the ideal rate&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Quality&lt;/td&gt;&lt;td&gt;process defects&lt;/td&gt;&lt;td&gt;scrap and rework in steady production&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Quality&lt;/td&gt;&lt;td&gt;reduced yield&lt;/td&gt;&lt;td&gt;scrap during start-up&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The six big losses&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Log stops with a reason code to show the biggest losses as a bar chart or a &lt;a href=&quot;/blog/decomposition-tree-power-bi/&quot;&gt;decomposition tree&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A generous ideal cycle time.&lt;/strong&gt; Using the average speed instead of the design speed inflates performance above 100%.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Planned time that excludes too much.&lt;/strong&gt; Leaving changeovers out of planned time hides them.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Averaging percentages.&lt;/strong&gt; Sum minutes and counts, then divide.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;OEE as a target for operators alone.&lt;/strong&gt; Many losses come from planning and materials.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://www.oee.com/calculating-oee/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;OEE.com: Calculating OEE&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/sumx-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SUMX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-waterfall-charts&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Waterfall charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Log planned and stop minutes, counts and the ideal cycle time per shift, and build the three factors and the loss waterfall. &lt;a href=&quot;/blog/first-pass-yield-kpi/&quot;&gt;First pass yield&lt;/a&gt; looks closer at quality.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>The KPI visual in Power BI: value, trend and target</title>
    <link href="https://data.benibix.com/blog/kpi-visual-power-bi/"/>
    <id>https://data.benibix.com/blog/kpi-visual-power-bi/</id>
    <published>2026-11-01T12:00:00Z</published>
    <updated>2026-11-17T12:00:00Z</updated>
    <summary>How the KPI visual in Power BI shows a value, its trend and its distance to a target, the Value, Trend axis and Target fields, the direction setting for metrics where lower is better, the DAX it needs, and its limits.</summary>
    <category term="Visuals"/>
    <category term="Cards and KPIs"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; the &lt;strong&gt;KPI visual&lt;/strong&gt; shows one number with two pieces of context: whether it is ahead of or behind a &lt;strong&gt;Target&lt;/strong&gt;, and how it got there (a &lt;strong&gt;Trend axis&lt;/strong&gt; drawn behind it). It needs a measure in &lt;strong&gt;Value&lt;/strong&gt;, a date or period field in &lt;strong&gt;Trend axis&lt;/strong&gt;, and optionally a measure in &lt;strong&gt;Target&lt;/strong&gt;. The value shown is the last point of the trend, so sort the trend correctly before converting the visual. Set the direction (&lt;strong&gt;high is good&lt;/strong&gt; or &lt;strong&gt;low is good&lt;/strong&gt;) so that a falling cost is green.&lt;/p&gt;
&lt;p&gt;A card that says &amp;quot;1,820&amp;quot; leaves the reader asking: is that good? Compared to what? Going up? The KPI visual answers all three in the space of a card.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-kpi-visual-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-kpi-visual-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a KPI visual look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;kpi&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;kpi chart: Jan 80; Feb 95; Mar 90; Apr 118; May 130&quot;&gt;&lt;polygon points=&quot;0,276.2 160,239 320,251.4 480,182 640,152.2 640,296 0,296&quot; class=&quot;ar t-teal&quot;/&gt;&lt;polyline points=&quot;0,276.2 160,239 320,251.4 480,182 640,152.2&quot; class=&quot;ln t-teal&quot;/&gt;&lt;text x=&quot;320&quot; y=&quot;64&quot; class=&quot;tkpi&quot; text-anchor=&quot;middle&quot;&gt;130&lt;/text&gt;&lt;text x=&quot;320&quot; y=&quot;94&quot; class=&quot;tg t-teal&quot; text-anchor=&quot;middle&quot;&gt;Goal 120 · +8.3%&lt;/text&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Monthly revenue in thousands: last value, goal and the trend behind it&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The big number is May's 130. It is 8.3% above the goal of 120, so it is green, and the shape behind it says it got there by climbing since March.&lt;/p&gt;
&lt;h2 id=&quot;when-should-you-use-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-should-you-use-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When should you use it?&lt;/h2&gt;
&lt;p&gt;Microsoft puts it in two questions: &amp;quot;What am I ahead or behind on?&amp;quot; (progress) and &amp;quot;How far ahead or behind am I?&amp;quot; (distance to a goal). Use it in the top row of a page, one per headline metric: revenue against budget, orders against last year, tickets against an SLA.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-build-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build one?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;Start with the measure as a column chart: &lt;code&gt;[Revenue]&lt;/code&gt; on the Y-axis and the month on the X-axis.&lt;/li&gt;&lt;li&gt;Sort it by the month, ascending (&lt;strong&gt;More options (...)&lt;/strong&gt;, &lt;strong&gt;Sort axis&lt;/strong&gt;). Microsoft warns that once the visual is a KPI there is no option to sort, so sort first.&lt;/li&gt;&lt;li&gt;Switch the visual to &lt;strong&gt;KPI&lt;/strong&gt;. The wells become &lt;strong&gt;Value&lt;/strong&gt;, &lt;strong&gt;Trend axis&lt;/strong&gt; and &lt;strong&gt;Target&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Drag the target measure to &lt;strong&gt;Target&lt;/strong&gt;, for example &lt;code&gt;[Revenue Target]&lt;/code&gt; or last year's revenue.&lt;/li&gt;&lt;li&gt;In &lt;strong&gt;Format visual&lt;/strong&gt;: &lt;strong&gt;Callout value&lt;/strong&gt; (display units, decimals, font), &lt;strong&gt;Icons&lt;/strong&gt; (a green check for good, a red exclamation mark for bad), &lt;strong&gt;Trend axis&lt;/strong&gt; (on or off, and the direction: high is good or low is good), &lt;strong&gt;Target label&lt;/strong&gt; with &lt;strong&gt;Distance to goal&lt;/strong&gt;, and &lt;strong&gt;Date&lt;/strong&gt; (shows the last period).&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;what-dax-does-it-need&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-dax-does-it-need&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What DAX does it need?&lt;/h2&gt;
&lt;p&gt;A measure for the value and one for the target. The KPI takes the value of the &lt;strong&gt;last period on the trend axis&lt;/strong&gt; that has data, so the trend must stop at today:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )

Revenue Target = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Budget&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )

Revenue to Date =
&lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) &amp;lt;= &lt;i class=&quot;f&quot;&gt;TODAY&lt;/i&gt; (), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Without &lt;code&gt;Revenue to Date&lt;/code&gt;, months later in the year with a budget but no sales can make the KPI show a blank or zero as &amp;quot;the last value&amp;quot;. The target can also be last year:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue LY =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;For a cost or a delivery time, set the direction to &lt;strong&gt;low is good&lt;/strong&gt;: 2.8 days against a target of 3 is then green.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-show-a-year-to-date-kpi&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-show-a-year-to-date-kpi&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you show a year-to-date KPI?&lt;/h2&gt;
&lt;p&gt;The KPI's callout is the last trend point, so with months on the trend axis it shows the last month alone. To show a running year-to-date value with a monthly trend, use a YTD measure in Value and Target:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue YTD = &lt;i class=&quot;f&quot;&gt;TOTALYTD&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )

Target YTD = &lt;i class=&quot;f&quot;&gt;TOTALYTD&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue Target]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The trend then climbs through the year, and the callout is the year so far against the target so far.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;The wrong last value.&lt;/strong&gt; Future months with a target but no actuals end the trend at blank or 0. Stop the value at today.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Unsorted trend.&lt;/strong&gt; Sorting is not available after the conversion; a trend sorted by value draws a meaningless line and takes the wrong &amp;quot;last&amp;quot; point.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Red when it is good.&lt;/strong&gt; For costs, churn, delays, set &lt;strong&gt;low is good&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A total in the callout.&lt;/strong&gt; People expect &amp;quot;this month&amp;quot; or &amp;quot;year to date&amp;quot;; say which in the title.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too many KPIs.&lt;/strong&gt; Eight KPI tiles in a row make none of them stand out. Three to five headline numbers per page.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-kpi&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create key performance indicator (KPI) visualizations&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/totalytd-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: TOTALYTD function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/sameperiodlastyear-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SAMEPERIODLASTYEAR function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Pick three to five headline measures, give each a target and a trend stopped at today, and set the direction for the ones where lower is better. &lt;a href=&quot;/blog/kpi-actual-target-variance-dax/&quot;&gt;Actual, target and variance in DAX&lt;/a&gt; builds the measures, and &lt;a href=&quot;/blog/what-makes-a-good-kpi/&quot;&gt;what makes a good KPI&lt;/a&gt; helps choose them.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Your photo in an AI editor: what data are you sharing?</title>
    <link href="https://data.benibix.com/blog/photos-you-upload-to-ai-are-personal-data/"/>
    <id>https://data.benibix.com/blog/photos-you-upload-to-ai-are-personal-data/</id>
    <published>2026-11-01T01:00:00Z</published>
    <updated>2026-11-01T01:00:00Z</updated>
    <summary>Editing a selfie in Gemini or ChatGPT means sending a picture of a face to a service. Why that photo is personal data under the GDPR, when it becomes biometric data, and four checks before you or your team upload one.</summary>
    <category term="AI"/>
    <category term="AI images"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a photo of an identifiable person is &lt;strong&gt;personal data&lt;/strong&gt; under the GDPR. It becomes &lt;strong&gt;biometric data&lt;/strong&gt;, a special category with stricter rules, when it is processed with specific technical means to &lt;strong&gt;identify&lt;/strong&gt; someone uniquely. Before uploading a face to an AI editor, check four things: whose face it is and whether you may use it, what the service does with uploads, whether you can turn off training on your data, and how long it is kept.&lt;/p&gt;
&lt;p&gt;&amp;quot;Keep my face exactly the same&amp;quot; is the line that makes AI photo edits work. It also means you are handing a service a clear picture of a face. For a personal selfie that is your choice; for a colleague's headshot or a customer photo it is a data protection question.&lt;/p&gt;
&lt;h2 id=&quot;when-is-a-photo-personal-or-biometric-data&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-a-photo-personal-or-biometric-data&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is a photo personal or biometric data?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;layers&quot;&gt;&lt;ol class=&quot;dfig-stack&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Personal data&lt;/b&gt;&lt;span&gt;any information about an identified or identifiable person: a photo of a face is one&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Biometric data&lt;/b&gt;&lt;span&gt;from specific technical processing of physical features that allows or confirms unique identification, such as facial images&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;red&quot;&gt;&lt;b&gt;Special category&lt;/b&gt;&lt;span&gt;biometric data used to uniquely identify a person: processing is prohibited unless an exception in Article 9 applies&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;A face photo, under the GDPR&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Editing your own selfie for a profile picture is normally not about identifying anyone. Building a system that matches faces to names is.&lt;/p&gt;
&lt;h2 id=&quot;what-should-you-check-before-uploading&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-should-you-check-before-uploading&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What should you check before uploading?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:4&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Whose face&lt;/b&gt;&lt;span&gt;your own, or someone who agreed to this use&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;What happens to uploads&lt;/b&gt;&lt;span&gt;the service's privacy terms: stored, reviewed, used to improve models?&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Training setting&lt;/b&gt;&lt;span&gt;can you or your company turn off use of your data for training?&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;How long&lt;/b&gt;&lt;span&gt;the retention period, and how to delete&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Four checks before a face goes into an AI tool&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-changes-for-a-team&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-changes-for-a-team&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What changes for a team?&lt;/h2&gt;
&lt;p&gt;A team using AI image tools for real people's photos needs the same care as any other personal data: a reason to process it, the person's agreement where needed, a business account with clear data terms rather than personal accounts, and no customer photos in tools the company has not approved.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://eur-lex.europa.eu/eli/reg/2016/679/oj&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;EUR-Lex: Regulation (EU) 2016/679 (GDPR)&lt;/a&gt;, Article 4 (1) and (14) definitions, Article 9 special categories&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;This is general information, not legal advice.&lt;/p&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;For the same question with code and company data, see &lt;a href=&quot;/blog/claude-code-and-company-data/&quot;&gt;what Claude Code sends and keeps&lt;/a&gt;. For access rules inside a report, see &lt;a href=&quot;/blog/row-level-security-power-bi-explained/&quot;&gt;row-level security in Power BI&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Materialized lake views in Fabric: silver and gold in SQL</title>
    <link href="https://data.benibix.com/blog/materialized-lake-views-fabric/"/>
    <id>https://data.benibix.com/blog/materialized-lake-views-fabric/</id>
    <published>2026-10-31T18:00:00Z</published>
    <updated>2026-10-31T18:00:00Z</updated>
    <summary>Materialized lake views turn bronze, silver and gold into SQL statements that Fabric refreshes in order, with data quality rules built in. Generally available since September 2026.</summary>
    <category term="Fabric"/>
    <category term="Lakehouse"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;materialized lake view&lt;/strong&gt; is a &lt;code&gt;CREATE MATERIALIZED LAKE VIEW ... AS SELECT&lt;/code&gt; statement whose result Fabric saves as a &lt;strong&gt;Delta table&lt;/strong&gt; in your lakehouse and keeps fresh. Fabric works out which view reads which, refreshes them &lt;strong&gt;in that order&lt;/strong&gt;, skips a refresh when nothing changed, and drops or fails on rows that break a &lt;code&gt;CONSTRAINT&lt;/code&gt;. It became &lt;strong&gt;generally available in September 2026&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Most lakehouses move data from bronze to silver to gold with notebooks and a pipeline that runs them in the right order. Every new table means a new notebook, a new step in the pipeline and one more place where a rule can be forgotten. A materialized lake view keeps only the part that matters, the SELECT, and lets Fabric handle the order, the schedule and the retries.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-lake-view-replace&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-lake-view-replace&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a lake view replace?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Notebook and pipeline&lt;/b&gt;&lt;ul&gt;&lt;li&gt;a PySpark notebook per table&lt;/li&gt;&lt;li&gt;a pipeline step per notebook, in the right order&lt;/li&gt;&lt;li&gt;quality checks written by hand&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Materialized lake view&lt;/b&gt;&lt;ul&gt;&lt;li&gt;one SQL statement per table&lt;/li&gt;&lt;li&gt;Fabric reads the dependencies and refreshes in order&lt;/li&gt;&lt;li&gt;CONSTRAINT rules in the statement&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;The same silver table, two ways&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The result is an ordinary Delta table. A Direct Lake semantic model, the SQL analytics endpoint and a notebook all read it the same way, with the same permissions as any other lakehouse table.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-build-silver-and-gold-with-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-silver-and-gold-with-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build silver and gold with it?&lt;/h2&gt;
&lt;p&gt;Say bronze holds six orders, and one has a negative amount from a bad export:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;order_id&lt;/th&gt;&lt;th&gt;region&lt;/th&gt;&lt;th&gt;amount&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1001&lt;/td&gt;&lt;td&gt;North&lt;/td&gt;&lt;td&gt;120.00&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1002&lt;/td&gt;&lt;td&gt;South&lt;/td&gt;&lt;td&gt;80.00&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;1003&lt;/td&gt;&lt;td&gt;North&lt;/td&gt;&lt;td&gt;-15.00&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1004&lt;/td&gt;&lt;td&gt;West&lt;/td&gt;&lt;td&gt;200.00&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1005&lt;/td&gt;&lt;td&gt;South&lt;/td&gt;&lt;td&gt;45.50&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1006&lt;/td&gt;&lt;td&gt;North&lt;/td&gt;&lt;td&gt;60.00&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;bronze.orders, as it arrived&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Silver casts the types and drops any row whose amount is not above zero:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;CREATE&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;OR&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;REPLACE&lt;/i&gt; MATERIALIZED LAKE VIEW silver.orders
(
  &lt;i class=&quot;k&quot;&gt;CONSTRAINT&lt;/i&gt; positive_amount &lt;i class=&quot;f&quot;&gt;CHECK&lt;/i&gt; (amount &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;) &lt;i class=&quot;k&quot;&gt;ON&lt;/i&gt; MISMATCH DROP
)
&lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;SELECT&lt;/i&gt;
  &lt;i class=&quot;f&quot;&gt;CAST&lt;/i&gt;(order_id &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; INT) &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; order_id,
  &lt;i class=&quot;f&quot;&gt;TRIM&lt;/i&gt;(region) &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; region,
  &lt;i class=&quot;f&quot;&gt;CAST&lt;/i&gt;(amount &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;DECIMAL&lt;/i&gt;(&lt;i class=&quot;n&quot;&gt;18&lt;/i&gt;,&lt;i class=&quot;n&quot;&gt;2&lt;/i&gt;)) &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; amount
&lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; bronze.orders;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Gold reads silver, so Fabric knows to refresh it second:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;CREATE&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;OR&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;REPLACE&lt;/i&gt; MATERIALIZED LAKE VIEW gold.sales_by_region
&lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;SELECT&lt;/i&gt;
  region,
  &lt;i class=&quot;f&quot;&gt;COUNT&lt;/i&gt;(*) &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; orders,
  &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt;(amount) &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; sales
&lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; silver.orders
&lt;i class=&quot;k&quot;&gt;GROUP&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;BY&lt;/i&gt; region;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Order 1003 stops at silver, so gold counts five orders worth &lt;strong&gt;505.50&lt;/strong&gt;:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;region&lt;/th&gt;&lt;th&gt;orders&lt;/th&gt;&lt;th&gt;sales&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;North&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;180.00&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;South&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;125.50&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;West&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;200.00&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;505.50&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;gold.sales_by_region after the first refresh&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;code&gt;ON MISMATCH DROP&lt;/code&gt; removes the row and counts it in the lineage view. Write &lt;code&gt;ON MISMATCH FAIL&lt;/code&gt;, or leave the ON MISMATCH part out, and the refresh stops instead; FAIL is the default. Pick DROP for rows you expect now and then, FAIL for rows that mean the source is broken.&lt;/p&gt;
&lt;h2 id=&quot;how-does-it-stay-fresh&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-it-stay-fresh&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does it stay fresh?&lt;/h2&gt;
&lt;p&gt;You do not run the views from a notebook. In the lakehouse, open &lt;strong&gt;Materialized lake views&lt;/strong&gt;, then &lt;strong&gt;Manage&lt;/strong&gt;: the lineage shows every view and what it reads, and a schedule there refreshes them all in dependency order. A pipeline can do the same with the &lt;strong&gt;Refresh Materialized Lake View&lt;/strong&gt; activity after a Copy step, though that activity refreshes every view in the lakehouse, not one.&lt;/p&gt;
&lt;p&gt;On each run Fabric picks one of three strategies:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;No refresh&lt;/b&gt;&lt;ul&gt;&lt;li&gt;the source tables have no new Delta commits&lt;/li&gt;&lt;li&gt;nothing runs&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Incremental&lt;/b&gt;&lt;ul&gt;&lt;li&gt;only the changed rows&lt;/li&gt;&lt;li&gt;needs change data feed on every source&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Full&lt;/b&gt;&lt;ul&gt;&lt;li&gt;rebuilds the view&lt;/li&gt;&lt;li&gt;when changes cannot be applied as a delta, or the data is small&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;What optimal refresh chooses&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Incremental refresh needs Delta &lt;strong&gt;change data feed&lt;/strong&gt; on every table the view reads. Without it Fabric can only skip or rebuild. Turn it on for a source table once:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;ALTER&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;TABLE&lt;/i&gt; bronze.orders &lt;i class=&quot;k&quot;&gt;SET&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;TBLPROPERTIES&lt;/i&gt; (delta.enableChangeDataFeed = true);&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;For updates and deletes in the source, not only appends, a view also needs a &lt;code&gt;REFRESH_HINT ... UNIQUE (order_id)&lt;/code&gt; that names the row key; that part is still in preview.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Refreshing from a notebook.&lt;/strong&gt; Session settings set with &lt;code&gt;spark.conf.set&lt;/code&gt; are not applied in a scheduled refresh, and you lose the dependency order. Author in a notebook, refresh from Manage.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Every run is a full refresh.&lt;/strong&gt; Change data feed is off on one of the sources. The lineage view shows a banner with &lt;strong&gt;Activate CDF&lt;/strong&gt; for the views that could run incrementally.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Logic SQL cannot express.&lt;/strong&gt; No UDFs, no time travel, no temporary views and no INSERT or UPDATE against the view. Machine learning or API calls stay in a notebook.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;An upper-case schema.&lt;/strong&gt; A schema named &lt;code&gt;SILVER&lt;/code&gt; is not supported; use &lt;code&gt;silver&lt;/code&gt; or &lt;code&gt;Silver&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/data-engineering/materialized-lake-views/overview-materialized-lake-view&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What are materialized lake views in Microsoft Fabric?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/data-engineering/materialized-lake-views/create-materialized-lake-view&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Spark SQL reference for materialized lake views&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/data-engineering/materialized-lake-views/refresh-materialized-lake-view&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Optimal refresh for materialized lake views&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/fundamentals/whats-new&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What's new in Microsoft Fabric?&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Take one silver table you already build in a notebook and write its SELECT as a lake view next to it; compare the row counts, then switch the report over. The layers themselves are in &lt;a href=&quot;/blog/medallion-architecture-fabric-lakehouse/&quot;&gt;bronze, silver and gold in a Fabric lakehouse&lt;/a&gt;, and the open course &lt;a href=&quot;/courses/lakehouse-in-three-layers/&quot;&gt;A lakehouse in three layers&lt;/a&gt; builds them in your own workspace.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Make a Power BI report background with an AI image model</title>
    <link href="https://data.benibix.com/blog/ai-background-for-a-power-bi-report/"/>
    <id>https://data.benibix.com/blog/ai-background-for-a-power-bi-report/</id>
    <published>2026-10-31T17:00:00Z</published>
    <updated>2026-10-31T17:00:00Z</updated>
    <summary>Nano Banana and other image models can make a calm background for a report page in a minute. What to ask for so the data stays readable, the size that matches the page, and how to set it in Power BI.</summary>
    <category term="Visuals"/>
    <category term="Report design"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; ask the image model for a &lt;strong&gt;quiet, low-contrast&lt;/strong&gt; design in the page's &lt;strong&gt;shape&lt;/strong&gt; (16:9 for the default page), with &lt;strong&gt;no text, no numbers and no fake charts&lt;/strong&gt;, and big plain areas where the visuals will sit. Make it at least &lt;strong&gt;1280 × 720&lt;/strong&gt;, or 2560 × 1440 to stay sharp. In Power BI, click an empty part of the page, open &lt;strong&gt;Format, Canvas background&lt;/strong&gt;, choose the image, set &lt;strong&gt;Image fit&lt;/strong&gt; to &lt;strong&gt;Fit&lt;/strong&gt; and &lt;strong&gt;Transparency&lt;/strong&gt; to 0%, then give the visuals transparent backgrounds.&lt;/p&gt;
&lt;p&gt;A background makes a report look designed, but a busy one is the fastest way to make it unreadable. The job of the image is to frame the data, never to compete with it.&lt;/p&gt;
&lt;h2 id=&quot;what-should-the-prompt-ask-for&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-should-the-prompt-ask-for&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What should the prompt ask for?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:4&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Shape&lt;/b&gt;&lt;span&gt;&amp;quot;16:9, wide&amp;quot;, so it fits the page without stretching&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Calm&lt;/b&gt;&lt;span&gt;&amp;quot;soft, low contrast, muted colours from #1F2A44 and #2F7CF6&amp;quot;, your theme's colours&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Space&lt;/b&gt;&lt;span&gt;&amp;quot;large empty panels for charts: a top band, three tiles below&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Nothing to read&lt;/b&gt;&lt;span&gt;&amp;quot;no text, no numbers, no icons, no charts&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Four things to put in a background prompt&lt;/figcaption&gt;&lt;/figure&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot;&gt;&lt;code&gt;A 16:9 background for a business dashboard. Flat, calm, low contrast.
Dark navy base with soft panels in slightly lighter navy: a thin band across the top,
three equal tiles below it, one wide panel at the bottom.
No text, no numbers, no icons, no charts, no people.&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Nano Banana, Google's Gemini image model, follows full sentences like these well; say what it must not add as clearly as what it should.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-check-it-before-using-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-check-it-before-using-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you check it before using it?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Squint at it&lt;/strong&gt; with your charts on top: if the background pulls the eye more than the data, it is too strong.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Check contrast:&lt;/strong&gt; labels and numbers must stay readable on every part of it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Look for invented text:&lt;/strong&gt; image models like to add fake words and numbers; remove or regenerate.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;why-not-put-the-charts-in-the-image&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-not-put-the-charts-in-the-image&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why not put the charts in the image?&lt;/h2&gt;
&lt;p&gt;Because an image model draws chart-like shapes without your data. The background holds the layout; the real visuals sit on top and read from the model.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://ai.google.dev/gemini-api/docs/image-generation&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Google AI for Developers: Image generation with Gemini&lt;/a&gt;, prompting the image model&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-report-display-settings&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Report display settings in Power BI&lt;/a&gt;, page sizes&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Match the colours to your theme with &lt;a href=&quot;/blog/report-theme-json-power-bi/&quot;&gt;the report theme JSON&lt;/a&gt;, and see why the charts themselves must come from your data in &lt;a href=&quot;/blog/can-ai-image-models-draw-charts/&quot;&gt;can an AI image model draw a chart?&lt;/a&gt;&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>CTR, CPC and CPM: ad metrics with formulas and DAX</title>
    <link href="https://data.benibix.com/blog/ctr-cpc-cpm-kpi/"/>
    <id>https://data.benibix.com/blog/ctr-cpc-cpm-kpi/</id>
    <published>2026-10-31T12:00:00Z</published>
    <updated>2026-10-31T12:00:00Z</updated>
    <summary>How the ad metrics click-through rate, cost per click and cost per thousand impressions are calculated, how they connect (CPC = CPM / (1000 × CTR)), cost per acquisition, a worked campaign example, the DAX on ad platform exports, and why they must be summed before they are divided.</summary>
    <category term="KPIs"/>
    <category term="Marketing"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;CTR&lt;/strong&gt; (click-through rate) = clicks / impressions. &lt;strong&gt;CPC&lt;/strong&gt; (cost per click) = spend / clicks. &lt;strong&gt;CPM&lt;/strong&gt; (cost per mille) = spend / impressions × 1,000. They are linked: &lt;strong&gt;CPC = CPM / (1,000 × CTR)&lt;/strong&gt;, so a better CTR at the same CPM makes each click cheaper. Add &lt;strong&gt;CPA&lt;/strong&gt; (cost per acquisition) = spend / conversions to reach the outcome. In DAX, sum spend, clicks and impressions first and divide the totals; never average the platform's daily CTR or CPC.&lt;/p&gt;
&lt;p&gt;These metrics diagnose ads: CPM is the price of attention, CTR whether the ad is interesting, CPC the price of a visit, and CPA what an order costs.&lt;/p&gt;
&lt;h2 id=&quot;how-are-they-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-are-they-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How are they calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Ad&lt;/th&gt;&lt;th&gt;Impressions&lt;/th&gt;&lt;th&gt;Clicks&lt;/th&gt;&lt;th&gt;Spend&lt;/th&gt;&lt;th&gt;Conversions&lt;/th&gt;&lt;th&gt;CTR&lt;/th&gt;&lt;th&gt;CPC&lt;/th&gt;&lt;th&gt;CPM&lt;/th&gt;&lt;th&gt;CPA&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Video A&lt;/td&gt;&lt;td&gt;400,000&lt;/td&gt;&lt;td&gt;4,800&lt;/td&gt;&lt;td&gt;2,400&lt;/td&gt;&lt;td&gt;96&lt;/td&gt;&lt;td&gt;1.20%&lt;/td&gt;&lt;td&gt;0.50&lt;/td&gt;&lt;td&gt;6.00&lt;/td&gt;&lt;td&gt;25.00&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Image B&lt;/td&gt;&lt;td&gt;250,000&lt;/td&gt;&lt;td&gt;1,500&lt;/td&gt;&lt;td&gt;1,500&lt;/td&gt;&lt;td&gt;45&lt;/td&gt;&lt;td&gt;0.60%&lt;/td&gt;&lt;td&gt;1.00&lt;/td&gt;&lt;td&gt;6.00&lt;/td&gt;&lt;td&gt;33.33&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;650,000&lt;/td&gt;&lt;td&gt;6,300&lt;/td&gt;&lt;td&gt;3,900&lt;/td&gt;&lt;td&gt;141&lt;/td&gt;&lt;td&gt;0.97%&lt;/td&gt;&lt;td&gt;0.62&lt;/td&gt;&lt;td&gt;6.00&lt;/td&gt;&lt;td&gt;27.66&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Two ads, one week&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Both ads cost the same per thousand impressions (CPM 6.00), but Video A's double CTR halves its CPC: 6.00 / (1,000 × 1.2%) = 0.50.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:4&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;CPM&lt;/b&gt;&lt;span&gt;the price of reaching people: audience, season, competition&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;CTR&lt;/b&gt;&lt;span&gt;whether the ad makes people click: creative, message, targeting fit&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;CPC&lt;/b&gt;&lt;span&gt;the price of a visit: CPM divided by CTR&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;CPA&lt;/b&gt;&lt;span&gt;the price of an outcome: CPC divided by the landing page's conversion rate&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;What each metric diagnoses&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Impressions = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Ads&lt;i class=&quot;m&quot;&gt;[Impressions]&lt;/i&gt; )
Clicks = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Ads&lt;i class=&quot;m&quot;&gt;[Clicks]&lt;/i&gt; )
Ad Spend = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Ads&lt;i class=&quot;m&quot;&gt;[Spend]&lt;/i&gt; )
Conversions = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Ads&lt;i class=&quot;m&quot;&gt;[Conversions]&lt;/i&gt; )

CTR = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Clicks]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Impressions]&lt;/i&gt; )
CPC = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Ad Spend]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Clicks]&lt;/i&gt; )
CPM = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Ad Spend]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Impressions]&lt;/i&gt; ) * &lt;i class=&quot;n&quot;&gt;1000&lt;/i&gt;
CPA = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Ad Spend]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Conversions]&lt;/i&gt; )
Click to Conversion % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Conversions]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Clicks]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Load the platforms' exports into one Ads table with the same columns (Date, Platform, Campaign, Ad, Impressions, Clicks, Spend, Conversions), converting currencies on the way in. All totals then work across platforms.&lt;/p&gt;
&lt;h2 id=&quot;why-must-you-divide-totals&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-must-you-divide-totals&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why must you divide totals?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Day&lt;/th&gt;&lt;th&gt;Impressions&lt;/th&gt;&lt;th&gt;Clicks&lt;/th&gt;&lt;th&gt;Daily CTR&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Mon&lt;/td&gt;&lt;td&gt;100,000&lt;/td&gt;&lt;td&gt;1,000&lt;/td&gt;&lt;td&gt;1.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Tue&lt;/td&gt;&lt;td&gt;10,000&lt;/td&gt;&lt;td&gt;300&lt;/td&gt;&lt;td&gt;3.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;Average of daily CTR&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;2.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total clicks / total impressions&lt;/td&gt;&lt;td&gt;110,000&lt;/td&gt;&lt;td&gt;1,300&lt;/td&gt;&lt;td&gt;1.18%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Averaging CTR goes wrong&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;A quiet day counts as much as a busy one in an average of rates. Measures that sum first and divide last are always right, at every level.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Averaging platform rates.&lt;/strong&gt; Sum, then divide.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Different click definitions.&lt;/strong&gt; Link clicks, all clicks, outbound clicks; pick one per platform.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Different conversion counts.&lt;/strong&gt; Each platform attributes its own; compare with your orders (see &lt;a href=&quot;/blog/roas-kpi/&quot;&gt;ROAS&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;CTR as the goal.&lt;/strong&gt; A clickbait ad wins on CTR and loses on CPA; judge by CPA or ROAS.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/sum-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SUM function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/divide-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DIVIDE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-query/append-queries&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Append queries in Power Query&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Append all ad platforms into one table and build the five measures; then sort ads by CPA. &lt;a href=&quot;/blog/cost-per-lead-and-mql-to-sql-kpi/&quot;&gt;Cost per lead and MQL to SQL&lt;/a&gt; continues the funnel for B2B.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Custom visuals in Power BI: AppSource and certified</title>
    <link href="https://data.benibix.com/blog/custom-visuals-power-bi/"/>
    <id>https://data.benibix.com/blog/custom-visuals-power-bi/</id>
    <published>2026-10-31T12:00:00Z</published>
    <updated>2026-10-31T12:00:00Z</updated>
    <summary>Where Power BI custom visuals come from (AppSource, organizational visuals, your own with the SDK), what certified means, licensing and data privacy, admin settings, popular custom chart types, and how to choose one safely.</summary>
    <category term="Visuals"/>
    <category term="More visuals"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;custom visuals&lt;/strong&gt; add chart types that Power BI does not have built in: bullet charts, Gantt charts, Sankey diagrams, box plots, calendars and more. Get them from &lt;strong&gt;AppSource&lt;/strong&gt; (in &lt;strong&gt;Visualizations, Get more visuals&lt;/strong&gt;), from your organisation's &lt;strong&gt;organizational visuals&lt;/strong&gt; list that an admin manages, or build your own with the Power BI visuals SDK. Prefer &lt;strong&gt;certified&lt;/strong&gt; visuals: Microsoft has checked their code and they do not call outside services. Read the publisher's licence: download is free, but some visuals need a paid licence for all features.&lt;/p&gt;
&lt;p&gt;The built-in visuals cover most needs. The rest (a Gantt plan, a Sankey flow of customers between plans, a bullet chart of 20 targets) is where custom visuals come in, and where a careless pick can send data out of your tenant.&lt;/p&gt;
&lt;h2 id=&quot;where-do-custom-visuals-come-from&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-custom-visuals-come-from&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do custom visuals come from?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Source&lt;/th&gt;&lt;th&gt;Who controls it&lt;/th&gt;&lt;th&gt;Good for&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;AppSource&lt;/td&gt;&lt;td&gt;publishers; Microsoft tests and approves them&lt;/td&gt;&lt;td&gt;finding a visual; certified ones are checked further&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Organizational visuals&lt;/td&gt;&lt;td&gt;your Power BI admin&lt;/td&gt;&lt;td&gt;an approved list everyone in the company can use&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Your own (SDK)&lt;/td&gt;&lt;td&gt;your developers&lt;/td&gt;&lt;td&gt;a chart type nobody offers, or company branding&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Three sources&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Microsoft notes two things about AppSource visuals: visuals built with the SDK may import data from or send data to a service outside your tenant's region, and imported visuals may be updated automatically without notice.&lt;/p&gt;
&lt;h2 id=&quot;what-does-certified-mean&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-certified-mean&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does certified mean?&lt;/h2&gt;
&lt;p&gt;A certified visual has passed Microsoft's code review: it does not access external services or resources, it meets the coding requirements, and it gets features noncertified visuals lack, such as export to PowerPoint and showing the visual in the emails of report page subscriptions. Look for the certified badge in AppSource, or filter by it.&lt;/p&gt;
&lt;p&gt;Admins can allow only certified visuals in the tenant, and can add approved visuals (certified or not, after review) to the organizational visuals list.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-add-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-add-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you add one?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;In &lt;strong&gt;Visualizations&lt;/strong&gt;, select &lt;strong&gt;...&lt;/strong&gt; (Get more visuals), then &lt;strong&gt;Get more visuals&lt;/strong&gt; for AppSource, or &lt;strong&gt;My organization&lt;/strong&gt; for organizational visuals.&lt;/li&gt;&lt;li&gt;Pick the visual, check the certified badge, the publisher and the licence, and &lt;strong&gt;Add&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;It appears in the Visualizations pane for this report. Use it like any other visual: fields in its wells, formatting in &lt;strong&gt;Format visual&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;To import a &lt;code&gt;.pbiviz&lt;/code&gt; file from your developers: &lt;strong&gt;Import a visual from a file&lt;/strong&gt; (if your admin allows it).&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Licensing models vary: free, free with paid features, or licensed through the Microsoft 365 admin center. A visual that shows a watermark or &amp;quot;trial&amp;quot; for readers without a licence is a surprise in a board meeting.&lt;/p&gt;
&lt;h2 id=&quot;which-custom-visuals-are-common&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-custom-visuals-are-common&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which custom visuals are common?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Chart&lt;/th&gt;&lt;th&gt;Answers&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Bullet chart&lt;/td&gt;&lt;td&gt;many values against their targets in a compact list&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Gantt&lt;/td&gt;&lt;td&gt;tasks over time with durations and dependencies&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sankey&lt;/td&gt;&lt;td&gt;flows between stages or states (plan changes, page paths)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Box and whisker&lt;/td&gt;&lt;td&gt;distribution of a measure per group&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Calendar heatmap&lt;/td&gt;&lt;td&gt;activity per day across a year&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Chiclet or tile slicers&lt;/td&gt;&lt;td&gt;now mostly covered by the built-in button slicer&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;The measures behind them are ordinary DAX. A bullet chart of revenue against target per sales rep needs only:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )
Revenue Target = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Targets&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )
Target Attainment % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue Target]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Uncertified visuals with sensitive data.&lt;/strong&gt; They may send data out; use certified or reviewed organizational visuals.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A visual that disappears.&lt;/strong&gt; Publishers can stop maintaining a visual; prefer well-known publishers and keep a fallback with built-in visuals.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Silent updates.&lt;/strong&gt; AppSource visuals update automatically; test reports after updates. Organizational visuals give the admin control over the version.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Licences for readers.&lt;/strong&gt; Paid features may need a licence per reader; check before rolling out.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A custom visual where a built-in one exists.&lt;/strong&gt; Built-in visuals get the theme, accessibility features and performance work; use them first.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/developer/visuals/power-bi-custom-visuals&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What are custom visuals in Power BI and where can I get them?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/developer/visuals/power-bi-custom-visuals-certified&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Certified Power BI visuals&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/admin/organizational-visuals&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Manage Power BI visuals admin settings&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Check whether a built-in visual can answer the question first; if not, pick a certified visual from a known publisher, or ask your admin to add it to the organizational visuals. &lt;a href=&quot;/blog/which-power-bi-chart/&quot;&gt;Which chart for which question&lt;/a&gt; maps questions to the built-in visuals.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Refresh data only or sync schema? Power BI's refresh menu</title>
    <link href="https://data.benibix.com/blog/power-bi-refresh-options-sync-schema/"/>
    <id>https://data.benibix.com/blog/power-bi-refresh-options-sync-schema/</id>
    <published>2026-10-31T12:00:00Z</published>
    <updated>2026-10-31T12:00:00Z</updated>
    <summary>Power BI's Refresh button now has three options, Refresh schema and data, Sync schema only and Refresh data only, and works per table. What each does and when to use it.</summary>
    <category term="Power BI"/>
    <category term="Modelling"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; expand the &lt;strong&gt;Refresh&lt;/strong&gt; button on the Home ribbon or in the Data pane. &lt;strong&gt;Refresh schema and data&lt;/strong&gt; is what Refresh always did: it syncs the model with the source's columns, then loads the data. &lt;strong&gt;Sync schema only&lt;/strong&gt; brings in new or changed columns without loading data. &lt;strong&gt;Refresh data only&lt;/strong&gt; loads the latest rows and &lt;strong&gt;keeps the model's columns as they are&lt;/strong&gt;. Pick a single table first and the same three options apply to that table alone. Microsoft shipped this in the &lt;strong&gt;August 2026&lt;/strong&gt; Power BI update.&lt;/p&gt;
&lt;p&gt;Until now every refresh started with a schema sync. That is handy until the source changes under you: an engineer adds a column to a lakehouse table, and the next refresh pulls it into a model that was published, tested and in use. Or one table changed and you wait for every table in the model to reload. The new menu separates the two jobs and lets you point them at one table.&lt;/p&gt;
&lt;h2 id=&quot;what-does-each-option-do&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-each-option-do&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does each option do?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Refresh schema and data&lt;/b&gt;&lt;ul&gt;&lt;li&gt;sync columns, then load rows&lt;/li&gt;&lt;li&gt;the old default&lt;/li&gt;&lt;li&gt;for when you want the source's changes&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Sync schema only&lt;/b&gt;&lt;ul&gt;&lt;li&gt;new columns and type changes come in&lt;/li&gt;&lt;li&gt;no rows are loaded&lt;/li&gt;&lt;li&gt;quick&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Refresh data only&lt;/b&gt;&lt;ul&gt;&lt;li&gt;the latest rows&lt;/li&gt;&lt;li&gt;the model's columns stay as they are&lt;/li&gt;&lt;li&gt;safe while the source is changing&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Three ways to refresh&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-does-it-look-like-with-a-real-change&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-it-look-like-with-a-real-change&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does it look like with a real change?&lt;/h2&gt;
&lt;p&gt;A Direct Lake model reads the gold table &lt;code&gt;sales&lt;/code&gt; in a lakehouse. On Monday an engineer adds a column &lt;code&gt;discount_pct&lt;/code&gt; to that table for a report that is still being built. Your model is in use, and you want this morning's rows in it, nothing else:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Option&lt;/th&gt;&lt;th&gt;discount_pct in the model?&lt;/th&gt;&lt;th&gt;Latest rows?&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Refresh schema and data&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sync schema only&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Refresh data only&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The same change, three choices&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;strong&gt;Refresh data only&lt;/strong&gt; is the one you want: the report shows today's sales and the published model does not change. When the new report is ready, a &lt;strong&gt;Sync schema only&lt;/strong&gt; adds the column, and you build its measures before anyone sees it.&lt;/p&gt;
&lt;h2 id=&quot;when-do-you-refresh-just-one-table&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-do-you-refresh-just-one-table&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When do you refresh just one table?&lt;/h2&gt;
&lt;p&gt;Say a model has three Import tables, and a full refresh takes about 21 minutes:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;bar&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;bar chart: Sales 18; Customers 2; Product 1&quot;&gt;&lt;line x1=&quot;85.2&quot; y1=&quot;8&quot; x2=&quot;85.2&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;85.2&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;212.9&quot; y1=&quot;8&quot; x2=&quot;212.9&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;212.9&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;5&lt;/text&gt;&lt;line x1=&quot;340.6&quot; y1=&quot;8&quot; x2=&quot;340.6&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;340.6&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;10&lt;/text&gt;&lt;line x1=&quot;468.3&quot; y1=&quot;8&quot; x2=&quot;468.3&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;468.3&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;15&lt;/text&gt;&lt;line x1=&quot;596&quot; y1=&quot;8&quot; x2=&quot;596&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;596&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;20&lt;/text&gt;&lt;rect x=&quot;85.2&quot; y=&quot;22.8&quot; width=&quot;459.7&quot; height=&quot;55.6&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;550.9&quot; y=&quot;55.7&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;18&lt;/text&gt;&lt;text x=&quot;75.2&quot; y=&quot;55.7&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Sales&lt;/text&gt;&lt;rect x=&quot;85.2&quot; y=&quot;110.2&quot; width=&quot;51.1&quot; height=&quot;55.6&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;142.3&quot; y=&quot;143&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;2&lt;/text&gt;&lt;text x=&quot;75.2&quot; y=&quot;143&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Customers&lt;/text&gt;&lt;rect x=&quot;85.2&quot; y=&quot;197.5&quot; width=&quot;25.5&quot; height=&quot;55.6&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;116.7&quot; y=&quot;230.3&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;1&lt;/text&gt;&lt;text x=&quot;75.2&quot; y=&quot;230.3&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Product&lt;/text&gt;&lt;line x1=&quot;85.2&quot; y1=&quot;8&quot; x2=&quot;85.2&quot; y2=&quot;270&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Refresh time per table in an example model (minutes)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;A customer's region was fixed at the source and the report must show it now. Select &lt;strong&gt;Customers&lt;/strong&gt; in the Data pane and refresh that table: about 2 minutes instead of 21, and Sales is not touched. The same works for schema: sync one table's columns without checking all the others.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Data only after a column was removed at the source.&lt;/strong&gt; The model still expects the column, so the data load can fail. Sync the schema, fix the measures that used it, then refresh.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Forgetting the sync.&lt;/strong&gt; A new column you need never appears because every refresh since was data only. When a column is missing, sync that table's schema first.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;One table out of step.&lt;/strong&gt; Refreshing only Sales while Customers is a day older can leave sales rows for customers the model does not have yet; they land on the blank row. Refresh the dimension too when new keys arrive.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/connect-data/refresh-data&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Data refresh in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/fundamentals/desktop-latest-update&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What's new in Power BI?&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Next time a source table changes, open the Refresh menu instead of clicking the button, and choose on purpose. For large Import tables that take most of the time, &lt;a href=&quot;/blog/incremental-refresh-power-bi-explained/&quot;&gt;incremental refresh in Power BI&lt;/a&gt; reloads only the newest days, and &lt;a href=&quot;/blog/direct-lake-power-bi-explained/&quot;&gt;Direct Lake&lt;/a&gt; skips the copy altogether.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>OPTIMIZE and VACUUM on a schedule: Lakehouse Maintenance</title>
    <link href="https://data.benibix.com/blog/lakehouse-maintenance-activity-fabric/"/>
    <id>https://data.benibix.com/blog/lakehouse-maintenance-activity-fabric/</id>
    <published>2026-10-31T06:00:00Z</published>
    <updated>2026-10-31T06:00:00Z</updated>
    <summary>The Lakehouse Maintenance activity runs OPTIMIZE and VACUUM on lakehouse Delta tables as a pipeline step, right after the load. How to set it up, and why small files need it.</summary>
    <category term="Fabric"/>
    <category term="Lakehouse"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; add a &lt;strong&gt;Lakehouse Maintenance&lt;/strong&gt; activity to the pipeline that loads your tables. Point it at a lakehouse and a table, choose &lt;strong&gt;Optimize&lt;/strong&gt; (with V-Order if you like) to compact small files, or &lt;strong&gt;Vacuum&lt;/strong&gt; to delete files the table no longer uses. It runs synchronously, so the next step starts only when maintenance is done.&lt;/p&gt;
&lt;p&gt;A Delta table loaded in small batches gets a new set of Parquet files on every run. Reads slow down, and a Direct Lake model has a hard limit on files per table. Until now that meant a notebook with &lt;code&gt;OPTIMIZE&lt;/code&gt; in it, a schedule of its own, and hoping it ran after the load and not during it. As a pipeline step it simply runs next.&lt;/p&gt;
&lt;h2 id=&quot;why-do-small-files-pile-up&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-do-small-files-pile-up&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why do small files pile up?&lt;/h2&gt;
&lt;p&gt;Say a pipeline appends to &lt;code&gt;sales&lt;/code&gt; every hour and each run writes one file. That is &lt;strong&gt;24 files a day&lt;/strong&gt;. On capacities F2 to F32, a Direct Lake table may have at most &lt;strong&gt;1,000 Parquet files&lt;/strong&gt;:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;line&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;Files&lt;/li&gt;&lt;li class=&quot;k1&quot;&gt;Direct Lake limit on F2 to F32&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;line chart: Day 10 240, 1,000; Day 20 480, 1,000; Day 30 720, 1,000; Day 40 960, 1,000; Day 50 1,200, 1,000&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;626&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;250&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;626&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;500&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;626&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;750&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;626&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;1,000&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;626&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;1,250&lt;/text&gt;&lt;polyline points=&quot;52,64.4 195.5,64.4 339,64.4 482.5,64.4 626,64.4&quot; class=&quot;ln k1&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;64.4&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;195.5&quot; cy=&quot;64.4&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;339&quot; cy=&quot;64.4&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;482.5&quot; cy=&quot;64.4&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;64.4&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;polyline points=&quot;52,217.6 195.5,169.2 339,120.8 482.5,72.5 626,24.1&quot; class=&quot;ln k0&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;217.6&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;195.5&quot; cy=&quot;169.2&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;339&quot; cy=&quot;120.8&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;482.5&quot; cy=&quot;72.5&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;24.1&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;text x=&quot;52&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Day 10&lt;/text&gt;&lt;text x=&quot;195.5&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Day 20&lt;/text&gt;&lt;text x=&quot;339&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Day 30&lt;/text&gt;&lt;text x=&quot;482.5&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Day 40&lt;/text&gt;&lt;text x=&quot;626&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Day 50&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Files in the sales table with an hourly load and no OPTIMIZE&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;After 41 days the table holds 984 files; on day 42 it passes the limit at 1,008. A Direct Lake on OneLake model then fails to refresh until the table is optimised. A daily OPTIMIZE folds each day's 24 files into a few larger ones and the count stays flat.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-set-it-up&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-set-it-up&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you set it up?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:3&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Copy&lt;/b&gt;&lt;span&gt;appends the hour's rows to sales&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Lakehouse Maintenance&lt;/b&gt;&lt;span&gt;Optimize with V-Order on sales&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Refresh SQL analytics endpoint&lt;/b&gt;&lt;span&gt;so SQL readers see the new files&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One pipeline: load, compact, publish&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ol&gt;&lt;li&gt;In the pipeline, search the Activities pane for &lt;strong&gt;Lakehouse Maintenance&lt;/strong&gt; and drop it after the Copy step, joined &lt;strong&gt;on success&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;On &lt;strong&gt;Settings&lt;/strong&gt;, pick the connection, the lakehouse and the table.&lt;/li&gt;&lt;li&gt;Choose the operation: &lt;strong&gt;Optimize&lt;/strong&gt; compacts small files into larger ones, and &lt;strong&gt;Apply V-Order&lt;/strong&gt; sorts and encodes them for faster reads. &lt;strong&gt;Vacuum&lt;/strong&gt; removes files no longer referenced by the Delta log.&lt;/li&gt;&lt;li&gt;Save, then &lt;strong&gt;Run&lt;/strong&gt; or &lt;strong&gt;Schedule&lt;/strong&gt;. The Output tab under the canvas shows each run.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;If maintenance fails for a table, the activity fails, so an &lt;strong&gt;on failure&lt;/strong&gt; path can send an alert before the next load piles on more files.&lt;/p&gt;
&lt;h2 id=&quot;when-do-you-run-optimize-and-when-vacuum&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-do-you-run-optimize-and-when-vacuum&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When do you run Optimize, and when Vacuum?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Optimize&lt;/b&gt;&lt;ul&gt;&lt;li&gt;after each large load or once a day&lt;/li&gt;&lt;li&gt;compacts files&lt;/li&gt;&lt;li&gt;V-Order costs about 15% more write time and can give up to 50% more compression&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Vacuum&lt;/b&gt;&lt;ul&gt;&lt;li&gt;once a week is plenty&lt;/li&gt;&lt;li&gt;deletes unreferenced files older than the retention, 7 days by default&lt;/li&gt;&lt;li&gt;frees storage&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Two operations, two rhythms&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Optimize does not delete the old small files; it writes new large ones and the Delta log stops pointing at the old ones. That is why Vacuum exists: it removes them once they are older than the retention period. Keep the 7 days unless you have a reason. A shorter retention cuts Delta time travel and can break a reader that is still on an older version, and Fabric refuses anything under 7 days unless you turn the check off in your Spark environment.&lt;/p&gt;
&lt;p&gt;The same two commands, for a notebook or a table's &lt;strong&gt;Maintenance&lt;/strong&gt; menu in the lakehouse explorer:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;OPTIMIZE sales VORDER;
VACUUM sales RETAIN &lt;i class=&quot;n&quot;&gt;168&lt;/i&gt; HOURS;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;168 hours is the 7 days written out.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A lakehouse with schemas.&lt;/strong&gt; The activity does not support schema-enabled lakehouses yet. Until it does, keep the notebook for those tables.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A Private Link workspace.&lt;/strong&gt; The activity does not run there yet either.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Vacuum with a short retention.&lt;/strong&gt; Time travel to before the retention fails, and so does a long query that started on an old version. Seven days is the safe floor.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Optimize while the load still runs.&lt;/strong&gt; Two writers on one table can conflict. Chain maintenance after the load with an on-success arrow instead of giving it its own schedule.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/data-factory/lakehouse-maintenance-activity&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Lakehouse maintenance activity&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-table-maintenance&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Run Delta table maintenance in lakehouse&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/data-factory/refresh-sql-endpoint-activity&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Refresh SQL analytics endpoint activity&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/fundamentals/direct-lake-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Direct Lake overview&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Open the lakehouse, look at your most often loaded table and count its files; if it is in the hundreds, add the activity after its load today. What V-Order does to the files is in &lt;a href=&quot;/blog/delta-tables-and-v-order-fabric/&quot;&gt;Delta tables and V-Order in Fabric&lt;/a&gt;, and why the file limit matters in &lt;a href=&quot;/blog/direct-lake-power-bi-explained/&quot;&gt;Direct Lake: Power BI reports straight from the lake&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Connect Claude Code to a database with MCP, safely</title>
    <link href="https://data.benibix.com/blog/connect-claude-code-to-a-database/"/>
    <id>https://data.benibix.com/blog/connect-claude-code-to-a-database/</id>
    <published>2026-10-31T01:00:00Z</published>
    <updated>2026-10-31T01:00:00Z</updated>
    <summary>One command adds an MCP server to Claude Code. For a database, the command is the easy part: the scope, the login and the limits decide whether it is safe. The command, the three scopes, and a checklist before you connect.</summary>
    <category term="AI"/>
    <category term="MCP"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; add the server with &lt;code&gt;claude mcp add&lt;/code&gt;, a name, and the command that starts it after &lt;code&gt;--&lt;/code&gt;, for example &lt;code&gt;claude mcp add --transport stdio warehouse -- &amp;lt;command that starts your database MCP server&amp;gt;&lt;/code&gt;. Pick the &lt;strong&gt;scope&lt;/strong&gt;: &lt;strong&gt;local&lt;/strong&gt; (you, this project, the default), &lt;strong&gt;project&lt;/strong&gt; (the team, saved in &lt;code&gt;.mcp.json&lt;/code&gt;), or &lt;strong&gt;user&lt;/strong&gt; (you, every project). For a database, connect with a &lt;strong&gt;read-only login&lt;/strong&gt; to a &lt;strong&gt;test or reporting copy&lt;/strong&gt;, and never put the password in &lt;code&gt;.mcp.json&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Once Claude Code can query the database itself, it stops guessing column names and starts checking its own answers. That is the benefit. The risk is the same: it can run whatever the login allows.&lt;/p&gt;
&lt;h2 id=&quot;what-are-the-three-scopes&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-three-scopes&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the three scopes?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Scope&lt;/th&gt;&lt;th&gt;Saved in&lt;/th&gt;&lt;th&gt;Who has it&lt;/th&gt;&lt;th&gt;Good for&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;local (default)&lt;/td&gt;&lt;td&gt;your user settings, for this project&lt;/td&gt;&lt;td&gt;Only you, in this project&lt;/td&gt;&lt;td&gt;Trying a server, personal credentials&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;project&lt;/td&gt;&lt;td&gt;.mcp.json in the project&lt;/td&gt;&lt;td&gt;Everyone who opens the project&lt;/td&gt;&lt;td&gt;A shared, read-only reporting database&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;user&lt;/td&gt;&lt;td&gt;your user settings&lt;/td&gt;&lt;td&gt;You, in every project&lt;/td&gt;&lt;td&gt;A server you use everywhere&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Where the server is saved, and who gets it&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Choose project scope with &lt;code&gt;--scope project&lt;/code&gt;. Claude Code asks each person to approve project servers before they are used.&lt;/p&gt;
&lt;h2 id=&quot;what-should-you-check-before-connecting&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-should-you-check-before-connecting&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What should you check before connecting?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:4&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Login&lt;/b&gt;&lt;span&gt;a database user that can only read, on the schemas it needs&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Target&lt;/b&gt;&lt;span&gt;a test or reporting copy, not the production system&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Limits&lt;/b&gt;&lt;span&gt;a row limit and a timeout on queries&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Secrets&lt;/b&gt;&lt;span&gt;passwords from environment variables, never in .mcp.json&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Four checks for a database server&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-see-that-it-works&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-see-that-it-works&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you see that it works?&lt;/h2&gt;
&lt;p&gt;Type &lt;code&gt;/mcp&lt;/code&gt; in Claude Code: it lists the servers, whether each is connected, and its tools. Then ask something you can check: &amp;quot;How many rows are in the orders table?&amp;quot; and compare with your own count.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/mcp&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Connect Claude Code to tools via MCP&lt;/a&gt;, &lt;code&gt;claude mcp add&lt;/code&gt;, scopes and &lt;code&gt;/mcp&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Read what a server can offer in &lt;a href=&quot;/blog/mcp-for-data-tools-resources-prompts/&quot;&gt;MCP for data: tools, resources and prompts&lt;/a&gt;. For the access rules inside a Power BI model, see &lt;a href=&quot;/blog/row-level-security-power-bi-explained/&quot;&gt;row-level security&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Calculated columns in Direct Lake: what works (preview)</title>
    <link href="https://data.benibix.com/blog/direct-lake-calculated-columns/"/>
    <id>https://data.benibix.com/blog/direct-lake-calculated-columns/</id>
    <published>2026-10-31T00:00:00Z</published>
    <updated>2026-10-31T00:00:00Z</updated>
    <summary>Direct Lake on OneLake models can now have DAX calculated columns, in preview. They are worked out at query time for each viewer, so they suit translations and user-aware logic, not relationships.</summary>
    <category term="Power BI"/>
    <category term="Modelling"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; since the &lt;strong&gt;August 2026&lt;/strong&gt; update you can add a DAX calculated column to a table in a &lt;strong&gt;Direct Lake on OneLake&lt;/strong&gt; model, in Power BI Desktop or in web modelling, without changing its storage mode. It is in &lt;strong&gt;preview&lt;/strong&gt;, and its &lt;strong&gt;Expression Context&lt;/strong&gt; must be &lt;strong&gt;User Context&lt;/strong&gt;: the column is &lt;strong&gt;not stored&lt;/strong&gt;, it is worked out &lt;strong&gt;at query time&lt;/strong&gt; for whoever is looking. That makes it right for things like a product name in the viewer's language, and wrong for anything a relationship or a heavy visual depends on.&lt;/p&gt;
&lt;p&gt;Direct Lake models used to have no calculated columns at all: every column had to exist in the Delta table. That is still the right home for most columns. But some values depend on who is looking, like their language, and no table in the lake can hold those. This is the gap the preview fills.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-use-them&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-use-them&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you use them?&lt;/h2&gt;
&lt;p&gt;Each storage mode stores, or does not store, a calculated column differently:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Storage mode&lt;/th&gt;&lt;th&gt;Standard (default)&lt;/th&gt;&lt;th&gt;User Context&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Import&lt;/td&gt;&lt;td&gt;stored at refresh&lt;/td&gt;&lt;td&gt;worked out at query time&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Direct Lake on OneLake&lt;/td&gt;&lt;td&gt;not available&lt;/td&gt;&lt;td&gt;worked out at query time (preview)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Direct Lake on SQL&lt;/td&gt;&lt;td&gt;not available&lt;/td&gt;&lt;td&gt;not available&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DirectQuery&lt;/td&gt;&lt;td&gt;worked out at query time&lt;/td&gt;&lt;td&gt;worked out at query time&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Calculated columns by storage mode and Expression Context&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;So on Direct Lake on OneLake there is one kind: User Context, never stored. On Direct Lake on SQL there are still none.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-good-one-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-good-one-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a good one look like?&lt;/h2&gt;
&lt;p&gt;A &lt;code&gt;Product&lt;/code&gt; gold table has an English and a German name. Viewers whose language is German should see German, everyone else English:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Product Name =
&lt;i class=&quot;f&quot;&gt;SWITCH&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;LEFT&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;USERCULTURE&lt;/i&gt; (), &lt;i class=&quot;n&quot;&gt;2&lt;/i&gt; ),
    &lt;i class=&quot;s&quot;&gt;&amp;quot;de&amp;quot;&lt;/i&gt;, Product&lt;i class=&quot;m&quot;&gt;[Name_DE]&lt;/i&gt;,
    Product&lt;i class=&quot;m&quot;&gt;[Name_EN]&lt;/i&gt;
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Set the column's &lt;strong&gt;Expression Context&lt;/strong&gt; property to &lt;strong&gt;User Context&lt;/strong&gt;. &lt;code&gt;USERCULTURE&lt;/code&gt; returns the viewer's locale, from their language setting in the Power BI service (by default, their browser's language):&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Viewer's locale&lt;/th&gt;&lt;th&gt;LEFT of it&lt;/th&gt;&lt;th&gt;Product Name shown&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;en-US&lt;/td&gt;&lt;td&gt;en&lt;/td&gt;&lt;td&gt;Road bike&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;de-AT&lt;/td&gt;&lt;td&gt;de&lt;/td&gt;&lt;td&gt;Rennrad&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;fr-FR&lt;/td&gt;&lt;td&gt;fr&lt;/td&gt;&lt;td&gt;Road bike&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The same row of Product for three viewers&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;French has no column of its own, so it falls through to English. Adding &lt;code&gt;&amp;quot;fr&amp;quot;, Product[Name_FR]&lt;/code&gt; and the column in gold would fix it.&lt;/p&gt;
&lt;h2 id=&quot;why-not-put-every-column-here&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-not-put-every-column-here&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why not put every column here?&lt;/h2&gt;
&lt;p&gt;Because nothing is stored, every query that uses the column works it out again, row by row. A stored column costs time at refresh; an unstored one costs time on every visual. For a few thousand products that is nothing. For a price band on a 50-million-row fact table it is felt on every page.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Same for every viewer&lt;/b&gt;&lt;span&gt;a price band, a full name, a fiscal year: build it in the gold table, in SQL or a notebook&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Depends on the viewer&lt;/b&gt;&lt;span&gt;a language, a user's own label: a User Context calculated column&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Needed by a relationship&lt;/b&gt;&lt;span&gt;a key: only in the table, never calculated here&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Where a new column belongs&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Using it in a relationship.&lt;/strong&gt; Unstored columns cannot be keys of a relationship. Build keys in the lake.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A slow fact table.&lt;/strong&gt; A calculated column on the largest table runs on every query that touches it. Move the logic to gold, or onto a smaller dimension.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Expecting the old Import behaviour.&lt;/strong&gt; In an Import model with the default Standard context, &lt;code&gt;USERCULTURE&lt;/code&gt; in a column is fixed at refresh with an invariant locale, so everyone saw the same value. Here it changes per viewer. Test with two language settings before you publish.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Relying on a preview.&lt;/strong&gt; Preview features can still change. Keep the model working without the column, or be ready to adjust it.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-calculated-columns&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create calculated columns in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/userculture-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: USERCULTURE&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/fundamentals/desktop-latest-update&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What's new in Power BI?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/fundamentals/direct-lake-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Direct Lake overview&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;List the calculated columns you dropped when you moved a model to Direct Lake. Most belong in gold; the one or two that depend on the viewer can come back as User Context columns. How Direct Lake reads the lake is in &lt;a href=&quot;/blog/direct-lake-power-bi-explained/&quot;&gt;Direct Lake: Power BI reports straight from the lake&lt;/a&gt;, and when a column beats a measure in &lt;a href=&quot;/blog/measures-vs-calculated-columns-dax/&quot;&gt;measures vs calculated columns in DAX&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Copy job with CDC in Fabric: updates and deletes too</title>
    <link href="https://data.benibix.com/blog/copy-job-cdc-fabric/"/>
    <id>https://data.benibix.com/blog/copy-job-cdc-fabric/</id>
    <published>2026-10-30T18:00:00Z</published>
    <updated>2026-10-30T18:00:00Z</updated>
    <summary>A Fabric Copy job reads a CDC-enabled source and applies inserts, updates and deletes to the destination, as a Merge or as SCD Type 2 history. When to pick it over a watermark.</summary>
    <category term="Fabric"/>
    <category term="Ingest and real time"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; turn on &lt;strong&gt;change data capture&lt;/strong&gt; on the source tables, create a &lt;strong&gt;Copy job&lt;/strong&gt; with &lt;strong&gt;incremental copy&lt;/strong&gt;, and it picks CDC on its own for those tables. Each run then copies only the rows that changed, &lt;strong&gt;deletes included&lt;/strong&gt;, and writes them either as a &lt;strong&gt;Merge&lt;/strong&gt; (the destination mirrors the source) or as &lt;strong&gt;SCD Type 2&lt;/strong&gt; (every old version kept, with &lt;code&gt;Valid_From&lt;/code&gt;, &lt;code&gt;Valid_To&lt;/code&gt; and &lt;code&gt;Is_Current&lt;/code&gt;). A watermark column can do inserts and updates, but never sees a delete.&lt;/p&gt;
&lt;p&gt;Most incremental loads compare a &lt;code&gt;modified_at&lt;/code&gt; column with the last run. That works until a row is deleted at the source: it has no new timestamp, so it stays in the lakehouse forever and the report counts a customer who is gone. CDC reads the database's own change log instead, so the delete arrives like any other change.&lt;/p&gt;
&lt;h2 id=&quot;cdc-or-a-watermark&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#cdc-or-a-watermark&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;CDC or a watermark?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Watermark&lt;/b&gt;&lt;ul&gt;&lt;li&gt;compares a column (datetime, date, integer, ROWVERSION) with the last run&lt;/li&gt;&lt;li&gt;inserts and updates&lt;/li&gt;&lt;li&gt;no setup on the source&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;CDC&lt;/b&gt;&lt;ul&gt;&lt;li&gt;reads the source's change log&lt;/li&gt;&lt;li&gt;inserts, updates and deletes&lt;/li&gt;&lt;li&gt;CDC turned on at the source&lt;/li&gt;&lt;li&gt;needed for SCD Type 2&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Two ways a Copy job finds changes&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The Copy job finds the CDC-enabled tables itself. One catch: if a single job mixes tables with CDC and tables without, it treats &lt;strong&gt;all of them&lt;/strong&gt; as watermark copies. Keep the CDC tables in a job of their own.&lt;/p&gt;
&lt;h2 id=&quot;what-happens-to-the-rows&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-happens-to-the-rows&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What happens to the rows?&lt;/h2&gt;
&lt;p&gt;A &lt;code&gt;customers&lt;/code&gt; table in Azure SQL has three rows at the first run, which copies everything. Before the second run, three things happen at the source:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;customer_id&lt;/th&gt;&lt;th&gt;city at run 1&lt;/th&gt;&lt;th&gt;change&lt;/th&gt;&lt;th&gt;city at run 2&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;C-101&lt;/td&gt;&lt;td&gt;Vienna&lt;/td&gt;&lt;td&gt;none&lt;/td&gt;&lt;td&gt;Vienna&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;C-102&lt;/td&gt;&lt;td&gt;Graz&lt;/td&gt;&lt;td&gt;updated&lt;/td&gt;&lt;td&gt;Salzburg&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;C-103&lt;/td&gt;&lt;td&gt;Linz&lt;/td&gt;&lt;td&gt;deleted&lt;/td&gt;&lt;td&gt;(gone)&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;C-104&lt;/td&gt;&lt;td&gt;(new)&lt;/td&gt;&lt;td&gt;inserted&lt;/td&gt;&lt;td&gt;Innsbruck&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Changes between run 1 and run 2&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;With &lt;strong&gt;Merge&lt;/strong&gt;, the default for CDC, the destination is the source again: three rows.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;customer_id&lt;/th&gt;&lt;th&gt;city&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;C-101&lt;/td&gt;&lt;td&gt;Vienna&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;C-102&lt;/td&gt;&lt;td&gt;Salzburg&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;C-104&lt;/td&gt;&lt;td&gt;Innsbruck&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Destination after run 2, Merge (SCD Type 1)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;With &lt;strong&gt;SCD Type 2&lt;/strong&gt;, the old version of C-102 is closed, the deleted C-103 is closed instead of removed, and the new rows are current. Five rows, of which &lt;strong&gt;three are current&lt;/strong&gt;, the same three as the Merge:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;customer_id&lt;/th&gt;&lt;th&gt;city&lt;/th&gt;&lt;th&gt;Valid_From&lt;/th&gt;&lt;th&gt;Valid_To&lt;/th&gt;&lt;th&gt;Is_Current&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;C-101&lt;/td&gt;&lt;td&gt;Vienna&lt;/td&gt;&lt;td&gt;run 1&lt;/td&gt;&lt;td&gt;NULL&lt;/td&gt;&lt;td&gt;true&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;C-102&lt;/td&gt;&lt;td&gt;Graz&lt;/td&gt;&lt;td&gt;run 1&lt;/td&gt;&lt;td&gt;run 2&lt;/td&gt;&lt;td&gt;false&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;C-102&lt;/td&gt;&lt;td&gt;Salzburg&lt;/td&gt;&lt;td&gt;run 2&lt;/td&gt;&lt;td&gt;NULL&lt;/td&gt;&lt;td&gt;true&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;C-103&lt;/td&gt;&lt;td&gt;Linz&lt;/td&gt;&lt;td&gt;run 1&lt;/td&gt;&lt;td&gt;run 2&lt;/td&gt;&lt;td&gt;false&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;C-104&lt;/td&gt;&lt;td&gt;Innsbruck&lt;/td&gt;&lt;td&gt;run 2&lt;/td&gt;&lt;td&gt;NULL&lt;/td&gt;&lt;td&gt;true&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Destination after run 2, SCD Type 2&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;A report that wants today's picture filters &lt;code&gt;Is_Current = true&lt;/code&gt;; one that wants &amp;quot;where did this customer live in March&amp;quot; joins on the dates. A watermark copy of the same changes would have three rows plus C-103 still sitting in Linz.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-set-it-up&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-set-it-up&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you set it up?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Enable CDC&lt;/b&gt;&lt;span&gt;on the database and each table, at the source&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Copy job&lt;/b&gt;&lt;span&gt;incremental copy; the CDC tables are found&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Write method&lt;/b&gt;&lt;span&gt;Merge, or SCD Type 2 for history&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Schedule&lt;/b&gt;&lt;span&gt;one or several schedules in the job&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From a source table to a Fabric destination&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;On SQL Server or Azure SQL, CDC is two procedures, run once by someone with the rights:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;EXEC&lt;/i&gt; sys.sp_cdc_enable_db;

&lt;i class=&quot;k&quot;&gt;EXEC&lt;/i&gt; sys.sp_cdc_enable_table
  @source_schema = N&lt;i class=&quot;s&quot;&gt;'dbo'&lt;/i&gt;,
  @source_name   = N&lt;i class=&quot;s&quot;&gt;'customers'&lt;/i&gt;,
  @role_name     = &lt;i class=&quot;k&quot;&gt;NULL&lt;/i&gt;;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Then in Fabric: &lt;strong&gt;New item&lt;/strong&gt;, &lt;strong&gt;Copy job&lt;/strong&gt;, pick the connection and the tables, choose &lt;strong&gt;Incremental copy&lt;/strong&gt;, and on the write settings pick &lt;strong&gt;Merge&lt;/strong&gt; or &lt;strong&gt;SCD Type 2&lt;/strong&gt;. Both use the primary key by default. If a run fails, the next one starts from the end of the last successful run, so nothing is lost; you can also reset one table back to a full copy.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;SCD Type 2 is still in preview&lt;/strong&gt;, and not offered for Oracle sources yet, nor when you create the schema in the destination database yourself.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A deleted mapped column.&lt;/strong&gt; With a column mapping, a source column that is dropped or renamed fails the run. A new column is ignored until you add it to the mapping.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Net changes only.&lt;/strong&gt; A row updated five times between two runs arrives once, in its last state. If you need every step, run more often or read the CDC tables directly.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Lakehouse sources.&lt;/strong&gt; Whether change data feed is on for a Fabric lakehouse table is not detected automatically; check it yourself.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/data-factory/cdc-copy-job&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Change data capture (CDC) in Copy job&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/data-factory/what-is-copy-job&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What is Copy job in Data Factory for Microsoft Fabric?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/track-changes/enable-and-disable-change-data-capture-sql-server&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Enable and disable change data capture&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/fundamentals/whats-new&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What's new in Microsoft Fabric?&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Pick the one source table where deletes matter most, usually customers or products, and move it to a Copy job of its own with CDC. How CDC works inside SQL Server is in &lt;a href=&quot;/blog/change-data-capture-sql-server-explained/&quot;&gt;change data capture in SQL Server, explained&lt;/a&gt;, what Type 1 and Type 2 mean for a report in &lt;a href=&quot;/blog/slowly-changing-dimensions-type-1-type-2/&quot;&gt;slowly changing dimensions&lt;/a&gt;, and the watermark way in &lt;a href=&quot;/blog/incremental-load-watermark-azure-data-factory/&quot;&gt;load only the rows that changed&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Wireframe a Power BI report before you build it</title>
    <link href="https://data.benibix.com/blog/wireframe-a-power-bi-report/"/>
    <id>https://data.benibix.com/blog/wireframe-a-power-bi-report/</id>
    <published>2026-10-30T17:00:00Z</published>
    <updated>2026-10-30T17:00:00Z</updated>
    <summary>A report works best planned before it is built: a wireframe that says what each page answers and where each visual goes. How to sketch one in ten minutes and what to put on it.</summary>
    <category term="Visuals"/>
    <category term="Report design"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; before opening Power BI, sketch each page as boxes on paper or a whiteboard: the &lt;strong&gt;question the page answers&lt;/strong&gt; at the top, then a box for each visual with &lt;strong&gt;what it shows and which measure it uses&lt;/strong&gt;, in the order people read (top left first). Agree on that sketch with the person who asked for the report. Building from a wireframe takes less time than rebuilding from feedback.&lt;/p&gt;
&lt;p&gt;A report goes faster when it starts as a plan: page, question, visuals, filters. Writing that plan first is what keeps the build short.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-on-a-wireframe&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-on-a-wireframe&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes on a wireframe?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;layers&quot;&gt;&lt;ol class=&quot;dfig-stack&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Title band&lt;/b&gt;&lt;span&gt;the page's question: &amp;quot;Are we on track for Q4 revenue?&amp;quot; and the slicers&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;KPI row&lt;/b&gt;&lt;span&gt;three to four cards, each with its target: revenue, margin, orders&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Main chart&lt;/b&gt;&lt;span&gt;revenue by week against target, a line&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;bronze&quot;&gt;&lt;b&gt;Breakdown&lt;/b&gt;&lt;span&gt;revenue by region, a sorted bar; by product, a sorted bar&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;Detail&lt;/b&gt;&lt;span&gt;link to a drillthrough page, not a big table here&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One report page, as a wireframe&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-make-one-in-ten-minutes&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-make-one-in-ten-minutes&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you make one in ten minutes?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;&lt;strong&gt;List the questions&lt;/strong&gt; the report must answer. One page per question.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Draw the page&lt;/strong&gt; at 16:9: a title band, a row for the key numbers, one big chart, the breakdowns.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Label every box&lt;/strong&gt; with the visual type and the measure: &amp;quot;Line: Revenue, Revenue Target, by week&amp;quot;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Mark the filters&lt;/strong&gt; and where they apply: the whole page, or one visual.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Show it&lt;/strong&gt; to the person who asked, and change the boxes, not the report.&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;why-does-it-save-time&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-does-it-save-time&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why does it save time?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Without a wireframe&lt;/th&gt;&lt;th&gt;With one&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;The report is built, then &amp;quot;can we see it by region?&amp;quot;&lt;/td&gt;&lt;td&gt;Region is on the sketch, or agreed as out of scope&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Measures are written as visuals need them&lt;/td&gt;&lt;td&gt;The list of measures is known before you start&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Pages grow to 15 visuals&lt;/td&gt;&lt;td&gt;Each page has its question, and five to seven boxes&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-report-display-settings&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Report display settings in Power BI&lt;/a&gt;, page sizes for the sketch&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/guidance/power-bi-optimization&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Optimization guide for Power BI&lt;/a&gt;, limit visuals on report pages&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Use the layout in &lt;a href=&quot;/blog/power-bi-report-design-pattern/&quot;&gt;how I design a Power BI report page&lt;/a&gt;, keep the page lean with &lt;a href=&quot;/blog/how-many-visuals-per-power-bi-page/&quot;&gt;how many visuals a page should have&lt;/a&gt;, and turn the sketch into a finished look with &lt;a href=&quot;https://tools.benibix.com/data/report-design-studio/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Report Design Studio&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>DAU, MAU and stickiness (DAU/MAU) in DAX</title>
    <link href="https://data.benibix.com/blog/dau-mau-stickiness-kpi/"/>
    <id>https://data.benibix.com/blog/dau-mau-stickiness-kpi/</id>
    <published>2026-10-30T12:00:00Z</published>
    <updated>2026-10-30T12:00:00Z</updated>
    <summary>How to calculate daily, weekly and monthly active users from event data, rolling 28 or 30-day MAU, the stickiness ratio DAU divided by MAU, what counts as active, the DAX with DATESINPERIOD on an events table, performance on large event tables, and a chart of the ratio.</summary>
    <category term="KPIs"/>
    <category term="SaaS and product"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;DAU&lt;/strong&gt;, &lt;strong&gt;WAU&lt;/strong&gt; and &lt;strong&gt;MAU&lt;/strong&gt; are the distinct users active in a day, the last 7 days and the last 28 or 30 days. &lt;strong&gt;Stickiness&lt;/strong&gt; = average DAU / MAU: 4,500 daily users out of 15,000 monthly = &lt;strong&gt;30%&lt;/strong&gt;, meaning the average user comes back about 9 days a month. Define &lt;strong&gt;active&lt;/strong&gt; as a meaningful action (created, edited, sent), not just opening the app. Use &lt;strong&gt;rolling&lt;/strong&gt; windows, so MAU on any date covers the 28 or 30 days up to it.&lt;/p&gt;
&lt;p&gt;Sign-ups tell you how many people tried a product; active users tell you how many use it. Stickiness tells you how much it has become a habit.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Month end&lt;/th&gt;&lt;th&gt;DAU (average of the month)&lt;/th&gt;&lt;th&gt;MAU (rolling 30 days)&lt;/th&gt;&lt;th&gt;Stickiness&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Jun&lt;/td&gt;&lt;td&gt;3,600&lt;/td&gt;&lt;td&gt;13,000&lt;/td&gt;&lt;td&gt;27.7%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Jul&lt;/td&gt;&lt;td&gt;3,900&lt;/td&gt;&lt;td&gt;13,800&lt;/td&gt;&lt;td&gt;28.3%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Aug&lt;/td&gt;&lt;td&gt;4,200&lt;/td&gt;&lt;td&gt;14,500&lt;/td&gt;&lt;td&gt;29.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sep&lt;/td&gt;&lt;td&gt;4,500&lt;/td&gt;&lt;td&gt;15,000&lt;/td&gt;&lt;td&gt;30.0%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Active users at the end of each month&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;line&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;line chart: Jun 27.7; Jul 28.3; Aug 29; Sep 30&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;182&quot; x2=&quot;626&quot; y2=&quot;182&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;186&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;10&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;98&quot; x2=&quot;626&quot; y2=&quot;98&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;102&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;20&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;626&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;30&lt;/text&gt;&lt;polyline points=&quot;52,33.3 243.3,28.3 434.7,22.4 626,14&quot; class=&quot;ln ka&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;33.3&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;243.3&quot; cy=&quot;28.3&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;434.7&quot; cy=&quot;22.4&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;14&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;text x=&quot;52&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jun&lt;/text&gt;&lt;text x=&quot;243.3&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jul&lt;/text&gt;&lt;text x=&quot;434.7&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Aug&lt;/text&gt;&lt;text x=&quot;626&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Sep&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Stickiness DAU/MAU (%)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;An Events table with one row per event: User ID, Timestamp, Date, Event Name. Count only the events that mean real use:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Active Users =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Events&lt;i class=&quot;m&quot;&gt;[User ID]&lt;/i&gt; ),
    Events&lt;i class=&quot;m&quot;&gt;[Event Name]&lt;/i&gt; IN { &lt;i class=&quot;s&quot;&gt;&amp;quot;doc_created&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;doc_edited&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;message_sent&amp;quot;&lt;/i&gt; }
)

DAU = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Active Users]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;LASTDATE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )

Avg DAU = &lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Active Users]&lt;/i&gt; )

WAU = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Active Users]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DATESINPERIOD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), -&lt;i class=&quot;n&quot;&gt;7&lt;/i&gt;, DAY ) )

MAU = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Active Users]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DATESINPERIOD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), -&lt;i class=&quot;n&quot;&gt;30&lt;/i&gt;, DAY ) )

Stickiness = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Avg DAU]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[MAU]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;On a month row, &lt;code&gt;Avg DAU&lt;/code&gt; averages the daily counts of the month and &lt;code&gt;MAU&lt;/code&gt; covers the 30 days to its last date. On a day row, both refer to that day and its 30-day window, so a daily line chart of stickiness works too.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-keep-it-fast-on-large-event-tables&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-keep-it-fast-on-large-event-tables&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you keep it fast on large event tables?&lt;/h2&gt;
&lt;p&gt;Distinct counts over hundreds of millions of events are slow. Pre-aggregate in the source or Power Query to a &lt;strong&gt;daily user table&lt;/strong&gt; (one row per user per active day): the measures stay the same, the table is far smaller, and &lt;code&gt;DISTINCTCOUNT&lt;/code&gt; runs on it instead. For very large data, compute MAU in the warehouse.&lt;/p&gt;
&lt;h2 id=&quot;what-counts-as-active&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-counts-as-active&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What counts as active?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;red&quot;&gt;&lt;b&gt;Too broad&lt;/b&gt;&lt;span&gt;app opened, page viewed, notification received: counts people who did nothing&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Right&lt;/b&gt;&lt;span&gt;the core action of the product: a document edited, an order placed, a message sent&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Too narrow&lt;/b&gt;&lt;span&gt;a rare premium action: undercounts real users&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Choosing the active event&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Calendar months for MAU.&lt;/strong&gt; February and March differ in length; use a rolling 28 or 30 days.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Summing DAU.&lt;/strong&gt; Users active on several days count once per day; that is fine for &amp;quot;user-days&amp;quot;, not for user counts.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Bots and internal users.&lt;/strong&gt; Filter them out of the events.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Comparing products.&lt;/strong&gt; Daily tools (chat) and monthly tools (invoicing) have different natural stickiness.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/datesinperiod-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DATESINPERIOD function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/distinctcount-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DISTINCTCOUNT function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/aggregations-advanced&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Use aggregations in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Pick the one event that means real use, build a daily user table, and show DAU, MAU and stickiness by week. &lt;a href=&quot;/blog/activation-rate-kpi/&quot;&gt;Activation rate&lt;/a&gt; shows how many new users get there.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>DAX queries: EVALUATE, DEFINE and DAX query view</title>
    <link href="https://data.benibix.com/blog/dax-query-view-evaluate/"/>
    <id>https://data.benibix.com/blog/dax-query-view-evaluate/</id>
    <published>2026-10-30T12:00:00Z</published>
    <updated>2026-10-30T12:00:00Z</updated>
    <summary>How to write DAX queries with EVALUATE, DEFINE, ORDER BY and START AT, test measures in Power BI's DAX query view, quick queries, updating the model from query-scoped measures, CodeLens, and examples for checking numbers and exploring tables.</summary>
    <category term="DAX"/>
    <category term="Concepts"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;DAX query&lt;/strong&gt; returns a table from the model. It needs &lt;code&gt;EVALUATE&lt;/code&gt; followed by a table expression, and can start with &lt;code&gt;DEFINE&lt;/code&gt; to declare measures, variables, columns or functions for the query. In Power BI Desktop, &lt;strong&gt;DAX query view&lt;/strong&gt; (the fourth view on the left) runs queries, shows the result grid, writes queries for you (quick queries), and saves query-defined measures into the model with &lt;strong&gt;Update model with changes&lt;/strong&gt;. It is the fastest way to test a measure without building a visual.&lt;/p&gt;
&lt;p&gt;Testing a measure in a report means building a table visual, adding fields and filters, and reading the numbers. In DAX query view it is three lines, with the result in a grid you can copy, and the formula editable next to it.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-dax-query-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-dax-query-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a DAX query look like?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;DEFINE
    MEASURE Sales&lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt; =
        &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
    &lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Years = { &lt;i class=&quot;n&quot;&gt;2025&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;2026&lt;/i&gt; }

EVALUATE
&lt;i class=&quot;f&quot;&gt;SUMMARIZECOLUMNS&lt;/i&gt; (
    &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;TREATAS&lt;/i&gt; ( Years, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt; ),
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Revenue&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Revenue LY&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt;
)
ORDER BY &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; DESC&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Keyword&lt;/th&gt;&lt;th&gt;Does&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;DEFINE&lt;/td&gt;&lt;td&gt;optional; declares MEASURE, VAR, TABLE, COLUMN or FUNCTION for this query&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;EVALUATE&lt;/td&gt;&lt;td&gt;required; returns the table expression after it (several EVALUATE blocks are allowed)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ORDER BY&lt;/td&gt;&lt;td&gt;sorts the result, ASC or DESC per column&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;START AT&lt;/td&gt;&lt;td&gt;with ORDER BY, starts the result at given values (paging)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The parts of a DAX query&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Any table expression works after &lt;code&gt;EVALUATE&lt;/code&gt;: a table name, &lt;code&gt;FILTER&lt;/code&gt;, &lt;code&gt;TOPN&lt;/code&gt;, &lt;code&gt;SUMMARIZECOLUMNS&lt;/code&gt;. A single value needs braces: &lt;code&gt;EVALUATE { [Revenue] }&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;which-quick-queries-help-most&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-quick-queries-help-most&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which quick queries help most?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- look at the first rows of a table&lt;/i&gt;
EVALUATE &lt;i class=&quot;f&quot;&gt;TOPN&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;100&lt;/i&gt;, Sales )

&lt;i class=&quot;c&quot;&gt;-- check a measure's total&lt;/i&gt;
EVALUATE { &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; }

&lt;i class=&quot;c&quot;&gt;-- distinct values of a column with a count&lt;/i&gt;
EVALUATE
&lt;i class=&quot;f&quot;&gt;SUMMARIZECOLUMNS&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Rows&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Sales ) )

&lt;i class=&quot;c&quot;&gt;-- find keys in Sales without a product&lt;/i&gt;
EVALUATE
&lt;i class=&quot;f&quot;&gt;EXCEPT&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Product Key]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product Key]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The last query returns the product keys that exist in Sales but not in Product: the rows that show as (Blank) in visuals.&lt;/p&gt;
&lt;p&gt;In the &lt;strong&gt;Data&lt;/strong&gt; pane, right-click a table, column or measure, &lt;strong&gt;Quick queries&lt;/strong&gt;: Show top 100 rows and Show column statistics for tables and columns; Evaluate, Define and evaluate, and Define with references and evaluate for a measure; Define all measures in this table or in the model (up to 500 measures). Each writes the query for you; Show top 100 rows uses &lt;code&gt;SELECTCOLUMNS&lt;/code&gt; with one column per line, so you can comment columns out.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-change-measures-from-the-query&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-change-measures-from-the-query&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you change measures from the query?&lt;/h2&gt;
&lt;p&gt;Measures in &lt;code&gt;DEFINE MEASURE&lt;/code&gt; are &lt;strong&gt;query-scoped&lt;/strong&gt;: they exist only while the query runs and override the model measure of the same name. That makes testing safe. When the change is right:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;CodeLens&lt;/strong&gt; above each &lt;code&gt;DEFINE MEASURE&lt;/code&gt;: &lt;strong&gt;Update model: Add new measure&lt;/strong&gt; or &lt;strong&gt;Update model: Overwrite measure&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Update model with changes&lt;/strong&gt; in the command bar saves all of them at once.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Select a measure in an &lt;code&gt;EVALUATE&lt;/code&gt; without &lt;code&gt;DEFINE&lt;/code&gt; and the &lt;strong&gt;light bulb&lt;/strong&gt; offers &lt;strong&gt;Define&lt;/strong&gt; or &lt;strong&gt;Define with references&lt;/strong&gt;, which writes the measure and the measures it depends on into a &lt;code&gt;DEFINE&lt;/code&gt; block. Descriptions can be added with &lt;code&gt;///&lt;/code&gt; comments above a measure.&lt;/p&gt;
&lt;h2 id=&quot;what-else-is-in-dax-query-view&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-else-is-in-dax-query-view&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What else is in DAX query view?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Format&lt;/strong&gt; (Shift+Alt+F), &lt;strong&gt;comment&lt;/strong&gt; (Ctrl+/), &lt;strong&gt;find and replace&lt;/strong&gt; (Ctrl+F, Ctrl+H), &lt;strong&gt;command palette&lt;/strong&gt; (Ctrl+Alt+P).&lt;/li&gt;&lt;li&gt;Several &lt;strong&gt;query tabs&lt;/strong&gt;, saved in the file from Power BI Desktop; queries can run in the background while you work in another tab.&lt;/li&gt;&lt;li&gt;Several &lt;code&gt;EVALUATE&lt;/code&gt; statements return several results; the &lt;strong&gt;Result&lt;/strong&gt; dropdown switches between them, and &lt;strong&gt;Copy&lt;/strong&gt; copies the grid.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Copilot&lt;/strong&gt; can write and explain queries, where available.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;EVALUATE [Measure]&lt;/code&gt;.&lt;/strong&gt; A measure is a scalar; wrap it in braces: &lt;code&gt;EVALUATE { [Measure] }&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Forgetting the model is untouched.&lt;/strong&gt; Query-scoped measures disappear; save with CodeLens or Update model.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Filters missing.&lt;/strong&gt; A query has no slicers; add filters with &lt;code&gt;TREATAS&lt;/code&gt;, &lt;code&gt;CALCULATETABLE&lt;/code&gt; or &lt;code&gt;FILTER&lt;/code&gt; to match the report.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Huge results.&lt;/strong&gt; &lt;code&gt;EVALUATE Sales&lt;/code&gt; on 50 million rows is slow; use &lt;code&gt;TOPN&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/dax-query-view&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Work with DAX query view&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/dax-queries&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DAX queries&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/evaluate-statement-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: EVALUATE statement (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Open DAX query view, right-click your main measure and pick &lt;strong&gt;Define and evaluate&lt;/strong&gt;, then change the formula and run it until the number is right. &lt;a href=&quot;/blog/summarize-summarizecolumns-addcolumns-dax/&quot;&gt;SUMMARIZECOLUMNS&lt;/a&gt; is the function most queries are built on.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>DP-900 in 2026: what the exam covers and how to study</title>
    <link href="https://data.benibix.com/blog/dp-900-study-guide/"/>
    <id>https://data.benibix.com/blog/dp-900-study-guide/</id>
    <published>2026-10-30T12:00:00Z</published>
    <updated>2026-10-30T12:00:00Z</updated>
    <summary>What the DP-900 Azure Data Fundamentals exam measures since July 2026, how its four areas are weighted, who it is for, and a short study plan that touches each Azure data service once.</summary>
    <category term="Exams"/>
    <category term="Data and BI"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; DP-900 earns &lt;strong&gt;Microsoft Certified: Azure Data Fundamentals&lt;/strong&gt;. It checks that you can describe core data concepts (25 to 30%), relational data on Azure (20 to 25%), non-relational data on Azure (15 to 20%) and analytics workloads (25 to 30%). It is a 45-minute fundamentals exam, you need 700 out of 1,000, and the certification does not expire. It is not a prerequisite for any other exam.&lt;/p&gt;
&lt;p&gt;DP-900 is the vocabulary exam for data on Azure: what a transactional workload is, when Cosmos DB fits, what a lakehouse does. It suits people starting in data, and people around data teams who want to follow the conversation.&lt;/p&gt;
&lt;h2 id=&quot;what-does-dp-900-cover&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-dp-900-cover&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does DP-900 cover?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Core data concepts&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;25-30%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Relational data on Azure&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:83.3%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;20-25%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Non-relational data on Azure&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:66.7%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;15-20%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Analytics workloads&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;25-30%&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;DP-900 skills, by weight in the exam&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Core data concepts&lt;/strong&gt;: structured, semi-structured and unstructured data, common file formats, transactional against analytical workloads, and what database administrators, data engineers and data analysts each do.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Relational data&lt;/strong&gt;: normalization, common SQL statements and database objects, the Azure SQL family (SQL Database, SQL Managed Instance, SQL Server on a VM) and the open-source database services.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Non-relational data&lt;/strong&gt;: Blob storage, Azure Files, Table storage, and Cosmos DB with its APIs and use cases.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Analytics&lt;/strong&gt;: ingestion and analytical stores, Azure Databricks and Microsoft Fabric, batch against streaming, real-time services, and Power BI models and visuals.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;who-is-it-for&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#who-is-it-for&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Who is it for?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:1&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Take it&lt;/b&gt;&lt;span&gt;new to data, moving into a data role, or working beside data teams&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Skip it&lt;/b&gt;&lt;span&gt;already building in SQL, Fabric or Power BI: go straight to an associate exam&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Should you take DP-900?&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Microsoft says it can help prepare for role-based exams but is not required for any of them. If you already write SQL and build reports, &lt;a href=&quot;/blog/pl-300-study-guide/&quot;&gt;PL-300&lt;/a&gt; or &lt;a href=&quot;/blog/dp-600-study-guide/&quot;&gt;DP-600&lt;/a&gt; proves more.&lt;/p&gt;
&lt;h2 id=&quot;how-would-you-study-for-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-would-you-study-for-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How would you study for it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Study guide&lt;/b&gt;&lt;span&gt;read the skills list, mark the unknown terms&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Learn path&lt;/b&gt;&lt;span&gt;the free DP-900 modules on Microsoft Learn&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Touch each service&lt;/b&gt;&lt;span&gt;create a SQL database, a storage account, a Cosmos DB container, a Fabric lakehouse&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Practice assessment&lt;/b&gt;&lt;span&gt;the free one, until the score is steady&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Exam&lt;/b&gt;&lt;span&gt;45 minutes&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Two weeks, one service at a time&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Touching each service once makes the &amp;quot;which service for which job&amp;quot; questions easy. A free Azure account or a Fabric trial is enough; delete what you create afterwards.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;If the scenario says&lt;/th&gt;&lt;th&gt;Think of&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;JSON documents, global scale, low latency&lt;/td&gt;&lt;td&gt;Azure Cosmos DB&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Files shared over SMB&lt;/td&gt;&lt;td&gt;Azure Files&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Big, cheap object storage for a lake&lt;/td&gt;&lt;td&gt;Blob storage with Data Lake Storage Gen2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Managed SQL Server with almost full compatibility&lt;/td&gt;&lt;td&gt;Azure SQL Managed Instance&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Events analysed as they arrive&lt;/td&gt;&lt;td&gt;Real-time analytics (Eventhouse, KQL)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;One platform from lake to report&lt;/td&gt;&lt;td&gt;Microsoft Fabric&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Questions DP-900 likes to ask&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-helps-on-the-day&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-helps-on-the-day&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What helps on the day?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Learn the words exactly.&lt;/strong&gt; Fundamentals questions turn on terms: OLTP and OLAP, normalization, semi-structured, batch and streaming.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;No Microsoft Learn in the exam.&lt;/strong&gt; Open-book Learn access is only on associate and expert exams, not fundamentals.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Use every minute.&lt;/strong&gt; There is no penalty for a wrong answer, so answer every question.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-keep-the-certification&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-keep-the-certification&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you keep the certification?&lt;/h2&gt;
&lt;p&gt;You do not need to: fundamentals certifications do not expire.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/dp-900&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam DP-900&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/exams/dp-900/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Microsoft Certified: Azure Data Fundamentals&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/renew-your-microsoft-certification&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Renew your Microsoft Certification&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Read the skills list, then make each service once. &lt;a href=&quot;/blog/what-is-onelake/&quot;&gt;What is OneLake&lt;/a&gt; and &lt;a href=&quot;/blog/azure-data-lake-storage-gen2-explained/&quot;&gt;Azure Data Lake Storage Gen2 explained&lt;/a&gt; cover two of the analytics terms in plain words; &lt;a href=&quot;/blog/which-fundamentals-exam-first/&quot;&gt;Which fundamentals exam first?&lt;/a&gt; compares DP-900 with AZ-900 and AI-901.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Microsoft exam question types: what to expect on the day</title>
    <link href="https://data.benibix.com/blog/microsoft-exam-question-types/"/>
    <id>https://data.benibix.com/blog/microsoft-exam-question-types/</id>
    <published>2026-10-30T12:00:00Z</published>
    <updated>2026-10-30T12:00:00Z</updated>
    <summary>The question types you can meet on a Microsoft certification exam in 2026, multiple choice, drag and drop, build list, hot area, active screen, case studies, problem and solution sets, labs and the review screen, how points are counted, and how to handle each.</summary>
    <category term="Exams"/>
    <category term="Exam tips"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; Microsoft does not say which types a given exam uses, but the ones you can meet are &lt;strong&gt;multiple choice&lt;/strong&gt;, &lt;strong&gt;drag and drop&lt;/strong&gt;, &lt;strong&gt;build list&lt;/strong&gt; (put steps in order), &lt;strong&gt;hot area&lt;/strong&gt; (pick on a picture or code), &lt;strong&gt;active screen&lt;/strong&gt; (set the options on a screen), &lt;strong&gt;case studies&lt;/strong&gt;, &lt;strong&gt;problem and solution sets&lt;/strong&gt; (&amp;quot;does this solution meet the goal?&amp;quot;), and on some exams &lt;strong&gt;labs&lt;/strong&gt;. Most exams have &lt;strong&gt;40 to 60 questions&lt;/strong&gt;. There is no penalty for a wrong answer, and multi-part questions usually give one point per correct part.&lt;/p&gt;
&lt;h2 id=&quot;what-does-each-type-ask&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-each-type-ask&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does each type ask?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Type&lt;/th&gt;&lt;th&gt;What you do&lt;/th&gt;&lt;th&gt;Tip&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Multiple choice&lt;/td&gt;&lt;td&gt;pick one or several answers&lt;/td&gt;&lt;td&gt;the question says how many to pick&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Drag and drop&lt;/td&gt;&lt;td&gt;move items into the right slots&lt;/td&gt;&lt;td&gt;the instructions say whether an item may be used more than once&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Build list&lt;/td&gt;&lt;td&gt;put steps in order&lt;/td&gt;&lt;td&gt;think of what must exist first&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Hot area&lt;/td&gt;&lt;td&gt;select parts of a picture, code or table&lt;/td&gt;&lt;td&gt;read every dropdown before choosing&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Active screen&lt;/td&gt;&lt;td&gt;set options on a mock screen&lt;/td&gt;&lt;td&gt;it mirrors the real portal or tool&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Case study&lt;/td&gt;&lt;td&gt;a long scenario with several questions&lt;/td&gt;&lt;td&gt;read the requirements first, background later&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Problem and solution&lt;/td&gt;&lt;td&gt;judge if one proposed solution meets the goal&lt;/td&gt;&lt;td&gt;read the instructions on going back&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Lab&lt;/td&gt;&lt;td&gt;do tasks in a live environment&lt;/td&gt;&lt;td&gt;only on some exams, usually at the end&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Question types&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-are-points-counted&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-are-points-counted&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How are points counted?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;Each correct part of a multi-part question usually earns a point; you can earn all, some or none.&lt;/li&gt;&lt;li&gt;A wrong answer just earns nothing, so never leave a question blank.&lt;/li&gt;&lt;li&gt;Some questions are unscored trial items, and you cannot tell which, so treat every one as scored.&lt;/li&gt;&lt;li&gt;The pass mark is &lt;strong&gt;700 on a scale to 1,000&lt;/strong&gt;, a scaled score, not 70% of the points. See &lt;a href=&quot;/blog/microsoft-exam-score-report/&quot;&gt;Your score report&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;which-ones-need-special-care&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-ones-need-special-care&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which ones need special care?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;red&quot;&gt;&lt;b&gt;Problem and solution sets&lt;/b&gt;&lt;ul&gt;&lt;li&gt;several questions with the same goal and different solutions&lt;/li&gt;&lt;li&gt;the instructions say whether you can return, and you cannot take a break inside a set&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Case studies&lt;/b&gt;&lt;ul&gt;&lt;li&gt;a section of their own&lt;/li&gt;&lt;li&gt;check the instructions on whether you can go back&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Labs&lt;/b&gt;&lt;ul&gt;&lt;li&gt;real tasks that take time&lt;/li&gt;&lt;li&gt;Microsoft does not publish which exams include them&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Three to plan for&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-practise-the-format&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-practise-the-format&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you practise the format?&lt;/h2&gt;
&lt;p&gt;Microsoft's &lt;strong&gt;exam sandbox&lt;/strong&gt; demos the interface and every question type, and the free &lt;strong&gt;practice assessment&lt;/strong&gt; on Learn shows the style and difficulty of the real questions. Neither has the exam's actual questions.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/support/exam-duration-exam-experience&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Exam duration and exam experience&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/exam-scoring-reports&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Exam scoring and score reports&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/practice-assessments-for-microsoft-certifications&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Practice assessments&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Click through the exam sandbox once so nothing about the screen is new. &lt;a href=&quot;/blog/microsoft-learn-during-the-exam/&quot;&gt;Using Microsoft Learn during the exam&lt;/a&gt; explains the open-book option on associate and expert exams.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Pipeline coverage ratio: formula, target and DAX</title>
    <link href="https://data.benibix.com/blog/pipeline-coverage-kpi/"/>
    <id>https://data.benibix.com/blog/pipeline-coverage-kpi/</id>
    <published>2026-10-30T12:00:00Z</published>
    <updated>2026-10-30T12:00:00Z</updated>
    <summary>How to calculate sales pipeline coverage, open pipeline due in a period divided by the remaining quota, how to derive the right coverage target from your win rate, weighted pipeline by stage probability, pipeline by close month, the DAX on a CRM opportunity table, and the traps of inflated pipeline.</summary>
    <category term="KPIs"/>
    <category term="Sales"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;pipeline coverage&lt;/strong&gt; = open pipeline value expected to close in a period / the quota still to reach in that period. A ratio of 3 means three euros of open deals for every euro still needed. The right target comes from your own &lt;strong&gt;win rate by value&lt;/strong&gt;: with a 25% win rate you need about 1 / 0.25 = &lt;strong&gt;4×&lt;/strong&gt; coverage. &lt;strong&gt;Weighted pipeline&lt;/strong&gt; multiplies each deal by its stage probability and estimates what will close; compare it with the gap directly.&lt;/p&gt;
&lt;p&gt;Revenue tells you about last quarter. Pipeline coverage, a leading KPI, tells you at the start of the quarter whether this quarter can make it.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Item&lt;/th&gt;&lt;th&gt;Value (k)&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Quarterly quota&lt;/td&gt;&lt;td&gt;1,200&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Already closed won in Q4&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Remaining quota&lt;/td&gt;&lt;td&gt;1,200&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Open pipeline with close date in Q4&lt;/td&gt;&lt;td&gt;3,900&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Coverage&lt;/td&gt;&lt;td&gt;3.25×&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Win rate by value (last 4 quarters)&lt;/td&gt;&lt;td&gt;25%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Coverage needed&lt;/td&gt;&lt;td&gt;4.0×&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Q4 at 1 October&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;At 3.25× against a needed 4.0×, the quarter is short by about (4.0 - 3.25) × 1,200 = 900k of pipeline, or the team must win more than usual.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Stage&lt;/th&gt;&lt;th&gt;Probability&lt;/th&gt;&lt;th&gt;Open value (k)&lt;/th&gt;&lt;th&gt;Weighted (k)&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Qualify&lt;/td&gt;&lt;td&gt;10%&lt;/td&gt;&lt;td&gt;1,500&lt;/td&gt;&lt;td&gt;150&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Propose&lt;/td&gt;&lt;td&gt;30%&lt;/td&gt;&lt;td&gt;1,300&lt;/td&gt;&lt;td&gt;390&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Negotiate&lt;/td&gt;&lt;td&gt;60%&lt;/td&gt;&lt;td&gt;800&lt;/td&gt;&lt;td&gt;480&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Commit&lt;/td&gt;&lt;td&gt;90%&lt;/td&gt;&lt;td&gt;300&lt;/td&gt;&lt;td&gt;270&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;3,900&lt;/td&gt;&lt;td&gt;1,290&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Weighted pipeline by stage&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Weighted pipeline of 1,290k against 1,200k remaining: just enough, if the stage probabilities are honest.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;The Opportunities table has Status, Stage, Amount and Close Date (related to Date); Quota has Rep, Quarter and Amount.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Open Pipeline = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Opportunities&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ), Opportunities&lt;i class=&quot;m&quot;&gt;[Status]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Open&amp;quot;&lt;/i&gt; )

Won Value = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Opportunities&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ), Opportunities&lt;i class=&quot;m&quot;&gt;[Status]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Won&amp;quot;&lt;/i&gt; )

Quota =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Quota&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;TREATAS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Quarter]&lt;/i&gt; ), Quota&lt;i class=&quot;m&quot;&gt;[Year Quarter]&lt;/i&gt; )
)

Remaining Quota = &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Quota]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Won Value]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; )

Pipeline Coverage = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Open Pipeline]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Remaining Quota]&lt;/i&gt; )

Weighted Pipeline =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Opportunities, Opportunities&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; * &lt;i class=&quot;f&quot;&gt;RELATED&lt;/i&gt; ( Stage&lt;i class=&quot;m&quot;&gt;[Probability]&lt;/i&gt; ) ),
    Opportunities&lt;i class=&quot;m&quot;&gt;[Status]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Open&amp;quot;&lt;/i&gt;
)

Coverage Needed = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Win Rate by Value 4Q]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;Win Rate by Value 4Q&lt;/code&gt; is &lt;a href=&quot;/blog/win-rate-kpi/&quot;&gt;win rate by value&lt;/a&gt; over the last four quarters: &lt;code&gt;CALCULATE ( [Win Rate by Value], DATESINPERIOD ( 'Date'[Date], MAX ( 'Date'[Date] ), -12, MONTH ) )&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;how-should-you-track-it-over-time&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-should-you-track-it-over-time&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How should you track it over time?&lt;/h2&gt;
&lt;p&gt;Coverage changes daily as deals move. Store a &lt;strong&gt;snapshot&lt;/strong&gt; of open pipeline each week (a table with Snapshot Date, Opportunity, Stage, Amount) to show how coverage for the quarter developed: a line falling toward the quarter end is normal, a line starting low is the warning.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Pipeline without a close date in the period.&lt;/strong&gt; Deals with no or far-away close dates do not cover this quarter.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Inflated pipeline.&lt;/strong&gt; Old deals nobody works on raise coverage; age out deals that have not moved in 90 days.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Generic targets.&lt;/strong&gt; &amp;quot;3× coverage&amp;quot; from a blog is not your number; derive it from your win rate.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Stage probabilities from a template.&lt;/strong&gt; Calibrate them from history: of deals that reached Negotiate, how many were won?&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Remaining quota below zero.&lt;/strong&gt; When the quota is reached, coverage divides by zero; the &lt;code&gt;MAX ( ..., 0 )&lt;/code&gt; and &lt;code&gt;DIVIDE&lt;/code&gt; handle it.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/treatas-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: TREATAS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/related-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: RELATED function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/datesinperiod-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DATESINPERIOD function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Calculate your win rate by value over the last year, take its inverse as the coverage target, and show coverage per rep for the current quarter. &lt;a href=&quot;/blog/quota-attainment-kpi/&quot;&gt;Quota attainment&lt;/a&gt; measures the outcome.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>How much can you simplify a chart before it lies?</title>
    <link href="https://data.benibix.com/blog/simplify-a-chart-without-losing-the-data/"/>
    <id>https://data.benibix.com/blog/simplify-a-chart-without-losing-the-data/</id>
    <published>2026-10-30T01:00:00Z</published>
    <updated>2026-10-30T01:00:00Z</updated>
    <summary>A simpler chart is easier to read, until it drops something that matters. Cut everything that is not data, keep everything that is: what to remove, what must stay, and a before and after.</summary>
    <category term="Visuals"/>
    <category term="Report design"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; remove what does not carry data: heavy gridlines, borders, 3D, a legend for a single series, decimal places nobody needs, background colour. &lt;strong&gt;Keep&lt;/strong&gt; what the reader needs to read the numbers truthfully: an axis that &lt;strong&gt;starts at zero for bars&lt;/strong&gt;, the &lt;strong&gt;units&lt;/strong&gt;, the &lt;strong&gt;time period&lt;/strong&gt;, and every data point you are not explicitly leaving out. A simpler chart is fine; a chart that changes what the data says is not.&lt;/p&gt;
&lt;p&gt;Simplifying a chart is easy; keeping it honest is the hard part. Delete the wrong thing, and it still looks clean but no longer tells the truth.&lt;/p&gt;
&lt;h2 id=&quot;what-can-go-and-what-must-stay&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-can-go-and-what-must-stay&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What can go, and what must stay?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Remove&lt;/th&gt;&lt;th&gt;Keep&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Heavy gridlines (keep a few light ones, or none with data labels)&lt;/td&gt;&lt;td&gt;The value axis starting at zero, for bars and columns&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;3D effects and shadows&lt;/td&gt;&lt;td&gt;Units: €, %, thousands&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;A legend when there is only one series&lt;/td&gt;&lt;td&gt;The time period: &amp;quot;Jan to Oct 2026&amp;quot;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Borders and background fills&lt;/td&gt;&lt;td&gt;Every category, unless you say &amp;quot;top 10&amp;quot;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Extra decimals: 12.4567%&lt;/td&gt;&lt;td&gt;Labels on the bars you want people to compare&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Many colours with no meaning&lt;/td&gt;&lt;td&gt;One highlight colour for what matters&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Simplify, but keep the truth&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-does-a-before-and-after-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-before-and-after-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a before and after look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;bar&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;bar chart: North 420; West 310; East 260; South 190&quot;&gt;&lt;line x1=&quot;58&quot; y1=&quot;8&quot; x2=&quot;58&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;58&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;165.6&quot; y1=&quot;8&quot; x2=&quot;165.6&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;165.6&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;273.2&quot; y1=&quot;8&quot; x2=&quot;273.2&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;273.2&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;200&lt;/text&gt;&lt;line x1=&quot;380.8&quot; y1=&quot;8&quot; x2=&quot;380.8&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;380.8&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;300&lt;/text&gt;&lt;line x1=&quot;488.4&quot; y1=&quot;8&quot; x2=&quot;488.4&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;488.4&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;400&lt;/text&gt;&lt;line x1=&quot;596&quot; y1=&quot;8&quot; x2=&quot;596&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;596&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;500&lt;/text&gt;&lt;rect x=&quot;58&quot; y=&quot;19.1&quot; width=&quot;451.9&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-gold&quot;/&gt;&lt;text x=&quot;515.9&quot; y=&quot;44.8&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;420&lt;/text&gt;&lt;text x=&quot;48&quot; y=&quot;44.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;North&lt;/text&gt;&lt;rect x=&quot;58&quot; y=&quot;84.6&quot; width=&quot;333.6&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;397.6&quot; y=&quot;110.3&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;310&lt;/text&gt;&lt;text x=&quot;48&quot; y=&quot;110.3&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;West&lt;/text&gt;&lt;rect x=&quot;58&quot; y=&quot;150.1&quot; width=&quot;279.8&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;343.8&quot; y=&quot;175.8&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;260&lt;/text&gt;&lt;text x=&quot;48&quot; y=&quot;175.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;East&lt;/text&gt;&lt;rect x=&quot;58&quot; y=&quot;215.6&quot; width=&quot;204.4&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;268.4&quot; y=&quot;241.3&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;190&lt;/text&gt;&lt;text x=&quot;48&quot; y=&quot;241.3&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;South&lt;/text&gt;&lt;line x1=&quot;58&quot; y1=&quot;8&quot; x2=&quot;58&quot; y2=&quot;270&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;After: revenue by region, sorted, one highlight (made-up, k€)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Before, the same data was a 3D column chart in four colours, with a legend repeating the region names, gridlines every 20, and an axis starting at 150, which made South look about a seventh of North instead of almost half.&lt;/p&gt;
&lt;h2 id=&quot;where-does-simplifying-turn-into-lying&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-does-simplifying-turn-into-lying&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where does simplifying turn into lying?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Cutting the axis&lt;/strong&gt; on bars: with the axis starting at 150, 190 against 420 looks like 1 to 7 instead of almost 1 to 2.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Dropping categories&lt;/strong&gt; without saying so: &amp;quot;top 4 regions&amp;quot; must be in the title if there are more.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Smoothing a line&lt;/strong&gt; so a real dip disappears.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Rounding&lt;/strong&gt; so two different numbers look equal.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/service-dashboards-design-tips&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Tips for designing a great Power BI dashboard&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Sort and label the bars with &lt;a href=&quot;/blog/bar-chart-power-bi/&quot;&gt;the bar chart in Power BI&lt;/a&gt;, and pick one colour that means one thing with &lt;a href=&quot;/blog/conditional-formatting-power-bi/&quot;&gt;conditional formatting&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Date table in Power BI: build it in DAX or Power Query</title>
    <link href="https://data.benibix.com/blog/date-table-dax/"/>
    <id>https://data.benibix.com/blog/date-table-dax/</id>
    <published>2026-10-29T12:00:00Z</published>
    <updated>2026-10-29T12:00:00Z</updated>
    <summary>Why every Power BI model needs a date table, the rules for one (unique, no blanks, contiguous dates), building it with CALENDAR, ADDCOLUMNS or Power Query, fiscal years, sort columns, marking it as a date table, turning off auto date/time, and relationships.</summary>
    <category term="DAX"/>
    <category term="Time intelligence"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;date table&lt;/strong&gt; has one row per day for whole years, with columns for year, quarter, month, week and fiscal periods, and a relationship to every date in your fact tables. Classic time intelligence (&lt;code&gt;DATESYTD&lt;/code&gt;, &lt;code&gt;SAMEPERIODLASTYEAR&lt;/code&gt;) needs it: Microsoft lists its rules as unique values, no blanks, and contiguous dates from start to end. Build it with DAX (&lt;code&gt;CALENDAR&lt;/code&gt; plus &lt;code&gt;ADDCOLUMNS&lt;/code&gt;) or Power Query, &lt;strong&gt;mark it as a date table&lt;/strong&gt;, sort month names by month number, and turn off &lt;strong&gt;auto date/time&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Without a date table, Power BI creates a hidden one per date column (auto date/time): the model grows, fiscal years are impossible, and order date and ship date cannot share one slicer.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-good-date-table-contain&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-good-date-table-contain&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a good date table contain?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Column&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;th&gt;Used for&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Date&lt;/td&gt;&lt;td&gt;2026-10-29&lt;/td&gt;&lt;td&gt;the key for relationships&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Year&lt;/td&gt;&lt;td&gt;2026&lt;/td&gt;&lt;td&gt;slicers, axes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Quarter&lt;/td&gt;&lt;td&gt;Q4&lt;/td&gt;&lt;td&gt;axes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Year Quarter&lt;/td&gt;&lt;td&gt;2026 Q4&lt;/td&gt;&lt;td&gt;axes across years&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Month Number&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;sorting month names&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Month Name&lt;/td&gt;&lt;td&gt;October&lt;/td&gt;&lt;td&gt;axes, sorted by Month Number&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Year Month&lt;/td&gt;&lt;td&gt;2026-10&lt;/td&gt;&lt;td&gt;continuous month axis&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Week (ISO)&lt;/td&gt;&lt;td&gt;44&lt;/td&gt;&lt;td&gt;weekly reports&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Weekday&lt;/td&gt;&lt;td&gt;Thursday&lt;/td&gt;&lt;td&gt;patterns by day, sorted by weekday number&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Fiscal Year&lt;/td&gt;&lt;td&gt;FY2027&lt;/td&gt;&lt;td&gt;fiscal reports (year starting 1 July)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Is Working Day&lt;/td&gt;&lt;td&gt;TRUE&lt;/td&gt;&lt;td&gt;working-day counts&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Columns of a typical date table&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-build-it-in-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-it-in-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build it in DAX?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Date =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; FirstYear = &lt;i class=&quot;f&quot;&gt;YEAR&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Order Date]&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; LastYear = &lt;i class=&quot;f&quot;&gt;YEAR&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Order Date]&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;ADDCOLUMNS&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;CALENDAR&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;DATE&lt;/i&gt; ( FirstYear, &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;DATE&lt;/i&gt; ( LastYear, &lt;i class=&quot;n&quot;&gt;12&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;31&lt;/i&gt; ) ),
        &lt;i class=&quot;s&quot;&gt;&amp;quot;Year&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;YEAR&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ),
        &lt;i class=&quot;s&quot;&gt;&amp;quot;Quarter&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Q&amp;quot;&lt;/i&gt; &amp;amp; &lt;i class=&quot;f&quot;&gt;QUARTER&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ),
        &lt;i class=&quot;s&quot;&gt;&amp;quot;Year Quarter&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;YEAR&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot; Q&amp;quot;&lt;/i&gt; &amp;amp; &lt;i class=&quot;f&quot;&gt;QUARTER&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ),
        &lt;i class=&quot;s&quot;&gt;&amp;quot;Month Number&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;MONTH&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ),
        &lt;i class=&quot;s&quot;&gt;&amp;quot;Month Name&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;FORMAT&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;MMMM&amp;quot;&lt;/i&gt; ),
        &lt;i class=&quot;s&quot;&gt;&amp;quot;Year Month&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;FORMAT&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;YYYY-MM&amp;quot;&lt;/i&gt; ),
        &lt;i class=&quot;s&quot;&gt;&amp;quot;ISO Week&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;WEEKNUM&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;21&lt;/i&gt; ),
        &lt;i class=&quot;s&quot;&gt;&amp;quot;Weekday Number&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;WEEKDAY&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;2&lt;/i&gt; ),
        &lt;i class=&quot;s&quot;&gt;&amp;quot;Weekday&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;FORMAT&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;dddd&amp;quot;&lt;/i&gt; ),
        &lt;i class=&quot;s&quot;&gt;&amp;quot;Fiscal Year&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;FY&amp;quot;&lt;/i&gt; &amp;amp; ( &lt;i class=&quot;f&quot;&gt;YEAR&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) + &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MONTH&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) &amp;gt;= &lt;i class=&quot;n&quot;&gt;7&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; ) ),
        &lt;i class=&quot;s&quot;&gt;&amp;quot;Is Working Day&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;WEEKDAY&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;2&lt;/i&gt; ) &amp;lt;= &lt;i class=&quot;n&quot;&gt;5&lt;/i&gt;
    )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Whole years matter: &lt;code&gt;DATESYTD&lt;/code&gt; and &lt;code&gt;SAMEPERIODLASTYEAR&lt;/code&gt; work on complete years. &lt;code&gt;WEEKNUM ( date, 21 )&lt;/code&gt; returns ISO 8601 weeks (Monday start, week 1 contains the first Thursday). &lt;code&gt;WEEKDAY ( date, 2 )&lt;/code&gt; numbers Monday as 1.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;CALENDARAUTO ( )&lt;/code&gt; builds whole years covering all dates in the model, but it also picks up birth dates and far-future dates, so a range from the fact table is safer.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-build-it-in-power-query&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-it-in-power-query&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build it in Power Query?&lt;/h2&gt;
&lt;p&gt;Power Query is better when the table is shared or needs holidays from a source. Microsoft's example starts with:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot;&gt;&lt;code&gt;let
    StartDate = #date(2022, 1, 1),
    EndDate = #date(2026, 12, 31),
    NumberOfDays = Duration.Days(EndDate - StartDate) + 1,
    DateList = List.Dates(StartDate, NumberOfDays, #duration(1,0,0,0)),
    DateTable = Table.FromList(DateList, Splitter.SplitByNothing(), {&amp;quot;Date&amp;quot;}),
    AddYear = Table.AddColumn(DateTable, &amp;quot;Year&amp;quot;, each Date.Year([Date]), Int64.Type)
in
    AddYear&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Add the other columns with &lt;code&gt;Table.AddColumn&lt;/code&gt; in the same way, then set the Date column's type to Date.&lt;/p&gt;
&lt;h2 id=&quot;what-do-you-set-in-the-model&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-do-you-set-in-the-model&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What do you set in the model?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Mark as date table&lt;/strong&gt;: select the table, &lt;strong&gt;Table tools&lt;/strong&gt;, &lt;strong&gt;Mark as date table&lt;/strong&gt;, choose the Date column. Power BI checks the rules.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Sort by column&lt;/strong&gt;: Month Name by Month Number, Weekday by Weekday Number, Year Month is already sortable.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Relationships&lt;/strong&gt;: Date[Date] one-to-many to each fact date column; one active (order date), others inactive for &lt;a href=&quot;/blog/dax-relationship-functions/&quot;&gt;USERELATIONSHIP&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Turn off auto date/time&lt;/strong&gt;: &lt;strong&gt;File, Options, Current file, Data load, Auto date/time&lt;/strong&gt;, and for new files under Global.&lt;/li&gt;&lt;li&gt;Hide the fact tables' date columns, so everyone slices by the Date table.&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Dates with times.&lt;/strong&gt; A Date/Time column with times does not match the date table's midnight values; convert to Date.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Gaps.&lt;/strong&gt; A date table built from distinct order dates has holes, and classic time intelligence throws an error on missing dates.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Partial years.&lt;/strong&gt; Starting on the first sale date breaks year-to-date and last-year comparisons at the edges.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Month names sorted alphabetically.&lt;/strong&gt; April first; set Sort by column.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Auto date/time left on.&lt;/strong&gt; Hidden tables for every date column grow the model.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-date-tables&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Set and use date tables in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-time-intelligence&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Implement time-based calculations in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/guidance/auto-date-time&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Auto date/time guidance&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Build the DAX date table above, mark it, connect it, and turn off auto date/time. Then &lt;a href=&quot;/blog/ytd-qtd-mtd-dax/&quot;&gt;YTD, QTD and MTD&lt;/a&gt; and &lt;a href=&quot;/blog/year-over-year-dax/&quot;&gt;year over year&lt;/a&gt; work with one line each.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>DAX date and time functions: every one with an example</title>
    <link href="https://data.benibix.com/blog/date-and-time-functions-dax-reference/"/>
    <id>https://data.benibix.com/blog/date-and-time-functions-dax-reference/</id>
    <published>2026-10-29T12:00:00Z</published>
    <updated>2026-10-29T12:00:00Z</updated>
    <summary>A reference of all DAX date and time functions, building dates (DATE, TIME, DATEVALUE, CALENDAR, CALENDARAUTO), splitting them (YEAR, MONTH, DAY, WEEKDAY, WEEKNUM, QUARTER), moving them (EDATE, EOMONTH), differences (DATEDIFF, YEARFRAC, NETWORKDAYS) and now (TODAY, NOW, UTCNOW), with examples.</summary>
    <category term="DAX"/>
    <category term="Reference"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; DAX date and time functions work on single values, like Excel's: build a date (&lt;code&gt;DATE ( 2026, 10, 29 )&lt;/code&gt;), take it apart (&lt;code&gt;YEAR&lt;/code&gt;, &lt;code&gt;MONTH&lt;/code&gt;, &lt;code&gt;WEEKNUM&lt;/code&gt;), move it (&lt;code&gt;EDATE&lt;/code&gt;, &lt;code&gt;EOMONTH&lt;/code&gt;), measure between two dates (&lt;code&gt;DATEDIFF&lt;/code&gt;, &lt;code&gt;NETWORKDAYS&lt;/code&gt;, &lt;code&gt;YEARFRAC&lt;/code&gt;), or get the current time (&lt;code&gt;TODAY&lt;/code&gt;, &lt;code&gt;NOW&lt;/code&gt;). &lt;code&gt;CALENDAR&lt;/code&gt; and &lt;code&gt;CALENDARAUTO&lt;/code&gt; build whole date tables. For periods and comparisons, use the &lt;a href=&quot;/blog/time-intelligence-dax-reference/&quot;&gt;time intelligence functions&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;These are the functions of date table columns, ages, durations, due dates and &amp;quot;days since last order&amp;quot;.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-build-dates-and-tables&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-build-dates-and-tables&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions build dates and tables?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Returns&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;DATE&lt;/td&gt;&lt;td&gt;a date from year, month, day&lt;/td&gt;&lt;td&gt;DATE ( 2026, 10, 29 )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;TIME&lt;/td&gt;&lt;td&gt;a time from hour, minute, second&lt;/td&gt;&lt;td&gt;TIME ( 14, 30, 0 )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DATEVALUE&lt;/td&gt;&lt;td&gt;a date from text&lt;/td&gt;&lt;td&gt;DATEVALUE ( &amp;quot;2026-10-29&amp;quot; )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;TIMEVALUE&lt;/td&gt;&lt;td&gt;a time from text&lt;/td&gt;&lt;td&gt;TIMEVALUE ( &amp;quot;14:30&amp;quot; )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CALENDAR&lt;/td&gt;&lt;td&gt;a table of dates from start to end&lt;/td&gt;&lt;td&gt;CALENDAR ( DATE ( 2022, 1, 1 ), DATE ( 2026, 12, 31 ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CALENDARAUTO&lt;/td&gt;&lt;td&gt;a table of whole years covering the model's dates&lt;/td&gt;&lt;td&gt;CALENDARAUTO ( 6 )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Building&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;code&gt;CALENDARAUTO ( 6 )&lt;/code&gt; builds fiscal years ending in June. See the &lt;a href=&quot;/blog/date-table-dax/&quot;&gt;date table&lt;/a&gt; post.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-take-dates-apart&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-take-dates-apart&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions take dates apart?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Returns&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;YEAR&lt;/td&gt;&lt;td&gt;the year&lt;/td&gt;&lt;td&gt;YEAR ( 'Date'[Date] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;QUARTER&lt;/td&gt;&lt;td&gt;1 to 4&lt;/td&gt;&lt;td&gt;QUARTER ( 'Date'[Date] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;MONTH&lt;/td&gt;&lt;td&gt;1 to 12&lt;/td&gt;&lt;td&gt;MONTH ( 'Date'[Date] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DAY&lt;/td&gt;&lt;td&gt;1 to 31&lt;/td&gt;&lt;td&gt;DAY ( 'Date'[Date] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;WEEKDAY&lt;/td&gt;&lt;td&gt;1 to 7; return type 2 makes Monday 1&lt;/td&gt;&lt;td&gt;WEEKDAY ( 'Date'[Date], 2 )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;WEEKNUM&lt;/td&gt;&lt;td&gt;week of the year; return type 21 is ISO 8601&lt;/td&gt;&lt;td&gt;WEEKNUM ( 'Date'[Date], 21 )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;HOUR, MINUTE, SECOND&lt;/td&gt;&lt;td&gt;parts of a time&lt;/td&gt;&lt;td&gt;HOUR ( Calls[Start Time] )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Parts of a date&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;which-functions-move-dates&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-move-dates&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions move dates?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Returns&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;EDATE&lt;/td&gt;&lt;td&gt;the date n months later or earlier&lt;/td&gt;&lt;td&gt;EDATE ( Contracts[Start], 12 )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;EOMONTH&lt;/td&gt;&lt;td&gt;the last day of the month n months away&lt;/td&gt;&lt;td&gt;EOMONTH ( Invoices[Date], 0 )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Moving dates&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;code&gt;EOMONTH ( date, 0 )&lt;/code&gt; is the end of the same month, &lt;code&gt;EOMONTH ( date, -1 ) + 1&lt;/code&gt; the first day of it.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-measure-between-dates&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-measure-between-dates&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions measure between dates?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Returns&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;DATEDIFF&lt;/td&gt;&lt;td&gt;intervals between two dates: SECOND to YEAR&lt;/td&gt;&lt;td&gt;DATEDIFF ( Orders[Order Date], Orders[Ship Date], DAY )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;YEARFRAC&lt;/td&gt;&lt;td&gt;the fraction of a year between two dates&lt;/td&gt;&lt;td&gt;YEARFRAC ( Employees[Birth Date], TODAY ( ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;NETWORKDAYS&lt;/td&gt;&lt;td&gt;working days between two dates, optional weekend and holidays&lt;/td&gt;&lt;td&gt;NETWORKDAYS ( Tickets[Opened], Tickets[Closed], 1, Holidays )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Differences&lt;/figcaption&gt;&lt;/figure&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- calculated column: age in whole years&lt;/i&gt;
Age = &lt;i class=&quot;f&quot;&gt;INT&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;YEARFRAC&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Birth Date]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;TODAY&lt;/i&gt; ( ) ) )

&lt;i class=&quot;c&quot;&gt;-- measure: average days to ship&lt;/i&gt;
Avg Days to Ship =
&lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; ( Orders, &lt;i class=&quot;f&quot;&gt;DATEDIFF&lt;/i&gt; ( Orders&lt;i class=&quot;m&quot;&gt;[Order Date]&lt;/i&gt;, Orders&lt;i class=&quot;m&quot;&gt;[Ship Date]&lt;/i&gt;, DAY ) )

&lt;i class=&quot;c&quot;&gt;-- measure: days since the customer's last order&lt;/i&gt;
Days Since Last Order =
&lt;i class=&quot;f&quot;&gt;DATEDIFF&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Order Date]&lt;/i&gt; ) ), &lt;i class=&quot;f&quot;&gt;TODAY&lt;/i&gt; ( ), DAY )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;NETWORKDAYS&lt;/code&gt; takes a weekend code (1 is Saturday and Sunday) and a table of holiday dates.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-return-the-current-time&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-return-the-current-time&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions return the current time?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Returns&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;TODAY&lt;/td&gt;&lt;td&gt;the current date&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;NOW&lt;/td&gt;&lt;td&gt;the current date and time&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;UTCTODAY&lt;/td&gt;&lt;td&gt;the current date in UTC&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;UTCNOW&lt;/td&gt;&lt;td&gt;the current date and time in UTC&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Now&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Microsoft notes that in the Power BI service the result of &lt;code&gt;NOW&lt;/code&gt; is always in UTC, so a report in Vienna sees a time one or two hours behind; near midnight &lt;code&gt;TODAY&lt;/code&gt; can also be a different day than the reader expects. Add the offset yourself if local time matters. In calculated columns they are evaluated at refresh, not when the report is viewed.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Text dates.&lt;/strong&gt; &amp;quot;29/10/2026&amp;quot; may be read as month 29 in another locale; convert in Power Query with a locale.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;WEEKNUM default.&lt;/strong&gt; The default counts weeks from 1 January with Sunday start; use 21 for ISO weeks.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;DATEDIFF across midnight with times.&lt;/strong&gt; &lt;code&gt;DAY&lt;/code&gt; counts calendar day boundaries, not 24-hour periods.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;TODAY in columns.&lt;/strong&gt; A column with &lt;code&gt;TODAY&lt;/code&gt; is frozen at the last refresh.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/date-and-time-functions-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Date and time functions (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/networkdays-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: NETWORKDAYS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/weeknum-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: WEEKNUM function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Use &lt;code&gt;CALENDAR&lt;/code&gt; with &lt;code&gt;ADDCOLUMNS&lt;/code&gt; for your date table and &lt;code&gt;DATEDIFF&lt;/code&gt; for durations. &lt;a href=&quot;/blog/time-intelligence-dax-reference/&quot;&gt;Time intelligence functions&lt;/a&gt; take it from there.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>DP-300 in 2026: what the exam covers and how to study</title>
    <link href="https://data.benibix.com/blog/dp-300-study-guide/"/>
    <id>https://data.benibix.com/blog/dp-300-study-guide/</id>
    <published>2026-10-29T12:00:00Z</published>
    <updated>2026-10-29T12:00:00Z</updated>
    <summary>What the DP-300 Azure Database Administrator exam measures from 27 October 2026, how its five areas are weighted, and a study plan built on one Azure SQL database you secure, tune, automate and recover.</summary>
    <category term="Exams"/>
    <category term="Data and BI"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; DP-300 earns &lt;strong&gt;Microsoft Certified: Azure Database Administrator Associate&lt;/strong&gt;. It covers planning and deploying Azure SQL (15 to 20%), security (20 to 25%), monitoring and tuning (20 to 25%), automation (15 to 20%) and high availability and disaster recovery (20 to 25%). It runs 100 minutes, needs 700 out of 1,000, and the certification is renewed each year with a free online assessment. The English exam was updated on 27 October 2026.&lt;/p&gt;
&lt;p&gt;DP-300 is the operations exam for SQL Server and Azure SQL: choosing the right deployment, keeping it secure, finding slow queries, automating jobs and getting a database back after a failure.&lt;/p&gt;
&lt;h2 id=&quot;what-does-dp-300-cover&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-dp-300-cover&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does DP-300 cover?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Plan and implement data platform resources&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:80.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;15-20%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Implement a secure environment&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;20-25%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Monitor, configure and optimize&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;20-25%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;b&gt;Automate tasks&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:80.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;15-20%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;High availability and disaster recovery&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;20-25%&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;DP-300 skills, by weight in the exam&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Plan and deploy&lt;/strong&gt;: Azure SQL Database, SQL Managed Instance or SQL Server on a VM, sizing for scale and performance, and a migration strategy.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Security&lt;/strong&gt;: authentication and authorization (Microsoft Entra ID, logins, roles), encryption at rest and in transit, and compliance controls for sensitive data.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Monitor and optimize&lt;/strong&gt;: resource and query performance, Query Store, indexes and database settings.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Automation&lt;/strong&gt;: SQL Server Agent jobs, deploying database resources from templates or scripts, and scheduled tasks in Azure.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;HA/DR&lt;/strong&gt;: a strategy that meets the RPO and RTO, backup and restore, and the HA/DR features for each deployment type.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-would-you-study-for-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-would-you-study-for-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How would you study for it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Step&lt;/th&gt;&lt;th&gt;Area&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Deploy SQL Database and a Managed Instance, compare the options&lt;/td&gt;&lt;td&gt;Plan and implement&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Add Entra ID logins, roles, TDE and Always Encrypted&lt;/td&gt;&lt;td&gt;Secure environment&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Load data, run a slow query, fix it with Query Store and an index&lt;/td&gt;&lt;td&gt;Monitor and optimize&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Schedule a maintenance job (Agent job, elastic job or Automation)&lt;/td&gt;&lt;td&gt;Automation&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Restore to a point in time, set up a failover group&lt;/td&gt;&lt;td&gt;HA/DR&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;One database, every area once&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The exam asks you to choose: which deployment, which HA feature, which encryption. Doing each once makes the trade-offs concrete. Delete the Managed Instance when you are done; it is the expensive part.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Term&lt;/th&gt;&lt;th&gt;Meaning&lt;/th&gt;&lt;th&gt;Example requirement&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;RPO&lt;/td&gt;&lt;td&gt;how much data you may lose&lt;/td&gt;&lt;td&gt;at most 5 minutes of transactions&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;RTO&lt;/td&gt;&lt;td&gt;how long you may be down&lt;/td&gt;&lt;td&gt;back online within 1 hour&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;RPO and RTO in plain words&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-helps-on-the-day&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-helps-on-the-day&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What helps on the day?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Know the differences between deployments.&lt;/strong&gt; Many questions hinge on what Managed Instance has (Agent, cross-database queries) that SQL Database does not.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Use Microsoft Learn in the exam.&lt;/strong&gt; Associate exams let you open Learn in a split screen; it costs time, so use it to confirm a detail, not to learn a topic.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Read the requirement words.&lt;/strong&gt; &amp;quot;Minimize cost&amp;quot;, &amp;quot;minimize administrative effort&amp;quot; and &amp;quot;no data loss&amp;quot; each point to a different answer.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-keep-the-certification&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-keep-the-certification&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you keep the certification?&lt;/h2&gt;
&lt;p&gt;It expires after a year. Renew it with the free online renewal assessment on Microsoft Learn, which opens six months before the expiry date.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/dp-300&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam DP-300&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/exams/dp-300/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Microsoft Certified: Azure Database Administrator Associate&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/support/exam-duration-exam-experience&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Exam duration and exam experience&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Deploy one database and work down the table above. &lt;a href=&quot;/blog/columnstore-index-explained/&quot;&gt;Columnstore index explained&lt;/a&gt; and &lt;a href=&quot;/blog/temporal-tables-sql-server-explained/&quot;&gt;Temporal tables explained&lt;/a&gt; cover two SQL features DBAs meet often; &lt;a href=&quot;/courses/upserts-into-azure-sql/&quot;&gt;Upserts into Azure SQL&lt;/a&gt; is an open course on loading it.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>DP-600 or DP-700: which Fabric exam fits you?</title>
    <link href="https://data.benibix.com/blog/dp-600-vs-dp-700/"/>
    <id>https://data.benibix.com/blog/dp-600-vs-dp-700/</id>
    <published>2026-10-29T12:00:00Z</published>
    <updated>2026-10-29T12:00:00Z</updated>
    <summary>The two Microsoft Fabric exams compared for 2026, analytics engineer against data engineer, what each measures, where they overlap, which to take first, and how one Fabric project prepares you for both.</summary>
    <category term="Exams"/>
    <category term="Choosing an exam"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;DP-600&lt;/strong&gt; (Fabric Analytics Engineer) is for people who turn data into models people can use: preparing data is 45 to 50% and semantic models 25 to 30%. &lt;strong&gt;DP-700&lt;/strong&gt; (Fabric Data Engineer) is for people who move and transform data: implementing and managing the solution, ingesting and transforming, and monitoring and optimizing are 30 to 35% each, with real-time data included. Take the one closer to your work first; they share Fabric itself, so the second comes faster.&lt;/p&gt;
&lt;p&gt;I hold both: DP-600 since December 2024 and DP-700 since April 2026. Both guides follow the skills measured as of 19 October 2026.&lt;/p&gt;
&lt;h2 id=&quot;how-do-they-compare&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-they-compare&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do they compare?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;DP-600&lt;/th&gt;&lt;th&gt;DP-700&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Role&lt;/td&gt;&lt;td&gt;analytics engineer&lt;/td&gt;&lt;td&gt;data engineer&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ends at&lt;/td&gt;&lt;td&gt;a semantic model ready for reports&lt;/td&gt;&lt;td&gt;clean, loaded, monitored data&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Largest area&lt;/td&gt;&lt;td&gt;prepare data (45-50%)&lt;/td&gt;&lt;td&gt;three equal areas (30-35% each)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Semantic models and DAX&lt;/td&gt;&lt;td&gt;yes, a quarter of the exam&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Real time (Eventstream, Eventhouse)&lt;/td&gt;&lt;td&gt;query with KQL&lt;/td&gt;&lt;td&gt;build and run it&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Pipelines and orchestration&lt;/td&gt;&lt;td&gt;some&lt;/td&gt;&lt;td&gt;central&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Monitoring and optimization&lt;/td&gt;&lt;td&gt;part of maintaining&lt;/td&gt;&lt;td&gt;a third of the exam&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;DP-600 against DP-700&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;where-do-they-overlap&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-they-overlap&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do they overlap?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Only DP-600&lt;/b&gt;&lt;span&gt;semantic models, DAX, Direct Lake, model performance&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Both&lt;/b&gt;&lt;span&gt;lakehouse, warehouse, SQL and KQL, Git, deployment pipelines, workspace security&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Only DP-700&lt;/b&gt;&lt;span&gt;PySpark, ingestion patterns, streaming, orchestration, monitoring and tuning&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;What both exams test&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;which-first&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-first&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which first?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;You end your day in Power BI&lt;/strong&gt; (models, measures, reports): DP-600.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;You end your day in pipelines and notebooks&lt;/strong&gt;: DP-700.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;You do both&lt;/strong&gt;: DP-700 first. The data engineering is harder to fake in the exam, and DP-600's modelling is easier to add on top.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-prepare-for-both-with-one-project&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-prepare-for-both-with-one-project&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you prepare for both with one project?&lt;/h2&gt;
&lt;p&gt;Build the &lt;a href=&quot;/blog/medallion-architecture-fabric-lakehouse/&quot;&gt;medallion layers&lt;/a&gt; in one workspace: ingest into bronze with a pipeline, clean into silver with a notebook, add a streaming source into an Eventhouse, then build gold tables and a Direct Lake model with measures. Put it in Git and promote it with a deployment pipeline. Everything up to gold is DP-700; gold and the model are DP-600.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/dp-600&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam DP-600&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/dp-700&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam DP-700&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Read the full guides: &lt;a href=&quot;/blog/dp-600-study-guide/&quot;&gt;DP-600&lt;/a&gt; and &lt;a href=&quot;/blog/dp-700-study-guide/&quot;&gt;DP-700&lt;/a&gt;. The open course &lt;a href=&quot;/courses/lakehouse-in-three-layers/&quot;&gt;A lakehouse in three layers&lt;/a&gt; is a good first build for both.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>DP-800 in 2026: what the exam covers and how to study</title>
    <link href="https://data.benibix.com/blog/dp-800-study-guide/"/>
    <id>https://data.benibix.com/blog/dp-800-study-guide/</id>
    <published>2026-10-29T12:00:00Z</published>
    <updated>2026-10-29T12:00:00Z</updated>
    <summary>What DP-800, the SQL AI Developer exam, measures in 2026, from T-SQL and database projects to embeddings, vector search and RAG inside the database, and how to study for it.</summary>
    <category term="Exams"/>
    <category term="Data and BI"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; DP-800, &lt;em&gt;Developing AI-Enabled Database Solutions&lt;/em&gt;, earns the &lt;strong&gt;SQL AI Developer Associate&lt;/strong&gt; certification. It covers SQL Server, Azure SQL and SQL databases in Fabric: designing and developing the database (35 to 40%), securing, optimising and deploying it (35 to 40%), and AI inside it, from embeddings to vector search and RAG (25 to 30%). You need 700 to pass. Study by building one database that answers questions about its own data.&lt;/p&gt;
&lt;p&gt;I passed DP-800 in October 2026. This guide follows the skills measured as of 12 March 2026.&lt;/p&gt;
&lt;h2 id=&quot;what-does-dp-800-cover&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-dp-800-cover&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does DP-800 cover?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Design and develop database solutions&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;35-40%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Secure, optimize and deploy database solutions&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;35-40%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Implement AI capabilities in database solutions&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:75.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;25-30%&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;DP-800 skills, by weight in the exam&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In plain words:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Design and develop&lt;/strong&gt;: tables and indexes (including columnstore), specialised tables (temporal, ledger, graph, in-memory), JSON columns, constraints, sequences and partitioning; views, functions, procedures and triggers; modern T-SQL with window functions, JSON functions, regular expressions and fuzzy matching; and AI-assisted development with GitHub Copilot, instruction files and MCP servers.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Secure, optimize and deploy&lt;/strong&gt;: encryption, dynamic data masking, row-level security, passwordless access and auditing; isolation levels, query plans, Query Store, blocking and deadlocks; CI/CD with SQL Database Projects, tests and schema drift; and Data API builder for REST and GraphQL, monitoring, and change tracking or change data capture.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;AI capabilities&lt;/strong&gt;: external models and embeddings (what to embed, how to chunk, how to keep them current), full-text, vector and hybrid search with vector indexes and reciprocal rank fusion, and retrieval-augmented generation with &lt;code&gt;sp_invoke_external_rest_endpoint&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;why-is-this-a-data-exam-and-not-an-ai-exam&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-is-this-a-data-exam-and-not-an-ai-exam&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why is this a data exam and not an AI exam?&lt;/h2&gt;
&lt;p&gt;Two thirds of it is the database itself: schema, T-SQL, security, performance and deployment. The AI third builds on those: an embedding is a column you have to keep current, a vector search is a query you have to tune, and a RAG answer is only as good as the rows it retrieves.&lt;/p&gt;
&lt;h2 id=&quot;what-does-rag-inside-the-database-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-rag-inside-the-database-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does RAG inside the database look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Question&lt;/b&gt;&lt;span&gt;a user asks in plain words&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Embed it&lt;/b&gt;&lt;span&gt;an external model turns it into a vector&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Vector search&lt;/b&gt;&lt;span&gt;the closest rows by meaning&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Prompt&lt;/b&gt;&lt;span&gt;those rows as JSON, sent to a language model&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;span&gt;grounded in your data&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Answering a question from your own rows&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Every step runs in T-SQL: the embedding comes from a model registered in the database, the search uses the vector type and its functions, and the call to the language model goes through &lt;code&gt;sp_invoke_external_rest_endpoint&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;how-would-i-study-for-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-would-i-study-for-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How would I study for it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Step&lt;/th&gt;&lt;th&gt;Area&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Design the tables, with JSON and a temporal history&lt;/td&gt;&lt;td&gt;Design and develop&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Write the queries with window and JSON functions&lt;/td&gt;&lt;td&gt;Design and develop&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Put it in a SQL Database Project with tests&lt;/td&gt;&lt;td&gt;Secure, optimize and deploy&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Add row-level security and dynamic data masking&lt;/td&gt;&lt;td&gt;Secure, optimize and deploy&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Generate embeddings and keep them current&lt;/td&gt;&lt;td&gt;AI capabilities&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Add vector and hybrid search, then a RAG procedure&lt;/td&gt;&lt;td&gt;AI capabilities&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;One build, mapped to the three areas&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Two areas are easy to skip and both are on the exam: &lt;strong&gt;CI/CD with SQL Database Projects&lt;/strong&gt; (build, deploy, detect drift) and &lt;strong&gt;Data API builder&lt;/strong&gt; (expose a table over REST and GraphQL). Do each once, end to end.&lt;/p&gt;
&lt;h2 id=&quot;what-helps-on-the-day&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-helps-on-the-day&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What helps on the day?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Use the new practice assessment.&lt;/strong&gt; Microsoft offers one for DP-800 on AI Skills Navigator, closer to the real exam than older practice tests.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Know the function families.&lt;/strong&gt; The skills list names the functions: JSON, regular expressions, fuzzy matching and vector functions. Write a query with each.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Watch for &amp;quot;choose&amp;quot;.&lt;/strong&gt; Many items ask you to choose: full-text, vector or hybrid search, ANN or exact search, which method keeps embeddings current. Know why you would pick each.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-keep-the-certification&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-keep-the-certification&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you keep the certification?&lt;/h2&gt;
&lt;p&gt;It expires after a year. Renew it with Microsoft's free online assessment, which opens in the six months before it expires.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/dp-800&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam DP-800&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/vectors/vectors-sql-server&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Vector search and vector indexes in the SQL Database Engine&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-invoke-external-rest-endpoint-transact-sql&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: sp_invoke_external_rest_endpoint (Transact-SQL)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/exam-scoring-reports&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Exam scoring and score reports&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;The database half starts with a staging table and a MERGE: &lt;a href=&quot;/courses/upserts-into-azure-sql/&quot;&gt;Upserts into Azure SQL&lt;/a&gt; builds them in your own Azure SQL Database, with a log of every run. Add the AI half on the same database once that works. My credential is on &lt;a href=&quot;/about/&quot;&gt;the About page&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>FORMAT in DAX: format codes and dynamic formats</title>
    <link href="https://data.benibix.com/blog/format-function-dax/"/>
    <id>https://data.benibix.com/blog/format-function-dax/</id>
    <published>2026-10-29T12:00:00Z</published>
    <updated>2026-10-29T12:00:00Z</updated>
    <summary>How the FORMAT function turns numbers and dates into text in DAX, named and custom number formats, thousands and millions scaling, date codes, locales, why FORMAT breaks charts and sorting, and dynamic format strings that keep a measure numeric.</summary>
    <category term="DAX"/>
    <category term="Text and formatting"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;code&gt;FORMAT ( value, format_string [, locale] )&lt;/code&gt; returns &lt;strong&gt;text&lt;/strong&gt;: &lt;code&gt;FORMAT ( 12345.67, &amp;quot;#,0.0&amp;quot; )&lt;/code&gt; is &amp;quot;12,345.7&amp;quot;, &lt;code&gt;FORMAT ( TODAY (), &amp;quot;mmm yyyy&amp;quot; )&lt;/code&gt; is &amp;quot;Oct 2026&amp;quot;. Use it for labels, titles and text columns. Do &lt;strong&gt;not&lt;/strong&gt; use it to format a numeric measure for a chart or a total: the measure becomes text, charts cannot plot it, and sorting goes alphabetical. For that, set the measure's format, or a &lt;strong&gt;dynamic format string&lt;/strong&gt; (Format: Dynamic), which changes how a number looks while it stays a number.&lt;/p&gt;
&lt;p&gt;People reach for &lt;code&gt;FORMAT&lt;/code&gt; to show &amp;quot;1.2M&amp;quot; instead of 1,234,567. It works on a card and breaks everywhere else. Knowing when to use the format string instead saves a lot of rework.&lt;/p&gt;
&lt;h2 id=&quot;which-number-formats-are-there&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-number-formats-are-there&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which number formats are there?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Format string&lt;/th&gt;&lt;th&gt;Result&lt;/th&gt;&lt;th&gt;Note&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&amp;quot;General Number&amp;quot;&lt;/td&gt;&lt;td&gt;1234567.891&lt;/td&gt;&lt;td&gt;no formatting&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;quot;Standard&amp;quot;&lt;/td&gt;&lt;td&gt;1,234,567.89&lt;/td&gt;&lt;td&gt;thousands separator, 2 decimals&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;quot;Currency&amp;quot;&lt;/td&gt;&lt;td&gt;$1,234,567.89&lt;/td&gt;&lt;td&gt;the locale's currency&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;quot;#,0&amp;quot;&lt;/td&gt;&lt;td&gt;1,234,568&lt;/td&gt;&lt;td&gt;rounded, separators&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;quot;#,0.00&amp;quot;&lt;/td&gt;&lt;td&gt;1,234,567.89&lt;/td&gt;&lt;td&gt;2 decimals&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;quot;0.0%&amp;quot; on 0.256&lt;/td&gt;&lt;td&gt;25.6%&lt;/td&gt;&lt;td&gt;one decimal&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;quot;#,0,&amp;quot;&lt;/td&gt;&lt;td&gt;1,235&lt;/td&gt;&lt;td&gt;one comma before the end divides by 1,000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;quot;#,0.0,,&amp;quot;&lt;/td&gt;&lt;td&gt;1.2&lt;/td&gt;&lt;td&gt;two commas divide by 1,000,000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;quot;#,0;(#,0);-&amp;quot; on -500&lt;/td&gt;&lt;td&gt;(500)&lt;/td&gt;&lt;td&gt;sections: positive; negative; zero&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Number formats on 1234567.891&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;A custom format can have up to three sections separated by semicolons: positive, negative and zero values.&lt;/p&gt;
&lt;h2 id=&quot;which-date-codes-are-there&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-date-codes-are-there&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which date codes are there?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Code&lt;/th&gt;&lt;th&gt;Result&lt;/th&gt;&lt;th&gt;Code&lt;/th&gt;&lt;th&gt;Result&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;d&lt;/td&gt;&lt;td&gt;29&lt;/td&gt;&lt;td&gt;dddd&lt;/td&gt;&lt;td&gt;Thursday&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;dd&lt;/td&gt;&lt;td&gt;29&lt;/td&gt;&lt;td&gt;m&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ddd&lt;/td&gt;&lt;td&gt;Thu&lt;/td&gt;&lt;td&gt;mm&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;mmm&lt;/td&gt;&lt;td&gt;Oct&lt;/td&gt;&lt;td&gt;mmmm&lt;/td&gt;&lt;td&gt;October&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;q&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;yy&lt;/td&gt;&lt;td&gt;26&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;yyyy&lt;/td&gt;&lt;td&gt;2026&lt;/td&gt;&lt;td&gt;hh:nn&lt;/td&gt;&lt;td&gt;14:05&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;quot;yyyy-mm&amp;quot;&lt;/td&gt;&lt;td&gt;2026-10&lt;/td&gt;&lt;td&gt;&amp;quot;\Qq yyyy&amp;quot;&lt;/td&gt;&lt;td&gt;Q4 2026&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Date codes on 2026-10-29 14:05&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In format strings, &lt;code&gt;m&lt;/code&gt; after &lt;code&gt;h&lt;/code&gt; means minutes; use &lt;code&gt;nn&lt;/code&gt; for minutes to be safe. A backslash shows the next character literally.&lt;/p&gt;
&lt;h2 id=&quot;when-is-format-the-right-tool&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-format-the-right-tool&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is FORMAT the right tool?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- dynamic title on a visual (Format, Title, fx)&lt;/i&gt;
Title Revenue = &lt;i class=&quot;s&quot;&gt;&amp;quot;Revenue &amp;quot;&lt;/i&gt; &amp;amp; &lt;i class=&quot;f&quot;&gt;FORMAT&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), &lt;i class=&quot;s&quot;&gt;&amp;quot;mmmm yyyy&amp;quot;&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- label text that combines a number and words&lt;/i&gt;
Revenue Label = &lt;i class=&quot;f&quot;&gt;FORMAT&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#,0&amp;quot;&lt;/i&gt; ) &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot; EUR (&amp;quot;&lt;/i&gt; &amp;amp; &lt;i class=&quot;f&quot;&gt;FORMAT&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Margin %]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;0.0%&amp;quot;&lt;/i&gt; ) &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot; margin)&amp;quot;&lt;/i&gt;

&lt;i class=&quot;c&quot;&gt;-- calculated column for a sortable month label: sort it by a number column&lt;/i&gt;
Month Label = &lt;i class=&quot;f&quot;&gt;FORMAT&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;mmm yyyy&amp;quot;&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- a fixed locale, independent of the user&lt;/i&gt;
Revenue DE = &lt;i class=&quot;f&quot;&gt;FORMAT&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#,0.00&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;de-DE&amp;quot;&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Text columns made with &lt;code&gt;FORMAT&lt;/code&gt; sort alphabetically (&amp;quot;Apr&amp;quot; before &amp;quot;Jan&amp;quot;); set &lt;strong&gt;Sort by column&lt;/strong&gt; to a number column (see &lt;a href=&quot;/blog/date-table-dax/&quot;&gt;date table&lt;/a&gt;).&lt;/p&gt;
&lt;h2 id=&quot;how-do-dynamic-format-strings-keep-the-number&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-dynamic-format-strings-keep-the-number&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do dynamic format strings keep the number?&lt;/h2&gt;
&lt;p&gt;Select the measure, set &lt;strong&gt;Format&lt;/strong&gt; to &lt;strong&gt;Dynamic&lt;/strong&gt;, and write a DAX expression that returns the &lt;strong&gt;format string&lt;/strong&gt;:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- format string expression for [Revenue]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; V = &lt;i class=&quot;f&quot;&gt;ABS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SELECTEDMEASURE&lt;/i&gt; ( ) )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;SWITCH&lt;/i&gt; (
        &lt;i class=&quot;k&quot;&gt;TRUE&lt;/i&gt; (),
        V &amp;gt;= 1e9, &lt;i class=&quot;s&quot;&gt;&amp;quot;#,0.0,,,\B&amp;quot;&lt;/i&gt;,
        V &amp;gt;= 1e6, &lt;i class=&quot;s&quot;&gt;&amp;quot;#,0.0,,\M&amp;quot;&lt;/i&gt;,
        V &amp;gt;= 1e3, &lt;i class=&quot;s&quot;&gt;&amp;quot;#,0.0,\K&amp;quot;&lt;/i&gt;,
        &lt;i class=&quot;s&quot;&gt;&amp;quot;#,0&amp;quot;&lt;/i&gt;
    )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The measure stays numeric: charts plot it, totals add up, sorting works, and the label shows 1.2M or 850.0K. Microsoft introduced dynamic format strings for exactly this problem with &lt;code&gt;FORMAT&lt;/code&gt;; they also work in calculation groups.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;FORMAT on chart measures.&lt;/strong&gt; Text cannot be plotted or summed; use the format string.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;FORMAT on BLANK.&lt;/strong&gt; Returns an empty string, so rows with no data appear in tables; wrap in &lt;code&gt;IF ( NOT ISBLANK ( [x] ), FORMAT ( ... ) )&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Locale surprises.&lt;/strong&gt; Separators and currency follow the model culture or the locale argument; test with users in other countries.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;m for minutes.&lt;/strong&gt; Means month unless after &lt;code&gt;h&lt;/code&gt;; use &lt;code&gt;nn&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;.NET format codes.&lt;/strong&gt; DAX uses Visual Basic style codes, so some .NET codes give unexpected results.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/format-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: FORMAT function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/custom-numeric-formats-for-the-format-function&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Custom numeric formats for the FORMAT function&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-dynamic-format-strings&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create dynamic format strings for measures&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Find measures wrapped in &lt;code&gt;FORMAT&lt;/code&gt; that sit in charts and move the formatting into a dynamic format string. &lt;a href=&quot;/blog/concatenatex-dax/&quot;&gt;CONCATENATEX&lt;/a&gt; builds text from lists, the other half of labels.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Your first data task in Claude Code: profile a CSV</title>
    <link href="https://data.benibix.com/blog/profile-a-csv-with-claude-code/"/>
    <id>https://data.benibix.com/blog/profile-a-csv-with-claude-code/</id>
    <published>2026-10-29T09:00:00Z</published>
    <updated>2026-10-29T09:00:00Z</updated>
    <summary>A good first Claude Code task for an analyst: point it at a CSV and get a profile of every column, then keep the script. The four steps, the prompt, what a useful profile contains, and how to check it.</summary>
    <category term="AI"/>
    <category term="Claude Code"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; install Claude Code, open a terminal in the folder with your file, type &lt;code&gt;claude&lt;/code&gt;, run &lt;code&gt;/init&lt;/code&gt; once, and ask: &amp;quot;Write a Python script that profiles &lt;code&gt;sales.csv&lt;/code&gt;: rows, columns, types, blanks, distinct counts, min and max per column, and values that look wrong. Run it and save the result as &lt;code&gt;profile.md&lt;/code&gt;.&amp;quot; You get a profile and, more useful, a &lt;strong&gt;script&lt;/strong&gt; you can run on next month's file.&lt;/p&gt;
&lt;p&gt;A profile is the first thing to do with any new data, and the most boring. It is also a perfect first task for an agent: clear, checkable, and safe, because it only reads the file.&lt;/p&gt;
&lt;h2 id=&quot;what-are-the-four-steps&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-four-steps&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the four steps?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Install&lt;/b&gt;&lt;span&gt;one line on Mac, Linux or Windows; a paid plan or Console account&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Open the folder&lt;/b&gt;&lt;span&gt;cd to the project, type claude&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;/init&lt;/b&gt;&lt;span&gt;Claude writes CLAUDE.md with notes about the project&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Ask&lt;/b&gt;&lt;span&gt;the profile request, then read the script it wrote&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From install to a profile&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-should-a-profile-contain&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-should-a-profile-contain&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What should a profile contain?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Check&lt;/th&gt;&lt;th&gt;Why it matters&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Row and column count&lt;/td&gt;&lt;td&gt;Matches what you expected to get?&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Type per column&lt;/td&gt;&lt;td&gt;Dates read as text, numbers read as text&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Blanks per column&lt;/td&gt;&lt;td&gt;Missing values to handle before any sum&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Distinct values&lt;/td&gt;&lt;td&gt;An ID column with duplicates is not an ID&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Min and max&lt;/td&gt;&lt;td&gt;Negative quantities, dates in 1900 or 2099&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Top values&lt;/td&gt;&lt;td&gt;&amp;quot;N/A&amp;quot;, &amp;quot;unknown&amp;quot;, &amp;quot;-&amp;quot; hiding as real values&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;A useful column profile&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-check-what-it-did&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-check-what-it-did&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you check what it did?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Read the script&lt;/strong&gt;, not only the result: it should read the file and nothing else.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Spot-check one number:&lt;/strong&gt; count the rows yourself, or open the file and look at one column's blanks.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Run it again&lt;/strong&gt; on another file with the same columns; a good script works without changes.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-should-you-do-with-the-result&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-should-you-do-with-the-result&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What should you do with the result?&lt;/h2&gt;
&lt;p&gt;Turn the problems it finds into cleaning steps, and keep the script in the project. Next time, &amp;quot;run the profile on the October file&amp;quot; takes seconds, and Claude can compare it with September's.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/quickstart&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Quickstart&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/setup&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Set up Claude Code&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Clean what the profile finds with &lt;a href=&quot;/blog/ai-prompts-for-cleaning-data/&quot;&gt;prompts for cleaning data&lt;/a&gt;, and see what else Claude Code can do with data in &lt;a href=&quot;/blog/claude-code-for-data-analysts/&quot;&gt;Claude Code for data analysts&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>How to tell a story with data: four parts in order</title>
    <link href="https://data.benibix.com/blog/tell-a-story-with-data/"/>
    <id>https://data.benibix.com/blog/tell-a-story-with-data/</id>
    <published>2026-10-29T01:00:00Z</published>
    <updated>2026-10-29T01:00:00Z</updated>
    <summary>A data story has four parts: the context, the change, the cause and the call to action. How to build each one from your numbers, with an example you can copy.</summary>
    <category term="Visuals"/>
    <category term="Report design"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; tell it in four parts. &lt;strong&gt;Context:&lt;/strong&gt; what the reader is looking at and why it matters. &lt;strong&gt;Change:&lt;/strong&gt; the one number that moved, with its size. &lt;strong&gt;Cause:&lt;/strong&gt; what drove it, shown with one breakdown. &lt;strong&gt;Call to action:&lt;/strong&gt; what you want the reader to decide or do. One chart per part is enough; a slide or report page per part works well.&lt;/p&gt;
&lt;p&gt;A report that shows numbers but no change gives the reader plenty to look at and nothing happening. A story needs something that moved, a reason it moved, and a next step.&lt;/p&gt;
&lt;h2 id=&quot;what-are-the-four-parts&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-four-parts&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the four parts?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Context&lt;/b&gt;&lt;span&gt;&amp;quot;Online orders, last 12 months, against target&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;red&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Change&lt;/b&gt;&lt;span&gt;&amp;quot;Repeat orders fell 18% since July&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Cause&lt;/b&gt;&lt;span&gt;&amp;quot;The drop is all in customers who joined via the summer discount&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Call to action&lt;/b&gt;&lt;span&gt;&amp;quot;Test a second-order offer for that group in December&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;A data story in four parts&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;which-chart-fits-each-part&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-chart-fits-each-part&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which chart fits each part?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Part&lt;/th&gt;&lt;th&gt;Chart that usually fits&lt;/th&gt;&lt;th&gt;Why&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Context&lt;/td&gt;&lt;td&gt;A KPI card with its target&lt;/td&gt;&lt;td&gt;Sets the stage in one glance&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Change&lt;/td&gt;&lt;td&gt;A line chart with the change marked&lt;/td&gt;&lt;td&gt;Shows when it happened and how big it is&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Cause&lt;/td&gt;&lt;td&gt;A bar chart of the change by group, sorted&lt;/td&gt;&lt;td&gt;Points at where it came from&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Call to action&lt;/td&gt;&lt;td&gt;A short sentence, or a small table of options&lt;/td&gt;&lt;td&gt;The decision, not another chart&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-do-you-find-the-cause-in-the-data&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-find-the-cause-in-the-data&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you find the cause in the data?&lt;/h2&gt;
&lt;p&gt;Break the change down by the dimensions you have (region, channel, product, customer group) and look for the one where the change is concentrated. In Power BI, the &lt;strong&gt;decomposition tree&lt;/strong&gt; and &lt;strong&gt;key influencers&lt;/strong&gt; visuals do exactly this kind of search; a sorted bar chart of &amp;quot;change by group&amp;quot; is the simple version.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Starting with the method.&lt;/strong&gt; Nobody needs the data model first; start with the change.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Five changes at once.&lt;/strong&gt; One story, one change. The others get their own page.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A cause the data does not show.&lt;/strong&gt; Say &amp;quot;linked to&amp;quot;, not &amp;quot;caused by&amp;quot;, unless you tested it.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-decomposition-tree&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create and view decomposition tree visuals in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-influencers&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create key influencers visualizations&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Lay the four parts out on one page with &lt;a href=&quot;/blog/power-bi-report-design-pattern/&quot;&gt;how I design a Power BI report page&lt;/a&gt;, and find the cause with &lt;a href=&quot;/blog/decomposition-tree-power-bi/&quot;&gt;the decomposition tree&lt;/a&gt; or &lt;a href=&quot;/blog/key-influencers-power-bi/&quot;&gt;key influencers&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>AVERAGEX, MINX and MAXX in DAX with examples</title>
    <link href="https://data.benibix.com/blog/averagex-minx-maxx-dax/"/>
    <id>https://data.benibix.com/blog/averagex-minx-maxx-dax/</id>
    <published>2026-10-28T12:00:00Z</published>
    <updated>2026-10-28T12:00:00Z</updated>
    <summary>How AVERAGE, AVERAGEX, MIN, MINX, MAX and MAXX work in DAX, averaging per row against per group (average order value, average per month), best and worst months, latest dates, blanks in averages, and examples you can copy.</summary>
    <category term="DAX"/>
    <category term="Iterators and aggregation"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;code&gt;AVERAGE&lt;/code&gt;, &lt;code&gt;MIN&lt;/code&gt; and &lt;code&gt;MAX&lt;/code&gt; work on one column. &lt;code&gt;AVERAGEX&lt;/code&gt;, &lt;code&gt;MINX&lt;/code&gt; and &lt;code&gt;MAXX&lt;/code&gt; evaluate an expression for each row of a table you choose, then average, take the smallest or the largest. The table decides the meaning: &lt;code&gt;AVERAGEX ( Sales, ... )&lt;/code&gt; averages per sales line, &lt;code&gt;AVERAGEX ( VALUES ( 'Date'[Month] ), [Revenue] )&lt;/code&gt; averages per month. Blanks are skipped, so months without sales do not pull the average down.&lt;/p&gt;
&lt;p&gt;&amp;quot;Average sale&amp;quot; can mean the average line, the average order or the average month. Each is a different &lt;code&gt;AVERAGEX&lt;/code&gt; over a different table, with different numbers.&lt;/p&gt;
&lt;h2 id=&quot;how-do-the-averages-differ&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-the-averages-differ&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do the averages differ?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- average of a column: per sales line&lt;/i&gt;
Avg Line Amount = &lt;i class=&quot;f&quot;&gt;AVERAGE&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- average order value: revenue per order&lt;/i&gt;
Avg Order Value = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Order ID]&lt;/i&gt; ) )

&lt;i class=&quot;c&quot;&gt;-- the same with AVERAGEX over orders&lt;/i&gt;
Avg Order Value X = &lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Order ID]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- average monthly revenue&lt;/i&gt;
Avg Month Revenue = &lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- average daily revenue over days with sales only&lt;/i&gt;
Avg Selling Day = &lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Order Date]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Average per&lt;/th&gt;&lt;th&gt;Denominator&lt;/th&gt;&lt;th&gt;Value&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Sales line&lt;/td&gt;&lt;td&gt;14,300 lines&lt;/td&gt;&lt;td&gt;85 EUR&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Order&lt;/td&gt;&lt;td&gt;5,050 orders&lt;/td&gt;&lt;td&gt;240 EUR&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Selling day&lt;/td&gt;&lt;td&gt;296 days with sales&lt;/td&gt;&lt;td&gt;4,100 EUR&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Month&lt;/td&gt;&lt;td&gt;12 months&lt;/td&gt;&lt;td&gt;101,000 EUR&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The same year, four averages&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;All are correct; they answer different questions. Name each measure after its denominator.&lt;/p&gt;
&lt;h2 id=&quot;how-do-minx-and-maxx-help&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-minx-and-maxx-help&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do MINX and MAXX help?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- best month's revenue in the current year&lt;/i&gt;
Best Month = &lt;i class=&quot;f&quot;&gt;MAXX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- worst month with sales&lt;/i&gt;
Worst Month = &lt;i class=&quot;f&quot;&gt;MINX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- the name of the best month&lt;/i&gt;
Best Month Name =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Best = &lt;i class=&quot;m&quot;&gt;[Best Month]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;MAXX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; = Best ), &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- latest order date per customer&lt;/i&gt;
Last Order = &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Order Date]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- largest single order&lt;/i&gt;
Largest Order = &lt;i class=&quot;f&quot;&gt;MAXX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Order ID]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;MAX&lt;/code&gt; and &lt;code&gt;MIN&lt;/code&gt; also accept two values: &lt;code&gt;MAX ( [Revenue], [Target] )&lt;/code&gt;, &lt;code&gt;MIN ( [Bonus], 500 )&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-about-blanks&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-about-blanks&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What about blanks?&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;AVERAGEX&lt;/code&gt; skips rows where the expression is BLANK. Months with no sales are left out of &lt;code&gt;Avg Month Revenue&lt;/code&gt;. If they should count as zero:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Avg Month incl Empty =
&lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;COALESCE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;VALUES ( 'Date'[Month] )&lt;/code&gt; comes from the Date table, so it lists all months in the filter, including those without sales; &lt;code&gt;VALUES ( Sales[Order Date] )&lt;/code&gt; lists only dates with sales.&lt;/p&gt;
&lt;h2 id=&quot;what-are-the-a-variants&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-a-variants&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the A variants?&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;AVERAGEA&lt;/code&gt;, &lt;code&gt;MINA&lt;/code&gt;, &lt;code&gt;MAXA&lt;/code&gt; and &lt;code&gt;COUNTA&lt;/code&gt; also handle non-numeric values: TRUE counts as 1, FALSE as 0, and text as 0 in &lt;code&gt;AVERAGEA&lt;/code&gt;. They are rarely needed in models with clean numeric columns.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;AVERAGE where a weighted average is needed.&lt;/strong&gt; The average of prices ignores quantities; use &lt;code&gt;DIVIDE ( SUMX ( Sales, Qty * Price ), SUM ( Qty ) )&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Average of averages.&lt;/strong&gt; Averaging regional averages ignores region size; average over the base rows.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The wrong table.&lt;/strong&gt; &lt;code&gt;AVERAGEX ( Sales, [Revenue] )&lt;/code&gt; calls the measure per line; it is slow and means the same as average line revenue.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Partial periods.&lt;/strong&gt; The current month drags down an average per month; exclude it or label it.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/averagex-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: AVERAGEX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/maxx-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: MAXX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/minx-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: MINX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Write &lt;code&gt;Avg Order Value&lt;/code&gt; and &lt;code&gt;Avg Month Revenue&lt;/code&gt; and give each a description that names its denominator. &lt;a href=&quot;/blog/rankx-dax/&quot;&gt;RANKX&lt;/a&gt; ranks the same per-row results instead of averaging them.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>AZ-305 in 2026: what the exam covers and how to study</title>
    <link href="https://data.benibix.com/blog/az-305-study-guide/"/>
    <id>https://data.benibix.com/blog/az-305-study-guide/</id>
    <published>2026-10-28T12:00:00Z</published>
    <updated>2026-10-28T12:00:00Z</updated>
    <summary>What the AZ-305 Azure Solutions Architect exam measures since April 2026, how its four design areas are weighted, why it needs AZ-104 first, and how I studied for it by designing instead of building.</summary>
    <category term="Exams"/>
    <category term="Azure"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; AZ-305 earns &lt;strong&gt;Microsoft Certified: Azure Solutions Architect Expert&lt;/strong&gt;, but only together with the &lt;strong&gt;Azure Administrator Associate&lt;/strong&gt; (&lt;a href=&quot;/blog/az-104-study-guide/&quot;&gt;AZ-104&lt;/a&gt;), its prerequisite. It weighs identity, governance and monitoring design at 25 to 30%, data storage design at 20 to 25%, business continuity at 15 to 20%, and infrastructure design at 30 to 35%. You need 700 out of 1,000 and renew it each year for free.&lt;/p&gt;
&lt;p&gt;I passed AZ-305 in June 2026, a month after AZ-104. Where AZ-104 asks &amp;quot;how do you configure this?&amp;quot;, AZ-305 asks &amp;quot;what would you recommend, and why?&amp;quot;. Almost every skill on the list starts with &lt;em&gt;recommend&lt;/em&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-does-az-305-cover&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-az-305-cover&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does AZ-305 cover?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Identity, governance and monitoring&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:85.7%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;25-30%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Data storage&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:71.4%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;20-25%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;b&gt;Business continuity&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:57.1%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;15-20%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Infrastructure&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;30-35%&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;AZ-305 skills, by weight in the exam&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Identity, governance and monitoring&lt;/strong&gt;: logging and routing logs, authentication and identity management, management group, subscription and resource group structure, tagging and compliance.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Data storage&lt;/strong&gt;: relational stores and their service and compute tiers, semi-structured and unstructured data, data integration and analysis.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Business continuity&lt;/strong&gt;: backup and recovery that meets recovery objectives, and high availability for compute and relational data.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Infrastructure&lt;/strong&gt;: compute, application architecture (messaging, events), migrations, and network connectivity to the internet and on-premises.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-would-i-study-for-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-would-i-study-for-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How would I study for it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Read&lt;/b&gt;&lt;span&gt;the Well-Architected Framework pillars and the Cloud Adoption Framework&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Decide&lt;/b&gt;&lt;span&gt;for each skill, a small table of options and when each wins&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Case&lt;/b&gt;&lt;span&gt;write one architecture for a real scenario, end to end&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Check&lt;/b&gt;&lt;span&gt;build the one piece you are unsure of&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Practice assessment&lt;/b&gt;&lt;span&gt;the free one, for the question style&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Design first, build only to check&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The decision tables are the study. For each area, list the options and the requirement that picks each one:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Requirement&lt;/th&gt;&lt;th&gt;Recommend&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Single database, fully managed, scale per database&lt;/td&gt;&lt;td&gt;Azure SQL Database&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Many databases with uneven load, shared cost&lt;/td&gt;&lt;td&gt;SQL Database elastic pool&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Lift and shift with SQL Agent and cross-database queries&lt;/td&gt;&lt;td&gt;SQL Managed Instance&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Full OS control or third-party software on the server&lt;/td&gt;&lt;td&gt;SQL Server on an Azure VM&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Example decision table: relational data&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-helps-on-the-day&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-helps-on-the-day&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What helps on the day?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Be ready for case studies.&lt;/strong&gt; They are one of the question types on role-based exams: a long scenario with several questions. Read the requirements and constraints first, the background later.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The cheapest option that meets every requirement.&lt;/strong&gt; Many answers work; the right one meets each stated requirement at the least cost or effort.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Use Microsoft Learn to confirm a limit or a tier&lt;/strong&gt;, not to learn a service.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-keep-the-certification&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-keep-the-certification&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you keep the certification?&lt;/h2&gt;
&lt;p&gt;It expires after a year; the free online renewal assessment opens in the six months before. It does not expire when AZ-104 does; each is renewed separately.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/az-305&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam AZ-305&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/azure-solutions-architect/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Microsoft Certified: Azure Solutions Architect Expert&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/renew-your-microsoft-certification-faq&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Renewal FAQ&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Write one decision table per area. &lt;a href=&quot;/blog/az-104-vs-az-305/&quot;&gt;AZ-104 or AZ-305?&lt;/a&gt; explains the order, and &lt;a href=&quot;/blog/fabric-lakehouse-or-warehouse/&quot;&gt;Fabric lakehouse or warehouse&lt;/a&gt; is the same kind of &amp;quot;which one and why&amp;quot; decision for data. My credential is on &lt;a href=&quot;/about/&quot;&gt;the About page&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>How long is a Microsoft exam, and how do breaks work?</title>
    <link href="https://data.benibix.com/blog/exam-time-and-breaks/"/>
    <id>https://data.benibix.com/blog/exam-time-and-breaks/</id>
    <published>2026-10-28T12:00:00Z</published>
    <updated>2026-10-28T12:00:00Z</updated>
    <summary>Exam and seat times for Microsoft fundamentals, associate and expert exams in 2026, the 30 extra minutes when the exam is not in your language, how unscheduled breaks work and what they cost, and a pacing plan for 40 to 60 questions.</summary>
    <category term="Exams"/>
    <category term="Exam tips"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; fundamentals exams give &lt;strong&gt;45 minutes&lt;/strong&gt; (plan 65 in the seat), associate and expert exams &lt;strong&gt;100 minutes&lt;/strong&gt; (120 in the seat), or &lt;strong&gt;120 minutes&lt;/strong&gt; (140) when they may contain labs. You can take &lt;strong&gt;unscheduled breaks&lt;/strong&gt;, but the clock keeps running and you &lt;strong&gt;cannot return&lt;/strong&gt; to any question you saw before the break. If the exam is not offered in your language, you can request &lt;strong&gt;30 extra minutes&lt;/strong&gt; in advance.&lt;/p&gt;
&lt;h2 id=&quot;how-long-is-each-exam-type&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-long-is-each-exam-type&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How long is each exam type?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Exam type&lt;/th&gt;&lt;th&gt;Exam time&lt;/th&gt;&lt;th&gt;Seat time&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Fundamentals&lt;/td&gt;&lt;td&gt;45 min&lt;/td&gt;&lt;td&gt;65 min&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Associate and expert, no labs&lt;/td&gt;&lt;td&gt;100 min&lt;/td&gt;&lt;td&gt;120 min&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Associate and expert, may contain labs&lt;/td&gt;&lt;td&gt;120 min&lt;/td&gt;&lt;td&gt;140 min&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Microsoft Office Specialist&lt;/td&gt;&lt;td&gt;50 min&lt;/td&gt;&lt;td&gt;60 min&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Exam time and seat time&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Seat time adds the instructions, the candidate agreement and the survey. Your booking tells you the exact exam time.&lt;/p&gt;
&lt;h2 id=&quot;how-do-breaks-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-breaks-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do breaks work?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;red&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Before&lt;/b&gt;&lt;span&gt;answer or review everything you have seen; you cannot return to it&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Start&lt;/b&gt;&lt;span&gt;the &amp;quot;Take a break&amp;quot; icon in the left pane&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;During&lt;/b&gt;&lt;span&gt;the clock keeps running; you may leave the camera (start the break first)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;After&lt;/b&gt;&lt;span&gt;continue with the questions you have not seen&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Taking a break&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Five minutes were added to every exam (and questions removed) to allow for a break. You cannot take one in the middle of a lab or a problem and solution set. Leaving the camera without starting a break in the exam can get the exam revoked.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-pace-40-to-60-questions&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-pace-40-to-60-questions&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you pace 40 to 60 questions?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;First pass, answer or mark&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;60 min&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Case study section&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:41.7%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;25 min&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Review marked questions&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:16.7%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;10 min&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;b&gt;Buffer&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:8.3%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;5 min&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;A 100-minute exam with 50 questions&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;First pass fast.&lt;/strong&gt; Answer what you know, mark what you do not, move on.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Watch for sections you cannot return to&lt;/strong&gt; (case studies and problem and solution sets have their own instructions).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Answer everything.&lt;/strong&gt; There is no penalty for a wrong answer.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;who-can-get-more-time&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#who-can-get-more-time&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Who can get more time?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Language:&lt;/strong&gt; if the exam is not in your preferred language, request extra time with the English as a Second Language form before booking. Choosing English when your language is offered does not qualify.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Accommodations:&lt;/strong&gt; extra time for learning disabilities, ADHD, PTSD or test anxiety, among others. See &lt;a href=&quot;/blog/exam-accommodations-extra-time/&quot;&gt;Exam accommodations&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/support/exam-duration-exam-experience&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Exam duration and exam experience&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/available-exam-accommodations-document-requirements&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Available exam accommodations and documentation&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Time one full practice assessment with the real exam's minutes. &lt;a href=&quot;/blog/microsoft-exam-question-types/&quot;&gt;Microsoft exam question types&lt;/a&gt; shows which sections have their own rules.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Key influencers in Power BI: what drives a metric</title>
    <link href="https://data.benibix.com/blog/key-influencers-power-bi/"/>
    <id>https://data.benibix.com/blog/key-influencers-power-bi/</id>
    <published>2026-10-28T12:00:00Z</published>
    <updated>2026-10-28T12:00:00Z</updated>
    <summary>How the key influencers visual in Power BI finds and ranks the factors behind a metric, Analyze, Explain by and Expand by, categorical and continuous analysis, Top segments, how to read &quot;2.57 times more likely&quot;, and the mistakes to avoid.</summary>
    <category term="Visuals"/>
    <category term="AI visuals"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; the &lt;strong&gt;key influencers&lt;/strong&gt; visual runs a statistical analysis on your model to answer &amp;quot;what makes this metric go up, down, or take this value?&amp;quot;. Put the metric in &lt;strong&gt;Analyze&lt;/strong&gt;, the possible factors in &lt;strong&gt;Explain by&lt;/strong&gt;, and for a measure, the level to analyse at in &lt;strong&gt;Expand by&lt;/strong&gt;. The &lt;strong&gt;Key influencers&lt;/strong&gt; tab ranks single factors (&amp;quot;customers in the Publisher role are 2.57 times more likely to give a low rating&amp;quot;); the &lt;strong&gt;Top segments&lt;/strong&gt; tab finds combinations of factors where the metric is especially high or low.&lt;/p&gt;
&lt;p&gt;&amp;quot;Why are ratings low?&amp;quot; usually leads to a few charts chosen by hunch. Key influencers tests every factor you give it, ranks them, and says how strong each effect is, so the hunch is checked before anyone acts on it.&lt;/p&gt;
&lt;h2 id=&quot;what-does-the-result-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-the-result-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does the result look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li&gt;&lt;b&gt;Role is Publisher&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;2.57x&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Theme is Dark&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:73.9%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;1.9x&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;More than 4 support tickets&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:62.3%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;1.6x&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Company size under 50&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:50.6%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;1.3x&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;What makes a low rating more likely (times as likely as for everyone else)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Microsoft's example reads: 14.93% of publishers give a low score; all other roles give one 5.78% of the time; so publishers are 2.57 times more likely to give a low score (14.93 / 5.78). In the visual, the green bar is the factor's rate and the red dotted line is the average of all others.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-set-it-up&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-set-it-up&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you set it up?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;In &lt;strong&gt;Visualizations&lt;/strong&gt; pick &lt;strong&gt;Key influencers&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Drag the metric to &lt;strong&gt;Analyze&lt;/strong&gt;. A categorical field (Rating: High or Low, Churned: Yes or No) asks &amp;quot;what makes it this value?&amp;quot;; a numeric field or measure asks &amp;quot;what makes it go up or down?&amp;quot;.&lt;/li&gt;&lt;li&gt;Drag candidate factors to &lt;strong&gt;Explain by&lt;/strong&gt;: as many as make sense (role, country, subscription type, company size, theme, ticket count).&lt;/li&gt;&lt;li&gt;For a categorical metric, pick the value at the top of the visual (&amp;quot;What influences Rating to be &lt;strong&gt;Low&lt;/strong&gt;&amp;quot;).&lt;/li&gt;&lt;li&gt;Leave &lt;strong&gt;Expand by&lt;/strong&gt; empty unless Analyze holds a measure or a summarised column (see below).&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;The analysis runs at the table level of the field in Analyze: for a rating per customer, each customer is one observation, and measures in Explain by are evaluated per customer.&lt;/p&gt;
&lt;h2 id=&quot;categorical-or-continuous&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#categorical-or-continuous&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Categorical or continuous?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Analyze holds&lt;/th&gt;&lt;th&gt;Analysis&lt;/th&gt;&lt;th&gt;The question&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;a categorical field&lt;/td&gt;&lt;td&gt;categorical (logistic regression)&lt;/td&gt;&lt;td&gt;what makes it this value?&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;an unsummarised numeric field&lt;/td&gt;&lt;td&gt;your choice in &lt;strong&gt;Format visual&lt;/strong&gt;: categorical or continuous&lt;/td&gt;&lt;td&gt;what makes it high or low / increase or decrease?&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;a measure or summarised column&lt;/td&gt;&lt;td&gt;continuous (linear regression), cannot change&lt;/td&gt;&lt;td&gt;what makes it increase or decrease?&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;For a measure, the visual needs to know the level of detail: it evaluates the measure at the level of the Explain by fields, which can be too coarse to learn from. &lt;strong&gt;Expand by&lt;/strong&gt; sets the level: put the house ID or customer ID there, and the measure is evaluated per house or customer.&lt;/p&gt;
&lt;p&gt;Continuous factors (age, price, ticket count) are reported as &amp;quot;for every 1 more ticket, a low rating is 4.08% more likely&amp;quot; when the relationship is linear enough; if it is not, the visual bins them into ranges and treats them as categories.&lt;/p&gt;
&lt;h2 id=&quot;what-does-top-segments-add&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-top-segments-add&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does Top segments add?&lt;/h2&gt;
&lt;p&gt;Single factors miss combinations. &lt;strong&gt;Top segments&lt;/strong&gt; finds groups defined by several factors at once, for example &amp;quot;Role is Consumer and Theme is Dark and tickets more than 3&amp;quot;, with the share of low ratings in each segment and how many customers it covers. A segment with a very high rate but 12 customers matters less than one with a slightly lower rate and 1,400.&lt;/p&gt;
&lt;h2 id=&quot;what-dax-goes-with-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-dax-goes-with-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What DAX goes with it?&lt;/h2&gt;
&lt;p&gt;A clean categorical target often beats a raw number:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- calculated column on Customer&lt;/i&gt;
Rating Band =
&lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Rating]&lt;/i&gt; &amp;lt;= &lt;i class=&quot;n&quot;&gt;2&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Low&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;High&amp;quot;&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- measure as an explanatory factor, evaluated per customer&lt;/i&gt;
Support Tickets = &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Tickets )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;With &lt;code&gt;Rating Band&lt;/code&gt; in Analyze and &lt;code&gt;Support Tickets&lt;/code&gt; in Explain by, the visual tests whether more tickets make a low rating more likely.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Influence read as cause.&lt;/strong&gt; The visual finds association. Publishers might rate low because of a feature they use, not because they are publishers.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Factors that are the target in disguise.&lt;/strong&gt; &amp;quot;Cancellation reason&amp;quot; explains churn perfectly and teaches nothing; leave out fields that only exist because of the outcome.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too little data.&lt;/strong&gt; With few rows per value, nothing is significant and the visual shows few or no influencers.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A measure at the wrong level.&lt;/strong&gt; Without Expand by, a measure is analysed at a very summarised level and finds little.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too many Explain by fields with many values.&lt;/strong&gt; Hundreds of products as a factor dilute the analysis; group them first.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-influencers&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create key influencers visualizations&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/countrows-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: COUNTROWS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Make the outcome a clear category (low or high, churned or not), give the visual five to ten factors that exist before the outcome, and check the top influencer with a plain chart before acting. The &lt;a href=&quot;/blog/decomposition-tree-power-bi/&quot;&gt;decomposition tree&lt;/a&gt; shows where a metric is highest; key influencers suggests why.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>LTV to CAC ratio and CAC payback in DAX</title>
    <link href="https://data.benibix.com/blog/ltv-to-cac-kpi/"/>
    <id>https://data.benibix.com/blog/ltv-to-cac-kpi/</id>
    <published>2026-10-28T12:00:00Z</published>
    <updated>2026-10-28T12:00:00Z</updated>
    <summary>How to calculate the LTV to CAC ratio from customer lifetime value and acquisition cost, using gross margin, a worked example by channel, CAC payback months as the companion KPI, the common 3 to 1 rule of thumb and its limits, the DAX combining the two measures, and a scatter of channels.</summary>
    <category term="KPIs"/>
    <category term="SaaS and product"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;LTV:CAC&lt;/strong&gt; = customer lifetime value (in &lt;strong&gt;gross margin&lt;/strong&gt;) / customer acquisition cost. A ratio of 3 means each customer brings three times what it cost to win them. A common rule of thumb treats about &lt;strong&gt;3:1&lt;/strong&gt; as healthy, below 1:1 as losing money on every customer, and far above 5:1 as possibly under-investing in growth. Always show &lt;strong&gt;CAC payback&lt;/strong&gt; with it (months of gross margin to recover CAC), because a high ratio that takes four years to pay back still drains cash.&lt;/p&gt;
&lt;p&gt;The two halves come from other KPIs: &lt;a href=&quot;/blog/customer-lifetime-value-kpi/&quot;&gt;customer lifetime value&lt;/a&gt; and &lt;a href=&quot;/blog/customer-acquisition-cost-kpi/&quot;&gt;customer acquisition cost&lt;/a&gt;. The ratio connects marketing spend to what customers are worth.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-calculated-by-channel&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-calculated-by-channel&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it calculated by channel?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Channel&lt;/th&gt;&lt;th&gt;ARPA per month&lt;/th&gt;&lt;th&gt;Gross margin&lt;/th&gt;&lt;th&gt;Monthly churn&lt;/th&gt;&lt;th&gt;LTV&lt;/th&gt;&lt;th&gt;CAC&lt;/th&gt;&lt;th&gt;LTV:CAC&lt;/th&gt;&lt;th&gt;Payback months&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Referral&lt;/td&gt;&lt;td&gt;60&lt;/td&gt;&lt;td&gt;80%&lt;/td&gt;&lt;td&gt;1.5%&lt;/td&gt;&lt;td&gt;3,200&lt;/td&gt;&lt;td&gt;400&lt;/td&gt;&lt;td&gt;8.0&lt;/td&gt;&lt;td&gt;8.3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Paid search&lt;/td&gt;&lt;td&gt;50&lt;/td&gt;&lt;td&gt;80%&lt;/td&gt;&lt;td&gt;2.5%&lt;/td&gt;&lt;td&gt;1,600&lt;/td&gt;&lt;td&gt;500&lt;/td&gt;&lt;td&gt;3.2&lt;/td&gt;&lt;td&gt;12.5&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Paid social&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;80%&lt;/td&gt;&lt;td&gt;4.0%&lt;/td&gt;&lt;td&gt;800&lt;/td&gt;&lt;td&gt;600&lt;/td&gt;&lt;td&gt;1.3&lt;/td&gt;&lt;td&gt;18.8&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;By acquisition channel&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;LTV = ARPA × gross margin / monthly churn (the subscription formula); payback = CAC / (ARPA × gross margin).&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;scatter&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;scatter chart: Referral 400, 3,200; Paid search 500, 1,600; Paid social 600, 800&quot;&gt;&lt;line x1=&quot;56&quot; y1=&quot;254&quot; x2=&quot;570&quot; y2=&quot;254&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;48&quot; y=&quot;258&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;56&quot; y1=&quot;194&quot; x2=&quot;570&quot; y2=&quot;194&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;48&quot; y=&quot;198&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;1,000&lt;/text&gt;&lt;line x1=&quot;56&quot; y1=&quot;134&quot; x2=&quot;570&quot; y2=&quot;134&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;48&quot; y=&quot;138&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;2,000&lt;/text&gt;&lt;line x1=&quot;56&quot; y1=&quot;74&quot; x2=&quot;570&quot; y2=&quot;74&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;48&quot; y=&quot;78&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;3,000&lt;/text&gt;&lt;line x1=&quot;56&quot; y1=&quot;14&quot; x2=&quot;570&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;48&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;4,000&lt;/text&gt;&lt;text x=&quot;56&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0&lt;/text&gt;&lt;text x=&quot;184.5&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;200&lt;/text&gt;&lt;text x=&quot;313&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;400&lt;/text&gt;&lt;text x=&quot;441.5&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;600&lt;/text&gt;&lt;text x=&quot;570&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;800&lt;/text&gt;&lt;circle cx=&quot;313&quot; cy=&quot;62&quot; r=&quot;6&quot; class=&quot;m bub k0&quot;/&gt;&lt;circle cx=&quot;377.3&quot; cy=&quot;158&quot; r=&quot;6&quot; class=&quot;m bub k1&quot;/&gt;&lt;circle cx=&quot;441.5&quot; cy=&quot;206&quot; r=&quot;6&quot; class=&quot;m bub k2&quot;/&gt;&lt;text x=&quot;323&quot; y=&quot;66&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;Referral&lt;/text&gt;&lt;text x=&quot;387.3&quot; y=&quot;162&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;Paid search&lt;/text&gt;&lt;text x=&quot;451.5&quot; y=&quot;210&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;Paid social&lt;/text&gt;&lt;text x=&quot;313&quot; y=&quot;294&quot; class=&quot;tax&quot; text-anchor=&quot;middle&quot;&gt;CAC&lt;/text&gt;&lt;text x=&quot;14&quot; y=&quot;134&quot; class=&quot;tax&quot; text-anchor=&quot;middle&quot; transform=&quot;rotate(-90 14 134)&quot;&gt;LTV&lt;/text&gt;&lt;line x1=&quot;56&quot; y1=&quot;254&quot; x2=&quot;570&quot; y2=&quot;254&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Channels by CAC and LTV&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Paid social customers churn fast and cost the most: at 1.3:1 and 19 months to pay back, each one barely returns its cost.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;ARPA = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[MRR]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Active Customers]&lt;/i&gt; )

Monthly Churn Rate = &lt;i class=&quot;m&quot;&gt;[Churn Rate]&lt;/i&gt;  &lt;i class=&quot;c&quot;&gt;-- from the churn measure, at month level&lt;/i&gt;

LTV = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[ARPA]&lt;/i&gt; * &lt;i class=&quot;m&quot;&gt;[Gross Margin %]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Monthly Churn Rate]&lt;/i&gt; )

CAC = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Spend]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[New Customers]&lt;/i&gt; )

LTV to CAC = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[LTV]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[CAC]&lt;/i&gt; )

CAC Payback Months = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[CAC]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[ARPA]&lt;/i&gt; * &lt;i class=&quot;m&quot;&gt;[Gross Margin %]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;With customers tagged by acquisition channel and spend loaded by channel, the Channel dimension filters both halves. Use trailing averages (for example the last 6 months of churn and spend) so one month does not swing the ratio; see &lt;a href=&quot;/blog/mrr-arr-kpi/&quot;&gt;MRR&lt;/a&gt; and &lt;a href=&quot;/blog/customer-churn-rate-kpi/&quot;&gt;churn rate&lt;/a&gt; for the parts.&lt;/p&gt;
&lt;h2 id=&quot;how-should-you-read-the-ratio&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-should-you-read-the-ratio&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How should you read the ratio?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;red&quot;&gt;&lt;b&gt;Below 1&lt;/b&gt;&lt;ul&gt;&lt;li&gt;every new customer loses money&lt;/li&gt;&lt;li&gt;fix churn, price or CAC before spending more&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Around 3&lt;/b&gt;&lt;span&gt;the usual target in subscription businesses&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Far above 5&lt;/b&gt;&lt;ul&gt;&lt;li&gt;growth may be held back&lt;/li&gt;&lt;li&gt;there may be room to spend more on acquisition&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Reading LTV:CAC&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;These bands are a common rule of thumb, not a law: a business with a short payback and cheap capital can grow profitably below 3, one with long payback needs more.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Revenue LTV.&lt;/strong&gt; Use gross margin, or the ratio is inflated by the cost of serving customers.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Churn from young cohorts or a tiny base.&lt;/strong&gt; LTV is very sensitive to churn: 1% against 2% doubles it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Blended CAC with organic customers.&lt;/strong&gt; Flatters paid channels; compute per channel.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Ratio without payback.&lt;/strong&gt; A 5:1 ratio with 48-month payback needs a lot of cash.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/divide-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DIVIDE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-scatter&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Scatter, bubble, and dot plot charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-relationships-understand&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Model relationships in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Compute LTV and CAC per acquisition channel over the last six months and plot them as a scatter. &lt;a href=&quot;/blog/dau-mau-stickiness-kpi/&quot;&gt;DAU/MAU&lt;/a&gt; is a leading sign of churn in products.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Matrix visual in Power BI: rows, columns, subtotals</title>
    <link href="https://data.benibix.com/blog/matrix-visual-power-bi/"/>
    <id>https://data.benibix.com/blog/matrix-visual-power-bi/</id>
    <published>2026-10-28T12:00:00Z</published>
    <updated>2026-10-28T12:00:00Z</updated>
    <summary>How the matrix visual in Power BI groups rows and columns with hierarchies, expands and collapses levels, shows subtotals, the stepped layout, values on rows, frozen headers, custom totals, and the DAX that keeps subtotals right.</summary>
    <category term="Visuals"/>
    <category term="Tables"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;matrix&lt;/strong&gt; is a table with groups on both sides, like a pivot table in Excel: fields in &lt;strong&gt;Rows&lt;/strong&gt; and &lt;strong&gt;Columns&lt;/strong&gt; make the headers, measures in &lt;strong&gt;Values&lt;/strong&gt; fill the cells, and each level gets a &lt;strong&gt;subtotal&lt;/strong&gt;. Put several fields in &lt;strong&gt;Rows&lt;/strong&gt; to make a hierarchy that people expand and collapse with the plus icons. Use it for &amp;quot;this measure by that and by that&amp;quot;, for example revenue by category and month.&lt;/p&gt;
&lt;p&gt;A table can list revenue for every category and month as 120 rows. A matrix shows the same numbers as 10 rows by 12 columns, with a total for each category and each month, and lets the reader open one category to see its products.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-matrix-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-matrix-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a matrix look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Category&lt;/th&gt;&lt;th&gt;Q1&lt;/th&gt;&lt;th&gt;Q2&lt;/th&gt;&lt;th&gt;Q3&lt;/th&gt;&lt;th&gt;Q4&lt;/th&gt;&lt;th&gt;Total&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Bikes&lt;/td&gt;&lt;td&gt;410&lt;/td&gt;&lt;td&gt;520&lt;/td&gt;&lt;td&gt;480&lt;/td&gt;&lt;td&gt;690&lt;/td&gt;&lt;td&gt;2,100&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bikes · Mountain&lt;/td&gt;&lt;td&gt;190&lt;/td&gt;&lt;td&gt;240&lt;/td&gt;&lt;td&gt;230&lt;/td&gt;&lt;td&gt;330&lt;/td&gt;&lt;td&gt;990&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bikes · Road&lt;/td&gt;&lt;td&gt;150&lt;/td&gt;&lt;td&gt;190&lt;/td&gt;&lt;td&gt;170&lt;/td&gt;&lt;td&gt;250&lt;/td&gt;&lt;td&gt;760&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bikes · Touring&lt;/td&gt;&lt;td&gt;70&lt;/td&gt;&lt;td&gt;90&lt;/td&gt;&lt;td&gt;80&lt;/td&gt;&lt;td&gt;110&lt;/td&gt;&lt;td&gt;350&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Accessories&lt;/td&gt;&lt;td&gt;95&lt;/td&gt;&lt;td&gt;110&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;td&gt;150&lt;/td&gt;&lt;td&gt;475&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Clothing&lt;/td&gt;&lt;td&gt;60&lt;/td&gt;&lt;td&gt;85&lt;/td&gt;&lt;td&gt;70&lt;/td&gt;&lt;td&gt;105&lt;/td&gt;&lt;td&gt;320&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;565&lt;/td&gt;&lt;td&gt;715&lt;/td&gt;&lt;td&gt;670&lt;/td&gt;&lt;td&gt;945&lt;/td&gt;&lt;td&gt;2,895&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Revenue by category and quarter, with subtotals; Bikes expanded to its subcategories&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-build-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build one?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;In &lt;strong&gt;Visualizations&lt;/strong&gt; pick &lt;strong&gt;Matrix&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Drag the row groups to &lt;strong&gt;Rows&lt;/strong&gt; (for example &lt;code&gt;Product[Category]&lt;/code&gt;, then &lt;code&gt;Product[Subcategory]&lt;/code&gt;), the column groups to &lt;strong&gt;Columns&lt;/strong&gt; (for example &lt;code&gt;Date[Quarter]&lt;/code&gt;) and measures to &lt;strong&gt;Values&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Use the drill icons on the visual, or right-click a row header, &lt;strong&gt;Expand&lt;/strong&gt; or &lt;strong&gt;Collapse&lt;/strong&gt;, to open levels. The &lt;strong&gt;Auto-expand&lt;/strong&gt; option in the row and column headers settings opens all levels by default.&lt;/li&gt;&lt;li&gt;In &lt;strong&gt;Format visual&lt;/strong&gt;, &lt;strong&gt;Layout and style presets&lt;/strong&gt; sets the &lt;strong&gt;Stepped layout&lt;/strong&gt; (child levels indented under the parent in one column) or not (one column per level), and &lt;strong&gt;Row subtotals&lt;/strong&gt; and &lt;strong&gt;Column subtotals&lt;/strong&gt; switch subtotals per level and set their position (top or bottom).&lt;/li&gt;&lt;li&gt;Several measures in &lt;strong&gt;Values&lt;/strong&gt;? &lt;strong&gt;Values, Options, Switch values to rows&lt;/strong&gt; puts the measures down the side instead of across.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Row headers are frozen by default, so they stay in view when scrolling sideways; &lt;strong&gt;Layout, Freeze, Row headers&lt;/strong&gt; changes that, and viewers can freeze or unfreeze for their session with a right-click. Column widths can &lt;strong&gt;Fit to content&lt;/strong&gt;, &lt;strong&gt;Grow to fit&lt;/strong&gt; or use a &lt;strong&gt;Fixed width&lt;/strong&gt;, with custom widths per column.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-keep-subtotals-right&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-keep-subtotals-right&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you keep subtotals right?&lt;/h2&gt;
&lt;p&gt;Subtotals, like totals, evaluate the measure for all the rows of the group together. For sums that is the same as adding up. For a measure that should be added up per row (commission per customer, the higher of two values per month), write it with an iterator at the level it is defined:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Best Month Revenue =
&lt;i class=&quot;f&quot;&gt;MAXX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )

Commission =
&lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;100000&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; * &lt;i class=&quot;n&quot;&gt;0.05&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;To show something different on the subtotal rows (for example, blank for a ratio that makes no sense when summed), test the level with &lt;code&gt;ISINSCOPE&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Share in Category =
&lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;ISINSCOPE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Subcategory]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;REMOVEFILTERS&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Subcategory]&lt;/i&gt; ) ) )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Subcategory rows show their share of the category (Mountain is 47% of Bikes); category and total rows show nothing. &lt;a href=&quot;/blog/isinscope-dax/&quot;&gt;ISINSCOPE in DAX&lt;/a&gt; goes through the cases.&lt;/p&gt;
&lt;p&gt;The no-DAX way is a &lt;strong&gt;custom total&lt;/strong&gt;: right-click a numeric column, &lt;strong&gt;Customize total calculation&lt;/strong&gt;, and pick Sum, Average, Min or Max of the displayed rows. Power BI renames the original column with a &lt;code&gt;_Base&lt;/code&gt; suffix, hides it, adds a visual calculation with the original name, and marks the total cell. &lt;strong&gt;Reset to default&lt;/strong&gt; undoes it. Custom totals work on tables and matrices, for numeric columns only, and not in Explore.&lt;/p&gt;
&lt;h2 id=&quot;when-is-a-matrix-better-than-a-chart&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-a-matrix-better-than-a-chart&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is a matrix better than a chart?&lt;/h2&gt;
&lt;p&gt;When people need the numbers, in a grid they already know from Excel: budgets by department and month, sales by region and product line, a P&amp;amp;L. With conditional formatting (background colours as a heatmap, data bars, icons), the matrix also shows the pattern. A &lt;strong&gt;Background color&lt;/strong&gt; gradient on the values makes the strongest cells the darkest, so in a region-by-month matrix a region that jumps in March lights up without anyone reading a number.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Subtotals that do not add up.&lt;/strong&gt; See above: iterate at the right level, blank meaningless subtotals with &lt;code&gt;ISINSCOPE&lt;/code&gt;, or use custom totals.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too many levels open.&lt;/strong&gt; Four levels expanded across thousands of rows are slow and unreadable. Keep the default collapsed and let people drill.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Months in alphabetical order.&lt;/strong&gt; Sort &lt;code&gt;Month Name&lt;/code&gt; by &lt;code&gt;Month Number&lt;/code&gt; in the model.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Measures as columns that wrap.&lt;/strong&gt; With five measures and twelve months, 60 columns do not fit; switch values to rows or cut measures.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Blank rows.&lt;/strong&gt; Rows with no value in any measure are hidden by default; &lt;strong&gt;Show items with no data&lt;/strong&gt; on the field brings them back when they matter.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-matrix-visual&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create a matrix visual in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Apply conditional formatting in tables and matrixes&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/isinscope-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: ISINSCOPE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Build the matrix with one row field and one column field first, add the second row level, then check every subtotal. The &lt;a href=&quot;/blog/table-visual-power-bi/&quot;&gt;table visual&lt;/a&gt; covers totals and formatting, and &lt;a href=&quot;/blog/visual-calculations-power-bi/&quot;&gt;visual calculations&lt;/a&gt; explain what custom totals are built on.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>A Claude Code skill for your team's DAX conventions</title>
    <link href="https://data.benibix.com/blog/claude-skill-for-dax-conventions/"/>
    <id>https://data.benibix.com/blog/claude-skill-for-dax-conventions/</id>
    <published>2026-10-28T09:00:00Z</published>
    <updated>2026-10-28T09:00:00Z</updated>
    <summary>A Claude Code skill teaches Claude one job and loads only when a request matches. Write one for your DAX rules (naming, VAR and DIVIDE, formatting) and every measure Claude writes follows them. The folder, the file and a full example.</summary>
    <category term="AI"/>
    <category term="Claude Code"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; create &lt;code&gt;.claude/skills/dax-conventions/SKILL.md&lt;/code&gt; in your project, with a &lt;code&gt;name&lt;/code&gt;, a &lt;code&gt;description&lt;/code&gt; that says &lt;strong&gt;when&lt;/strong&gt; to use it (&amp;quot;Use when writing or reviewing DAX measures&amp;quot;), and your rules below: naming, variables, &lt;code&gt;DIVIDE&lt;/code&gt;, formatting, comments. Claude reads only the description up front and loads the rules when you ask for a measure, so they cost nothing the rest of the time.&lt;/p&gt;
&lt;p&gt;Every team has DAX habits: measures named in Title Case, &lt;code&gt;DIVIDE&lt;/code&gt; instead of &lt;code&gt;/&lt;/code&gt;, a &lt;code&gt;VAR&lt;/code&gt; for anything used twice, display folders by subject. An AI that does not know them writes measures that work and still need rewriting. A skill fixes that once.&lt;/p&gt;
&lt;h2 id=&quot;where-does-the-skill-live&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-does-the-skill-live&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where does the skill live?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;layers&quot;&gt;&lt;ol class=&quot;dfig-stack&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;.claude/skills/&lt;/b&gt;&lt;span&gt;the project's skills folder, shared through Git&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;dax-conventions/&lt;/b&gt;&lt;span&gt;one folder per skill&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;SKILL.md&lt;/b&gt;&lt;span&gt;name and description at the top, the rules below&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;A skill in a project&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Put it in &lt;code&gt;~/.claude/skills/&lt;/code&gt; instead to use it in every project on your machine.&lt;/p&gt;
&lt;h2 id=&quot;what-does-the-file-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-the-file-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does the file look like?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot;&gt;&lt;code&gt;---
name: dax-conventions
description: Use when writing, reviewing or renaming DAX measures in this Power BI project.
---

# Our DAX conventions

- Measure names in Title Case with units: &amp;quot;Revenue&amp;quot;, &amp;quot;Margin %&amp;quot;, &amp;quot;Orders (count)&amp;quot;.
- Use DIVIDE for every division, never &amp;quot;/&amp;quot;.
- Use VAR ... RETURN for any expression used more than once.
- Time intelligence uses the 'Date' table, never the fact table's date column.
- Format: one function argument per line when there are more than two.
- Add a one-line comment above each measure: what it answers.
- After writing, list every column and measure the new measure depends on.&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;why-does-the-description-matter-so-much&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-does-the-description-matter-so-much&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why does the description matter so much?&lt;/h2&gt;
&lt;p&gt;Claude decides whether to load a skill from its description alone. &amp;quot;DAX rules&amp;quot; might never match a request like &amp;quot;add a margin measure&amp;quot;; &amp;quot;Use when writing, reviewing or renaming DAX measures&amp;quot; matches every one of them. Write the description as &lt;strong&gt;when to use it&lt;/strong&gt;, not what it is.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-check-it-works&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-check-it-works&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you check it works?&lt;/h2&gt;
&lt;p&gt;Ask for a measure without mentioning the skill: &amp;quot;Add a measure for revenue last year&amp;quot;. If the answer uses &lt;code&gt;DIVIDE&lt;/code&gt;, a &lt;code&gt;VAR&lt;/code&gt; and your naming, the skill loaded. You can also run it directly with &lt;code&gt;/dax-conventions&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/skills&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Extend Claude with skills&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Base the rules on &lt;a href=&quot;/blog/dax-variables-var-return/&quot;&gt;variables in DAX&lt;/a&gt; and &lt;a href=&quot;/blog/divide-dax/&quot;&gt;DIVIDE&lt;/a&gt;. For a skill that checks SQL instead, see &lt;a href=&quot;/blog/claude-code-skill-that-checks-sql/&quot;&gt;a Claude Code skill that checks SQL&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>How do you build a customer persona from your own data?</title>
    <link href="https://data.benibix.com/blog/customer-persona-from-data/"/>
    <id>https://data.benibix.com/blog/customer-persona-from-data/</id>
    <published>2026-10-28T01:00:00Z</published>
    <updated>2026-10-28T01:00:00Z</updated>
    <summary>A customer persona is only useful when its details come from your data, not from imagination. Describe a customer group once from its real numbers and reuse it: five numbers to start from, and how to keep the persona honest.</summary>
    <category term="KPIs"/>
    <category term="Customers"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; group your customers by a few &lt;strong&gt;behaviour numbers&lt;/strong&gt; (how often they buy, how much, what, through which channel, how long they stay), pick the &lt;strong&gt;two or three biggest groups&lt;/strong&gt;, and describe each one with its real medians: &amp;quot;buys every 6 weeks, spends 45 a basket, mostly online&amp;quot;. That description is the persona. Write it once and reuse it word for word in every brief, the same way an AI artist reuses one identity block to keep a character's face.&lt;/p&gt;
&lt;p&gt;Many personas are invented in a workshop: a name, a stock photo, a hobby. They feel real and rarely match who actually buys. A persona built from data changes when the data does, and you can check it.&lt;/p&gt;
&lt;h2 id=&quot;which-numbers-make-a-persona&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-numbers-make-a-persona&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which numbers make a persona?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:4&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;How often&lt;/b&gt;&lt;span&gt;orders per year, or days between orders&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;How much&lt;/b&gt;&lt;span&gt;median basket value&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;What&lt;/b&gt;&lt;span&gt;the top category, and the share of orders it makes up&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;How&lt;/b&gt;&lt;span&gt;the main channel: online, store, sales rep&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;How long&lt;/b&gt;&lt;span&gt;months since the first order, and churn in the group&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Five numbers per customer group&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Use the &lt;strong&gt;median&lt;/strong&gt;, not the average, for basket value and days between orders: a few very big customers would pull the average away from what is typical.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-data-persona-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-data-persona-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a data persona look like?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;Group A: &amp;quot;Weekly regulars&amp;quot;&lt;/th&gt;&lt;th&gt;Group B: &amp;quot;Big seasonal buyers&amp;quot;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Share of customers&lt;/td&gt;&lt;td&gt;41%&lt;/td&gt;&lt;td&gt;12%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Orders per year (median)&lt;/td&gt;&lt;td&gt;38&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Basket value (median)&lt;/td&gt;&lt;td&gt;32&lt;/td&gt;&lt;td&gt;410&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Top category&lt;/td&gt;&lt;td&gt;Fresh food, 62% of orders&lt;/td&gt;&lt;td&gt;Garden, 71% of orders&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Main channel&lt;/td&gt;&lt;td&gt;App&lt;/td&gt;&lt;td&gt;Website&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Churn in the last 12 months&lt;/td&gt;&lt;td&gt;9%&lt;/td&gt;&lt;td&gt;27%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;The numbers are made up, but the shape is real: two groups that need different messages, different offers and different KPIs.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-find-the-groups&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-find-the-groups&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you find the groups?&lt;/h2&gt;
&lt;p&gt;Start simple: split by order frequency and basket value into a few bands each, and look at which combinations hold most customers. A recency, frequency and monetary (RFM) score does this in a standard way. Clustering can come later; a persona the team understands beats a perfect model nobody reads.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-keep-the-persona-honest&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-keep-the-persona-honest&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you keep the persona honest?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Date it:&lt;/strong&gt; &amp;quot;based on orders from January to October 2026&amp;quot;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Refresh it&lt;/strong&gt; each quarter from the same query.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Show the share:&lt;/strong&gt; a persona for 4% of customers should not drive the whole product plan.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/median-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: MEDIAN function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Build the numbers behind each group with &lt;a href=&quot;/blog/repeat-purchase-rate-kpi/&quot;&gt;repeat purchase rate&lt;/a&gt;, &lt;a href=&quot;/blog/average-order-value-kpi/&quot;&gt;average order value&lt;/a&gt; and &lt;a href=&quot;/blog/customer-churn-rate-kpi/&quot;&gt;customer churn rate&lt;/a&gt;. Why the median: &lt;a href=&quot;/blog/median-vs-average/&quot;&gt;median or average&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Can an AI image model draw a chart from your data?</title>
    <link href="https://data.benibix.com/blog/can-ai-image-models-draw-charts/"/>
    <id>https://data.benibix.com/blog/can-ai-image-models-draw-charts/</id>
    <published>2026-10-27T17:00:00Z</published>
    <updated>2026-10-27T17:00:00Z</updated>
    <summary>Gemini, ChatGPT and other image models can draw something that looks like a chart. Why the bars and labels rarely match your numbers, when an AI chart picture is fine, and what to use when the numbers must be right.</summary>
    <category term="AI"/>
    <category term="AI images"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; it can draw a &lt;strong&gt;picture of a chart&lt;/strong&gt;, not a chart of your data. An image model paints what a chart usually looks like; it does not measure a bar against an axis, so heights, labels and totals can be off even when you paste the numbers in. Use it for an &lt;strong&gt;illustration&lt;/strong&gt; (a blog header, a slide mood, a mock-up). When the numbers matter, make the chart with a tool that &lt;strong&gt;plots&lt;/strong&gt; them: Excel, Power BI, or code such as Python.&lt;/p&gt;
&lt;p&gt;Gemini's image model (nicknamed Nano Banana) understands long, specific prompts and can render readable text, which makes its charts look convincing. That is exactly why they are risky in a report.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-difference-between-drawing-and-plotting&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-difference-between-drawing-and-plotting&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the difference between drawing and plotting?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Your numbers&lt;/b&gt;&lt;span&gt;revenue by month: 120, 135, 128, 160&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Plotting&lt;/b&gt;&lt;span&gt;a tool computes each bar's height from the axis: Excel, Power BI, Python&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;red&quot;&gt;&lt;b&gt;Image model&lt;/b&gt;&lt;span&gt;paints a chart-like picture from the prompt; heights are guessed&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Two ways to get a chart from numbers&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;when-is-an-ai-chart-picture-fine&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-an-ai-chart-picture-fine&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is an AI chart picture fine?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Use&lt;/th&gt;&lt;th&gt;AI image OK?&lt;/th&gt;&lt;th&gt;Why&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;A header image for a post about dashboards&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;td&gt;Nobody reads the numbers&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;A mock-up of a report layout, before building&lt;/td&gt;&lt;td&gt;Yes, labelled as a mock-up&lt;/td&gt;&lt;td&gt;It shows the arrangement, not data&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;A slide that says &amp;quot;revenue grew 33%&amp;quot;&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;td&gt;Readers will read the bar heights&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Anything in a report people decide from&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;td&gt;The numbers must come from the data&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-do-you-check-an-ai-chart-if-you-use-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-check-an-ai-chart-if-you-use-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you check an AI chart if you use one?&lt;/h2&gt;
&lt;p&gt;Measure it: compare each bar's height with the axis, read every label, add up a pie's slices. If any one is off, the picture is decoration, and it should not carry a number.&lt;/p&gt;
&lt;h2 id=&quot;what-should-you-use-instead&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-should-you-use-instead&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What should you use instead?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;For one chart fast:&lt;/strong&gt; Excel's Recommended Charts.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;For a report:&lt;/strong&gt; Power BI, where every visual reads from the model.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;For a chart in code:&lt;/strong&gt; ask an AI to write the Python (matplotlib or similar) and run it; the code plots the real numbers, and you can read what it did.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://ai.google.dev/gemini-api/docs/image-generation&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Google AI for Developers: Image generation with Gemini&lt;/a&gt;, what the image model does and how to prompt it&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Pick the right chart for the numbers first: &lt;a href=&quot;/blog/what-is-data-visualization/&quot;&gt;what is data visualization&lt;/a&gt; and &lt;a href=&quot;/blog/how-to-make-a-chart-power-bi/&quot;&gt;how to make a chart in Power BI&lt;/a&gt;. For a layout mock-up, see &lt;a href=&quot;/blog/mock-up-a-dashboard-with-ai/&quot;&gt;mock up a dashboard with Nano Banana Pro&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Order cycle time: from order to delivery in DAX</title>
    <link href="https://data.benibix.com/blog/order-cycle-time-kpi/"/>
    <id>https://data.benibix.com/blog/order-cycle-time-kpi/</id>
    <published>2026-10-27T12:00:00Z</published>
    <updated>2026-10-27T12:00:00Z</updated>
    <summary>How to measure order cycle time from order to delivery, the stages in between (approval, picking, shipping, transit), average against median and 90th percentile, business days with NETWORKDAYS, the DAX on order timestamps, and a stacked bar of time by stage.</summary>
    <category term="KPIs"/>
    <category term="Operations"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;order cycle time&lt;/strong&gt; = delivery date - order date, per order. Split it into &lt;strong&gt;stages&lt;/strong&gt; (order to approval, approval to picked, picked to shipped, shipped to delivered) to see where time goes. Report the &lt;strong&gt;median&lt;/strong&gt; and the &lt;strong&gt;90th percentile&lt;/strong&gt;, not just the average: customers remember the slow orders, and a few very late ones distort the mean. Use &lt;strong&gt;business days&lt;/strong&gt; (&lt;code&gt;NETWORKDAYS&lt;/code&gt;) when warehouses do not work weekends.&lt;/p&gt;
&lt;p&gt;&amp;quot;We ship in 2 days on average&amp;quot; is the number in the sales deck. &amp;quot;One order in ten takes more than 6 days&amp;quot; is the number customers feel.&lt;/p&gt;
&lt;h2 id=&quot;how-do-the-stages-add-up&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-the-stages-add-up&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do the stages add up?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;stacked-bar&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;Order to approved&lt;/li&gt;&lt;li class=&quot;k1&quot;&gt;Approved to picked&lt;/li&gt;&lt;li class=&quot;k2&quot;&gt;Picked to shipped&lt;/li&gt;&lt;li class=&quot;k3&quot;&gt;Shipped to delivered&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;stacked bar chart: Vienna 0.2, 0.6, 0.3, 1.4; Linz 0.2, 1.4, 0.5, 1.6; Graz 0.3, 0.7, 0.4, 2.3&quot;&gt;&lt;line x1=&quot;64.8&quot; y1=&quot;8&quot; x2=&quot;64.8&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;64.8&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;197.6&quot; y1=&quot;8&quot; x2=&quot;197.6&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;197.6&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;1&lt;/text&gt;&lt;line x1=&quot;330.4&quot; y1=&quot;8&quot; x2=&quot;330.4&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;330.4&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;2&lt;/text&gt;&lt;line x1=&quot;463.2&quot; y1=&quot;8&quot; x2=&quot;463.2&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;463.2&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;3&lt;/text&gt;&lt;line x1=&quot;596&quot; y1=&quot;8&quot; x2=&quot;596&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;596&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;4&lt;/text&gt;&lt;rect x=&quot;64.8&quot; y=&quot;22.8&quot; width=&quot;26.6&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;91.4&quot; y=&quot;22.8&quot; width=&quot;79.7&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;rect x=&quot;171&quot; y=&quot;22.8&quot; width=&quot;39.8&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k2&quot;/&gt;&lt;rect x=&quot;210.9&quot; y=&quot;22.8&quot; width=&quot;185.9&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k3&quot;/&gt;&lt;text x=&quot;54.8&quot; y=&quot;55.7&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Vienna&lt;/text&gt;&lt;rect x=&quot;64.8&quot; y=&quot;110.2&quot; width=&quot;26.6&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;91.4&quot; y=&quot;110.2&quot; width=&quot;185.9&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;rect x=&quot;277.3&quot; y=&quot;110.2&quot; width=&quot;66.4&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k2&quot;/&gt;&lt;rect x=&quot;343.7&quot; y=&quot;110.2&quot; width=&quot;212.5&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k3&quot;/&gt;&lt;text x=&quot;54.8&quot; y=&quot;143&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Linz&lt;/text&gt;&lt;rect x=&quot;64.8&quot; y=&quot;197.5&quot; width=&quot;39.8&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;104.6&quot; y=&quot;197.5&quot; width=&quot;93&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;rect x=&quot;197.6&quot; y=&quot;197.5&quot; width=&quot;53.1&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k2&quot;/&gt;&lt;rect x=&quot;250.7&quot; y=&quot;197.5&quot; width=&quot;305.4&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k3&quot;/&gt;&lt;text x=&quot;54.8&quot; y=&quot;230.3&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Graz&lt;/text&gt;&lt;line x1=&quot;64.8&quot; y1=&quot;8&quot; x2=&quot;64.8&quot; y2=&quot;270&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Median days per stage by warehouse&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Linz loses time in picking; Graz in transit, a carrier question. One total per warehouse would not say which.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Warehouse&lt;/th&gt;&lt;th&gt;Orders&lt;/th&gt;&lt;th&gt;Average&lt;/th&gt;&lt;th&gt;Median&lt;/th&gt;&lt;th&gt;90th percentile&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Vienna&lt;/td&gt;&lt;td&gt;4,200&lt;/td&gt;&lt;td&gt;2.7&lt;/td&gt;&lt;td&gt;2.5&lt;/td&gt;&lt;td&gt;4.0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Linz&lt;/td&gt;&lt;td&gt;2,100&lt;/td&gt;&lt;td&gt;3.9&lt;/td&gt;&lt;td&gt;3.7&lt;/td&gt;&lt;td&gt;6.5&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Graz&lt;/td&gt;&lt;td&gt;1,600&lt;/td&gt;&lt;td&gt;3.9&lt;/td&gt;&lt;td&gt;3.7&lt;/td&gt;&lt;td&gt;7.2&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Cycle time in days, September&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;An Orders table with timestamps per stage: Ordered At, Approved At, Picked At, Shipped At, Delivered At.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- calculated columns on Orders (days, with fractions)&lt;/i&gt;
Cycle Days = Orders&lt;i class=&quot;m&quot;&gt;[Delivered At]&lt;/i&gt; - Orders&lt;i class=&quot;m&quot;&gt;[Ordered At]&lt;/i&gt;
Pick Days = Orders&lt;i class=&quot;m&quot;&gt;[Picked At]&lt;/i&gt; - Orders&lt;i class=&quot;m&quot;&gt;[Approved At]&lt;/i&gt;

&lt;i class=&quot;c&quot;&gt;-- business days, excluding weekends and the holidays table&lt;/i&gt;
Cycle Business Days =
&lt;i class=&quot;f&quot;&gt;NETWORKDAYS&lt;/i&gt; ( Orders&lt;i class=&quot;m&quot;&gt;[Ordered At]&lt;/i&gt;, Orders&lt;i class=&quot;m&quot;&gt;[Delivered At]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, Holidays )

&lt;i class=&quot;c&quot;&gt;-- measures&lt;/i&gt;
Avg Cycle Days = &lt;i class=&quot;f&quot;&gt;AVERAGE&lt;/i&gt; ( Orders&lt;i class=&quot;m&quot;&gt;[Cycle Days]&lt;/i&gt; )
Median Cycle Days = &lt;i class=&quot;f&quot;&gt;MEDIAN&lt;/i&gt; ( Orders&lt;i class=&quot;m&quot;&gt;[Cycle Days]&lt;/i&gt; )
P90 Cycle Days = PERCENTILE.&lt;i class=&quot;f&quot;&gt;INC&lt;/i&gt; ( Orders&lt;i class=&quot;m&quot;&gt;[Cycle Days]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;0.9&lt;/i&gt; )

Orders Over &lt;i class=&quot;n&quot;&gt;5&lt;/i&gt; Days % =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Orders ), Orders&lt;i class=&quot;m&quot;&gt;[Cycle Days]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;5&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Orders ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Only delivered orders have a cycle time; filter on &lt;code&gt;NOT ISBLANK ( Orders[Delivered At] )&lt;/code&gt;, and track open orders by their age so far separately. &lt;code&gt;NETWORKDAYS&lt;/code&gt; takes a weekend code (1 = Saturday and Sunday) and an optional table of holiday dates.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-show-it-over-time&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-show-it-over-time&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you show it over time?&lt;/h2&gt;
&lt;p&gt;A line chart of the median and the 90th percentile by week shows both the typical order and the tail. A histogram of cycle days shows whether late orders form a second hump (a process problem) or a long tail (one-off delays). See &lt;a href=&quot;/blog/statistical-functions-dax-reference/&quot;&gt;statistical functions&lt;/a&gt; for MEDIAN and PERCENTILE.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;The average only.&lt;/strong&gt; Hides the slow tail; add the median and the 90th percentile.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Open orders left out.&lt;/strong&gt; The slowest orders are often still open; report their age.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Timestamps in different time zones.&lt;/strong&gt; Order times in UTC and delivery times local add hours of error; convert to one zone.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Calendar against business days.&lt;/strong&gt; Mixing them between warehouses makes them incomparable.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/networkdays-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: NETWORKDAYS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/percentile-inc-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: PERCENTILE.INC function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/median-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: MEDIAN function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add the stage timestamps to your orders table and show median and 90th percentile days by warehouse, split by stage. &lt;a href=&quot;/blog/otif-kpi/&quot;&gt;OTIF&lt;/a&gt; measures the same orders against the promise.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>PL-300 or DP-600: which Power BI and Fabric exam first?</title>
    <link href="https://data.benibix.com/blog/pl-300-vs-dp-600/"/>
    <id>https://data.benibix.com/blog/pl-300-vs-dp-600/</id>
    <published>2026-10-27T12:00:00Z</published>
    <updated>2026-10-27T12:00:00Z</updated>
    <summary>PL-300 and DP-600 compared for 2026, what each measures and how they overlap, who should take which first, and how to study for both with one project, from someone who holds both.</summary>
    <category term="Exams"/>
    <category term="Choosing an exam"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; take &lt;strong&gt;PL-300&lt;/strong&gt; first if your work is Power BI reports and models; take &lt;strong&gt;DP-600&lt;/strong&gt; first if you already build in Microsoft Fabric (lakehouses, warehouses, pipelines) and the semantic model is only part of your job. PL-300 is about the report and the model; DP-600 is about the data behind it, with preparing data at 45 to 50% of the exam. They overlap on semantic models and DAX, so taking them a few weeks apart saves study time.&lt;/p&gt;
&lt;p&gt;I hold both: DP-600 since December 2024 and PL-300 since April 2026.&lt;/p&gt;
&lt;h2 id=&quot;how-do-they-compare&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-they-compare&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do they compare?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;PL-300&lt;/th&gt;&lt;th&gt;DP-600&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Certification&lt;/td&gt;&lt;td&gt;Power BI Data Analyst Associate&lt;/td&gt;&lt;td&gt;Fabric Analytics Engineer Associate&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Main job&lt;/td&gt;&lt;td&gt;prepare, model and visualise data in Power BI&lt;/td&gt;&lt;td&gt;prepare data and build models in Fabric&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Largest area&lt;/td&gt;&lt;td&gt;prepare, model, visualise (25-30% each)&lt;/td&gt;&lt;td&gt;prepare data (45-50%)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Report design&lt;/td&gt;&lt;td&gt;a whole area&lt;/td&gt;&lt;td&gt;hardly&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SQL and KQL&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Lakehouse, warehouse, Direct Lake&lt;/td&gt;&lt;td&gt;Direct Lake only as a connection choice&lt;/td&gt;&lt;td&gt;central&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Admin and security&lt;/td&gt;&lt;td&gt;workspaces, apps, RLS (15-20%)&lt;/td&gt;&lt;td&gt;maintain the solution, including security and Git (25-30%)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;PL-300 against DP-600&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;where-do-they-overlap&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-they-overlap&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do they overlap?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Only PL-300&lt;/b&gt;&lt;span&gt;report pages, visuals, bookmarks, drillthrough, accessibility, apps&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Both&lt;/b&gt;&lt;span&gt;star schema, relationships, DAX, calculation groups, RLS, performance&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Only DP-600&lt;/b&gt;&lt;span&gt;lakehouse, warehouse, SQL and KQL queries, Git and deployment pipelines&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Shared and separate ground&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;which-first&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-first&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which first?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;PL-300 first&lt;/b&gt;&lt;ul&gt;&lt;li&gt;you build reports for business users&lt;/li&gt;&lt;li&gt;Power Query and DAX are your tools&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;DP-600 first&lt;/b&gt;&lt;ul&gt;&lt;li&gt;you build lakehouses or warehouses in Fabric&lt;/li&gt;&lt;li&gt;reports are made by others&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;silver&quot;&gt;&lt;b&gt;Either&lt;/b&gt;&lt;span&gt;you do both: start with PL-300, it is the narrower of the two&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Pick by your daily work&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-study-for-both-with-one-project&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-study-for-both-with-one-project&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you study for both with one project?&lt;/h2&gt;
&lt;p&gt;Build one Fabric solution end to end: load files into a lakehouse, shape them with SQL or a notebook, build a Direct Lake semantic model with measures and RLS, then design the report and publish it as an app. The first half is mostly DP-600, the second half mostly PL-300, and the model in the middle is both.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/pl-300&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam PL-300&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/dp-600&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam DP-600&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Read the full guides: &lt;a href=&quot;/blog/pl-300-study-guide/&quot;&gt;PL-300&lt;/a&gt; and &lt;a href=&quot;/blog/dp-600-study-guide/&quot;&gt;DP-600&lt;/a&gt;. &lt;a href=&quot;/blog/direct-lake-power-bi-explained/&quot;&gt;Direct Lake explained&lt;/a&gt; is the topic that links the two exams.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Power Apps and Power Automate visuals in Power BI</title>
    <link href="https://data.benibix.com/blog/power-apps-power-automate-visuals/"/>
    <id>https://data.benibix.com/blog/power-apps-power-automate-visuals/</id>
    <published>2026-10-27T12:00:00Z</published>
    <updated>2026-10-27T12:00:00Z</updated>
    <summary>How the Power Apps visual embeds an app that receives the report's filtered data, how the Power Automate visual runs a flow from a button with the selected data, common write-back and action scenarios, permissions, and when translytical task flows fit better.</summary>
    <category term="Visuals"/>
    <category term="More visuals"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; the &lt;strong&gt;Power Apps visual&lt;/strong&gt; puts an app inside a report: the fields you drag into it arrive in the app as &lt;code&gt;PowerBIIntegration.Data&lt;/code&gt;, filtered by the page, so readers can edit records, add comments or create tasks without leaving Power BI. The &lt;strong&gt;Power Automate visual&lt;/strong&gt; is a button that runs a flow with the data currently in the visual: send an email to the owners of the overdue accounts, post to Teams, create tickets. Readers need access to the app or the flow; the data passed is what the visual sees.&lt;/p&gt;
&lt;p&gt;Reports show what is wrong. People then copy names into an email or another system to act on it. These two visuals move the action into the report: see the overdue invoices, select them, press &amp;quot;Send reminder&amp;quot;.&lt;/p&gt;
&lt;h2 id=&quot;what-does-each-visual-do&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-each-visual-do&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does each visual do?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Report page&lt;/b&gt;&lt;span&gt;filtered to overdue invoices of one region&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Power Apps visual&lt;/b&gt;&lt;span&gt;an app lists those invoices; a reader adds a note and a promised payment date, saved to Dataverse&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Power Automate visual&lt;/b&gt;&lt;span&gt;a button sends one reminder email per invoice, with amount and due date from the data&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Acting on what the report shows&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-add-a-power-apps-visual&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-add-a-power-apps-visual&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you add a Power Apps visual?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;Select &lt;strong&gt;Power Apps for Power BI&lt;/strong&gt; in &lt;strong&gt;Visualizations&lt;/strong&gt; and drag the fields the app needs into &lt;strong&gt;Power Apps Data&lt;/strong&gt; (for example invoice ID, customer, amount, due date).&lt;/li&gt;&lt;li&gt;Choose an existing app or &lt;strong&gt;Create new&lt;/strong&gt;: Power Apps opens with a gallery bound to &lt;code&gt;PowerBIIntegration.Data&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;Build the app: forms that write to Dataverse, SharePoint or SQL, using the invoice ID as the key.&lt;/li&gt;&lt;li&gt;Save and share the app with the report's readers. Back in the report, the app filters with the page.&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;how-do-you-add-a-power-automate-visual&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-add-a-power-automate-visual&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you add a Power Automate visual?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;Select &lt;strong&gt;Power Automate for Power BI&lt;/strong&gt; in &lt;strong&gt;Visualizations&lt;/strong&gt; and add the fields the flow needs to &lt;strong&gt;Power Automate data&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Select &lt;strong&gt;Edit&lt;/strong&gt; on the visual to open the flow designer; start from a template or blank. The trigger is &amp;quot;Power BI button clicked&amp;quot; and it receives the data as a table.&lt;/li&gt;&lt;li&gt;Add an &lt;strong&gt;Apply to each&lt;/strong&gt; over the rows, with the action (send an email, create a Planner task, post to Teams).&lt;/li&gt;&lt;li&gt;Save, then &lt;strong&gt;Format&lt;/strong&gt; the button text and style. Share the flow, or give users run access, so readers can run it.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;The button takes no manual input beyond the data in the visual: whatever the page filters to is what the flow gets.&lt;/p&gt;
&lt;h2 id=&quot;what-decides-what-data-is-passed&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-decides-what-data-is-passed&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What decides what data is passed?&lt;/h2&gt;
&lt;p&gt;Both visuals receive the fields at the grain you drag in, filtered by the page and by cross-filters. A measure tells readers how many rows the button will act on:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Invoices to Remind =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Invoices&lt;i class=&quot;m&quot;&gt;[Invoice ID]&lt;/i&gt; ),
    Invoices&lt;i class=&quot;m&quot;&gt;[Status]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Overdue&amp;quot;&lt;/i&gt;
)

Remind Button Label =
&lt;i class=&quot;s&quot;&gt;&amp;quot;Send &amp;quot;&lt;/i&gt; &amp;amp; &lt;i class=&quot;m&quot;&gt;[Invoices to Remind]&lt;/i&gt; &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot; reminders&amp;quot;&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Show &lt;code&gt;Remind Button Label&lt;/code&gt; in a card next to the button, so nobody sends 2,000 emails by accident with no filter on the page.&lt;/p&gt;
&lt;h2 id=&quot;which-one-or-something-else&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-one-or-something-else&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which one, or something else?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Need&lt;/th&gt;&lt;th&gt;Choice&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Edit or add records in a form&lt;/td&gt;&lt;td&gt;Power Apps visual&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Run an action on the selected rows&lt;/td&gt;&lt;td&gt;Power Automate visual&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Write back a value in Fabric with a button and a function&lt;/td&gt;&lt;td&gt;translytical task flows (user data functions, a button with a &lt;strong&gt;Data function&lt;/strong&gt; action)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Just open a link&lt;/td&gt;&lt;td&gt;a button with a &lt;strong&gt;Web URL&lt;/strong&gt; action&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;No filter, many rows.&lt;/strong&gt; A flow on an unfiltered page acts on everything; show the count and test with a small filter.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Readers without access.&lt;/strong&gt; The app and flow must be shared; otherwise the visual shows an error to readers.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Data that is too coarse.&lt;/strong&gt; Without the ID field, rows are grouped and the app or flow cannot tell records apart. Always include the key.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Write-back in the wrong place.&lt;/strong&gt; Write to a system of record (Dataverse, SQL), not to the semantic model; the report shows the change after the next refresh.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-powerapp&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Embed a Power Apps visual in a Power BI report&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-automate-visual&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create a Power Automate visual for Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-buttons&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create and configure buttons in Power BI reports&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Pick one action people do by hand after reading the report, pass the key fields to a Power Automate visual, and show a count of the rows it will act on. &lt;a href=&quot;/blog/buttons-bookmarks-navigators-power-bi/&quot;&gt;Buttons, bookmarks and navigators&lt;/a&gt; covers the other button actions.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>ROAS: return on ad spend, break-even and DAX</title>
    <link href="https://data.benibix.com/blog/roas-kpi/"/>
    <id>https://data.benibix.com/blog/roas-kpi/</id>
    <published>2026-10-27T12:00:00Z</published>
    <updated>2026-10-27T12:00:00Z</updated>
    <summary>How to calculate return on ad spend, attributed revenue divided by ad spend, break-even ROAS from your gross margin, ROAS against ROI, ROAS by campaign and channel, attribution windows and models, the DAX joining ad platform data with orders, and a chart against the break-even line.</summary>
    <category term="KPIs"/>
    <category term="Marketing"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;ROAS (return on ad spend)&lt;/strong&gt; = revenue attributed to ads / ad spend. A ROAS of 4 (often written 400%) means 4 euros of revenue per euro of ads. Whether that is profitable depends on your margin: &lt;strong&gt;break-even ROAS = 1 / gross margin %&lt;/strong&gt;, so at 40% margin you need a ROAS of &lt;strong&gt;2.5&lt;/strong&gt; just to cover the product cost of the sales the ads bring. ROAS uses revenue; &lt;strong&gt;ROI&lt;/strong&gt; uses profit, (gross profit - spend) / spend.&lt;/p&gt;
&lt;p&gt;Ad platforms each report their own ROAS, usually generously. Bringing spend and your own orders into one model gives one consistent number per campaign.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Campaign&lt;/th&gt;&lt;th&gt;Spend&lt;/th&gt;&lt;th&gt;Attributed revenue&lt;/th&gt;&lt;th&gt;ROAS&lt;/th&gt;&lt;th&gt;Gross profit at 40%&lt;/th&gt;&lt;th&gt;ROI&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Search brand&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;85&lt;/td&gt;&lt;td&gt;8.5&lt;/td&gt;&lt;td&gt;34.0&lt;/td&gt;&lt;td&gt;240%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Search generic&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;td&gt;3.0&lt;/td&gt;&lt;td&gt;48.0&lt;/td&gt;&lt;td&gt;20%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Social prospecting&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;td&gt;60&lt;/td&gt;&lt;td&gt;2.0&lt;/td&gt;&lt;td&gt;24.0&lt;/td&gt;&lt;td&gt;-20%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Social retargeting&lt;/td&gt;&lt;td&gt;15&lt;/td&gt;&lt;td&gt;75&lt;/td&gt;&lt;td&gt;5.0&lt;/td&gt;&lt;td&gt;30.0&lt;/td&gt;&lt;td&gt;100%&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;95&lt;/td&gt;&lt;td&gt;340&lt;/td&gt;&lt;td&gt;3.6&lt;/td&gt;&lt;td&gt;136.0&lt;/td&gt;&lt;td&gt;43%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Campaigns in September (k)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;bar&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;bar chart: Search brand 8.5; Social retargeting 5; Search generic 3; Social prospecting 2&quot;&gt;&lt;line x1=&quot;146.4&quot; y1=&quot;8&quot; x2=&quot;146.4&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;146.4&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;236.3&quot; y1=&quot;8&quot; x2=&quot;236.3&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;236.3&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;2&lt;/text&gt;&lt;line x1=&quot;326.2&quot; y1=&quot;8&quot; x2=&quot;326.2&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;326.2&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;4&lt;/text&gt;&lt;line x1=&quot;416.2&quot; y1=&quot;8&quot; x2=&quot;416.2&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;416.2&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;6&lt;/text&gt;&lt;line x1=&quot;506.1&quot; y1=&quot;8&quot; x2=&quot;506.1&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;506.1&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;8&lt;/text&gt;&lt;line x1=&quot;596&quot; y1=&quot;8&quot; x2=&quot;596&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;596&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;10&lt;/text&gt;&lt;rect x=&quot;146.4&quot; y=&quot;19.1&quot; width=&quot;382.2&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;534.6&quot; y=&quot;44.8&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;8.5&lt;/text&gt;&lt;text x=&quot;136.4&quot; y=&quot;44.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Search brand&lt;/text&gt;&lt;rect x=&quot;146.4&quot; y=&quot;84.6&quot; width=&quot;224.8&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;377.2&quot; y=&quot;110.3&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;5&lt;/text&gt;&lt;text x=&quot;136.4&quot; y=&quot;110.3&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Social retargeting&lt;/text&gt;&lt;rect x=&quot;146.4&quot; y=&quot;150.1&quot; width=&quot;134.9&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-blue&quot;/&gt;&lt;text x=&quot;287.3&quot; y=&quot;175.8&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;3&lt;/text&gt;&lt;text x=&quot;136.4&quot; y=&quot;175.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Search generic&lt;/text&gt;&lt;rect x=&quot;146.4&quot; y=&quot;215.6&quot; width=&quot;89.9&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;242.3&quot; y=&quot;241.3&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;2&lt;/text&gt;&lt;text x=&quot;136.4&quot; y=&quot;241.3&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Social prospecting&lt;/text&gt;&lt;line x1=&quot;146.4&quot; y1=&quot;8&quot; x2=&quot;146.4&quot; y2=&quot;270&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;ROAS by campaign against break-even 2.5&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Social prospecting is below break-even on direct revenue, but it may bring customers who buy again later; judge it with &lt;a href=&quot;/blog/customer-lifetime-value-kpi/&quot;&gt;lifetime value&lt;/a&gt;, not only first-order ROAS.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;Ad spend comes from the platforms (Date, Campaign, Spend, Clicks, Impressions); orders carry the campaign they are attributed to (from UTM tags or the platform's conversion export):&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Ad Spend = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Ads&lt;i class=&quot;m&quot;&gt;[Spend]&lt;/i&gt; )

Attributed Revenue =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Orders&lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; ), NOT &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( Orders&lt;i class=&quot;m&quot;&gt;[Campaign]&lt;/i&gt; ) )

ROAS = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Attributed Revenue]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Ad Spend]&lt;/i&gt; )

Gross Margin % = &lt;i class=&quot;n&quot;&gt;0.40&lt;/i&gt;
Break-even ROAS = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Gross Margin %]&lt;/i&gt; )

Attributed Gross Profit = &lt;i class=&quot;m&quot;&gt;[Attributed Revenue]&lt;/i&gt; * &lt;i class=&quot;m&quot;&gt;[Gross Margin %]&lt;/i&gt;
ROI = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Attributed Gross Profit]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Ad Spend]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Ad Spend]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Relate both tables to a shared Campaign dimension and the Date table so one slicer filters spend and revenue. Use the real margin per product instead of a fixed 40% when order lines carry cost.&lt;/p&gt;
&lt;h2 id=&quot;which-attribution-should-you-use&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-attribution-should-you-use&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which attribution should you use?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Model&lt;/th&gt;&lt;th&gt;Credit goes to&lt;/th&gt;&lt;th&gt;Effect on ROAS&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Last click&lt;/td&gt;&lt;td&gt;the last ad clicked before the order&lt;/td&gt;&lt;td&gt;favours retargeting and brand search&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;First click&lt;/td&gt;&lt;td&gt;the first ad that brought the customer&lt;/td&gt;&lt;td&gt;favours prospecting&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Linear&lt;/td&gt;&lt;td&gt;all touches equally&lt;/td&gt;&lt;td&gt;evens out&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Data-driven&lt;/td&gt;&lt;td&gt;the platform's model of each touch's effect&lt;/td&gt;&lt;td&gt;depends on the platform&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Attribution models&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Also fix the &lt;strong&gt;attribution window&lt;/strong&gt; (for example 7 days after a click, 1 day after a view): a longer window raises reported ROAS. Platforms counting the same order each make total attributed revenue larger than real revenue; your own order data, attributed once, avoids double counting.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;ROAS above 1 called profitable.&lt;/strong&gt; Below break-even ROAS, ads lose money.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Brand search inflating the total.&lt;/strong&gt; People searching your name would often buy anyway; report brand separately.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Platform numbers summed.&lt;/strong&gt; Each platform claims the same orders; attribute in your own data.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Revenue before returns.&lt;/strong&gt; Use net revenue, or high-return campaigns look best.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/divide-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DIVIDE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-relationships-understand&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Model relationships in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-types-for-reports-and-q-and-a&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Bar and column charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Join spend and attributed orders on one campaign dimension, add break-even ROAS as a constant line on the bar chart (Analytics pane), and review campaigns below it. &lt;a href=&quot;/blog/conversion-rate-kpi/&quot;&gt;Conversion rate&lt;/a&gt; shows where the funnel loses buyers.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Rolling 12 months and moving averages in DAX</title>
    <link href="https://data.benibix.com/blog/rolling-12-months-dax/"/>
    <id>https://data.benibix.com/blog/rolling-12-months-dax/</id>
    <published>2026-10-27T12:00:00Z</published>
    <updated>2026-10-27T12:00:00Z</updated>
    <summary>How to calculate a rolling 12-month total, a moving average and a rolling count in DAX with DATESINPERIOD, why rolling totals smooth seasonality, showing only full windows, rolling averages per month or day, the visual calculation shortcut, and common mistakes.</summary>
    <category term="DAX"/>
    <category term="Time intelligence"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;rolling 12-month total&lt;/strong&gt; adds up the 12 months ending at the current date: &lt;code&gt;CALCULATE ( [Revenue], DATESINPERIOD ( 'Date'[Date], MAX ( 'Date'[Date] ), -12, MONTH ) )&lt;/code&gt;. Every point covers a full year, so seasonality disappears and the trend shows. A &lt;strong&gt;moving average&lt;/strong&gt; divides by the number of periods: &lt;code&gt;AVERAGEX&lt;/code&gt; over the months in the same window. On a single visual, the visual calculation &lt;code&gt;MOVINGAVERAGE ( [Revenue], 3 )&lt;/code&gt; is the shortcut.&lt;/p&gt;
&lt;p&gt;Monthly revenue goes up and down with the seasons, and comparing December with November says little. The rolling 12-month line goes up when the business grows and down when it shrinks, whatever the season.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-rolling-total-show&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-rolling-total-show&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a rolling total show?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;combo&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;Monthly&lt;/li&gt;&lt;li class=&quot;ln-key k1&quot;&gt;Rolling 12 months&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;combo chart: Jan 80, 1,287; Feb 85, 1,294; Mar 110, 1,303; Apr 120, 1,313; May 130, 1,324; Jun 105, 1,333; Jul 95, 1,341; Aug 90, 1,348; Sep 115, 1,357; Oct 125, 1,367; Nov 150, 1,379; Dec 190, 1,395&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;588&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;203&quot; x2=&quot;588&quot; y2=&quot;203&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;207&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;50&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;140&quot; x2=&quot;588&quot; y2=&quot;140&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;144&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;77&quot; x2=&quot;588&quot; y2=&quot;77&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;81&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;150&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;588&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;200&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;0&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;186&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;500&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;102&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;1,000&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;1,500&lt;/text&gt;&lt;rect x=&quot;60.5&quot; y=&quot;165.2&quot; width=&quot;27.7&quot; height=&quot;100.8&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;74.3&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jan&lt;/text&gt;&lt;rect x=&quot;105.2&quot; y=&quot;158.9&quot; width=&quot;27.7&quot; height=&quot;107.1&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;119&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Feb&lt;/text&gt;&lt;rect x=&quot;149.8&quot; y=&quot;127.4&quot; width=&quot;27.7&quot; height=&quot;138.6&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;163.7&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Mar&lt;/text&gt;&lt;rect x=&quot;194.5&quot; y=&quot;114.8&quot; width=&quot;27.7&quot; height=&quot;151.2&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;208.3&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Apr&lt;/text&gt;&lt;rect x=&quot;239.2&quot; y=&quot;102.2&quot; width=&quot;27.7&quot; height=&quot;163.8&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;253&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;May&lt;/text&gt;&lt;rect x=&quot;283.8&quot; y=&quot;133.7&quot; width=&quot;27.7&quot; height=&quot;132.3&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;297.7&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jun&lt;/text&gt;&lt;rect x=&quot;328.5&quot; y=&quot;146.3&quot; width=&quot;27.7&quot; height=&quot;119.7&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;342.3&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jul&lt;/text&gt;&lt;rect x=&quot;373.2&quot; y=&quot;152.6&quot; width=&quot;27.7&quot; height=&quot;113.4&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;387&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Aug&lt;/text&gt;&lt;rect x=&quot;417.8&quot; y=&quot;121.1&quot; width=&quot;27.7&quot; height=&quot;144.9&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;431.7&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Sep&lt;/text&gt;&lt;rect x=&quot;462.5&quot; y=&quot;108.5&quot; width=&quot;27.7&quot; height=&quot;157.5&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;476.3&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Oct&lt;/text&gt;&lt;rect x=&quot;507.2&quot; y=&quot;77&quot; width=&quot;27.7&quot; height=&quot;189&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;521&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Nov&lt;/text&gt;&lt;rect x=&quot;551.8&quot; y=&quot;26.6&quot; width=&quot;27.7&quot; height=&quot;239.4&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;565.7&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Dec&lt;/text&gt;&lt;polyline points=&quot;74.3,49.8 119,48.6 163.7,47.1 208.3,45.4 253,43.6 297.7,42.1 342.3,40.7 387,39.5 431.7,38 476.3,36.3 521,34.3 565.7,31.6&quot; class=&quot;ln k1&quot;/&gt;&lt;circle cx=&quot;74.3&quot; cy=&quot;49.8&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;119&quot; cy=&quot;48.6&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;163.7&quot; cy=&quot;47.1&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;208.3&quot; cy=&quot;45.4&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;253&quot; cy=&quot;43.6&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;297.7&quot; cy=&quot;42.1&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;342.3&quot; cy=&quot;40.7&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;387&quot; cy=&quot;39.5&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;431.7&quot; cy=&quot;38&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;476.3&quot; cy=&quot;36.3&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;521&quot; cy=&quot;34.3&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;565.7&quot; cy=&quot;31.6&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;588&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Monthly revenue and rolling 12 months (thousands)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The monthly columns swing from 80 to 190; the rolling line climbs steadily, which is the real story: every month beat the same month last year by about 9%, and the December point (1,395) is the whole year's total.&lt;/p&gt;
&lt;h2 id=&quot;which-measures-do-you-need&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-measures-do-you-need&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which measures do you need?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue R12M =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;DATESINPERIOD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), -&lt;i class=&quot;n&quot;&gt;12&lt;/i&gt;, MONTH )
)

&lt;i class=&quot;c&quot;&gt;-- the same a year earlier, for growth of the rolling total&lt;/i&gt;
Revenue R12M LY = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue R12M]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
R12M Growth % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue R12M]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Revenue R12M LY]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue R12M LY]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- 3-month moving average of monthly revenue&lt;/i&gt;
Revenue 3M Avg =
&lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;DATESINPERIOD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), -&lt;i class=&quot;n&quot;&gt;3&lt;/i&gt;, MONTH ),
    &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Careful with the last one: &lt;code&gt;AVERAGEX&lt;/code&gt; over &lt;code&gt;DATESINPERIOD&lt;/code&gt; iterates &lt;strong&gt;days&lt;/strong&gt;, so it averages daily revenue. For a monthly average, iterate months:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue 3M Avg =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;DATESINPERIOD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), -&lt;i class=&quot;n&quot;&gt;3&lt;/i&gt;, MONTH )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;DATESINPERIOD ( dates, start, number, interval )&lt;/code&gt; returns the dates from &lt;code&gt;start&lt;/code&gt; going back (negative) or forward (positive) by that many intervals: DAY, MONTH, QUARTER, YEAR (and WEEK with a calendar).&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-show-only-full-windows&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-show-only-full-windows&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you show only full windows?&lt;/h2&gt;
&lt;p&gt;At the start of the data, the first 11 points have less than 12 months behind them and look too low. Return BLANK until a full window exists:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue R12M Full =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; FirstSale = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Order Date]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;REMOVEFILTERS&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; WindowStart = &lt;i class=&quot;f&quot;&gt;EDATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), -&lt;i class=&quot;n&quot;&gt;12&lt;/i&gt; ) + &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( WindowStart &amp;gt;= FirstSale, &lt;i class=&quot;m&quot;&gt;[Revenue R12M]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Also stop the line at the last date with data, as for &lt;a href=&quot;/blog/ytd-qtd-mtd-dax/&quot;&gt;YTD&lt;/a&gt;, or it stays flat into the future while the window empties.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-visual-calculation-shortcut&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-visual-calculation-shortcut&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the visual calculation shortcut?&lt;/h2&gt;
&lt;p&gt;On a line chart by month, add a visual calculation:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Moving average = &lt;i class=&quot;f&quot;&gt;MOVINGAVERAGE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;3&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;It averages each month with the two before it, on the months the visual shows, with no date table logic. At the first two months the window is shorter, so check the start of the line. It is limited to that visual; see &lt;a href=&quot;/blog/visual-calculations-power-bi/&quot;&gt;visual calculations&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Averaging days instead of months.&lt;/strong&gt; &lt;code&gt;AVERAGEX ( DATESINPERIOD ( ... ) )&lt;/code&gt; iterates dates.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;MAX of the fact date.&lt;/strong&gt; &lt;code&gt;MAX ( Sales[Order Date] )&lt;/code&gt; ignores months without sales; use the date table.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Partial windows at the start.&lt;/strong&gt; Blank them.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A rolling total by year on the axis.&lt;/strong&gt; At year level, the window ends on 31 December and equals the year total; rolling totals belong on monthly or daily axes.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/datesinperiod-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DATESINPERIOD function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/movingaverage-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: MOVINGAVERAGE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/edate-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: EDATE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add &lt;code&gt;Revenue R12M&lt;/code&gt; as a line on your monthly revenue chart and blank the partial windows. &lt;a href=&quot;/blog/year-over-year-dax/&quot;&gt;Year over year&lt;/a&gt; compares the rolling total with last year.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Row context in DAX explained with examples</title>
    <link href="https://data.benibix.com/blog/dax-row-context-explained/"/>
    <id>https://data.benibix.com/blog/dax-row-context-explained/</id>
    <published>2026-10-27T12:00:00Z</published>
    <updated>2026-10-27T12:00:00Z</updated>
    <summary>What row context is in DAX, where it comes from (calculated columns and iterators like SUMX and FILTER), why it does not filter other tables, how RELATED and RELATEDTABLE follow relationships, nested row contexts, and how CALCULATE turns a row into a filter.</summary>
    <category term="DAX"/>
    <category term="Concepts"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;row context&lt;/strong&gt; means &amp;quot;the current row&amp;quot;: DAX knows which row it is on and can read that row's columns. It exists in two places: in a &lt;strong&gt;calculated column&lt;/strong&gt; (each row in turn) and inside an &lt;strong&gt;iterator&lt;/strong&gt; function such as &lt;code&gt;SUMX&lt;/code&gt;, &lt;code&gt;AVERAGEX&lt;/code&gt;, &lt;code&gt;FILTER&lt;/code&gt; or &lt;code&gt;ADDCOLUMNS&lt;/code&gt; (each row of the table you give it). Row context does &lt;strong&gt;not&lt;/strong&gt; filter anything: a &lt;code&gt;SUM&lt;/code&gt; inside it still sums the whole table. To follow a relationship use &lt;code&gt;RELATED&lt;/code&gt; (to the one side) or &lt;code&gt;RELATEDTABLE&lt;/code&gt; (to the many side); to turn the row into a filter, use &lt;code&gt;CALCULATE&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Two contexts drive every DAX result: filter context (what the visual and slicers filter) and row context (which row an iteration is on). Mixing them up gives the classic puzzle: a calculated column &lt;code&gt;= SUM(Sales[Amount])&lt;/code&gt; shows the grand total on every row.&lt;/p&gt;
&lt;h2 id=&quot;where-does-row-context-come-from&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-does-row-context-come-from&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where does row context come from?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:3&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Calculated column&lt;/b&gt;&lt;span&gt;the formula runs once per row of its table&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Iterator&lt;/b&gt;&lt;span&gt;SUMX, AVERAGEX, MAXX, COUNTX, FILTER, ADDCOLUMNS, RANKX run the expression once per row&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Inside&lt;/b&gt;&lt;span&gt;Table[Column] reads the current row's value&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Two sources of row context&lt;/figcaption&gt;&lt;/figure&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- calculated column on Sales: row context from the column&lt;/i&gt;
Line Amount = Sales&lt;i class=&quot;m&quot;&gt;[Quantity]&lt;/i&gt; * Sales&lt;i class=&quot;m&quot;&gt;[Unit Price]&lt;/i&gt;

&lt;i class=&quot;c&quot;&gt;-- measure: row context from SUMX over Sales&lt;/i&gt;
Revenue = &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Sales, Sales&lt;i class=&quot;m&quot;&gt;[Quantity]&lt;/i&gt; * Sales&lt;i class=&quot;m&quot;&gt;[Unit Price]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;A measure has no row context of its own: &lt;code&gt;Sales[Quantity]&lt;/code&gt; alone in a measure is an error (&amp;quot;a single value for column cannot be determined&amp;quot;), because there is no current row.&lt;/p&gt;
&lt;h2 id=&quot;why-does-sum-in-a-column-give-the-grand-total&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-does-sum-in-a-column-give-the-grand-total&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why does SUM in a column give the grand total?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- calculated column on Customer&lt;/i&gt;
Customer Sales Wrong = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )
Customer Sales Right = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ) )
Customer Sales Also Right = &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;RELATEDTABLE&lt;/i&gt; ( Sales ), Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Customer&lt;/th&gt;&lt;th&gt;Customer Sales Wrong&lt;/th&gt;&lt;th&gt;Customer Sales Right&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Ana&lt;/td&gt;&lt;td&gt;12,400&lt;/td&gt;&lt;td&gt;3,100&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ben&lt;/td&gt;&lt;td&gt;12,400&lt;/td&gt;&lt;td&gt;7,800&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Chen&lt;/td&gt;&lt;td&gt;12,400&lt;/td&gt;&lt;td&gt;1,500&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Calculated columns on the Customer table&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The row context on Customer says &amp;quot;the current customer is Ana&amp;quot;, but it filters nothing, so &lt;code&gt;SUM&lt;/code&gt; sees all of Sales. &lt;code&gt;CALCULATE&lt;/code&gt; performs &lt;strong&gt;context transition&lt;/strong&gt;: the current row becomes a filter (Customer = Ana), which flows through the relationship to Sales. &lt;code&gt;RELATEDTABLE&lt;/code&gt; returns Ana's sales rows directly.&lt;/p&gt;
&lt;h2 id=&quot;how-do-related-and-relatedtable-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-related-and-relatedtable-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do RELATED and RELATEDTABLE work?&lt;/h2&gt;
&lt;p&gt;Row context can follow relationships in a direction:&lt;/p&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;From&lt;/th&gt;&lt;th&gt;Returns&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;RELATED ( Product[Category] )&lt;/code&gt;&lt;/td&gt;&lt;td&gt;a row on the many side (Sales)&lt;/td&gt;&lt;td&gt;the one matching value on the one side&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;RELATEDTABLE ( Sales )&lt;/code&gt;&lt;/td&gt;&lt;td&gt;a row on the one side (Customer)&lt;/td&gt;&lt;td&gt;the table of matching rows on the many side&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- on Sales: the category of each line's product&lt;/i&gt;
Category = &lt;i class=&quot;f&quot;&gt;RELATED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- measure: revenue at list price, reading the product's list price per line&lt;/i&gt;
Revenue at List =
&lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Sales, Sales&lt;i class=&quot;m&quot;&gt;[Quantity]&lt;/i&gt; * &lt;i class=&quot;f&quot;&gt;RELATED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[List Price]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-about-nested-row-contexts&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-about-nested-row-contexts&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What about nested row contexts?&lt;/h2&gt;
&lt;p&gt;Iterators can be nested; each adds a row context. An inner reference to the same table sees the inner row. To reach the outer row, store it in a variable first (older formulas used &lt;code&gt;EARLIER&lt;/code&gt;):&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- calculated column on Product: rank by list price within the category&lt;/i&gt;
Price Rank in Category =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; ThisCategory = &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; ThisPrice = &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[List Price]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; (
            &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;,
            &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; = ThisCategory
                &amp;amp;&amp;amp; &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[List Price]&lt;/i&gt; &amp;gt; ThisPrice
        )
    ) + &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Inside &lt;code&gt;FILTER&lt;/code&gt;, &lt;code&gt;'Product'[Category]&lt;/code&gt; is the inner row; &lt;code&gt;ThisCategory&lt;/code&gt; holds the outer one. See &lt;a href=&quot;/blog/earlier-earliest-dax/&quot;&gt;EARLIER and EARLIEST&lt;/a&gt; for the older form.&lt;/p&gt;
&lt;h2 id=&quot;what-does-it-cost&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-it-cost&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does it cost?&lt;/h2&gt;
&lt;p&gt;An iterator runs its expression once per row. &lt;code&gt;SUMX ( Sales, ... )&lt;/code&gt; over 50 million rows is fast when the expression is simple column math, because the storage engine does it in bulk. It gets slow when each row calls a measure (a context transition per row) or &lt;code&gt;FILTER&lt;/code&gt; over a whole large table. Iterate the smallest table that gives the right answer: &lt;code&gt;SUMX ( VALUES ( Customer[Customer] ), [Revenue] )&lt;/code&gt; iterates customers, not sales lines.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Aggregates in a column without CALCULATE.&lt;/strong&gt; They ignore the row; wrap them in &lt;code&gt;CALCULATE&lt;/code&gt; or use &lt;code&gt;RELATEDTABLE&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A column reference in a measure without an iterator.&lt;/strong&gt; No row context: use an aggregate or an iterator.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;RELATED the wrong way.&lt;/strong&gt; &lt;code&gt;RELATED&lt;/code&gt; goes to the one side only; from the one side use &lt;code&gt;RELATEDTABLE&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Measures inside large iterators.&lt;/strong&gt; Each call is a context transition; iterate a smaller table.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/dax-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DAX overview (context)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/related-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: RELATED function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/relatedtable-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: RELATEDTABLE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Write &lt;code&gt;Customer Sales Wrong&lt;/code&gt; and &lt;code&gt;Customer Sales Right&lt;/code&gt; side by side in a test model and look at the difference. Then read &lt;a href=&quot;/blog/dax-filter-context-and-context-transition/&quot;&gt;filter context and context transition&lt;/a&gt;, the other half of DAX.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>How to prompt an AI to write a DAX measure</title>
    <link href="https://data.benibix.com/blog/ai-prompt-for-dax/"/>
    <id>https://data.benibix.com/blog/ai-prompt-for-dax/</id>
    <published>2026-10-27T01:00:00Z</published>
    <updated>2026-10-27T01:00:00Z</updated>
    <summary>A vague request gets DAX that runs but answers the wrong question. The four things to put in a prompt for a DAX measure, a before and after, and how to check the result before it goes in a report.</summary>
    <category term="AI"/>
    <category term="Prompts"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; tell the AI four things: &lt;strong&gt;what the number means&lt;/strong&gt; in business words, &lt;strong&gt;the tables and columns&lt;/strong&gt; it can use (with their relationships), &lt;strong&gt;the filter behaviour&lt;/strong&gt; you expect (per month, ignoring the region slicer, year to date), and &lt;strong&gt;the format&lt;/strong&gt; you want back (one measure, with a comment). Then test the measure against a number you already know before you trust it.&lt;/p&gt;
&lt;p&gt;&amp;quot;Write a DAX measure for sales growth&amp;quot; gets you something that runs. Whether it compares this month with last month or this year with last year, and whether it uses your date table, is a guess. The same four parts that make an image prompt specific make a DAX prompt correct.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-into-the-prompt&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-into-the-prompt&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes into the prompt?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:4&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Meaning&lt;/b&gt;&lt;span&gt;what the number answers: &amp;quot;revenue this month compared with the same month last year, as a percentage&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Model&lt;/b&gt;&lt;span&gt;the tables, columns and relationships: Sales[Amount], Sales[OrderDate], a marked date table 'Date'&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Behaviour&lt;/b&gt;&lt;span&gt;which filters apply and which do not: &amp;quot;respects the region slicer, blank when last year has no sales&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Format&lt;/b&gt;&lt;span&gt;one measure, named &amp;quot;Revenue YoY %&amp;quot;, using variables, with a one-line comment&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;The four parts of a DAX prompt&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-does-a-before-and-after-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-before-and-after-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a before and after look like?&lt;/h2&gt;
&lt;p&gt;Before:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot;&gt;&lt;code&gt;Write a DAX measure for sales growth.&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;After:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot;&gt;&lt;code&gt;Write one DAX measure named &amp;quot;Revenue YoY %&amp;quot;.
It answers: revenue this month compared with the same month last year, as a percentage.
Model: Sales[Amount] is revenue, Sales[OrderDate] relates to 'Date'[Date]; 'Date' is marked as a date table.
It should respect all slicers and return BLANK when last year has no revenue.
Use VAR and DIVIDE, and add a one-line comment.&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;A good answer to the second prompt looks like this:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue YoY % =
&lt;i class=&quot;c&quot;&gt;-- revenue against the same period last year&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; ThisYear = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; LastYear = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( ThisYear - LastYear, LastYear )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-do-you-check-the-measure&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-check-the-measure&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you check the measure?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Pick a month you know:&lt;/strong&gt; put the measure in a table by month next to plain revenue, and check one month by hand.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Try the edges:&lt;/strong&gt; the first month in the data (last year is empty, so the result should be blank), and a month with no sales.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Change a slicer:&lt;/strong&gt; the number should move when you expect it to, and stay when you do not.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;An AI writes DAX that looks right. Only a known number tells you it is right.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;No model in the prompt.&lt;/strong&gt; The AI invents column names, or uses the date column of the fact table instead of your date table.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&amp;quot;Growth&amp;quot; without a period.&lt;/strong&gt; Month over month and year over year are both &amp;quot;growth&amp;quot;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Pasting the answer straight into a shared report.&lt;/strong&gt; Test it in a copy first.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/sameperiodlastyear-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SAMEPERIODLASTYEAR function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/divide-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DIVIDE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Know the measure you are asking for: &lt;a href=&quot;/blog/year-over-year-dax/&quot;&gt;year-over-year in DAX&lt;/a&gt; and &lt;a href=&quot;/blog/dax-variables-var-return/&quot;&gt;variables in DAX&lt;/a&gt;. For the same idea with SQL, see &lt;a href=&quot;/blog/prompt-engineering-for-sql/&quot;&gt;prompt engineering for SQL&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>AB-731: the AI Transformation Leader exam explained</title>
    <link href="https://data.benibix.com/blog/ab-731-study-guide/"/>
    <id>https://data.benibix.com/blog/ab-731-study-guide/</id>
    <published>2026-10-26T12:00:00Z</published>
    <updated>2026-10-26T12:00:00Z</updated>
    <summary>What the AB-731 AI Transformation Leader exam measures since July 2026, how its three areas are weighted, who it is for, and how to prepare by writing an AI adoption plan for your own team.</summary>
    <category term="Exams"/>
    <category term="AI"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; AB-731 earns &lt;strong&gt;Microsoft Certified: AI Transformation Leader&lt;/strong&gt;, for business decision-makers who guide AI adoption without coding. It covers the business value of generative AI (35 to 40%), Microsoft's AI apps and services, from Microsoft 365 Copilot to Foundry Tools (35 to 40%), and an implementation and adoption strategy (20 to 25%). It is a 45-minute, beginner-level exam, and you need 700 out of 1,000.&lt;/p&gt;
&lt;p&gt;The questions are about decisions: where AI pays off, which Microsoft product fits a use case, and how to roll it out responsibly with the people who will use it.&lt;/p&gt;
&lt;h2 id=&quot;what-does-ab-731-cover&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-ab-731-cover&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does AB-731 cover?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Business value of generative AI&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;35-40%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;Microsoft AI apps and services&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;35-40%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Implementation and adoption strategy&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:62.5%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;20-25%&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;AB-731 skills, by weight in the exam&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Business value&lt;/strong&gt;: generative AI against other kinds of AI, what prompt engineering changes, and benefits, costs and risks.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Apps and services&lt;/strong&gt;: mapping business processes to Microsoft 365 Copilot and Microsoft Copilot, and to Foundry Tools (vision, language, speech and models), and matching a model to a need.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Strategy&lt;/strong&gt;: responsible AI, governance principles, an AI council, an adoption team, common barriers, and an AI champions programme.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-prepare&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-prepare&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you prepare?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Use cases&lt;/b&gt;&lt;span&gt;list five, score each by value and effort&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Fit&lt;/b&gt;&lt;span&gt;Copilot, a prebuilt agent, or Foundry Tools for each&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;red&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Risks&lt;/b&gt;&lt;span&gt;data, accuracy, people&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;People&lt;/b&gt;&lt;span&gt;a council, an adoption team, champions&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Measure&lt;/b&gt;&lt;span&gt;the outcome you will track&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;An adoption plan for your own team&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Writing it for a real team covers almost every skill on the list. Then take the free practice assessment for AB-731.&lt;/p&gt;
&lt;h2 id=&quot;what-helps-on-the-day&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-helps-on-the-day&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What helps on the day?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Match product to process.&lt;/strong&gt; Many questions describe a business need and ask which Microsoft offering fits.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Responsible AI is a strategy question here&lt;/strong&gt;, about governance and roles, not technical filters.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/ab-731&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam AB-731&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/exams/ab-731/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Microsoft Certified: AI Transformation Leader&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/practice-assessments-for-microsoft-certifications&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Practice assessments&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Write the five-use-case list for your team. &lt;a href=&quot;/blog/what-makes-a-good-kpi/&quot;&gt;What makes a good KPI&lt;/a&gt; helps choose the outcome to measure, and &lt;a href=&quot;/blog/ab-730-study-guide/&quot;&gt;AB-730&lt;/a&gt; is the hands-on exam for the people who will use the tools.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>AI-300 in 2026: what the exam covers and how to study</title>
    <link href="https://data.benibix.com/blog/ai-300-study-guide/"/>
    <id>https://data.benibix.com/blog/ai-300-study-guide/</id>
    <published>2026-10-26T12:00:00Z</published>
    <updated>2026-10-26T12:00:00Z</updated>
    <summary>What the AI-300 MLOps and GenAIOps exam measures, how its five areas are weighted, who it is for after DP-100 retired, and a study plan that takes one classic model and one generative AI app to production.</summary>
    <category term="Exams"/>
    <category term="AI"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; AI-300 earns &lt;strong&gt;Microsoft Certified: Machine Learning Operations Engineer Associate&lt;/strong&gt;. Its five areas are MLOps infrastructure (15 to 20%), the machine learning model lifecycle (25 to 30%), GenAIOps infrastructure (20 to 25%), generative AI quality and observability (10 to 15%), and optimizing generative AI systems (10 to 15%). It runs 120 minutes, needs 700 out of 1,000, and is renewed yearly for free. Microsoft expects a data science background, Python, and entry-level DevOps such as GitHub Actions.&lt;/p&gt;
&lt;p&gt;It is the operations exam for AI: the same discipline for a classic model in Azure Machine Learning and for a generative app in Microsoft Foundry. DP-100, the data scientist exam, retired on 1 June 2026.&lt;/p&gt;
&lt;h2 id=&quot;what-does-ai-300-cover&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-ai-300-cover&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does AI-300 cover?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;MLOps infrastructure&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:66.7%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;15-20%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;ML model lifecycle and operations&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;25-30%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;GenAIOps infrastructure&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:83.3%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;20-25%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;GenAI quality and observability&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:50.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;10-15%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Optimize GenAI systems&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:50.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;10-15%&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;AI-300 skills, by weight in the exam&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;MLOps infrastructure&lt;/strong&gt;: Machine Learning workspaces, datastores, data assets and environments, GitHub integration, and deploying it all with Bicep.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Model lifecycle&lt;/strong&gt;: experiment tracking with MLflow, automated ML, registering and versioning models, real-time and batch endpoints, and watching data drift and performance in production.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;GenAIOps&lt;/strong&gt;: Foundry resources and projects, managed identities and RBAC, deploying foundation models, and prompts versioned in source control with variants compared.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Quality and observability&lt;/strong&gt;: test datasets, groundedness, relevance, coherence and fluency metrics, and monitoring latency and throughput.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Optimization&lt;/strong&gt;: RAG tuning (chunk sizes, similarity thresholds, retrieval strategy), embedding models, fine-tuning and synthetic data.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-would-you-study-for-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-would-you-study-for-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How would you study for it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Classic ML (Azure Machine Learning)&lt;/th&gt;&lt;th&gt;Generative AI (Foundry)&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Workspace and compute from a Bicep file&lt;/td&gt;&lt;td&gt;Foundry project from a Bicep file&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Train with MLflow tracking, register the model&lt;/td&gt;&lt;td&gt;Deploy a foundation model&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Deploy a real-time endpoint, then a batch one&lt;/td&gt;&lt;td&gt;Version the prompt in Git, compare two variants&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Turn on data drift monitoring&lt;/td&gt;&lt;td&gt;Run an evaluation for groundedness and relevance&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;GitHub Actions retrains on new data&lt;/td&gt;&lt;td&gt;GitHub Actions runs the evaluation on every change&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Two tracks, one repository&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Keep both tracks in one Git repository with GitHub Actions: that mirrors how the exam frames the work.&lt;/p&gt;
&lt;h2 id=&quot;what-helps-on-the-day&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-helps-on-the-day&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What helps on the day?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Know the metric names.&lt;/strong&gt; Groundedness, relevance, coherence and fluency are listed by name.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Real-time or batch endpoint?&lt;/strong&gt; The scenario's latency and volume decide.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Drift is a data problem first.&lt;/strong&gt; Know what triggers retraining and how you detect it.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-keep-the-certification&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-keep-the-certification&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you keep the certification?&lt;/h2&gt;
&lt;p&gt;It expires after a year; renew it with the free online assessment on Microsoft Learn in the six months before.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/ai-300&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam AI-300&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/exams/ai-300/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Microsoft Certified: Machine Learning Operations Engineer Associate&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/dp-100&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam DP-100 (retired)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Set up the repository with one Bicep file and one workflow, then add each row of the table. &lt;a href=&quot;/blog/azure-data-factory-git-ci-cd/&quot;&gt;Azure Data Factory with Git and CI/CD&lt;/a&gt; shows the same idea of deploying data work from Git.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Buttons, bookmarks and page navigators in Power BI</title>
    <link href="https://data.benibix.com/blog/buttons-bookmarks-navigators-power-bi/"/>
    <id>https://data.benibix.com/blog/buttons-bookmarks-navigators-power-bi/</id>
    <published>2026-10-26T12:00:00Z</published>
    <updated>2026-10-26T12:00:00Z</updated>
    <summary>How buttons, bookmarks and page and bookmark navigators make a Power BI report move like an app, the button actions and states, what a bookmark captures (data, display, current page), switching views with bookmarks, and a DAX-driven button.</summary>
    <category term="Visuals"/>
    <category term="Filters and navigation"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;button&lt;/strong&gt; runs an &lt;strong&gt;action&lt;/strong&gt; when clicked: go to a page, apply a &lt;strong&gt;bookmark&lt;/strong&gt;, drill through, go back, open a web URL, apply or clear all slicers, or call a data function. A &lt;strong&gt;bookmark&lt;/strong&gt; saves a state of the report: the filters and slicers (&lt;strong&gt;Data&lt;/strong&gt;), which visuals are visible and spotlight (&lt;strong&gt;Display&lt;/strong&gt;), and the page (&lt;strong&gt;Current page&lt;/strong&gt;), for &lt;strong&gt;all visuals&lt;/strong&gt; or &lt;strong&gt;selected visuals&lt;/strong&gt;. &lt;strong&gt;Page navigator&lt;/strong&gt; and &lt;strong&gt;bookmark navigator&lt;/strong&gt; are ready-made rows of buttons, one per page or per bookmark, that update themselves when pages or bookmarks change.&lt;/p&gt;
&lt;p&gt;Tabs at the bottom of a report are easy to miss. A menu of buttons at the top, a toggle between &amp;quot;chart&amp;quot; and &amp;quot;table&amp;quot;, and a &amp;quot;Reset filters&amp;quot; button make a report work like an app, and readers stop getting lost.&lt;/p&gt;
&lt;h2 id=&quot;what-can-a-button-do&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-can-a-button-do&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What can a button do?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Action&lt;/th&gt;&lt;th&gt;What happens&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Back&lt;/td&gt;&lt;td&gt;returns to the previous page (made for drillthrough pages)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bookmark&lt;/td&gt;&lt;td&gt;applies a bookmark&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Drill through&lt;/td&gt;&lt;td&gt;opens a drillthrough page filtered to the reader's selection&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Page navigation&lt;/td&gt;&lt;td&gt;goes to another page, no bookmark needed&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bookmark navigation&lt;/td&gt;&lt;td&gt;goes to a bookmarked state, on this or another page&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Q&amp;amp;A&lt;/td&gt;&lt;td&gt;opens the Q&amp;amp;A explorer&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Web URL&lt;/td&gt;&lt;td&gt;opens a web page&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Apply all slicers, Clear all slicers&lt;/td&gt;&lt;td&gt;applies or clears every slicer on the page&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Data function&lt;/td&gt;&lt;td&gt;calls a user data function (translytical task flows, preview)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The button actions&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Buttons have states, each with its own look: &lt;strong&gt;Default&lt;/strong&gt;, &lt;strong&gt;On hover&lt;/strong&gt;, &lt;strong&gt;On press&lt;/strong&gt;, &lt;strong&gt;Disabled&lt;/strong&gt; and &lt;strong&gt;Loading&lt;/strong&gt; (for data functions). Shapes and images can carry actions too, and buttons support fill images per state.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-bookmark-save&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-bookmark-save&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a bookmark save?&lt;/h2&gt;
&lt;p&gt;Create one in &lt;strong&gt;View, Bookmarks, Add&lt;/strong&gt;. In its &lt;strong&gt;More options (...)&lt;/strong&gt; you choose what it applies:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Data&lt;/strong&gt;: filter and slicer states. On: the bookmark resets filters to how they were.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Display&lt;/strong&gt;: which visuals are visible or hidden, and spotlight.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Current page&lt;/strong&gt;: on, it jumps to its page; off, it applies to whatever page is open.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;All visuals&lt;/strong&gt; or &lt;strong&gt;Selected visuals&lt;/strong&gt;: apply to every visual on the page, or only to those selected when you saved it.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;For bookmarks that switch views (show the chart, hide the table), Microsoft suggests turning &lt;strong&gt;Data&lt;/strong&gt; off, so switching views does not undo the reader's filters.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-build-a-chart-or-table-toggle&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-a-chart-or-table-toggle&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build a chart or table toggle?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;Place a column chart and a table of the same data on top of each other.&lt;/li&gt;&lt;li&gt;In the &lt;strong&gt;Selection&lt;/strong&gt; pane, hide the table. Add a bookmark &amp;quot;Show chart&amp;quot; with &lt;strong&gt;Data&lt;/strong&gt; off and &lt;strong&gt;Selected visuals&lt;/strong&gt; for the two visuals.&lt;/li&gt;&lt;li&gt;Hide the chart, show the table, add a bookmark &amp;quot;Show table&amp;quot; the same way.&lt;/li&gt;&lt;li&gt;Add two buttons (or a &lt;strong&gt;bookmark navigator&lt;/strong&gt; limited to a group with these two bookmarks) whose actions apply them.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;The reader now switches between chart and table without losing any slicer selection.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-build-a-page-menu&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-a-page-menu&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build a page menu?&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Insert, Buttons, Navigator, Page navigator&lt;/strong&gt; adds one button per page, and keeps itself in sync when pages are added, renamed or hidden. Format the &lt;strong&gt;selected&lt;/strong&gt; state so the current page stands out. A &lt;strong&gt;bookmark navigator&lt;/strong&gt; does the same for a group of bookmarks.&lt;/p&gt;
&lt;h2 id=&quot;can-a-button-react-to-the-data&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#can-a-button-react-to-the-data&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Can a button react to the data?&lt;/h2&gt;
&lt;p&gt;The button's text and its &lt;strong&gt;action destination&lt;/strong&gt; can come from measures (&lt;strong&gt;fx&lt;/strong&gt;). A button that leads to a detail page only when one customer is selected:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Detail Button Text =
&lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;HASONEVALUE&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ),
    &lt;i class=&quot;s&quot;&gt;&amp;quot;See &amp;quot;&lt;/i&gt; &amp;amp; &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ) &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot; in detail&amp;quot;&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Select one customer&amp;quot;&lt;/i&gt;
)

Detail Page =
&lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;HASONEVALUE&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ), &lt;i class=&quot;s&quot;&gt;&amp;quot;Customer detail&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;&amp;quot;&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Use &lt;code&gt;Detail Button Text&lt;/code&gt; for the button text and &lt;code&gt;Detail Page&lt;/code&gt; as the &lt;strong&gt;Destination&lt;/strong&gt; of a page navigation (or drillthrough) action; with an empty destination the button is disabled and shows its Disabled state.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Bookmarks that reset filters.&lt;/strong&gt; A view toggle with &lt;strong&gt;Data&lt;/strong&gt; on throws away the reader's slicer selections; turn it off.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Bookmarks for everything.&lt;/strong&gt; Twenty bookmarks with hidden visuals are hard to maintain; page navigators and drillthrough often do the job without bookmarks.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;An unreadable Selection pane.&lt;/strong&gt; Bookmarks show and hide visuals by their names in the &lt;strong&gt;Selection&lt;/strong&gt; pane; &amp;quot;Clustered column chart 7&amp;quot; makes every change a guess. Name every visual.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;No way back.&lt;/strong&gt; A drillthrough page without a Back button traps readers (Power BI adds one when you set up drillthrough; keep it).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Buttons that look like decoration.&lt;/strong&gt; Give hover and pressed states a visible change, so readers know it is clickable.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-buttons&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create and configure buttons in Power BI reports&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-bookmarks&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create report bookmarks in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/button-navigators&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create page and bookmark navigators&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/selectedvalue-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SELECTEDVALUE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add a page navigator at the top of every page, a Clear all slicers button next to the slicers, and bookmarks with Data off only for view toggles. &lt;a href=&quot;/blog/drill-down-drill-through-power-bi/&quot;&gt;Drill down and drillthrough&lt;/a&gt; covers the detail pages buttons often lead to.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Cost per lead and MQL to SQL rate: B2B funnel KPIs</title>
    <link href="https://data.benibix.com/blog/cost-per-lead-and-mql-to-sql-kpi/"/>
    <id>https://data.benibix.com/blog/cost-per-lead-and-mql-to-sql-kpi/</id>
    <published>2026-10-26T12:00:00Z</published>
    <updated>2026-10-26T12:00:00Z</updated>
    <summary>How to measure a B2B lead funnel, cost per lead, marketing qualified and sales qualified leads, MQL to SQL and SQL to won conversion, cost per SQL and per customer, lead velocity, the DAX on a leads table with stage dates, and a funnel by source.</summary>
    <category term="KPIs"/>
    <category term="Marketing"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;cost per lead (CPL)&lt;/strong&gt; = marketing spend / new leads. Leads then move through stages: &lt;strong&gt;MQL&lt;/strong&gt; (marketing qualified: fits the profile and showed interest), &lt;strong&gt;SQL&lt;/strong&gt; (sales qualified: sales accepted it as a real opportunity) and &lt;strong&gt;won&lt;/strong&gt;. The &lt;strong&gt;MQL to SQL rate&lt;/strong&gt; = MQLs that became SQLs / MQLs, measured by the month the leads became MQLs. Because a cheap lead that never qualifies is expensive, judge sources by &lt;strong&gt;cost per SQL&lt;/strong&gt; and &lt;strong&gt;cost per won customer&lt;/strong&gt;, not by CPL.&lt;/p&gt;
&lt;p&gt;Marketing celebrates cheap leads; sales complains they are useless. Measuring the whole funnel per source, with costs at every stage, settles it with numbers.&lt;/p&gt;
&lt;h2 id=&quot;how-does-the-funnel-look-by-source&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-the-funnel-look-by-source&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does the funnel look by source?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Source&lt;/th&gt;&lt;th&gt;Spend (k)&lt;/th&gt;&lt;th&gt;Leads&lt;/th&gt;&lt;th&gt;CPL&lt;/th&gt;&lt;th&gt;MQL&lt;/th&gt;&lt;th&gt;SQL&lt;/th&gt;&lt;th&gt;Won&lt;/th&gt;&lt;th&gt;MQL to SQL&lt;/th&gt;&lt;th&gt;Cost per SQL&lt;/th&gt;&lt;th&gt;Cost per won&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Webinars&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;400&lt;/td&gt;&lt;td&gt;50&lt;/td&gt;&lt;td&gt;160&lt;/td&gt;&lt;td&gt;64&lt;/td&gt;&lt;td&gt;16&lt;/td&gt;&lt;td&gt;40%&lt;/td&gt;&lt;td&gt;313&lt;/td&gt;&lt;td&gt;1,250&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Paid social&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;td&gt;1,500&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;300&lt;/td&gt;&lt;td&gt;45&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;15%&lt;/td&gt;&lt;td&gt;667&lt;/td&gt;&lt;td&gt;5,000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Content, SEO&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;600&lt;/td&gt;&lt;td&gt;17&lt;/td&gt;&lt;td&gt;210&lt;/td&gt;&lt;td&gt;63&lt;/td&gt;&lt;td&gt;14&lt;/td&gt;&lt;td&gt;30%&lt;/td&gt;&lt;td&gt;159&lt;/td&gt;&lt;td&gt;714&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;60&lt;/td&gt;&lt;td&gt;2,500&lt;/td&gt;&lt;td&gt;24&lt;/td&gt;&lt;td&gt;670&lt;/td&gt;&lt;td&gt;172&lt;/td&gt;&lt;td&gt;36&lt;/td&gt;&lt;td&gt;26%&lt;/td&gt;&lt;td&gt;349&lt;/td&gt;&lt;td&gt;1,667&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Leads created in Q3, by source&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Paid social has the lowest CPL after content and the highest cost per won customer: its leads rarely qualify.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;funnel&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;funnel chart: Leads 2,500; MQL 670; SQL 172; Won 36&quot;&gt;&lt;rect x=&quot;150&quot; y=&quot;15.4&quot; width=&quot;420&quot; height=&quot;53.3&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;360&quot; y=&quot;46&quot; class=&quot;tin3&quot; text-anchor=&quot;middle&quot;&gt;2,500&lt;/text&gt;&lt;text x=&quot;12&quot; y=&quot;46&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Leads&lt;/text&gt;&lt;rect x=&quot;303.7&quot; y=&quot;87.4&quot; width=&quot;112.6&quot; height=&quot;53.3&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;360&quot; y=&quot;118&quot; class=&quot;tin3&quot; text-anchor=&quot;middle&quot;&gt;670&lt;/text&gt;&lt;text x=&quot;12&quot; y=&quot;118&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;MQL&lt;/text&gt;&lt;text x=&quot;632&quot; y=&quot;118&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;27%&lt;/text&gt;&lt;rect x=&quot;345.6&quot; y=&quot;159.4&quot; width=&quot;28.9&quot; height=&quot;53.3&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;382.4&quot; y=&quot;190&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;172&lt;/text&gt;&lt;text x=&quot;12&quot; y=&quot;190&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;SQL&lt;/text&gt;&lt;text x=&quot;632&quot; y=&quot;190&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;7%&lt;/text&gt;&lt;rect x=&quot;357&quot; y=&quot;231.4&quot; width=&quot;6&quot; height=&quot;53.3&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;371&quot; y=&quot;262&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;36&lt;/text&gt;&lt;text x=&quot;12&quot; y=&quot;262&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Won&lt;/text&gt;&lt;text x=&quot;632&quot; y=&quot;262&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;1%&lt;/text&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Q3 lead funnel&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;A Leads table with one row per lead: Lead ID, Source, Created Date, MQL Date, SQL Date, Won Date (blank until reached). Created Date relates to the Date table; the stage measures count by cohort (leads created in the period):&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Leads = &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Leads )
MQLs = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Leads]&lt;/i&gt;, NOT &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( Leads&lt;i class=&quot;m&quot;&gt;[MQL Date]&lt;/i&gt; ) )
SQLs = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Leads]&lt;/i&gt;, NOT &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( Leads&lt;i class=&quot;m&quot;&gt;[SQL Date]&lt;/i&gt; ) )
Won = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Leads]&lt;/i&gt;, NOT &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( Leads&lt;i class=&quot;m&quot;&gt;[Won Date]&lt;/i&gt; ) )

Spend = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Spend&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )

CPL = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Spend]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Leads]&lt;/i&gt; )
Lead to MQL % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[MQLs]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Leads]&lt;/i&gt; )
MQL to SQL % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[SQLs]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[MQLs]&lt;/i&gt; )
SQL to Won % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Won]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[SQLs]&lt;/i&gt; )
Cost per SQL = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Spend]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[SQLs]&lt;/i&gt; )
Cost per Won = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Spend]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Won]&lt;/i&gt; )

Days MQL to SQL =
&lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( Leads, NOT &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( Leads&lt;i class=&quot;m&quot;&gt;[SQL Date]&lt;/i&gt; ) ),
    Leads&lt;i class=&quot;m&quot;&gt;[SQL Date]&lt;/i&gt; - Leads&lt;i class=&quot;m&quot;&gt;[MQL Date]&lt;/i&gt;
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Counting by created date (cohort) keeps each rate a true share of the same leads. Counting each stage by its own date (&amp;quot;SQLs this month&amp;quot;) answers a different question, how busy each stage was; use &lt;a href=&quot;/blog/dax-relationship-functions/&quot;&gt;USERELATIONSHIP&lt;/a&gt; on SQL Date for that view.&lt;/p&gt;
&lt;h2 id=&quot;what-is-lead-velocity&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-lead-velocity&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is lead velocity?&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Lead velocity rate&lt;/strong&gt; = (qualified leads this month - last month) / last month. Growing qualified leads predict pipeline in the coming months, a leading KPI for &lt;a href=&quot;/blog/pipeline-coverage-kpi/&quot;&gt;pipeline coverage&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;MQLs by MQL Month = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Leads]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;USERELATIONSHIP&lt;/i&gt; ( Leads&lt;i class=&quot;m&quot;&gt;[MQL Date]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
MQLs PM = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[MQLs by MQL Month]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DATEADD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, -&lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, MONTH ) )
Lead Velocity % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[MQLs by MQL Month]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[MQLs PM]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[MQLs PM]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Young cohorts.&lt;/strong&gt; Leads from last week have not had time to become SQLs; the latest months look worse.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Definitions that drift.&lt;/strong&gt; If the MQL score threshold changes, MQL numbers jump; record the definition and its change date.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Spend by source missing.&lt;/strong&gt; Events and content have staff costs; without them their CPL looks free.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Leads skipping stages.&lt;/strong&gt; A lead that goes straight to SQL has no MQL date; set MQL Date when SQL is set.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/userelationship-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: USERELATIONSHIP function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-funnel-charts&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Funnel charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/averagex-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: AVERAGEX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add stage dates to the leads export, build the funnel by source, and rank sources by cost per won customer. &lt;a href=&quot;/blog/win-rate-kpi/&quot;&gt;Win rate&lt;/a&gt; continues after SQL.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>DAX aggregation functions: every one with an example</title>
    <link href="https://data.benibix.com/blog/aggregation-functions-dax-reference/"/>
    <id>https://data.benibix.com/blog/aggregation-functions-dax-reference/</id>
    <published>2026-10-26T12:00:00Z</published>
    <updated>2026-10-26T12:00:00Z</updated>
    <summary>A reference of all DAX aggregation functions, SUM, SUMX, AVERAGE, AVERAGEA, AVERAGEX, MIN, MINA, MINX, MAX, MAXA, MAXX, COUNT, COUNTA, COUNTAX, COUNTBLANK, COUNTROWS, COUNTX, DISTINCTCOUNT, DISTINCTCOUNTNOBLANK, APPROXIMATEDISTINCTCOUNT, PRODUCT and PRODUCTX, with examples.</summary>
    <category term="DAX"/>
    <category term="Reference"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; DAX aggregation functions come in three forms. The &lt;strong&gt;plain&lt;/strong&gt; form takes a column (&lt;code&gt;SUM ( Sales[Amount] )&lt;/code&gt;). The &lt;strong&gt;X&lt;/strong&gt; form is an iterator that evaluates an expression per row of a table and then aggregates (&lt;code&gt;SUMX ( Sales, Sales[Qty] * Sales[Price] )&lt;/code&gt;). The &lt;strong&gt;A&lt;/strong&gt; form (&lt;code&gt;AVERAGEA&lt;/code&gt;, &lt;code&gt;MINA&lt;/code&gt;, &lt;code&gt;MAXA&lt;/code&gt;, &lt;code&gt;COUNTA&lt;/code&gt;) also handles non-numeric values such as Booleans. Most return BLANK when there are no rows, which keeps empty rows out of visuals.&lt;/p&gt;
&lt;p&gt;This page lists all of them with one example each. The everyday ones have their own posts: &lt;a href=&quot;/blog/sum-vs-sumx-dax/&quot;&gt;SUM vs SUMX&lt;/a&gt;, &lt;a href=&quot;/blog/count-functions-dax/&quot;&gt;count functions&lt;/a&gt;, &lt;a href=&quot;/blog/averagex-minx-maxx-dax/&quot;&gt;AVERAGEX, MINX and MAXX&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-sum-and-multiply&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-sum-and-multiply&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions sum and multiply?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Does&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;SUM&lt;/td&gt;&lt;td&gt;adds the numbers in a column&lt;/td&gt;&lt;td&gt;SUM ( Sales[Amount] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SUMX&lt;/td&gt;&lt;td&gt;adds an expression evaluated per row&lt;/td&gt;&lt;td&gt;SUMX ( Sales, Sales[Quantity] * Sales[Unit Price] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PRODUCT&lt;/td&gt;&lt;td&gt;multiplies the numbers in a column&lt;/td&gt;&lt;td&gt;PRODUCT ( Growth[Factor] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PRODUCTX&lt;/td&gt;&lt;td&gt;multiplies an expression evaluated per row&lt;/td&gt;&lt;td&gt;PRODUCTX ( Returns, 1 + Returns[Monthly Return] ) - 1&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Sums and products&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;code&gt;PRODUCTX&lt;/code&gt; is the function for compound growth: a month of +10% followed by a month of -10% compounds to &lt;code&gt;1.10 * 0.90 - 1&lt;/code&gt;, which is -1%, while adding the two rates says 0%.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Compound Return =
&lt;i class=&quot;f&quot;&gt;PRODUCTX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month]&lt;/i&gt; ), &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; + &lt;i class=&quot;m&quot;&gt;[Monthly Return]&lt;/i&gt; ) - &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;which-functions-average&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-average&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions average?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Does&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;AVERAGE&lt;/td&gt;&lt;td&gt;mean of the numbers in a column&lt;/td&gt;&lt;td&gt;AVERAGE ( Sales[Amount] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;AVERAGEA&lt;/td&gt;&lt;td&gt;mean, counting TRUE as 1, FALSE and text as 0&lt;/td&gt;&lt;td&gt;AVERAGEA ( Survey[Recommends] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;AVERAGEX&lt;/td&gt;&lt;td&gt;mean of an expression per row&lt;/td&gt;&lt;td&gt;AVERAGEX ( VALUES ( 'Date'[Month] ), [Revenue] )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Averages&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;For medians, percentiles and geometric means see the &lt;a href=&quot;/blog/statistical-functions-dax-reference/&quot;&gt;statistical functions&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-find-the-smallest-and-largest&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-find-the-smallest-and-largest&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions find the smallest and largest?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Does&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;MIN&lt;/td&gt;&lt;td&gt;smallest value in a column, or the smaller of two values&lt;/td&gt;&lt;td&gt;MIN ( Sales[Order Date] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;MINA&lt;/td&gt;&lt;td&gt;as MIN, also for Booleans (FALSE is 0)&lt;/td&gt;&lt;td&gt;MINA ( Tasks[Done] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;MINX&lt;/td&gt;&lt;td&gt;smallest result of an expression per row&lt;/td&gt;&lt;td&gt;MINX ( VALUES ( 'Date'[Month] ), [Revenue] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;MAX&lt;/td&gt;&lt;td&gt;largest value in a column, or the larger of two values&lt;/td&gt;&lt;td&gt;MAX ( [Revenue], [Target] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;MAXA&lt;/td&gt;&lt;td&gt;as MAX, also for Booleans (TRUE is 1)&lt;/td&gt;&lt;td&gt;MAXA ( Tasks[Done] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;MAXX&lt;/td&gt;&lt;td&gt;largest result of an expression per row&lt;/td&gt;&lt;td&gt;MAXX ( VALUES ( Sales[Order ID] ), [Revenue] )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Minimum and maximum&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;which-functions-count&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-count&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions count?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Counts&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;COUNT&lt;/td&gt;&lt;td&gt;non-blank numbers, dates and strings&lt;/td&gt;&lt;td&gt;COUNT ( Sales[Ship Date] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;COUNTA&lt;/td&gt;&lt;td&gt;non-blank values, also Booleans&lt;/td&gt;&lt;td&gt;COUNTA ( Sales[Is Return] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;COUNTAX&lt;/td&gt;&lt;td&gt;rows where an expression returns any non-blank value&lt;/td&gt;&lt;td&gt;COUNTAX ( Sales, Sales[Comment] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;COUNTBLANK&lt;/td&gt;&lt;td&gt;blank cells in a column&lt;/td&gt;&lt;td&gt;COUNTBLANK ( Sales[Ship Date] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;COUNTROWS&lt;/td&gt;&lt;td&gt;rows of a table&lt;/td&gt;&lt;td&gt;COUNTROWS ( Sales )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;COUNTX&lt;/td&gt;&lt;td&gt;rows where an expression is not blank&lt;/td&gt;&lt;td&gt;COUNTX ( VALUES ( 'Product'[Product] ), [Revenue] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DISTINCTCOUNT&lt;/td&gt;&lt;td&gt;unique values, BLANK as one&lt;/td&gt;&lt;td&gt;DISTINCTCOUNT ( Sales[Customer Key] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DISTINCTCOUNTNOBLANK&lt;/td&gt;&lt;td&gt;unique values without BLANK&lt;/td&gt;&lt;td&gt;DISTINCTCOUNTNOBLANK ( Sales[Promo Code] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;APPROXIMATEDISTINCTCOUNT&lt;/td&gt;&lt;td&gt;an estimate of unique values (large DirectQuery sources)&lt;/td&gt;&lt;td&gt;APPROXIMATEDISTINCTCOUNT ( Events[User ID] )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Counts&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-choose-between-plain-and-x&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-choose-between-plain-and-x&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you choose between plain and X?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;If&lt;/th&gt;&lt;th&gt;Use&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;the value is already a column&lt;/td&gt;&lt;td&gt;plain: &lt;code&gt;SUM&lt;/code&gt;, &lt;code&gt;AVERAGE&lt;/code&gt;, &lt;code&gt;MAX&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;the value must be computed per row&lt;/td&gt;&lt;td&gt;X: &lt;code&gt;SUMX ( Sales, Qty * Price )&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;the average or max is per group (month, customer)&lt;/td&gt;&lt;td&gt;X over the group: &lt;code&gt;AVERAGEX ( VALUES ( 'Date'[Month] ), [Revenue] )&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;the total must add up the rows of the visual&lt;/td&gt;&lt;td&gt;X over the row column: &lt;code&gt;SUMX ( VALUES ( Customer[Customer] ), [Bonus] )&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Multiplying or dividing aggregates where the row math is needed.&lt;/strong&gt; &lt;code&gt;SUM ( Qty ) * SUM ( Price )&lt;/code&gt; is not revenue.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Average of a ratio column.&lt;/strong&gt; Average the parts, then divide.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;X functions over a fact table with a measure inside.&lt;/strong&gt; Slow; iterate the dimension.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Expecting 0.&lt;/strong&gt; Most return BLANK with no rows; see &lt;a href=&quot;/blog/dax-blank-handling/&quot;&gt;BLANK handling&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/aggregation-functions-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Aggregation functions (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/productx-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: PRODUCTX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/averagea-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: AVERAGEA function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Keep this page for lookup, and learn &lt;code&gt;SUM&lt;/code&gt;, &lt;code&gt;SUMX&lt;/code&gt;, &lt;code&gt;DISTINCTCOUNT&lt;/code&gt;, &lt;code&gt;COUNTROWS&lt;/code&gt; and &lt;code&gt;AVERAGEX&lt;/code&gt; well; they cover nearly every measure. The &lt;a href=&quot;/blog/filter-functions-dax-reference/&quot;&gt;filter functions&lt;/a&gt; decide what rows these functions see.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Decomposition tree in Power BI: drill a total apart</title>
    <link href="https://data.benibix.com/blog/decomposition-tree-power-bi/"/>
    <id>https://data.benibix.com/blog/decomposition-tree-power-bi/</id>
    <published>2026-10-26T12:00:00Z</published>
    <updated>2026-10-26T12:00:00Z</updated>
    <summary>How the decomposition tree in Power BI breaks a measure down across dimensions in any order, the Analyze and Explain by fields, AI splits for high and low values in absolute or relative mode, locking levels, the DAX it works best with, and its limits.</summary>
    <category term="Visuals"/>
    <category term="AI visuals"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; the &lt;strong&gt;decomposition tree&lt;/strong&gt; splits one measure across dimensions, one level at a time, in the order the reader chooses: total revenue, then by region, then the weakest region by product, then that product by channel. Put the measure in &lt;strong&gt;Analyze&lt;/strong&gt; and the candidate dimensions in &lt;strong&gt;Explain by&lt;/strong&gt;. Each &lt;strong&gt;+&lt;/strong&gt; opens the next level; an &lt;strong&gt;AI split&lt;/strong&gt; (the light bulb) picks the dimension that leads to the &lt;strong&gt;highest&lt;/strong&gt; or &lt;strong&gt;lowest&lt;/strong&gt; value for you. The report author can &lt;strong&gt;lock&lt;/strong&gt; the first levels so everyone starts from the same path.&lt;/p&gt;
&lt;p&gt;A matrix shows a breakdown in a fixed order the author chose. Real questions wander: &amp;quot;Backorders are high. Where? In which product type? From which supplier?&amp;quot; The tree follows the question instead of the layout.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-decomposition-tree-show&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-decomposition-tree-show&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a decomposition tree show?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Backorder %&lt;/b&gt;&lt;span&gt;all products: 6.2%&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Product type&lt;/b&gt;&lt;span&gt;Patient monitoring: 9.4% (highest)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;red&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Supplier&lt;/b&gt;&lt;span&gt;Supplier C: 14.1% (AI split: high value)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;red&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Plant&lt;/b&gt;&lt;span&gt;Plant 2: 19.8%&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One path through a tree: backorders, drilled to where they are highest&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Each level is a column of bars, one per value, sorted. The selected bar leads to the next level, and a dotted line marks where the AI split recommends looking.&lt;/p&gt;
&lt;p&gt;Microsoft's examples: a supply chain analysing the share of products on backorder, and video game sales broken down by genre, publisher and platform.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-build-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build one?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;In &lt;strong&gt;Visualizations&lt;/strong&gt; pick &lt;strong&gt;Decomposition tree&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Drag a measure (or an aggregate) to &lt;strong&gt;Analyze&lt;/strong&gt;, for example &lt;code&gt;[Backorder %]&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;Drag the dimensions people may want to break it down by to &lt;strong&gt;Explain by&lt;/strong&gt;: product type, supplier, plant, region, month. Order does not matter here.&lt;/li&gt;&lt;li&gt;Select &lt;strong&gt;+&lt;/strong&gt; next to the root and pick a dimension, or &lt;strong&gt;High value&lt;/strong&gt; / &lt;strong&gt;Low value&lt;/strong&gt; for an AI split. Continue from any bar.&lt;/li&gt;&lt;li&gt;In &lt;strong&gt;Format visual, Analysis&lt;/strong&gt;, choose &lt;strong&gt;Absolute&lt;/strong&gt; or &lt;strong&gt;Relative&lt;/strong&gt; AI splits, or turn them off. Under &lt;strong&gt;Tree&lt;/strong&gt;, lock levels so viewers cannot change or remove them (they can still add levels after the locked ones).&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;how-do-ai-splits-choose&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-ai-splits-choose&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do AI splits choose?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;High value&lt;/strong&gt;: looks at all fields in Explain by and picks the one whose top value is highest.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Low value&lt;/strong&gt;: the same for the lowest value.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Absolute&lt;/strong&gt; mode (default) picks the biggest number. &lt;strong&gt;Relative&lt;/strong&gt; mode picks the value that stands out most against the rest of its own column, which finds surprises rather than the obvious big one. Microsoft's example: drilling into Nintendo's sales, absolute picks Nintendo's own platform (no surprise), relative picks a platform that stands out against the others.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;AI levels can follow each other and mix high and low. A manual split cannot follow an AI split: making one turns the AI level into a normal level. Selecting another bar recalculates the AI levels after it.&lt;/p&gt;
&lt;h2 id=&quot;which-measures-suit-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-measures-suit-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which measures suit it?&lt;/h2&gt;
&lt;p&gt;Ratios and averages, because the question &amp;quot;where is it highest?&amp;quot; is only meaningful for them. A sum is always highest where the most rows are:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Orders = &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Orders&lt;i class=&quot;m&quot;&gt;[Order ID]&lt;/i&gt; )

Backordered Orders =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Orders]&lt;/i&gt;, Orders&lt;i class=&quot;m&quot;&gt;[Status]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Backorder&amp;quot;&lt;/i&gt; )

Backorder % =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Backordered Orders]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Orders]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Supplier&lt;/th&gt;&lt;th&gt;Orders&lt;/th&gt;&lt;th&gt;Backordered&lt;/th&gt;&lt;th&gt;Backorder %&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Supplier A&lt;/td&gt;&lt;td&gt;4,120&lt;/td&gt;&lt;td&gt;165&lt;/td&gt;&lt;td&gt;4.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Supplier B&lt;/td&gt;&lt;td&gt;2,980&lt;/td&gt;&lt;td&gt;152&lt;/td&gt;&lt;td&gt;5.1%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Supplier C&lt;/td&gt;&lt;td&gt;1,240&lt;/td&gt;&lt;td&gt;175&lt;/td&gt;&lt;td&gt;14.1%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;By backordered orders, the three suppliers look alike. By &lt;code&gt;Backorder %&lt;/code&gt;, Supplier C is the problem: one order in seven.&lt;/p&gt;
&lt;h2 id=&quot;what-are-the-limits&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-limits&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the limits?&lt;/h2&gt;
&lt;p&gt;Microsoft lists: up to 50 levels; up to 5,000 data points on the tree at once, with each level truncated to its top values. AI splits are not supported on Azure Analysis Services, on-premises Analysis Services, Power BI Report Server or Publish to web, nor for complex measures and measures from extension schemas in Analyze.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A sum in Analyze.&lt;/strong&gt; &amp;quot;Highest revenue&amp;quot; is the largest region, every time. Analyze a rate or an average.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too many Explain by fields.&lt;/strong&gt; Twenty fields make the + menu a long list and AI splits slow; keep the ones people would really ask about.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;AI splits taken as causes.&lt;/strong&gt; A high value is a place to look, not an explanation. Ask &lt;a href=&quot;/blog/key-influencers-power-bi/&quot;&gt;key influencers&lt;/a&gt; which factors move the measure.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Lost path.&lt;/strong&gt; Viewers who rebuild the tree from scratch every time miss the main path; lock the first levels.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-decomposition-tree&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create and view decomposition tree visuals in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/divide-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DIVIDE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Put one rate in Analyze, five or six dimensions in Explain by, and use a High value AI split to find the first place to look. The &lt;a href=&quot;/blog/matrix-visual-power-bi/&quot;&gt;matrix visual&lt;/a&gt; shows a fixed breakdown when the order is always the same.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Donut charts in Power BI: the center value and more</title>
    <link href="https://data.benibix.com/blog/donut-chart-power-bi/"/>
    <id>https://data.benibix.com/blog/donut-chart-power-bi/</id>
    <published>2026-10-26T12:00:00Z</published>
    <updated>2026-11-23T12:00:00Z</updated>
    <summary>What a donut chart in Power BI adds over a pie, the Center value with its own measure, label and format, the inner radius, DAX for a progress donut against a target, and when not to use one.</summary>
    <category term="Visuals"/>
    <category term="Part of a whole"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;donut chart&lt;/strong&gt; is a pie chart with a hollow centre. It reads the same way (each ring segment is a share of the whole) and follows the same rule: two to five segments. What it adds is the centre: Power BI's &lt;strong&gt;Center value&lt;/strong&gt; shows the total of the charted values in the middle, or any measure you pick, with its own label, format and background. A donut with one segment and a grey rest also makes a simple progress ring.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The chart, part by part:&lt;/strong&gt; &lt;a href=&quot;/visuals/donut-chart/&quot;&gt;What is a donut chart?&lt;/a&gt; draws its parts and shows how to read one, its kinds and the mistakes to avoid.&lt;/p&gt;
&lt;p&gt;The pie's weakness is that the reader has to look for the total somewhere else. The donut puts it where the eye already is.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-donut-chart-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-donut-chart-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a donut chart look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;donut&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;donut chart: Online shop 540; Stores 310; Marketplaces 150&quot;&gt;&lt;path d=&quot;M160 30A120 120 0 1 1 130.2 266.2L142.7 217.4A69.6 69.6 0 1 0 160 80.4Z&quot; class=&quot;m sl k0&quot;/&gt;&lt;text x=&quot;254.1&quot; y=&quot;165.9&quot; class=&quot;tp&quot; text-anchor=&quot;middle&quot;&gt;54%&lt;/text&gt;&lt;rect x=&quot;330&quot; y=&quot;111&quot; width=&quot;12&quot; height=&quot;12&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;352&quot; y=&quot;122&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Online shop&lt;/text&gt;&lt;text x=&quot;628&quot; y=&quot;122&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;540 · 54%&lt;/text&gt;&lt;path d=&quot;M130.2 266.2A120 120 0 0 1 62.9 79.5L103.7 109.1A69.6 69.6 0 0 0 142.7 217.4Z&quot; class=&quot;m sl k1&quot;/&gt;&lt;text x=&quot;70.8&quot; y=&quot;186.1&quot; class=&quot;tp&quot; text-anchor=&quot;middle&quot;&gt;31%&lt;/text&gt;&lt;rect x=&quot;330&quot; y=&quot;137&quot; width=&quot;12&quot; height=&quot;12&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;text x=&quot;352&quot; y=&quot;148&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Stores&lt;/text&gt;&lt;text x=&quot;628&quot; y=&quot;148&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;310 · 31%&lt;/text&gt;&lt;path d=&quot;M62.9 79.5A120 120 0 0 1 160 30L160 80.4A69.6 69.6 0 0 0 103.7 109.1Z&quot; class=&quot;m sl k2&quot;/&gt;&lt;text x=&quot;117&quot; y=&quot;69.5&quot; class=&quot;tp&quot; text-anchor=&quot;middle&quot;&gt;15%&lt;/text&gt;&lt;rect x=&quot;330&quot; y=&quot;163&quot; width=&quot;12&quot; height=&quot;12&quot; rx=&quot;3&quot; class=&quot;m k2&quot;/&gt;&lt;text x=&quot;352&quot; y=&quot;174&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Marketplaces&lt;/text&gt;&lt;text x=&quot;628&quot; y=&quot;174&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;150 · 15%&lt;/text&gt;&lt;text x=&quot;160&quot; y=&quot;152&quot; class=&quot;tbig&quot; text-anchor=&quot;middle&quot;&gt;1,000&lt;/text&gt;&lt;text x=&quot;160&quot; y=&quot;172&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Total&lt;/text&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Revenue by channel with the total in the centre (in thousands)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Online is more than half, and the centre says of what: 1,000 thousand.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-add-the-center-value&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-add-the-center-value&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you add the center value?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;Build the donut: &lt;strong&gt;Visualizations&lt;/strong&gt;, &lt;strong&gt;Donut chart&lt;/strong&gt;, the measure in &lt;strong&gt;Values&lt;/strong&gt;, the category in &lt;strong&gt;Legend&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;In &lt;strong&gt;Format visual&lt;/strong&gt;, on the &lt;strong&gt;Visual&lt;/strong&gt; tab, turn on &lt;strong&gt;Center value&lt;/strong&gt;. The donut shows the total of the charted values in the middle.&lt;/li&gt;&lt;li&gt;Format it: value format and display units (K, M, B), font, an optional &lt;strong&gt;Label&lt;/strong&gt; above or below the value (by default the measure's name), an &lt;strong&gt;Image&lt;/strong&gt; above or below, and a &lt;strong&gt;Background&lt;/strong&gt; colour or picture.&lt;/li&gt;&lt;li&gt;To show something other than the total, use &lt;strong&gt;Value&lt;/strong&gt;, &lt;strong&gt;Field&lt;/strong&gt;, &lt;strong&gt;Add data&lt;/strong&gt; and pick a measure.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;The center value is for donut charts only; pie charts do not have it. It follows the report: filtering, cross-highlighting, drilling and selecting a segment all update it.&lt;/p&gt;
&lt;h2 id=&quot;what-measure-belongs-in-the-centre&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-measure-belongs-in-the-centre&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What measure belongs in the centre?&lt;/h2&gt;
&lt;p&gt;The total is the default. Often a more useful number is the share of the most important segment, or a change:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Online Share =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, Channels&lt;i class=&quot;m&quot;&gt;[Channel]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Online shop&amp;quot;&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;REMOVEFILTERS&lt;/i&gt; ( Channels&lt;i class=&quot;m&quot;&gt;[Channel]&lt;/i&gt; ) )
)

Revenue vs LY =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;With &lt;code&gt;Online Share&lt;/code&gt; in the centre (54%), the donut reads as &amp;quot;online is 54% of our revenue&amp;quot;, with the split around it.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-make-a-progress-ring&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-make-a-progress-ring&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you make a progress ring?&lt;/h2&gt;
&lt;p&gt;A donut with two segments, &amp;quot;Done&amp;quot; and &amp;quot;To go&amp;quot;, becomes a progress ring for a target. It needs a tiny table with the two labels and a measure that returns the right amount for each:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Progress Parts =
&lt;i class=&quot;f&quot;&gt;DATATABLE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;&amp;quot;Part&amp;quot;&lt;/i&gt;, STRING, &lt;i class=&quot;s&quot;&gt;&amp;quot;Order&amp;quot;&lt;/i&gt;, INTEGER, { { &lt;i class=&quot;s&quot;&gt;&amp;quot;Done&amp;quot;&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; }, { &lt;i class=&quot;s&quot;&gt;&amp;quot;To go&amp;quot;&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;2&lt;/i&gt; } } )

Progress Value =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Done = &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; ToGo = &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue Target]&lt;/i&gt; - Done, &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;SWITCH&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Progress Parts'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Part]&lt;/i&gt; ), &lt;i class=&quot;s&quot;&gt;&amp;quot;Done&amp;quot;&lt;/i&gt;, Done, &lt;i class=&quot;s&quot;&gt;&amp;quot;To go&amp;quot;&lt;/i&gt;, ToGo )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Put &lt;code&gt;Progress Parts[Part]&lt;/code&gt; in &lt;strong&gt;Legend&lt;/strong&gt; and &lt;code&gt;Progress Value&lt;/code&gt; in &lt;strong&gt;Values&lt;/strong&gt;, colour &amp;quot;To go&amp;quot; grey, and show &lt;code&gt;DIVIDE ( [Revenue], [Revenue Target] )&lt;/code&gt; as the center value:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;donut&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;donut chart: Done 72; To go 28&quot;&gt;&lt;path d=&quot;M160 30A120 120 0 1 1 42.1 172.5L91.6 163A69.6 69.6 0 1 0 160 80.4Z&quot; class=&quot;m sl t-teal&quot;/&gt;&lt;text x=&quot;233&quot; y=&quot;214.4&quot; class=&quot;tp&quot; text-anchor=&quot;middle&quot;&gt;72%&lt;/text&gt;&lt;rect x=&quot;330&quot; y=&quot;124&quot; width=&quot;12&quot; height=&quot;12&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;352&quot; y=&quot;135&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Done&lt;/text&gt;&lt;text x=&quot;628&quot; y=&quot;135&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;72 · 72%&lt;/text&gt;&lt;path d=&quot;M42.1 172.5A120 120 0 0 1 160 30L160 80.4A69.6 69.6 0 0 0 91.6 163Z&quot; class=&quot;m sl t-grey&quot;/&gt;&lt;text x=&quot;87&quot; y=&quot;93.6&quot; class=&quot;tp&quot; text-anchor=&quot;middle&quot;&gt;28%&lt;/text&gt;&lt;rect x=&quot;330&quot; y=&quot;150&quot; width=&quot;12&quot; height=&quot;12&quot; rx=&quot;3&quot; class=&quot;m t-grey&quot;/&gt;&lt;text x=&quot;352&quot; y=&quot;161&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;To go&lt;/text&gt;&lt;text x=&quot;628&quot; y=&quot;161&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;28 · 28%&lt;/text&gt;&lt;text x=&quot;160&quot; y=&quot;152&quot; class=&quot;tbig&quot; text-anchor=&quot;middle&quot;&gt;100&lt;/text&gt;&lt;text x=&quot;160&quot; y=&quot;172&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Total&lt;/text&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;A progress ring: 72% of the year's target reached&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;When the target is beaten, &lt;code&gt;To go&lt;/code&gt; is 0 and the ring is full. For a progress number with more context (a target needle, minimum and maximum), the &lt;a href=&quot;/blog/gauge-chart-power-bi/&quot;&gt;gauge&lt;/a&gt; is built for it.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;More than five segments.&lt;/strong&gt; The ring makes small segments even thinner than pie slices. Group into &amp;quot;Other&amp;quot; or use a bar chart.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A centre that says something else.&lt;/strong&gt; A total in the middle of a chart filtered to one region must be that region's total; check the measure follows the same filters.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Values that are not a whole.&lt;/strong&gt; As with pies: no averages, no rates, no overlapping counts in the segments.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Several donuts to compare periods.&lt;/strong&gt; Use a 100% stacked bar instead; rings next to each other cannot be compared.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-pie-donut-chart&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create and use pie and donut charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/divide-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DIVIDE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/switch-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SWITCH function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Use a donut instead of a pie whenever a number belongs in the middle, and pick that number on purpose. The &lt;a href=&quot;/blog/pie-chart-power-bi/&quot;&gt;pie chart&lt;/a&gt; post covers slices, labels and the &amp;quot;Other&amp;quot; group in detail.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Turn a picture's style into a Power BI theme</title>
    <link href="https://data.benibix.com/blog/power-bi-theme-from-a-picture/"/>
    <id>https://data.benibix.com/blog/power-bi-theme-from-a-picture/</id>
    <published>2026-10-25T22:00:00Z</published>
    <updated>2026-10-25T22:00:00Z</updated>
    <summary>A report theme is one file that sets every colour and font in Power BI. How to take the palette from an image, check it, and write it into the theme JSON.</summary>
    <category term="Visuals"/>
    <category term="Report design"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; pick &lt;strong&gt;five to eight colours&lt;/strong&gt; from the picture (a brand photo, a poster, an illustration), check that they &lt;strong&gt;differ in lightness&lt;/strong&gt; and that text on your background passes contrast, then put them in a theme JSON as &lt;code&gt;dataColors&lt;/code&gt;, with your background, text and sentiment colours. Import it on the &lt;strong&gt;View&lt;/strong&gt; ribbon, &lt;strong&gt;Themes, Browse for themes&lt;/strong&gt;, and every visual in the report takes the style at once.&lt;/p&gt;
&lt;p&gt;Generic Power BI reports come from the default theme. A theme is a style written once and applied to every visual, and a picture whose mood fits the report is a quick place to find one.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-get-from-a-picture-to-a-theme&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-get-from-a-picture-to-a-theme&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you get from a picture to a theme?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Pick the picture&lt;/b&gt;&lt;span&gt;one image whose mood fits the report&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Take the colours&lt;/b&gt;&lt;span&gt;five to eight, with an eyedropper or a palette tool&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Check them&lt;/b&gt;&lt;span&gt;lightness steps, contrast on the background, colour blind safety&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Write the JSON&lt;/b&gt;&lt;span&gt;dataColors, background, foreground, good, neutral, bad&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Import&lt;/b&gt;&lt;span&gt;View, Themes, Browse for themes&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From an image to a report theme&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-does-the-theme-file-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-the-theme-file-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does the theme file look like?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;json&quot;&gt;&lt;code&gt;{
  &lt;i class=&quot;s&quot;&gt;&amp;quot;name&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;Harbour at dusk&amp;quot;&lt;/i&gt;,
  &lt;i class=&quot;s&quot;&gt;&amp;quot;dataColors&amp;quot;&lt;/i&gt;: [&lt;i class=&quot;s&quot;&gt;&amp;quot;#2F5D8A&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#E39A6C&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#7FB7BE&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#D9C27A&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#8C6FA8&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#4E8C5B&amp;quot;&lt;/i&gt;],
  &lt;i class=&quot;s&quot;&gt;&amp;quot;background&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;#FFFFFF&amp;quot;&lt;/i&gt;,
  &lt;i class=&quot;s&quot;&gt;&amp;quot;foreground&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;#1F2A44&amp;quot;&lt;/i&gt;,
  &lt;i class=&quot;s&quot;&gt;&amp;quot;tableAccent&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;#2F5D8A&amp;quot;&lt;/i&gt;,
  &lt;i class=&quot;s&quot;&gt;&amp;quot;good&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;#4E8C5B&amp;quot;&lt;/i&gt;,
  &lt;i class=&quot;s&quot;&gt;&amp;quot;neutral&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;#D9C27A&amp;quot;&lt;/i&gt;,
  &lt;i class=&quot;s&quot;&gt;&amp;quot;bad&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;#B5523B&amp;quot;&lt;/i&gt;
}&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The first colour in &lt;code&gt;dataColors&lt;/code&gt; goes to the first series in every chart, so put the colour you want to see most first.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-check-the-colours&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-check-the-colours&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you check the colours?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Lightness:&lt;/strong&gt; turn the picture grey in your head; if two colours become the same grey, readers with colour blindness may not tell them apart.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Contrast:&lt;/strong&gt; text and numbers need a contrast of at least 4.5 to 1 against the background.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Meaning:&lt;/strong&gt; keep green for good and red for bad only if you also show the meaning another way, with a label or an icon.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-report-themes&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Use report themes in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/report-themes-create-custom&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create custom report themes in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Every field in the file is explained in &lt;a href=&quot;/blog/report-theme-json-power-bi/&quot;&gt;the report theme JSON&lt;/a&gt;. To build the theme with your palette, fonts and contrast checks in the browser, use &lt;a href=&quot;https://tools.benibix.com/data/report-design-studio/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Report Design Studio&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Claude Code for data analysts: what it can do for you</title>
    <link href="https://data.benibix.com/blog/claude-code-for-data-analysts/"/>
    <id>https://data.benibix.com/blog/claude-code-for-data-analysts/</id>
    <published>2026-10-25T18:57:00Z</published>
    <updated>2026-10-25T18:57:00Z</updated>
    <summary>Claude Code is Anthropic's coding agent: it reads files, edits them and runs commands, and it asks before it acts. What that means for SQL, Python, DAX and CSV work, five jobs it does well, and where to keep a person in the loop.</summary>
    <category term="AI"/>
    <category term="Claude Code"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; Claude Code is Anthropic's AI coding agent. You start it in a project folder and ask in plain English; it &lt;strong&gt;reads the files&lt;/strong&gt; it needs, &lt;strong&gt;proposes and makes changes&lt;/strong&gt;, and &lt;strong&gt;runs commands&lt;/strong&gt; such as a Python script or a SQL client, &lt;strong&gt;asking before it acts&lt;/strong&gt; unless you allow more. For data work that means it can profile a CSV, write and test a query, refactor a notebook, document a model, or turn a one-off analysis into a script you can run again.&lt;/p&gt;
&lt;p&gt;Chat assistants answer questions about code you paste in. Claude Code works where your files are: it can open the 40 SQL files in a repository, run the tests and fix what fails. For analysts who keep their work in folders, that is the difference.&lt;/p&gt;
&lt;h2 id=&quot;what-can-it-do-with-data-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-can-it-do-with-data-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What can it do with data work?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:4&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Profile a file&lt;/b&gt;&lt;span&gt;&amp;quot;Load sales.csv with pandas and tell me row count, types, blanks and odd values&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Write and test a query&lt;/b&gt;&lt;span&gt;write SQL against your schema files, run it on a test database, fix what fails&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Tidy a notebook&lt;/b&gt;&lt;span&gt;turn a long notebook into functions and a script that runs end to end&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Document&lt;/b&gt;&lt;span&gt;write a data dictionary from your table definitions and DAX measures&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Automate&lt;/b&gt;&lt;span&gt;turn the monthly copy and paste into a script you run with one command&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Five data jobs Claude Code does well&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-does-it-work-in-one-session&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-it-work-in-one-session&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does it work, in one session?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;You ask&lt;/b&gt;&lt;span&gt;&amp;quot;Find why revenue in monthly_report.sql is 3% higher than the finance figure&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;It reads&lt;/b&gt;&lt;span&gt;the query, the schema files, the notes in CLAUDE.md&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;It proposes&lt;/b&gt;&lt;span&gt;&amp;quot;the join to returns repeats rows for split shipments&amp;quot; and the fix&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;It runs&lt;/b&gt;&lt;span&gt;the query on the test data, with your permission&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;You decide&lt;/b&gt;&lt;span&gt;keep the change, or ask for another approach&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One Claude Code session on a data project&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;where-should-a-person-stay-in-the-loop&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-should-a-person-stay-in-the-loop&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where should a person stay in the loop?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Production data.&lt;/strong&gt; Give it a test database or a sample, not write access to the warehouse.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Numbers that go to people.&lt;/strong&gt; Check one figure by hand before a report goes out.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Permissions.&lt;/strong&gt; Keep the default (it asks first) until you trust a command, then allow that command only.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-do-you-need-to-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-do-you-need-to-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What do you need to start?&lt;/h2&gt;
&lt;p&gt;A Pro, Max, Ultra, Team or Enterprise plan, or a Claude Console account; the free Claude plan does not include it. Install it with one line, open a terminal in your project, and type &lt;code&gt;claude&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Overview&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://code.claude.com/docs/en/setup&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Claude Code docs: Set up Claude Code&lt;/a&gt;, install and plans&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Try a first task on a CSV with &lt;a href=&quot;/blog/profile-a-csv-with-claude-code/&quot;&gt;profile a CSV with Claude Code&lt;/a&gt;, then give it your project's rules in &lt;a href=&quot;/blog/claude-md-for-a-data-repo/&quot;&gt;a CLAUDE.md for a data repository&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Customer retention by cohort in Power BI with DAX</title>
    <link href="https://data.benibix.com/blog/customer-retention-cohort-kpi/"/>
    <id>https://data.benibix.com/blog/customer-retention-cohort-kpi/</id>
    <published>2026-10-25T12:00:00Z</published>
    <updated>2026-10-25T12:00:00Z</updated>
    <summary>How to build a cohort retention analysis in Power BI, customers grouped by the month of their first purchase, the share still buying in month 1, 2, 3 and later, a cohort triangle matrix with a heat map, retention curves, the DAX with a first-purchase column and a months-since axis, and how to read the result.</summary>
    <category term="KPIs"/>
    <category term="Customers"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;cohort&lt;/strong&gt; is the group of customers who first bought (or signed up) in the same month. &lt;strong&gt;Retention&lt;/strong&gt; in month n = customers of the cohort active in the n-th month after their first / the cohort's size. Shown as a &lt;strong&gt;triangle&lt;/strong&gt; (cohorts down, months since first purchase across, a heat-map colour), it answers two questions a single churn number cannot: &lt;strong&gt;when&lt;/strong&gt; in their life customers leave, and whether &lt;strong&gt;newer cohorts&lt;/strong&gt; stay better than older ones.&lt;/p&gt;
&lt;p&gt;A churn rate of 3% mixes customers in their first month with customers of five years. Cohorts separate them, so you can see whether last quarter's onboarding change actually kept people.&lt;/p&gt;
&lt;h2 id=&quot;how-does-a-cohort-triangle-look&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-a-cohort-triangle-look&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does a cohort triangle look?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Cohort&lt;/th&gt;&lt;th&gt;Size&lt;/th&gt;&lt;th&gt;M0&lt;/th&gt;&lt;th&gt;M1&lt;/th&gt;&lt;th&gt;M2&lt;/th&gt;&lt;th&gt;M3&lt;/th&gt;&lt;th&gt;M4&lt;/th&gt;&lt;th&gt;M5&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Apr 2026&lt;/td&gt;&lt;td&gt;410&lt;/td&gt;&lt;td&gt;100%&lt;/td&gt;&lt;td&gt;38%&lt;/td&gt;&lt;td&gt;29%&lt;/td&gt;&lt;td&gt;25%&lt;/td&gt;&lt;td&gt;23%&lt;/td&gt;&lt;td&gt;22%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;May 2026&lt;/td&gt;&lt;td&gt;380&lt;/td&gt;&lt;td&gt;100%&lt;/td&gt;&lt;td&gt;36%&lt;/td&gt;&lt;td&gt;28%&lt;/td&gt;&lt;td&gt;24%&lt;/td&gt;&lt;td&gt;22%&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Jun 2026&lt;/td&gt;&lt;td&gt;450&lt;/td&gt;&lt;td&gt;100%&lt;/td&gt;&lt;td&gt;41%&lt;/td&gt;&lt;td&gt;32%&lt;/td&gt;&lt;td&gt;28%&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Jul 2026&lt;/td&gt;&lt;td&gt;500&lt;/td&gt;&lt;td&gt;100%&lt;/td&gt;&lt;td&gt;44%&lt;/td&gt;&lt;td&gt;35%&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Aug 2026&lt;/td&gt;&lt;td&gt;520&lt;/td&gt;&lt;td&gt;100%&lt;/td&gt;&lt;td&gt;45%&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sep 2026&lt;/td&gt;&lt;td&gt;480&lt;/td&gt;&lt;td&gt;100%&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Share of each cohort buying again, by months since first purchase&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Read across a row for one cohort's life; read down a column to compare cohorts at the same age. Here month-1 retention rose from 36 to 45% from June: something changed for the better.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;line&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;Apr&lt;/li&gt;&lt;li class=&quot;k1&quot;&gt;May&lt;/li&gt;&lt;li class=&quot;k2&quot;&gt;Jun&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;line chart: M0 100, 100, 100; M1 38, 36, 41; M2 29, 28, 32; M3 25, 24, 28&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;626&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;20&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;626&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;40&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;626&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;60&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;626&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;80&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;626&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;polyline points=&quot;52,14 243.3,162.7 434.7,185.4 626,195.4&quot; class=&quot;ln k2&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;14&quot; r=&quot;3.5&quot; class=&quot;dt k2&quot;/&gt;&lt;circle cx=&quot;243.3&quot; cy=&quot;162.7&quot; r=&quot;3.5&quot; class=&quot;dt k2&quot;/&gt;&lt;circle cx=&quot;434.7&quot; cy=&quot;185.4&quot; r=&quot;3.5&quot; class=&quot;dt k2&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;195.4&quot; r=&quot;3.5&quot; class=&quot;dt k2&quot;/&gt;&lt;polyline points=&quot;52,14 243.3,175.3 434.7,195.4 626,205.5&quot; class=&quot;ln k1&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;14&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;243.3&quot; cy=&quot;175.3&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;434.7&quot; cy=&quot;195.4&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;205.5&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;polyline points=&quot;52,14 243.3,170.2 434.7,192.9 626,203&quot; class=&quot;ln k0&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;14&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;243.3&quot; cy=&quot;170.2&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;434.7&quot; cy=&quot;192.9&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;203&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;text x=&quot;52&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;M0&lt;/text&gt;&lt;text x=&quot;243.3&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;M1&lt;/text&gt;&lt;text x=&quot;434.7&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;M2&lt;/text&gt;&lt;text x=&quot;626&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;M3&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Retention curves by cohort (%)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;Add two calculated columns to Sales (or build them in Power Query), and a small axis table:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- calculated columns on Sales&lt;/i&gt;
First Purchase Month =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; C = Sales&lt;i class=&quot;m&quot;&gt;[Customer ID]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;EOMONTH&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( Sales ), Sales&lt;i class=&quot;m&quot;&gt;[Customer ID]&lt;/i&gt; = C ), -&lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; ) + &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;

Months Since First =
( &lt;i class=&quot;f&quot;&gt;YEAR&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) - &lt;i class=&quot;f&quot;&gt;YEAR&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[First Purchase Month]&lt;/i&gt; ) ) * &lt;i class=&quot;n&quot;&gt;12&lt;/i&gt;
    + &lt;i class=&quot;f&quot;&gt;MONTH&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) - &lt;i class=&quot;f&quot;&gt;MONTH&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[First Purchase Month]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- calculated table for the columns of the matrix&lt;/i&gt;
Cohort Age = &lt;i class=&quot;f&quot;&gt;GENERATESERIES&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;24&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Put &lt;code&gt;Sales[First Purchase Month]&lt;/code&gt; on the matrix rows and &lt;code&gt;'Cohort Age'[Value]&lt;/code&gt; on its columns (no relationship), then:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Cohort Size =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Customer ID]&lt;/i&gt; ), Sales&lt;i class=&quot;m&quot;&gt;[Months Since First]&lt;/i&gt; = &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; )

Active in Month n =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; N = &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Cohort Age'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Value]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Customer ID]&lt;/i&gt; ), Sales&lt;i class=&quot;m&quot;&gt;[Months Since First]&lt;/i&gt; = N )

Retention % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Active in Month n]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Cohort Size]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Apply a background colour scale to Retention % for the heat map (&lt;a href=&quot;/blog/conditional-formatting-power-bi/&quot;&gt;conditional formatting&lt;/a&gt;). Remove any Date slicer from the page, or filter only on First Purchase Month, because a date filter would cut off the later months of each cohort.&lt;/p&gt;
&lt;h2 id=&quot;what-does-active-mean&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-active-mean&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does &amp;quot;active&amp;quot; mean?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Shops&lt;/strong&gt;: bought at least once in that month (as above).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Subscriptions&lt;/strong&gt;: still subscribed at the end of the month; use start and end dates instead of orders.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Apps&lt;/strong&gt;: used the product in that month or week (see &lt;a href=&quot;/blog/dau-mau-stickiness-kpi/&quot;&gt;DAU/MAU&lt;/a&gt;).&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Unbounded retention (&amp;quot;bought in month n &lt;strong&gt;or later&lt;/strong&gt;&amp;quot;) is smoother and suits products bought rarely.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Date slicers on the page.&lt;/strong&gt; They cut cohorts short; filter by cohort month only.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Incomplete months.&lt;/strong&gt; The newest cohort's last column is a partial month; hide ages that have not fully passed.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Tiny cohorts.&lt;/strong&gt; 30 customers swing by 3 points per customer; show the size column.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Calculated columns on huge tables.&lt;/strong&gt; For millions of rows, compute first purchase month in Power Query or the source.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/generateseries-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: GENERATESERIES function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Apply conditional formatting in tables and matrixes&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/eomonth-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: EOMONTH function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Build the triangle for the last twelve monthly cohorts and compare month-1 retention down the column. &lt;a href=&quot;/blog/customer-lifetime-value-kpi/&quot;&gt;Customer lifetime value&lt;/a&gt; turns retention into money.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>DAX user-defined functions (UDFs) with examples</title>
    <link href="https://data.benibix.com/blog/dax-user-defined-functions/"/>
    <id>https://data.benibix.com/blog/dax-user-defined-functions/</id>
    <published>2026-10-25T12:00:00Z</published>
    <updated>2026-10-25T12:00:00Z</updated>
    <summary>How to write DAX user-defined functions with the FUNCTION keyword, parameters and type hints (Scalar, Table, ColumnRef, MeasureRef), val and expr passing modes, defaults, where to define them (DAX query view, TMDL view), and examples for tax, growth and safe percentages.</summary>
    <category term="DAX"/>
    <category term="Concepts"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;user-defined function&lt;/strong&gt; (UDF) packages DAX logic under a name, with parameters, and you call it like a built-in function: &lt;code&gt;AddTax ( [Revenue] )&lt;/code&gt;. Define it with &lt;code&gt;FUNCTION Name = ( param : type ) =&amp;gt; body&lt;/code&gt; in &lt;strong&gt;DAX query view&lt;/strong&gt; or &lt;strong&gt;TMDL view&lt;/strong&gt;, and save it to the model. Parameters can carry &lt;strong&gt;type hints&lt;/strong&gt; (Scalar with subtypes like Numeric or String, Table, or references like ColumnRef and MeasureRef) and a &lt;strong&gt;passing mode&lt;/strong&gt;: &lt;code&gt;val&lt;/code&gt; evaluates the argument once before the call, &lt;code&gt;expr&lt;/code&gt; passes the expression to be evaluated inside the function, in its context.&lt;/p&gt;
&lt;p&gt;Before UDFs, the same &amp;quot;growth against last year&amp;quot; logic was copied into twenty measures, each slightly different. A function writes it once; every measure calls it, and a fix lands everywhere.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-function-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-function-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a function look like?&lt;/h2&gt;
&lt;p&gt;Based on Microsoft's tax example, in DAX query view:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;DEFINE
    &lt;i class=&quot;c&quot;&gt;/// AddTax takes in amount and returns amount including tax&lt;/i&gt;
    &lt;i class=&quot;c&quot;&gt;/// @param {NUMERIC} amount - The pre-tax value&lt;/i&gt;
    &lt;i class=&quot;c&quot;&gt;/// @param {NUMERIC} [taxRate] - Optional tax rate, default 0.1&lt;/i&gt;
    FUNCTION AddTax =
        ( amount : NUMERIC, taxRate : NUMERIC = &lt;i class=&quot;n&quot;&gt;0.1&lt;/i&gt; ) =&amp;gt;
            amount * ( &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; + taxRate )

EVALUATE
{ &lt;i class=&quot;f&quot;&gt;AddTax&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;10&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;AddTax&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;10&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;0.2&lt;/i&gt; ) }
&lt;i class=&quot;c&quot;&gt;// Returns 11 and 12&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The general form:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;FUNCTION &amp;lt;Name&amp;gt; = ( &amp;lt;param&amp;gt; : &amp;lt;type&amp;gt; &amp;lt;subtype&amp;gt; &amp;lt;mode&amp;gt; = &amp;lt;default&amp;gt;, ... ) =&amp;gt; &amp;lt;body&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Save it with &lt;strong&gt;Update model: Add new function&lt;/strong&gt; (CodeLens above it) or &lt;strong&gt;Update model with changes&lt;/strong&gt;. In TMDL view the keyword is lowercase &lt;code&gt;function&lt;/code&gt;, and in a Power BI project the functions live in &lt;code&gt;functions.tmdl&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;which-parameter-types-are-there&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-parameter-types-are-there&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which parameter types are there?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Hint&lt;/th&gt;&lt;th&gt;Accepts&lt;/th&gt;&lt;th&gt;Passing&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;AnyVal (default)&lt;/td&gt;&lt;td&gt;a scalar or a table&lt;/td&gt;&lt;td&gt;val&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Scalar, with subtype Variant, Int64, Decimal, Double, String, DateTime, Boolean, Numeric&lt;/td&gt;&lt;td&gt;one value&lt;/td&gt;&lt;td&gt;val or expr&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Table&lt;/td&gt;&lt;td&gt;a table&lt;/td&gt;&lt;td&gt;val or expr&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;AnyRef, ColumnRef, MeasureRef, TableRef, CalendarRef&lt;/td&gt;&lt;td&gt;a reference&lt;/td&gt;&lt;td&gt;expr only&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Parameter type hints&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;val&lt;/strong&gt; (eager): the argument is evaluated once, in the caller's context, and the value is passed in.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;expr&lt;/strong&gt; (lazy): the expression is passed unevaluated, and the function evaluates it where it wants, for example inside &lt;code&gt;CALCULATE&lt;/code&gt; with another filter. Time intelligence functions need this.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;A function takes 0 to 256 parameters. A default makes a parameter optional: &lt;code&gt;( rate : NUMERIC = 0.2 )&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-are-useful-examples&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-useful-examples&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are useful examples?&lt;/h2&gt;
&lt;p&gt;Growth against the same period last year, for any measure:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;FUNCTION GrowthVsLY =
    ( m : SCALAR NUMERIC EXPR, dateCol : COLUMNREF ) =&amp;gt;
        &lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Cur = m
        &lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; LY = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( m, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( dateCol ) )
        &lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( Cur - LY, LY )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue Growth % = &lt;i class=&quot;f&quot;&gt;GrowthVsLY&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
Orders Growth % = &lt;i class=&quot;f&quot;&gt;GrowthVsLY&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Orders]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;m&lt;/code&gt; must be &lt;code&gt;expr&lt;/code&gt;: with &lt;code&gt;val&lt;/code&gt;, it would be evaluated once in the current context, and &lt;code&gt;CALCULATE&lt;/code&gt; could not shift it to last year (the same trap as with &lt;a href=&quot;/blog/dax-variables-var-return/&quot;&gt;variables&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;A share of a parent level:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;FUNCTION ShareOf =
    ( m : SCALAR NUMERIC EXPR, col : COLUMNREF ) =&amp;gt;
        &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( m, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( m, &lt;i class=&quot;f&quot;&gt;REMOVEFILTERS&lt;/i&gt; ( col ) ) )

Share of Category = &lt;i class=&quot;f&quot;&gt;ShareOf&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-do-you-name-and-document-them&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-name-and-document-them&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you name and document them?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;Names may use letters, digits, underscores and &lt;strong&gt;dots for namespaces&lt;/strong&gt; (&lt;code&gt;Finance.GrowthVsLY&lt;/code&gt;); no spaces; not a built-in function name or reserved word.&lt;/li&gt;&lt;li&gt;Document with &lt;code&gt;///&lt;/code&gt; above the function, with JSDoc-style tags like &lt;code&gt;@param&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;code&gt;INFO.USERDEFINEDFUNCTIONS()&lt;/code&gt; lists the functions in a model.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-are-the-limits&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-limits&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the limits?&lt;/h2&gt;
&lt;p&gt;From Microsoft's list: functions cannot be hidden, placed in display folders or translated; models without tables do not support them; DAX query view has no &amp;quot;define with references&amp;quot; for them; in a live-connected model they do not show in Model explorer.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;val&lt;/code&gt; where &lt;code&gt;expr&lt;/code&gt; is needed.&lt;/strong&gt; The argument is fixed before the call; context changes inside do nothing.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Missing type hints.&lt;/strong&gt; Without hints a parameter is AnyVal (val); add hints so wrong arguments fail early.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;One function per measure.&lt;/strong&gt; Write functions for logic that repeats; a single-use function only adds a layer.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/best-practices/dax-user-defined-functions&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DAX user-defined functions&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/dax-query-view&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Work with DAX query view&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-tmdl-view&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Work with TMDL view&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Find one calculation copied into several measures (growth, share, safe percentage), write it as a function in DAX query view, and call it from two measures. &lt;a href=&quot;/blog/dax-query-view-evaluate/&quot;&gt;DAX queries&lt;/a&gt; explains the editor you write it in.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>DIVIDE in DAX: safe division and when to use /</title>
    <link href="https://data.benibix.com/blog/divide-dax/"/>
    <id>https://data.benibix.com/blog/divide-dax/</id>
    <published>2026-10-25T12:00:00Z</published>
    <updated>2026-10-25T12:00:00Z</updated>
    <summary>How DIVIDE handles division by zero and BLANK in DAX, the alternate result, why returning BLANK is usually better than 0, when the / operator is the better choice, ratio measures done right (margin %, conversion rate, per customer), and common mistakes.</summary>
    <category term="DAX"/>
    <category term="Logic and information"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;code&gt;DIVIDE ( numerator, denominator [, alternate] )&lt;/code&gt; divides and returns BLANK (or the alternate result) when the denominator is 0 or BLANK, instead of an error or infinity. Microsoft's guidance: use &lt;code&gt;DIVIDE&lt;/code&gt; whenever the denominator is an expression that could be zero or blank, use the &lt;code&gt;/&lt;/code&gt; operator when the denominator is a constant (&lt;code&gt;[Revenue] / 1000&lt;/code&gt;), and think twice before passing an alternate such as 0, because visuals hide rows where measures are BLANK.&lt;/p&gt;
&lt;p&gt;Every ratio in a report (margin %, conversion rate, revenue per customer, growth) is a division, and every one meets a zero somewhere: a new product with no last year, a day without visits.&lt;/p&gt;
&lt;h2 id=&quot;what-does-divide-return&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-divide-return&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does DIVIDE return?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Numerator&lt;/th&gt;&lt;th&gt;Denominator&lt;/th&gt;&lt;th&gt;numerator / denominator&lt;/th&gt;&lt;th&gt;DIVIDE&lt;/th&gt;&lt;th&gt;DIVIDE with alternate 0&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;50&lt;/td&gt;&lt;td&gt;200&lt;/td&gt;&lt;td&gt;0.25&lt;/td&gt;&lt;td&gt;0.25&lt;/td&gt;&lt;td&gt;0.25&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;50&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;Infinity&lt;/td&gt;&lt;td&gt;BLANK&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;NaN&lt;/td&gt;&lt;td&gt;BLANK&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;50&lt;/td&gt;&lt;td&gt;BLANK&lt;/td&gt;&lt;td&gt;Infinity&lt;/td&gt;&lt;td&gt;BLANK&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;BLANK&lt;/td&gt;&lt;td&gt;200&lt;/td&gt;&lt;td&gt;BLANK&lt;/td&gt;&lt;td&gt;BLANK&lt;/td&gt;&lt;td&gt;BLANK&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;DIVIDE against the / operator&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;code&gt;5 / BLANK&lt;/code&gt; is Infinity and &lt;code&gt;0 / BLANK&lt;/code&gt; is NaN in DAX (Microsoft's data types table); &lt;code&gt;DIVIDE&lt;/code&gt; avoids both.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-write-ratio-measures&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-write-ratio-measures&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you write ratio measures?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Margin % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Cost]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )

Conversion Rate = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Orders]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Sessions]&lt;/i&gt; )

Revenue per Customer = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Customers]&lt;/i&gt; )

Revenue vs LY % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- a constant denominator: use the operator&lt;/i&gt;
Revenue K = &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; / &lt;i class=&quot;n&quot;&gt;1000&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Divide &lt;strong&gt;aggregates&lt;/strong&gt;, never sum or average a ratio column: the margin of a total is total margin over total revenue, not the average of line margins (see &lt;a href=&quot;/blog/measures-vs-calculated-columns-dax/&quot;&gt;measures vs calculated columns&lt;/a&gt;).&lt;/p&gt;
&lt;h2 id=&quot;when-is-an-alternate-result-right&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-an-alternate-result-right&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is an alternate result right?&lt;/h2&gt;
&lt;p&gt;Microsoft's recommendation is that measures usually return BLANK, because visuals remove groupings where all measures are BLANK. An alternate of 0 brings back every empty combination as a row of zeros. Use an alternate when:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;a card must show a number, not &amp;quot;(Blank)&amp;quot;: &lt;code&gt;DIVIDE ( [Returns], [Orders], 0 )&lt;/code&gt;,&lt;/li&gt;&lt;li&gt;a downstream calculation needs a number,&lt;/li&gt;&lt;li&gt;zero is the true answer (no orders, so no returns rate is meaningful as 0%).&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;/&lt;/code&gt; with measure denominators.&lt;/strong&gt; Infinity or errors appear in visuals; use &lt;code&gt;DIVIDE&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;DIVIDE&lt;/code&gt; with constants.&lt;/strong&gt; Unnecessary checks; use &lt;code&gt;/&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Alternate 0 everywhere.&lt;/strong&gt; Long tables full of zero rows and slower visuals.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Growth from a blank base.&lt;/strong&gt; &lt;code&gt;DIVIDE&lt;/code&gt; returns BLANK for new items; label them &amp;quot;new&amp;quot; with an &lt;code&gt;IF ( ISBLANK ( [Revenue LY] ), ... )&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Ratios of ratios.&lt;/strong&gt; Averaging percentages weights small groups like big ones; divide totals.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/divide-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DIVIDE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/best-practices/dax-divide-function-operator&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DIVIDE function vs divide operator&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-data-types&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Data types in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Search your measures for &lt;code&gt; / [&lt;/code&gt; and replace each measure denominator with &lt;code&gt;DIVIDE&lt;/code&gt;. &lt;a href=&quot;/blog/if-switch-dax/&quot;&gt;IF and SWITCH&lt;/a&gt; covers the other conditions around ratios.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Funnel charts in Power BI: stages, drop-off, conversion</title>
    <link href="https://data.benibix.com/blog/funnel-chart-power-bi/"/>
    <id>https://data.benibix.com/blog/funnel-chart-power-bi/</id>
    <published>2026-10-25T12:00:00Z</published>
    <updated>2026-10-25T12:00:00Z</updated>
    <summary>How a funnel chart in Power BI shows a process through its stages, the conversion rate and stage-to-stage drop rate in its tooltip, the Category and Values fields, the DAX for each rate, and the mistakes that break a funnel.</summary>
    <category term="Visuals"/>
    <category term="Part of a whole"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;funnel chart&lt;/strong&gt; shows a process with stages in a fixed order, each stage a bar centred on the one above, so the shape shows where people drop out: visits, product views, cart, checkout, order. Put the stage in &lt;strong&gt;Category&lt;/strong&gt; and a count in &lt;strong&gt;Values&lt;/strong&gt;. Hover a stage and Power BI shows its value, the overall conversion (&lt;strong&gt;% of the first stage&lt;/strong&gt;) and the &lt;strong&gt;stage-to-stage&lt;/strong&gt; rate (% of the previous stage). Microsoft recommends at least four stages, with the first larger than the last.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The chart, part by part:&lt;/strong&gt; &lt;a href=&quot;/visuals/funnel-chart/&quot;&gt;What is a funnel chart?&lt;/a&gt; draws its parts and shows how to read one, its kinds and the mistakes to avoid.&lt;/p&gt;
&lt;p&gt;A table that says &amp;quot;480 orders from 10,000 visits&amp;quot; gives a conversion rate of 4.8%. It does not say where the other 9,520 went. The funnel shows that most left before looking at a product, and that the cart step lost two thirds.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-funnel-chart-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-funnel-chart-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a funnel chart look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;funnel&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;funnel chart: Visits 10K; Product views 4,200; Add to cart 1,300; Checkout started 620; Orders 480&quot;&gt;&lt;rect x=&quot;150&quot; y=&quot;13.5&quot; width=&quot;420&quot; height=&quot;42.6&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;360&quot; y=&quot;38.8&quot; class=&quot;tin3&quot; text-anchor=&quot;middle&quot;&gt;10K&lt;/text&gt;&lt;text x=&quot;12&quot; y=&quot;38.8&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Visits&lt;/text&gt;&lt;rect x=&quot;271.8&quot; y=&quot;71.1&quot; width=&quot;176.4&quot; height=&quot;42.6&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;360&quot; y=&quot;96.4&quot; class=&quot;tin3&quot; text-anchor=&quot;middle&quot;&gt;4,200&lt;/text&gt;&lt;text x=&quot;12&quot; y=&quot;96.4&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Product views&lt;/text&gt;&lt;text x=&quot;632&quot; y=&quot;96.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;42%&lt;/text&gt;&lt;rect x=&quot;332.7&quot; y=&quot;128.7&quot; width=&quot;54.6&quot; height=&quot;42.6&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;395.3&quot; y=&quot;154&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;1,300&lt;/text&gt;&lt;text x=&quot;12&quot; y=&quot;154&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Add to cart&lt;/text&gt;&lt;text x=&quot;632&quot; y=&quot;154&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;13%&lt;/text&gt;&lt;rect x=&quot;347&quot; y=&quot;186.3&quot; width=&quot;26&quot; height=&quot;42.6&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;381&quot; y=&quot;211.6&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;620&lt;/text&gt;&lt;text x=&quot;12&quot; y=&quot;211.6&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Checkout started&lt;/text&gt;&lt;text x=&quot;632&quot; y=&quot;211.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;6%&lt;/text&gt;&lt;rect x=&quot;349.9&quot; y=&quot;243.9&quot; width=&quot;20.2&quot; height=&quot;42.6&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;378.1&quot; y=&quot;269.2&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;480&lt;/text&gt;&lt;text x=&quot;12&quot; y=&quot;269.2&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Orders&lt;/text&gt;&lt;text x=&quot;632&quot; y=&quot;269.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;5%&lt;/text&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;An online shop's month, from visit to order&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The percentages on the right are of the first stage. The widest drop in absolute numbers is the first one; the most telling rate is Product views to Add to cart, where only 31% go on.&lt;/p&gt;
&lt;h2 id=&quot;when-is-it-the-right-chart&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-it-the-right-chart&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is it the right chart?&lt;/h2&gt;
&lt;p&gt;Microsoft's list: progress of sequential data through at least four stages; items where the first stage is larger than the last; potential (revenue, deals) by stage; conversion and retention rates; bottlenecks in a linear process; a shopping cart's workflow; and click-through campaigns. A sales pipeline is the classic case: lead, qualified lead, proposal, contract, closed.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-build-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build one?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;In &lt;strong&gt;Visualizations&lt;/strong&gt; pick &lt;strong&gt;Funnel&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Drag the stage to &lt;strong&gt;Category&lt;/strong&gt; and the count (a measure) to &lt;strong&gt;Values&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Sort the stages in process order, not by value: give the stage table a &lt;code&gt;Stage Order&lt;/code&gt; column and use &lt;strong&gt;Sort by column&lt;/strong&gt; on the stage name.&lt;/li&gt;&lt;li&gt;Turn on &lt;strong&gt;Data labels&lt;/strong&gt; and &lt;strong&gt;Conversion rate label&lt;/strong&gt; in &lt;strong&gt;Format visual&lt;/strong&gt; to show the overall rate on the chart.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Hover a bar for the tooltip: stage name, its value, the % of the first stage and the stage-to-stage rate (Microsoft also calls this the drop rate). Selecting a stage cross-filters or highlights the other visuals on the page; Ctrl plus select picks several stages.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-calculate-the-rates-in-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-calculate-the-rates-in-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you calculate the rates in DAX?&lt;/h2&gt;
&lt;p&gt;The funnel shows them on hover. For a table, a card or a KPI they need measures. With a &lt;code&gt;Stages&lt;/code&gt; table (&lt;code&gt;Stage&lt;/code&gt;, &lt;code&gt;Stage Order&lt;/code&gt;) and a fact table of events counted per stage:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Stage Count = &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Events&lt;i class=&quot;m&quot;&gt;[Session ID]&lt;/i&gt; )

First Stage Count =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Stage Count]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Stages'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Stage Order]&lt;/i&gt; = &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;REMOVEFILTERS&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Stages'&lt;/i&gt; ) )

% of First Stage =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Stage Count]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[First Stage Count]&lt;/i&gt; )

Previous Stage Count =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; ThisOrder = &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Stages'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Stage Order]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Stage Count]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Stages'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Stage Order]&lt;/i&gt; = ThisOrder - &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;REMOVEFILTERS&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Stages'&lt;/i&gt; ) )

% of Previous Stage =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Stage Count]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Previous Stage Count]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Stage&lt;/th&gt;&lt;th&gt;Stage Count&lt;/th&gt;&lt;th&gt;% of First Stage&lt;/th&gt;&lt;th&gt;% of Previous Stage&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Visits&lt;/td&gt;&lt;td&gt;10,000&lt;/td&gt;&lt;td&gt;100%&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Product views&lt;/td&gt;&lt;td&gt;4,200&lt;/td&gt;&lt;td&gt;42%&lt;/td&gt;&lt;td&gt;42%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Add to cart&lt;/td&gt;&lt;td&gt;1,300&lt;/td&gt;&lt;td&gt;13%&lt;/td&gt;&lt;td&gt;31%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Checkout started&lt;/td&gt;&lt;td&gt;620&lt;/td&gt;&lt;td&gt;6.2%&lt;/td&gt;&lt;td&gt;48%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Orders&lt;/td&gt;&lt;td&gt;480&lt;/td&gt;&lt;td&gt;4.8%&lt;/td&gt;&lt;td&gt;77%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;The weakest step is the one with the lowest &lt;code&gt;% of Previous Stage&lt;/code&gt;: here, product view to cart at 31%. That is where the work is.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Stages sorted by value.&lt;/strong&gt; Usually the same as the process order, until a later stage is bigger than an earlier one (a promotion sends people straight to checkout); then the funnel reorders itself. Always sort by a stage order column.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Counting events instead of people.&lt;/strong&gt; One person who views ten products counts ten times in &amp;quot;Product views&amp;quot;. Count distinct sessions or customers in every stage.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Stages from different periods.&lt;/strong&gt; Leads from March and deals closed in March are not the same people. For a true conversion, count each cohort through all its stages.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Fewer than four stages.&lt;/strong&gt; Two or three numbers read better as cards with the rates.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Reading only the % of the first stage.&lt;/strong&gt; It always falls; the stage-to-stage rate shows where it falls fastest.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-funnel-charts&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create and use funnel charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/distinctcount-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DISTINCTCOUNT function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-sort-by-column&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Sort by column in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Build the funnel on distinct counts, sort the stages by a stage order column, and read the stage-to-stage rates first. &lt;a href=&quot;/blog/conversion-rate-kpi/&quot;&gt;Conversion rate&lt;/a&gt; and &lt;a href=&quot;/blog/win-rate-kpi/&quot;&gt;win rate&lt;/a&gt; turn the same numbers into KPIs.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>GH-900 in 2026: GitHub Foundations and how to study</title>
    <link href="https://data.benibix.com/blog/gh-900-study-guide/"/>
    <id>https://data.benibix.com/blog/gh-900-study-guide/</id>
    <published>2026-10-25T12:00:00Z</published>
    <updated>2026-10-25T12:00:00Z</updated>
    <summary>What the GH-900 GitHub Foundations exam measures, how its seven areas are weighted, why it is useful for data people too, and the study plan I would follow again, built on one repository you run like a small team project.</summary>
    <category term="Exams"/>
    <category term="GitHub"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; GH-900 earns the &lt;strong&gt;GitHub Foundations&lt;/strong&gt; certification. Git and GitHub basics are the largest area (25 to 30%); repositories, collaboration, modern development practices, and privacy, security and administration are 10 to 15% each; projects and the GitHub community are 5 to 10% each. The exam gives you 100 minutes, and the certification does not need renewal: it follows Microsoft's policy for fundamentals.&lt;/p&gt;
&lt;p&gt;I passed GH-900 in May 2026. For data people it is a useful first credential: pipelines, notebooks, SQL projects and Power BI files (PBIP) all live in Git now, and this exam covers the words and workflow around them.&lt;/p&gt;
&lt;h2 id=&quot;what-does-gh-900-cover&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-gh-900-cover&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does GH-900 cover?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;b&gt;Git and GitHub basics&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;25-30%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;b&gt;Repositories&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:50.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;10-15%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;b&gt;Collaboration&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:50.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;10-15%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;b&gt;Modern development practices&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:50.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;10-15%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;Projects&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:33.3%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;5-10%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;b&gt;Privacy, security and administration&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:50.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;10-15%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;Community&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:33.3%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;5-10%&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;GH-900 skills, by weight in the exam&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Basics&lt;/strong&gt;: version control, Git against GitHub, repositories, commits and branches, accounts and organisations, GitHub Flow, Markdown, GitHub Desktop and Mobile.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Repositories and collaboration&lt;/strong&gt;: key files (README, licence, CODEOWNERS and similar), issues, pull requests, discussions, templates, notifications, gists, wikis and GitHub Pages.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Modern practices&lt;/strong&gt;: GitHub Actions, GitHub Copilot and its plans, Codespaces and dev containers, the github.dev editor.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Projects&lt;/strong&gt;: GitHub Projects, labels, milestones, saved replies and insights.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Security and admin&lt;/strong&gt;: two-factor authentication, repository permissions and roles, Enterprise Managed Users, visibility and branch protection.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Community&lt;/strong&gt;: open source, Sponsors, Marketplace, InnerSource, forks and templates.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-would-i-study-for-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-would-i-study-for-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How would I study for it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:6&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Repository&lt;/b&gt;&lt;span&gt;README, licence, .gitignore, CODEOWNERS&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Flow&lt;/b&gt;&lt;span&gt;a branch, a pull request linked to an issue, a review, a merge&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Protect&lt;/b&gt;&lt;span&gt;branch protection and required reviews&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Automate&lt;/b&gt;&lt;span&gt;one GitHub Actions workflow that runs a check&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Plan&lt;/b&gt;&lt;span&gt;a Project board with labels and a milestone&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;6&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Codespace&lt;/b&gt;&lt;span&gt;open the repository in a Codespace and in github.dev&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One repository, run like a team&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-helps-on-the-day&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-helps-on-the-day&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What helps on the day?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Know where a feature lives.&lt;/strong&gt; Repository, organisation or enterprise setting: many questions hinge on that.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Codespaces against github.dev.&lt;/strong&gt; One runs a full environment, the other is an editor in the browser without a terminal.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;No Microsoft Learn during GitHub exams.&lt;/strong&gt; Learn access is not offered on them.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-keep-the-certification&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-keep-the-certification&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you keep the certification?&lt;/h2&gt;
&lt;p&gt;You do not need to: GitHub Foundations does not require renewal.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/gh-900&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam GH-900&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/github-foundations/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: GitHub Foundations&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/support/exam-duration-exam-experience&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Exam duration and exam experience&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Create one repository and run it through the flow above. &lt;a href=&quot;/blog/azure-data-factory-git-ci-cd/&quot;&gt;Azure Data Factory with Git and CI/CD&lt;/a&gt; shows GitHub at work in a data project, and &lt;a href=&quot;/blog/gh-300-study-guide/&quot;&gt;GH-300&lt;/a&gt; is the Copilot exam after it. My credential is on &lt;a href=&quot;/about/&quot;&gt;the About page&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Inventory turnover and days of inventory in DAX</title>
    <link href="https://data.benibix.com/blog/inventory-turnover-kpi/"/>
    <id>https://data.benibix.com/blog/inventory-turnover-kpi/</id>
    <published>2026-10-25T12:00:00Z</published>
    <updated>2026-10-25T12:00:00Z</updated>
    <summary>How to calculate inventory turnover, cost of goods sold divided by average inventory, days inventory outstanding, turnover by product and category, slow movers and dead stock, average inventory from monthly snapshots, the DAX with semi-additive balances, and a scatter of turnover against margin.</summary>
    <category term="KPIs"/>
    <category term="Operations"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;inventory turnover&lt;/strong&gt; = cost of goods sold in a period / &lt;strong&gt;average&lt;/strong&gt; inventory value at cost in that period. With 8.0M of COGS in a year and an average stock of 1.6M, stock turns &lt;strong&gt;5 times&lt;/strong&gt; a year. &lt;strong&gt;Days of inventory (DIO)&lt;/strong&gt; = 365 / turnover = &lt;strong&gt;73 days&lt;/strong&gt;: the average item waits 73 days on the shelf. Compute it per product or category to find &lt;strong&gt;slow movers&lt;/strong&gt;, and list &lt;strong&gt;dead stock&lt;/strong&gt; (no sales in, say, 180 days) separately.&lt;/p&gt;
&lt;p&gt;Stock is cash on shelves. Higher turnover frees cash and reduces write-offs; too high causes stock-outs. Turnover by product shows where the cash sits.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Category&lt;/th&gt;&lt;th&gt;COGS&lt;/th&gt;&lt;th&gt;Average inventory&lt;/th&gt;&lt;th&gt;Turnover&lt;/th&gt;&lt;th&gt;Days of inventory&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Fresh&lt;/td&gt;&lt;td&gt;2,400&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;td&gt;24.0&lt;/td&gt;&lt;td&gt;15&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Drinks&lt;/td&gt;&lt;td&gt;1,800&lt;/td&gt;&lt;td&gt;300&lt;/td&gt;&lt;td&gt;6.0&lt;/td&gt;&lt;td&gt;61&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Household&lt;/td&gt;&lt;td&gt;2,000&lt;/td&gt;&lt;td&gt;500&lt;/td&gt;&lt;td&gt;4.0&lt;/td&gt;&lt;td&gt;91&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Electronics&lt;/td&gt;&lt;td&gt;1,800&lt;/td&gt;&lt;td&gt;700&lt;/td&gt;&lt;td&gt;2.6&lt;/td&gt;&lt;td&gt;142&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;8,000&lt;/td&gt;&lt;td&gt;1,600&lt;/td&gt;&lt;td&gt;5.0&lt;/td&gt;&lt;td&gt;73&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Turnover by category, last 12 months (k)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;scatter&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;scatter chart: Fresh 24, 22; Drinks 6, 30; Household 4, 35; Electronics 2.6, 18&quot;&gt;&lt;line x1=&quot;56&quot; y1=&quot;254&quot; x2=&quot;570&quot; y2=&quot;254&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;48&quot; y=&quot;258&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;56&quot; y1=&quot;194&quot; x2=&quot;570&quot; y2=&quot;194&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;48&quot; y=&quot;198&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;10&lt;/text&gt;&lt;line x1=&quot;56&quot; y1=&quot;134&quot; x2=&quot;570&quot; y2=&quot;134&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;48&quot; y=&quot;138&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;20&lt;/text&gt;&lt;line x1=&quot;56&quot; y1=&quot;74&quot; x2=&quot;570&quot; y2=&quot;74&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;48&quot; y=&quot;78&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;30&lt;/text&gt;&lt;line x1=&quot;56&quot; y1=&quot;14&quot; x2=&quot;570&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;48&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;40&lt;/text&gt;&lt;text x=&quot;56&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0&lt;/text&gt;&lt;text x=&quot;227.3&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;10&lt;/text&gt;&lt;text x=&quot;398.7&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;20&lt;/text&gt;&lt;text x=&quot;570&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;30&lt;/text&gt;&lt;circle cx=&quot;467.2&quot; cy=&quot;122&quot; r=&quot;6&quot; class=&quot;m bub k0&quot;/&gt;&lt;circle cx=&quot;158.8&quot; cy=&quot;74&quot; r=&quot;6&quot; class=&quot;m bub k1&quot;/&gt;&lt;circle cx=&quot;124.5&quot; cy=&quot;44&quot; r=&quot;6&quot; class=&quot;m bub k2&quot;/&gt;&lt;circle cx=&quot;100.5&quot; cy=&quot;146&quot; r=&quot;6&quot; class=&quot;m bub k3&quot;/&gt;&lt;text x=&quot;477.2&quot; y=&quot;126&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;Fresh&lt;/text&gt;&lt;text x=&quot;168.8&quot; y=&quot;78&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;Drinks&lt;/text&gt;&lt;text x=&quot;134.5&quot; y=&quot;48&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;Household&lt;/text&gt;&lt;text x=&quot;110.5&quot; y=&quot;150&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;Electronics&lt;/text&gt;&lt;text x=&quot;313&quot; y=&quot;294&quot; class=&quot;tax&quot; text-anchor=&quot;middle&quot;&gt;Turnover per year&lt;/text&gt;&lt;text x=&quot;14&quot; y=&quot;134&quot; class=&quot;tax&quot; text-anchor=&quot;middle&quot; transform=&quot;rotate(-90 14 134)&quot;&gt;Gross margin %&lt;/text&gt;&lt;line x1=&quot;56&quot; y1=&quot;254&quot; x2=&quot;570&quot; y2=&quot;254&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Products by turnover and gross margin&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Electronics turns slowly &lt;strong&gt;and&lt;/strong&gt; earns a low margin: the first place to cut stock. Household turns slowly but earns more, which can justify it.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;Inventory comes as snapshots (one row per product per month end, or per day) with Quantity and Value at cost. Stock is a balance, so an average over the period's snapshots, not a sum:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;COGS = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Cost]&lt;/i&gt; )

Inventory Value = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Inventory&lt;i class=&quot;m&quot;&gt;[Value]&lt;/i&gt; )

Average Inventory =
&lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Inventory Value]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;LASTDATE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
)

Inventory Turnover = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[COGS]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Average Inventory]&lt;/i&gt; )

Days of Inventory = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Inventory Turnover]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;AVERAGEX&lt;/code&gt; over months with &lt;code&gt;LASTDATE&lt;/code&gt; takes each month's closing stock and averages them. If snapshots are only at month ends, use the last date with data (&lt;code&gt;LASTNONBLANK&lt;/code&gt;) instead of the calendar's last date. &lt;code&gt;Days of Inventory&lt;/code&gt; uses the days in the selected period, so it works for a quarter or a year. See &lt;a href=&quot;/blog/opening-closing-balance-dax/&quot;&gt;opening and closing balances&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-find-slow-movers-and-dead-stock&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-find-slow-movers-and-dead-stock&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you find slow movers and dead stock?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Last Sale Date =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; AsOf = &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt; ), &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; &amp;lt;= AsOf )

Days Since Last Sale =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; AsOf = &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; L = &lt;i class=&quot;m&quot;&gt;[Last Sale Date]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( NOT &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( L ), AsOf - L )

Dead Stock Value =
&lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Days Since Last Sale]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;180&lt;/i&gt; || &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Last Sale Date]&lt;/i&gt; ),
        &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Inventory Value]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;LASTDATE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) ) )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;A table of products sorted by Days of Inventory, with stock value and days since last sale, is the working list for buyers.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Summing stock over months.&lt;/strong&gt; A balance; average the snapshots.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Revenue instead of COGS.&lt;/strong&gt; Stock is at cost; dividing revenue by it inflates turnover by the margin.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Year-end stock only.&lt;/strong&gt; Seasonal businesses look different at every month end; average twelve months.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;One number for all products.&lt;/strong&gt; Fresh food and spare parts should not share a target.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/lastdate-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: LASTDATE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/averagex-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: AVERAGEX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-scatter&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Scatter, bubble, and dot plot charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Load monthly stock snapshots at cost, build Average Inventory and turnover by category, and list dead stock. &lt;a href=&quot;/blog/fill-rate-and-stockout-kpi/&quot;&gt;Fill rate and stockouts&lt;/a&gt; shows the other side: too little stock.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Activation rate and time to value: product KPIs in DAX</title>
    <link href="https://data.benibix.com/blog/activation-rate-kpi/"/>
    <id>https://data.benibix.com/blog/activation-rate-kpi/</id>
    <published>2026-10-24T12:00:00Z</published>
    <updated>2026-10-24T12:00:00Z</updated>
    <summary>How to define and calculate activation rate, the share of new sign-ups who reach the first moment of value within a set number of days, choosing the activation event, time to value, an onboarding funnel, activation by sign-up cohort and source, and the DAX on users and events tables.</summary>
    <category term="KPIs"/>
    <category term="SaaS and product"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;activation rate&lt;/strong&gt; = new users who reach the &lt;strong&gt;activation event&lt;/strong&gt; (the first moment they get real value, such as &amp;quot;created a first project and invited a teammate&amp;quot;) within a set window, often 7 days / all new users who signed up, by sign-up week or month. 1,200 of 4,000 sign-ups activating within 7 days is &lt;strong&gt;30%&lt;/strong&gt;. Pick the event from data: the early action that most separates users who stay from users who leave. Pair it with &lt;strong&gt;time to value&lt;/strong&gt;, the median time from sign-up to activation.&lt;/p&gt;
&lt;p&gt;Most sign-ups never come back after day one. Activation shows how many get far enough to see why the product is worth it, and each onboarding change can be tested against it.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;funnel&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;funnel chart: Signed up 4,000; Verified email 3,200; Created first project 2,000; Invited a teammate 1,200&quot;&gt;&lt;rect x=&quot;150&quot; y=&quot;15.4&quot; width=&quot;420&quot; height=&quot;53.3&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;360&quot; y=&quot;46&quot; class=&quot;tin3&quot; text-anchor=&quot;middle&quot;&gt;4,000&lt;/text&gt;&lt;text x=&quot;12&quot; y=&quot;46&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Signed up&lt;/text&gt;&lt;rect x=&quot;192&quot; y=&quot;87.4&quot; width=&quot;336&quot; height=&quot;53.3&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;360&quot; y=&quot;118&quot; class=&quot;tin3&quot; text-anchor=&quot;middle&quot;&gt;3,200&lt;/text&gt;&lt;text x=&quot;12&quot; y=&quot;118&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Verified email&lt;/text&gt;&lt;text x=&quot;632&quot; y=&quot;118&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;80%&lt;/text&gt;&lt;rect x=&quot;255&quot; y=&quot;159.4&quot; width=&quot;210&quot; height=&quot;53.3&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;360&quot; y=&quot;190&quot; class=&quot;tin3&quot; text-anchor=&quot;middle&quot;&gt;2,000&lt;/text&gt;&lt;text x=&quot;12&quot; y=&quot;190&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Created first project&lt;/text&gt;&lt;text x=&quot;632&quot; y=&quot;190&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;50%&lt;/text&gt;&lt;rect x=&quot;297&quot; y=&quot;231.4&quot; width=&quot;126&quot; height=&quot;53.3&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;360&quot; y=&quot;262&quot; class=&quot;tin3&quot; text-anchor=&quot;middle&quot;&gt;1,200&lt;/text&gt;&lt;text x=&quot;12&quot; y=&quot;262&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Invited a teammate&lt;/text&gt;&lt;text x=&quot;632&quot; y=&quot;262&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;30%&lt;/text&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Onboarding funnel, September sign-ups&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Sign-up month&lt;/th&gt;&lt;th&gt;Sign-ups&lt;/th&gt;&lt;th&gt;Activated within 7 days&lt;/th&gt;&lt;th&gt;Activation rate&lt;/th&gt;&lt;th&gt;Median hours to activation&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Jun&lt;/td&gt;&lt;td&gt;3,400&lt;/td&gt;&lt;td&gt;850&lt;/td&gt;&lt;td&gt;25.0%&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Jul&lt;/td&gt;&lt;td&gt;3,700&lt;/td&gt;&lt;td&gt;962&lt;/td&gt;&lt;td&gt;26.0%&lt;/td&gt;&lt;td&gt;28&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Aug&lt;/td&gt;&lt;td&gt;3,900&lt;/td&gt;&lt;td&gt;1,092&lt;/td&gt;&lt;td&gt;28.0%&lt;/td&gt;&lt;td&gt;22&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sep&lt;/td&gt;&lt;td&gt;4,000&lt;/td&gt;&lt;td&gt;1,200&lt;/td&gt;&lt;td&gt;30.0%&lt;/td&gt;&lt;td&gt;18&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;7-day activation by sign-up month&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The share rose and the time fell after an onboarding checklist launched in August.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-choose-the-activation-event&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-choose-the-activation-event&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you choose the activation event?&lt;/h2&gt;
&lt;p&gt;Compare users who are still active after 60 days with those who are not, and look at what they did in their first week:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;First-week action&lt;/th&gt;&lt;th&gt;Retained at 60 days if done&lt;/th&gt;&lt;th&gt;Retained if not done&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Created a project&lt;/td&gt;&lt;td&gt;41%&lt;/td&gt;&lt;td&gt;9%&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Invited a teammate&lt;/td&gt;&lt;td&gt;58%&lt;/td&gt;&lt;td&gt;14%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Uploaded a file&lt;/td&gt;&lt;td&gt;35%&lt;/td&gt;&lt;td&gt;18%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Changed the theme&lt;/td&gt;&lt;td&gt;24%&lt;/td&gt;&lt;td&gt;23%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;First-week actions against 60-day retention&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Inviting a teammate separates retained users most; changing the theme hardly at all. Choose an event that is both predictive and early enough to influence.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;A Users table (User ID, Signup Date, Source) related to the Date table on Signup Date, and an Events table (User ID, Timestamp, Event Name). Add the first activation time per user as a calculated column:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- calculated column on Users&lt;/i&gt;
Activated At =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( Events&lt;i class=&quot;m&quot;&gt;[Timestamp]&lt;/i&gt; ), Events&lt;i class=&quot;m&quot;&gt;[Event Name]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;teammate_invited&amp;quot;&lt;/i&gt; )

Hours to Activation =
&lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( NOT &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( Users&lt;i class=&quot;m&quot;&gt;[Activated At]&lt;/i&gt; ), ( Users&lt;i class=&quot;m&quot;&gt;[Activated At]&lt;/i&gt; - Users&lt;i class=&quot;m&quot;&gt;[Signup Date]&lt;/i&gt; ) * &lt;i class=&quot;n&quot;&gt;24&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- measures&lt;/i&gt;
Sign-ups = &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Users )

Activated 7d = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Users ), Users&lt;i class=&quot;m&quot;&gt;[Hours to Activation]&lt;/i&gt; &amp;lt;= &lt;i class=&quot;n&quot;&gt;168&lt;/i&gt; )

Activation Rate 7d = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Activated 7d]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Sign-ups]&lt;/i&gt; )

Median Hours to Activation = &lt;i class=&quot;f&quot;&gt;MEDIAN&lt;/i&gt; ( Users&lt;i class=&quot;m&quot;&gt;[Hours to Activation]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The calculated column's &lt;code&gt;CALCULATE&lt;/code&gt; filters Events to the current user through the relationship from Users to Events. Leave out sign-ups from the last 7 days, whose window is not over. Break activation down by source and plan to see which sign-ups are worth acquiring.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;An event that is easy but meaningless.&lt;/strong&gt; &amp;quot;Logged in twice&amp;quot; moves easily and predicts little.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;No time window.&lt;/strong&gt; &amp;quot;Ever activated&amp;quot; rises with time and cannot compare cohorts.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Incomplete cohorts.&lt;/strong&gt; The newest users have not had the full window yet.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Several definitions in different teams.&lt;/strong&gt; Agree on one event and window, and write it into the KPI definition.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-funnel-charts&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Funnel charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/median-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: MEDIAN function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-influencers&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Key influencers visualizations&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;List the first-week actions of retained and lost users to choose the activation event, then track the 7-day rate by sign-up week. &lt;a href=&quot;/blog/feature-adoption-kpi/&quot;&gt;Feature adoption&lt;/a&gt; continues past activation.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Analytics pane in Power BI: lines, forecasts, error bars</title>
    <link href="https://data.benibix.com/blog/analytics-pane-power-bi/"/>
    <id>https://data.benibix.com/blog/analytics-pane-power-bi/</id>
    <published>2026-10-24T12:00:00Z</published>
    <updated>2026-10-24T12:00:00Z</updated>
    <summary>What the Analytics pane in Power BI adds to a visual, constant, min, max, average, median and percentile lines, trend lines, error bars, forecasts with seasonality and confidence intervals, anomalies, which visuals support each, and the DAX version of each line.</summary>
    <category term="Visuals"/>
    <category term="Report features"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; the &lt;strong&gt;Analytics&lt;/strong&gt; pane (the magnifier icon next to Build and Format) adds reference lines and statistics to the selected visual: &lt;strong&gt;constant lines&lt;/strong&gt; on X or Y, &lt;strong&gt;min&lt;/strong&gt;, &lt;strong&gt;max&lt;/strong&gt;, &lt;strong&gt;average&lt;/strong&gt;, &lt;strong&gt;median&lt;/strong&gt; and &lt;strong&gt;percentile&lt;/strong&gt; lines, &lt;strong&gt;trend lines&lt;/strong&gt;, &lt;strong&gt;error bars&lt;/strong&gt;, &lt;strong&gt;forecasts&lt;/strong&gt; and &lt;strong&gt;anomalies&lt;/strong&gt;. Each line follows the filters. Which ones are offered depends on the visual: forecasts and anomalies only on line charts, symmetry shading only on scatter charts.&lt;/p&gt;
&lt;p&gt;A column chart says what each month sold. An average line says which months were above average, a target line which ones hit the goal, and a forecast what the next three months may bring, all without a second visual.&lt;/p&gt;
&lt;h2 id=&quot;what-can-you-add-and-where&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-can-you-add-and-where&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What can you add, and where?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Feature&lt;/th&gt;&lt;th&gt;What it draws&lt;/th&gt;&lt;th&gt;Supported on&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Trend line&lt;/td&gt;&lt;td&gt;the overall direction over time&lt;/td&gt;&lt;td&gt;area, clustered column, line, line and clustered column (time data)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;X-axis constant line&lt;/td&gt;&lt;td&gt;a vertical line at a fixed value&lt;/td&gt;&lt;td&gt;area, bar and column charts, line, ribbon, scatter&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Y-axis constant line&lt;/td&gt;&lt;td&gt;a horizontal line at a fixed value&lt;/td&gt;&lt;td&gt;as above, plus waterfall&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Min, Max, Average, Median, Percentile&lt;/td&gt;&lt;td&gt;a line at that statistic of a measure&lt;/td&gt;&lt;td&gt;area, clustered bar, clustered column, line, scatter&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Symmetry shading&lt;/td&gt;&lt;td&gt;the area where X and Y are equal&lt;/td&gt;&lt;td&gt;scatter&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Error bars&lt;/td&gt;&lt;td&gt;variability around each point&lt;/td&gt;&lt;td&gt;supported charts, by field or by percentage&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Forecast&lt;/td&gt;&lt;td&gt;predicted future values&lt;/td&gt;&lt;td&gt;line chart&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Find anomalies&lt;/td&gt;&lt;td&gt;unusual points with an expected range&lt;/td&gt;&lt;td&gt;line chart&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Analytics pane features (from Microsoft's list)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;You can add several lines of one kind: three constant lines for three thresholds, two percentile lines for the 25th and 75th.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-add-a-target-line&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-add-a-target-line&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you add a target line?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;Select a column chart of monthly revenue.&lt;/li&gt;&lt;li&gt;Open &lt;strong&gt;Analytics&lt;/strong&gt;, &lt;strong&gt;Y-Axis constant line&lt;/strong&gt;, &lt;strong&gt;Add&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Set the &lt;strong&gt;Value&lt;/strong&gt; to a number, or with &lt;strong&gt;fx&lt;/strong&gt; to a measure: &lt;code&gt;[Revenue Target]&lt;/code&gt;. The line moves with filters.&lt;/li&gt;&lt;li&gt;Name it, style it (colour, dashed), and turn on its &lt;strong&gt;Data label&lt;/strong&gt; with the name and value.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;The target as a measure:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Monthly Target =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Budget&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-does-the-forecast-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-the-forecast-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does the forecast work?&lt;/h2&gt;
&lt;p&gt;On a line chart with a continuous date axis, &lt;strong&gt;Forecast, Add&lt;/strong&gt; draws the predicted values with a shaded confidence band. The options:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Forecast length&lt;/strong&gt;: how many points ahead (for example 3 months).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Ignore the last&lt;/strong&gt;: leave out the most recent points, for example an incomplete current month, or to test the forecast against known values.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Confidence interval&lt;/strong&gt;: 75%, 80%, 85%, 90%, 95% or 99%; wider bands for higher confidence.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Seasonality&lt;/strong&gt;: the number of points in one cycle (12 for monthly data with a yearly pattern), or automatic.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Use &lt;strong&gt;Ignore the last&lt;/strong&gt; with the forecast length to check quality: hide the last 3 known months, forecast 3, and see how close the forecast came.&lt;/p&gt;
&lt;h2 id=&quot;how-do-error-bars-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-error-bars-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do error bars work?&lt;/h2&gt;
&lt;p&gt;Error bars show a range around each point. &lt;strong&gt;By field&lt;/strong&gt;: upper and lower bound fields or measures from the model, either &lt;strong&gt;absolute&lt;/strong&gt; (the values are the bounds) or &lt;strong&gt;relative&lt;/strong&gt; (distances from the measure). &lt;strong&gt;By percentage&lt;/strong&gt;: a fixed percentage above and below. Style them with colour, width, border and cap markers.&lt;/p&gt;
&lt;p&gt;A survey score per region with a 95% confidence interval as error bars (&lt;strong&gt;By field&lt;/strong&gt;, &lt;strong&gt;Absolute&lt;/strong&gt;):&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Avg Score = &lt;i class=&quot;f&quot;&gt;AVERAGE&lt;/i&gt; ( Survey&lt;i class=&quot;m&quot;&gt;[Score]&lt;/i&gt; )

Score Margin =
&lt;i class=&quot;n&quot;&gt;1.96&lt;/i&gt; * &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( STDEV.&lt;i class=&quot;f&quot;&gt;S&lt;/i&gt; ( Survey&lt;i class=&quot;m&quot;&gt;[Score]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;SQRT&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Survey ) ) )

Score Upper = &lt;i class=&quot;m&quot;&gt;[Avg Score]&lt;/i&gt; + &lt;i class=&quot;m&quot;&gt;[Score Margin]&lt;/i&gt;
Score Lower = &lt;i class=&quot;m&quot;&gt;[Avg Score]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Score Margin]&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;A region with 40 answers gets a long error bar, one with 2,000 a short one: readers see which differences are real.&lt;/p&gt;
&lt;h2 id=&quot;can-you-get-the-same-lines-with-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#can-you-get-the-same-lines-with-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Can you get the same lines with DAX?&lt;/h2&gt;
&lt;p&gt;Yes, and sometimes you need to: a line that should appear in a tooltip or a table, or on a visual that does not support it.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Average Month =
&lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )

Median Month =
&lt;i class=&quot;f&quot;&gt;MEDIANX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )

Above Average =
&lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; &amp;gt; &lt;i class=&quot;m&quot;&gt;[Average Month]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Put &lt;code&gt;Average Month&lt;/code&gt; on the chart as a line series (a combo chart), and &lt;code&gt;Above Average&lt;/code&gt; into conditional formatting to colour the columns above the line.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;The option is missing.&lt;/strong&gt; The visual does not support it, or the chart has a legend or several series where the feature needs one; check the supported list.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Forecasts on too little history.&lt;/strong&gt; Two years of monthly data is the minimum for a yearly season; with less, the band is wide or the forecast is flat.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;An incomplete last period.&lt;/strong&gt; The current half month drags the trend and forecast down; ignore the last point.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Average of what?&lt;/strong&gt; The average line averages the points on the chart (months), not the transactions. Say so in its label.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Small multiples.&lt;/strong&gt; Trend lines and forecasting are not available on small multiples yet.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-analytics-pane&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Use the Analytics pane in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-anomaly-detection&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Anomaly detection tutorial for Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/medianx-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: MEDIANX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add a Y-axis constant line bound to a target measure on your main chart, and an average line where &amp;quot;above or below normal&amp;quot; matters. &lt;a href=&quot;/blog/anomaly-detection-power-bi/&quot;&gt;Anomaly detection&lt;/a&gt; covers the anomalies option in depth.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>AZ-104 in 2026: what the exam covers and how to study</title>
    <link href="https://data.benibix.com/blog/az-104-study-guide/"/>
    <id>https://data.benibix.com/blog/az-104-study-guide/</id>
    <published>2026-10-24T12:00:00Z</published>
    <updated>2026-10-24T12:00:00Z</updated>
    <summary>What the AZ-104 Azure Administrator exam measures since April 2026, how its five areas are weighted, and the study plan I would follow again, built on one subscription you secure, connect, run, monitor and back up.</summary>
    <category term="Exams"/>
    <category term="Azure"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; AZ-104 earns &lt;strong&gt;Microsoft Certified: Azure Administrator Associate&lt;/strong&gt;. It covers identities and governance (20 to 25%), storage (15 to 20%), compute (20 to 25%), virtual networking (15 to 20%), and monitoring and backup (10 to 15%). It runs 100 minutes, you need 700 out of 1,000, and you renew it each year for free. It is also the prerequisite for the Azure Solutions Architect Expert (&lt;a href=&quot;/blog/az-305-study-guide/&quot;&gt;AZ-305&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;I passed AZ-104 in May 2026. It is the broadest Azure exam: it touches almost every service, so the plan is to do each task once in a real subscription.&lt;/p&gt;
&lt;h2 id=&quot;what-does-az-104-cover&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-az-104-cover&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does AZ-104 cover?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Identities and governance&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;20-25%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Storage&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:80.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;15-20%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Compute&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;20-25%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Virtual networking&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:80.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;15-20%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;b&gt;Monitor and maintain&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:60.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;10-15%&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;AZ-104 skills, by weight in the exam&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Identities and governance&lt;/strong&gt;: Entra users and groups, built-in roles assigned at different scopes, Azure Policy, resource locks, subscriptions and costs.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Storage&lt;/strong&gt;: firewalls, SAS tokens and access keys, redundancy, Azure Files shares, Blob containers, tiers and lifecycle.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Compute&lt;/strong&gt;: reading and changing ARM templates and Bicep files, VMs (sizes, disks, encryption at host, availability), Container Registry, Container Instances and Container Apps, App Service plans and scaling.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Networking&lt;/strong&gt;: virtual networks, subnets and peering, network security groups and their effective rules, Azure DNS, and internal or public load balancers.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Monitor and maintain&lt;/strong&gt;: metrics, logs, alerts and Network Watcher in Azure Monitor; Recovery Services and Backup vaults, backup and restore, and site recovery.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-would-i-study-for-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-would-i-study-for-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How would I study for it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Step&lt;/th&gt;&lt;th&gt;Area&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Users, a group, a role assigned at resource-group scope, a policy, a lock and a budget&lt;/td&gt;&lt;td&gt;Identities and governance&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;A storage account with a firewall, a SAS token, a file share and lifecycle rules&lt;/td&gt;&lt;td&gt;Storage&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Deploy a VM from a Bicep file, then a container and an App Service&lt;/td&gt;&lt;td&gt;Compute&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Two peered VNets, an NSG, a private DNS zone, a load balancer&lt;/td&gt;&lt;td&gt;Networking&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;An alert, a log query, a backup and a restore&lt;/td&gt;&lt;td&gt;Monitor and maintain&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;One subscription, every area once&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Networking is where most people lose points. Build two VNets, peer them, block a port with an NSG and prove it with the effective security rules and Network Watcher; that one exercise answers a whole group of questions.&lt;/p&gt;
&lt;h2 id=&quot;what-helps-on-the-day&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-helps-on-the-day&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What helps on the day?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Read templates.&lt;/strong&gt; You will be shown ARM or Bicep and asked what it deploys or what to change; practise reading them, not only writing them.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Know the scope order.&lt;/strong&gt; Management group, subscription, resource group, resource: roles and policies inherit down it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Use Microsoft Learn in the exam for details only.&lt;/strong&gt; It is available on associate exams, but the clock keeps running.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-keep-the-certification&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-keep-the-certification&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you keep the certification?&lt;/h2&gt;
&lt;p&gt;It expires after a year. Renew it with the free online assessment on Microsoft Learn, which opens in the six months before it expires. Your AZ-305 expert certification does not expire if AZ-104 does, but each is renewed on its own.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/az-104&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam AZ-104&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/azure-administrator/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Microsoft Certified: Azure Administrator Associate&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/renew-your-microsoft-certification-faq&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Renewal FAQ&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Open a subscription and work down the table. &lt;a href=&quot;/blog/managed-identity-azure-data-factory/&quot;&gt;Managed identity in Azure Data Factory&lt;/a&gt; shows identities and role assignments in a data setting, and &lt;a href=&quot;/blog/az-104-vs-az-305/&quot;&gt;AZ-104 or AZ-305?&lt;/a&gt; explains the step to the expert exam. My credential is on &lt;a href=&quot;/about/&quot;&gt;the About page&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>AZ-104 or AZ-305: which comes first, and why both?</title>
    <link href="https://data.benibix.com/blog/az-104-vs-az-305/"/>
    <id>https://data.benibix.com/blog/az-104-vs-az-305/</id>
    <published>2026-10-24T12:00:00Z</published>
    <updated>2026-10-24T12:00:00Z</updated>
    <summary>AZ-104 and AZ-305 compared, administrator against architect, configure against recommend, why the Azure Solutions Architect Expert needs both, and how long to leave between them.</summary>
    <category term="Exams"/>
    <category term="Choosing an exam"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; take &lt;strong&gt;AZ-104 first&lt;/strong&gt;. The &lt;strong&gt;Azure Solutions Architect Expert&lt;/strong&gt; certification needs both: AZ-305 is its exam, and the Azure Administrator Associate (AZ-104) is its prerequisite. AZ-104 asks how to configure Azure; AZ-305 asks what to recommend and why. Knowing how things are configured makes the design answers much easier.&lt;/p&gt;
&lt;p&gt;I took them a month apart, AZ-104 in May 2026 and AZ-305 in June 2026, and that order worked.&lt;/p&gt;
&lt;h2 id=&quot;how-do-they-compare&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-they-compare&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do they compare?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;AZ-104&lt;/th&gt;&lt;th&gt;AZ-305&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Role&lt;/td&gt;&lt;td&gt;administrator&lt;/td&gt;&lt;td&gt;solutions architect&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Verb in the skills list&lt;/td&gt;&lt;td&gt;configure, create, manage&lt;/td&gt;&lt;td&gt;recommend, design, evaluate&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Level&lt;/td&gt;&lt;td&gt;associate&lt;/td&gt;&lt;td&gt;expert (with AZ-104 as prerequisite)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Largest area&lt;/td&gt;&lt;td&gt;identity and governance, compute (20-25% each)&lt;/td&gt;&lt;td&gt;infrastructure (30-35%)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Typical question&lt;/td&gt;&lt;td&gt;which setting makes this work?&lt;/td&gt;&lt;td&gt;which design meets every requirement at least cost?&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Hands-on study&lt;/td&gt;&lt;td&gt;build each task&lt;/td&gt;&lt;td&gt;write decision tables, build only to check&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;AZ-104 against AZ-305&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;why-does-az-104-help-with-az-305&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-does-az-104-help-with-az-305&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why does AZ-104 help with AZ-305?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;AZ-104&lt;/b&gt;&lt;span&gt;configure a VNet peering and an NSG&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;AZ-305&lt;/b&gt;&lt;span&gt;recommend hub-and-spoke or a virtual WAN for 40 branch offices&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;AZ-104&lt;/b&gt;&lt;span&gt;set up a backup and restore a VM&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;AZ-305&lt;/b&gt;&lt;span&gt;design recovery that meets a 15-minute RPO across regions&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;The same topic at two levels&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-long-between-them&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-long-between-them&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How long between them?&lt;/h2&gt;
&lt;p&gt;A few weeks is enough if you use the time to turn what you built for AZ-104 into decisions: for each service, when would you choose it and what would rule it out. Both certifications then renew separately, and the expert does not expire if the associate does.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/azure-solutions-architect/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Microsoft Certified: Azure Solutions Architect Expert&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/az-104&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam AZ-104&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/az-305&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam AZ-305&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/renew-your-microsoft-certification-faq&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Renewal FAQ&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Read the &lt;a href=&quot;/blog/az-104-study-guide/&quot;&gt;AZ-104 guide&lt;/a&gt;, then the &lt;a href=&quot;/blog/az-305-study-guide/&quot;&gt;AZ-305 guide&lt;/a&gt;. Both credentials are on &lt;a href=&quot;/about/&quot;&gt;the About page&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>COUNT, COUNTROWS, DISTINCTCOUNT and more in DAX</title>
    <link href="https://data.benibix.com/blog/count-functions-dax/"/>
    <id>https://data.benibix.com/blog/count-functions-dax/</id>
    <published>2026-10-24T12:00:00Z</published>
    <updated>2026-10-24T12:00:00Z</updated>
    <summary>Every DAX counting function compared, COUNT, COUNTA, COUNTBLANK, COUNTROWS, COUNTX, COUNTAX, DISTINCTCOUNT, DISTINCTCOUNTNOBLANK and APPROXIMATEDISTINCTCOUNT, what each counts, blanks, examples for orders, customers and active products, and which to use.</summary>
    <category term="DAX"/>
    <category term="Iterators and aggregation"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; use &lt;strong&gt;&lt;code&gt;COUNTROWS ( table )&lt;/code&gt;&lt;/strong&gt; to count rows (orders, lines), and &lt;strong&gt;&lt;code&gt;DISTINCTCOUNT ( column )&lt;/code&gt;&lt;/strong&gt; to count unique values (customers, products). &lt;code&gt;COUNT&lt;/code&gt; counts non-blank values in a column (numbers, dates, strings), &lt;code&gt;COUNTA&lt;/code&gt; also counts Booleans, and &lt;code&gt;COUNTBLANK&lt;/code&gt; counts blanks. &lt;code&gt;COUNTX&lt;/code&gt; and &lt;code&gt;COUNTAX&lt;/code&gt; count the rows where an expression is not blank. &lt;code&gt;DISTINCTCOUNTNOBLANK&lt;/code&gt; leaves BLANK out of the unique count, and &lt;code&gt;APPROXIMATEDISTINCTCOUNT&lt;/code&gt; estimates it on very large DirectQuery data.&lt;/p&gt;
&lt;p&gt;&amp;quot;How many customers bought?&amp;quot; and &amp;quot;how many orders?&amp;quot; are different counts, and so are &amp;quot;how many lines have a discount&amp;quot; and &amp;quot;how many customers have a discount&amp;quot;. Picking the right function is most of getting them right.&lt;/p&gt;
&lt;h2 id=&quot;what-does-each-count&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-each-count&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does each count?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Counts&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;COUNTROWS ( table )&lt;/td&gt;&lt;td&gt;rows of a table&lt;/td&gt;&lt;td&gt;COUNTROWS ( Sales )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;COUNT ( column )&lt;/td&gt;&lt;td&gt;non-blank values: numbers, dates, strings&lt;/td&gt;&lt;td&gt;COUNT ( Sales[Ship Date] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;COUNTA ( column )&lt;/td&gt;&lt;td&gt;non-blank values, also Booleans&lt;/td&gt;&lt;td&gt;COUNTA ( Sales[Is Return] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;COUNTBLANK ( column )&lt;/td&gt;&lt;td&gt;blank cells&lt;/td&gt;&lt;td&gt;COUNTBLANK ( Sales[Ship Date] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;COUNTX ( table, expr )&lt;/td&gt;&lt;td&gt;rows where expr is not blank&lt;/td&gt;&lt;td&gt;COUNTX ( Customer, [Revenue] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;COUNTAX ( table, expr )&lt;/td&gt;&lt;td&gt;as COUNTX, counting any type of value&lt;/td&gt;&lt;td&gt;COUNTAX ( Sales, Sales[Comment] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DISTINCTCOUNT ( column )&lt;/td&gt;&lt;td&gt;unique values, BLANK counted as one&lt;/td&gt;&lt;td&gt;DISTINCTCOUNT ( Sales[Customer Key] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DISTINCTCOUNTNOBLANK ( column )&lt;/td&gt;&lt;td&gt;unique values without BLANK&lt;/td&gt;&lt;td&gt;DISTINCTCOUNTNOBLANK ( Sales[Promo Code] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;APPROXIMATEDISTINCTCOUNT ( column )&lt;/td&gt;&lt;td&gt;an estimate of unique values&lt;/td&gt;&lt;td&gt;APPROXIMATEDISTINCTCOUNT ( Events[User ID] )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;DAX count functions&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;When there are no rows to count, these functions return BLANK, not 0.&lt;/p&gt;
&lt;h2 id=&quot;which-measures-do-you-write-most&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-measures-do-you-write-most&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which measures do you write most?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Orders = &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Order ID]&lt;/i&gt; )
Order Lines = &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Sales )
Customers = &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Customer Key]&lt;/i&gt; )
Shipped Lines = &lt;i class=&quot;f&quot;&gt;COUNT&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Ship Date]&lt;/i&gt; )
Open Lines = &lt;i class=&quot;f&quot;&gt;COUNTBLANK&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Ship Date]&lt;/i&gt; )

Lines per Order = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Order Lines]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Orders]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- customers in the Customer table, whether they bought or not&lt;/i&gt;
Customers in List = &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Customer )

&lt;i class=&quot;c&quot;&gt;-- customers with revenue over 10,000&lt;/i&gt;
Big Customers =
&lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;10000&lt;/i&gt; ) )

&lt;i class=&quot;c&quot;&gt;-- products sold in the period&lt;/i&gt;
Active Products = &lt;i class=&quot;f&quot;&gt;COUNTX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;Customers&lt;/code&gt; counts buyers in the current filter; &lt;code&gt;Customers in List&lt;/code&gt; counts the dimension rows. On a page filtered to 2026, the first is &amp;quot;customers who bought in 2026&amp;quot;, the second &amp;quot;all customers&amp;quot; (unless a filter reaches the Customer table).&lt;/p&gt;
&lt;h2 id=&quot;why-does-distinctcount-not-add-up&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-does-distinctcount-not-add-up&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why does DISTINCTCOUNT not add up?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Region&lt;/th&gt;&lt;th&gt;Customers&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;North&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;South&lt;/td&gt;&lt;td&gt;95&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;Sum of rows&lt;/td&gt;&lt;td&gt;215&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;214&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Customers by region, one customer bought in two regions&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The total counts the customer once. That is correct: a distinct count is never the sum of its parts. If readers expect the sum, add a note, or show &amp;quot;customer-region pairs&amp;quot; with &lt;code&gt;SUMX ( VALUES ( Region[Region] ), [Customers] )&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;when-is-an-approximate-count-useful&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-an-approximate-count-useful&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is an approximate count useful?&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;APPROXIMATEDISTINCTCOUNT&lt;/code&gt; returns an estimate of the distinct count and is meant for very large DirectQuery sources that can compute it faster. Microsoft marks support for it in Import and Direct Lake mode as preview. For most models, &lt;code&gt;DISTINCTCOUNT&lt;/code&gt; is exact and fast enough.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;COUNT&lt;/code&gt; on a key column with blanks.&lt;/strong&gt; Rows with a blank key are not counted; use &lt;code&gt;COUNTROWS&lt;/code&gt; for rows.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;COUNTROWS ( Customer )&lt;/code&gt; for buyers.&lt;/strong&gt; It counts the dimension; buyers are &lt;code&gt;DISTINCTCOUNT&lt;/code&gt; on the fact table's key.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;DISTINCTCOUNT counting BLANK.&lt;/strong&gt; A blank key counts as one value; use &lt;code&gt;DISTINCTCOUNTNOBLANK&lt;/code&gt; if it should not.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Showing 0.&lt;/strong&gt; Counts return BLANK when nothing matches; that keeps empty rows out of visuals (see &lt;a href=&quot;/blog/dax-blank-handling/&quot;&gt;BLANK handling&lt;/a&gt;).&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/countrows-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: COUNTROWS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/distinctcountnoblank-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DISTINCTCOUNTNOBLANK function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/approximate-distinctcount-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: APPROXIMATEDISTINCTCOUNT function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Define &lt;code&gt;Orders&lt;/code&gt;, &lt;code&gt;Order Lines&lt;/code&gt; and &lt;code&gt;Customers&lt;/code&gt; once, with these names, and build all other counts on them. &lt;a href=&quot;/blog/sum-vs-sumx-dax/&quot;&gt;SUM vs SUMX&lt;/a&gt; explains the iterator pattern behind &lt;code&gt;COUNTX&lt;/code&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Forecast accuracy: MAPE, WAPE and bias in DAX</title>
    <link href="https://data.benibix.com/blog/forecast-accuracy-mape-kpi/"/>
    <id>https://data.benibix.com/blog/forecast-accuracy-mape-kpi/</id>
    <published>2026-10-24T12:00:00Z</published>
    <updated>2026-10-24T12:00:00Z</updated>
    <summary>How to measure demand forecast accuracy, mean absolute percentage error (MAPE), weighted absolute percentage error (WAPE), forecast accuracy as 1 minus WAPE, bias for systematic over or under forecasting, a worked example where MAPE misleads, the DAX on forecast and actual tables, and a chart of bias by product.</summary>
    <category term="KPIs"/>
    <category term="Operations"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; forecast error is measured per item and period as &lt;strong&gt;actual - forecast&lt;/strong&gt;. &lt;strong&gt;MAPE&lt;/strong&gt; (mean absolute percentage error) averages |error| / actual over items: easy to explain, but small items with big percentage errors dominate it, and it breaks when actuals are zero. &lt;strong&gt;WAPE&lt;/strong&gt; (weighted absolute percentage error) = Σ |error| / Σ actual, which weights items by volume; &lt;strong&gt;forecast accuracy = 1 - WAPE&lt;/strong&gt;. &lt;strong&gt;Bias&lt;/strong&gt; = Σ (forecast - actual) / Σ actual shows whether you forecast too high (positive) or too low (negative) on average. Report accuracy and bias together.&lt;/p&gt;
&lt;p&gt;Accuracy says how far off the forecast is; bias says in which direction. A forecast that is always 10% too high fills warehouses; one 10% too low causes &lt;a href=&quot;/blog/fill-rate-and-stockout-kpi/&quot;&gt;stockouts&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;how-do-the-measures-compare&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-the-measures-compare&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do the measures compare?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Product&lt;/th&gt;&lt;th&gt;Forecast&lt;/th&gt;&lt;th&gt;Actual&lt;/th&gt;&lt;th&gt;Error&lt;/th&gt;&lt;th&gt;Absolute error&lt;/th&gt;&lt;th&gt;Absolute % error&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Bike&lt;/td&gt;&lt;td&gt;1,000&lt;/td&gt;&lt;td&gt;900&lt;/td&gt;&lt;td&gt;-100&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;td&gt;11.1%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Helmet&lt;/td&gt;&lt;td&gt;500&lt;/td&gt;&lt;td&gt;550&lt;/td&gt;&lt;td&gt;50&lt;/td&gt;&lt;td&gt;50&lt;/td&gt;&lt;td&gt;9.1%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bell&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;-15&lt;/td&gt;&lt;td&gt;15&lt;/td&gt;&lt;td&gt;300.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;1,520&lt;/td&gt;&lt;td&gt;1,455&lt;/td&gt;&lt;td&gt;-65&lt;/td&gt;&lt;td&gt;165&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;September, three products&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;MAPE = (11.1 + 9.1 + 300.0) / 3 = &lt;strong&gt;106.7%&lt;/strong&gt;: the bell, 5 units, makes the forecast look useless.&lt;/li&gt;&lt;li&gt;WAPE = 165 / 1,455 = &lt;strong&gt;11.3%&lt;/strong&gt;, accuracy &lt;strong&gt;88.7%&lt;/strong&gt;: weighted by volume, the forecast is decent.&lt;/li&gt;&lt;li&gt;Bias = (1,520 - 1,455) / 1,455 = &lt;strong&gt;+4.5%&lt;/strong&gt;: slightly too high overall.&lt;/li&gt;&lt;/ul&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;bar&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;bar chart: Bikes 9; Accessories 2; Clothing -6; Parts -1&quot;&gt;&lt;line x1=&quot;98.8&quot; y1=&quot;8&quot; x2=&quot;98.8&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;98.8&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;-10&lt;/text&gt;&lt;line x1=&quot;223.1&quot; y1=&quot;8&quot; x2=&quot;223.1&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;223.1&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;-5&lt;/text&gt;&lt;line x1=&quot;347.4&quot; y1=&quot;8&quot; x2=&quot;347.4&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;347.4&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;471.7&quot; y1=&quot;8&quot; x2=&quot;471.7&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;471.7&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;5&lt;/text&gt;&lt;line x1=&quot;596&quot; y1=&quot;8&quot; x2=&quot;596&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;596&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;10&lt;/text&gt;&lt;rect x=&quot;347.4&quot; y=&quot;19.1&quot; width=&quot;223.7&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;577.1&quot; y=&quot;44.8&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;9&lt;/text&gt;&lt;text x=&quot;88.8&quot; y=&quot;44.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Bikes&lt;/text&gt;&lt;rect x=&quot;347.4&quot; y=&quot;84.6&quot; width=&quot;49.7&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-grey&quot;/&gt;&lt;text x=&quot;403.1&quot; y=&quot;110.3&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;2&lt;/text&gt;&lt;text x=&quot;88.8&quot; y=&quot;110.3&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Accessories&lt;/text&gt;&lt;rect x=&quot;198.2&quot; y=&quot;150.1&quot; width=&quot;149.2&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-blue&quot;/&gt;&lt;text x=&quot;192.2&quot; y=&quot;175.8&quot; class=&quot;tv&quot; text-anchor=&quot;end&quot;&gt;-6&lt;/text&gt;&lt;text x=&quot;88.8&quot; y=&quot;175.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Clothing&lt;/text&gt;&lt;rect x=&quot;322.5&quot; y=&quot;215.6&quot; width=&quot;24.9&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-grey&quot;/&gt;&lt;text x=&quot;316.5&quot; y=&quot;241.3&quot; class=&quot;tv&quot; text-anchor=&quot;end&quot;&gt;-1&lt;/text&gt;&lt;text x=&quot;88.8&quot; y=&quot;241.3&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Parts&lt;/text&gt;&lt;line x1=&quot;347.4&quot; y1=&quot;8&quot; x2=&quot;347.4&quot; y2=&quot;270&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Forecast bias by product family (%)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Bikes are forecast 9% too high every month: an adjustment, not a new model, fixes much of that.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;Forecast and Actual tables at the same grain (Product, Month), both related to Product and Date:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Forecast Qty = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Forecast&lt;i class=&quot;m&quot;&gt;[Quantity]&lt;/i&gt; )
Actual Qty = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Quantity]&lt;/i&gt; )

Abs Error =
&lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;CROSSJOIN&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; ) ),
    &lt;i class=&quot;f&quot;&gt;ABS&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Actual Qty]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Forecast Qty]&lt;/i&gt; )
)

WAPE = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Abs Error]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Actual Qty]&lt;/i&gt; )
Forecast Accuracy = &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[WAPE]&lt;/i&gt;

Bias = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Forecast Qty]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Actual Qty]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Actual Qty]&lt;/i&gt; )

MAPE =
&lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;CROSSJOIN&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; ) ),
        &lt;i class=&quot;m&quot;&gt;[Actual Qty]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;
    ),
    &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ABS&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Actual Qty]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Forecast Qty]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Actual Qty]&lt;/i&gt; )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The absolute error must be computed at the &lt;strong&gt;forecast grain&lt;/strong&gt; (product and month) and then summed: computed on totals, errors of opposite sign cancel and accuracy looks perfect. &lt;code&gt;CROSSJOIN&lt;/code&gt; of the two grains does that.&lt;/p&gt;
&lt;h2 id=&quot;which-forecast-should-you-measure&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-forecast-should-you-measure&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which forecast should you measure?&lt;/h2&gt;
&lt;p&gt;Measure the forecast as it was &lt;strong&gt;when decisions were made&lt;/strong&gt;, for example the forecast made one month before (lag 1), not the latest update. Store forecast versions with a Version or Created Month column and filter on the lag you want.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Errors on totals.&lt;/strong&gt; Over and under forecasts cancel; compute at the item grain.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;MAPE with small or zero actuals.&lt;/strong&gt; Use WAPE; MAPE skips or explodes on zeros.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Accuracy below zero.&lt;/strong&gt; 1 - WAPE is negative when errors exceed actuals; cap it or report WAPE.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Latest forecast.&lt;/strong&gt; Measures nothing useful; measure the lag that drives purchasing.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/crossjoin-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: CROSSJOIN function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/averagex-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: AVERAGEX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/abs-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: ABS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Store each month's forecast with its creation month, and report WAPE accuracy and bias by product family at lag 1. &lt;a href=&quot;/blog/employee-turnover-kpi/&quot;&gt;Employee turnover&lt;/a&gt; starts the people KPIs.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Quarantine bad rows before they reach silver</title>
    <link href="https://data.benibix.com/blog/data-quality-quarantine-fabric-notebook/"/>
    <id>https://data.benibix.com/blog/data-quality-quarantine-fabric-notebook/</id>
    <published>2026-10-24T12:00:00Z</published>
    <updated>2026-10-24T12:00:00Z</updated>
    <summary>Data quality checks in a Fabric notebook: each rule has a name, failing rows go to a quarantine table with the rule they broke, and too many failures stop the run.</summary>
    <category term="Fabric"/>
    <category term="Lakehouse"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; write every check as a named rule, test each row on its way from bronze to silver, and send the rows that fail to a &lt;strong&gt;quarantine&lt;/strong&gt; table together with the rule they broke. Count passed and set-aside rows on every run, and stop the run before silver changes when too many fail.&lt;/p&gt;
&lt;p&gt;Dropping bad rows quietly makes the numbers look clean and wrong: totals shrink and nobody can say why. Letting them through is worse, because every report then counts them. Quarantine is the middle path: bad rows leave the load, and everyone can see which ones and why.&lt;/p&gt;
&lt;h2 id=&quot;where-do-bad-rows-go&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-bad-rows-go&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do bad rows go?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;bronze&quot;&gt;&lt;b&gt;Bronze orders&lt;/b&gt;&lt;span&gt;10,412 rows in this run&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Silver&lt;/b&gt;&lt;span&gt;10,377 rows passed every rule&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;red&quot;&gt;&lt;b&gt;Quarantine&lt;/b&gt;&lt;span&gt;35 rows, each with the rule it broke&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Every row from bronze ends up in exactly one place&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-does-a-rule-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-rule-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a rule look like?&lt;/h2&gt;
&lt;p&gt;A name and a condition that a good row meets. Keeping them in one list makes them easy to read, to count and to change:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;order_id&lt;/th&gt;&lt;th&gt;customer&lt;/th&gt;&lt;th&gt;amount&lt;/th&gt;&lt;th&gt;failed_rule&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;50211&lt;/td&gt;&lt;td&gt;Contoso&lt;/td&gt;&lt;td&gt;120.00&lt;/td&gt;&lt;td&gt;passed&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;50212&lt;/td&gt;&lt;td&gt;(null)&lt;/td&gt;&lt;td&gt;89.50&lt;/td&gt;&lt;td&gt;customer_missing&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;50213&lt;/td&gt;&lt;td&gt;Fabrikam&lt;/td&gt;&lt;td&gt;-40.00&lt;/td&gt;&lt;td&gt;amount_negative&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;50214&lt;/td&gt;&lt;td&gt;Northwind&lt;/td&gt;&lt;td&gt;75.00&lt;/td&gt;&lt;td&gt;order_date_in_future&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Four rows from bronze: one passes, three go to quarantine with their rule&lt;/figcaption&gt;&lt;/figure&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;python&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;from&lt;/i&gt; pyspark.sql &lt;i class=&quot;k&quot;&gt;import&lt;/i&gt; functions &lt;i class=&quot;k&quot;&gt;as&lt;/i&gt; F

RULES = {
    &lt;i class=&quot;s&quot;&gt;&amp;quot;customer_missing&amp;quot;&lt;/i&gt;:     F.&lt;i class=&quot;f&quot;&gt;col&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;customer&amp;quot;&lt;/i&gt;).&lt;i class=&quot;f&quot;&gt;isNotNull&lt;/i&gt;() &amp;amp; (F.&lt;i class=&quot;f&quot;&gt;trim&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;customer&amp;quot;&lt;/i&gt;) != &lt;i class=&quot;s&quot;&gt;&amp;quot;&amp;quot;&lt;/i&gt;),
    &lt;i class=&quot;s&quot;&gt;&amp;quot;amount_negative&amp;quot;&lt;/i&gt;:      F.&lt;i class=&quot;f&quot;&gt;col&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;amount&amp;quot;&lt;/i&gt;) &amp;gt;= &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;order_date_in_future&amp;quot;&lt;/i&gt;: F.&lt;i class=&quot;f&quot;&gt;col&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;order_date&amp;quot;&lt;/i&gt;) &amp;lt;= F.&lt;i class=&quot;f&quot;&gt;current_date&lt;/i&gt;(),
}

rows = spark.&lt;i class=&quot;f&quot;&gt;table&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;bronze_orders_today&amp;quot;&lt;/i&gt;)
failed = F.&lt;i class=&quot;f&quot;&gt;coalesce&lt;/i&gt;(*&lt;i class=&quot;m&quot;&gt;[F.when(~ok | ok.isNull(), F.lit(name)) for name, ok in RULES.items()]&lt;/i&gt;)
checked = rows.&lt;i class=&quot;f&quot;&gt;withColumn&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;failed_rule&amp;quot;&lt;/i&gt;, failed)

good = checked.&lt;i class=&quot;f&quot;&gt;filter&lt;/i&gt;(F.&lt;i class=&quot;f&quot;&gt;col&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;failed_rule&amp;quot;&lt;/i&gt;).&lt;i class=&quot;f&quot;&gt;isNull&lt;/i&gt;()).&lt;i class=&quot;f&quot;&gt;drop&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;failed_rule&amp;quot;&lt;/i&gt;)
bad = checked.&lt;i class=&quot;f&quot;&gt;filter&lt;/i&gt;(F.&lt;i class=&quot;f&quot;&gt;col&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;failed_rule&amp;quot;&lt;/i&gt;).&lt;i class=&quot;f&quot;&gt;isNotNull&lt;/i&gt;()).&lt;i class=&quot;f&quot;&gt;withColumn&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;_run_at&amp;quot;&lt;/i&gt;, F.&lt;i class=&quot;f&quot;&gt;current_timestamp&lt;/i&gt;())&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;coalesce&lt;/code&gt; picks the first rule a row breaks, so every bad row carries one clear reason. The &lt;code&gt;ok.isNull()&lt;/code&gt; part matters: a comparison with a null is neither true nor false, and without it a row with a null amount would slip through both filters.&lt;/p&gt;
&lt;h2 id=&quot;when-does-the-run-stop&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-does-the-run-stop&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When does the run stop?&lt;/h2&gt;
&lt;p&gt;Before silver changes. A few bad rows are normal; a third of the file failing usually means the source changed, and loading the rest would hide it.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;python&quot;&gt;&lt;code&gt;total, n_bad = checked.&lt;i class=&quot;f&quot;&gt;count&lt;/i&gt;(), bad.&lt;i class=&quot;f&quot;&gt;count&lt;/i&gt;()
bad.write.&lt;i class=&quot;f&quot;&gt;mode&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;append&amp;quot;&lt;/i&gt;).&lt;i class=&quot;f&quot;&gt;saveAsTable&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;quarantine_orders&amp;quot;&lt;/i&gt;)

&lt;i class=&quot;k&quot;&gt;if&lt;/i&gt; total &lt;i class=&quot;k&quot;&gt;and&lt;/i&gt; n_bad / total &amp;gt; &lt;i class=&quot;n&quot;&gt;0.02&lt;/i&gt;:
    raise &lt;i class=&quot;f&quot;&gt;Exception&lt;/i&gt;(f&lt;i class=&quot;s&quot;&gt;&amp;quot;{n_bad} of {total} rows failed the rules (over 2%): silver left as it was&amp;quot;&lt;/i&gt;)

good.write.&lt;i class=&quot;f&quot;&gt;mode&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;append&amp;quot;&lt;/i&gt;).&lt;i class=&quot;f&quot;&gt;saveAsTable&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;silver_orders_staged&amp;quot;&lt;/i&gt;)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;An exception fails the notebook, so the pipeline that runs it fails too and can alert. The quarantine rows are written first on purpose: when the run stops, they show what went wrong.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Rules hidden in a long chain of filters.&lt;/strong&gt; Nobody can say which rule dropped a row. One list of named rules, as above, is the documentation.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A quarantine nobody reads.&lt;/strong&gt; Put the counts per rule in the run log and on a small report page. A rule that fails every day either has a bug or found a real problem in the source.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A threshold that is too tight.&lt;/strong&gt; If ordinary days fail, people stop trusting the alert. Start from what a normal run looks like, then set the line above it.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/data-engineering/how-to-use-notebook&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: How to use Microsoft Fabric notebooks&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/data-factory/notebook-activity&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Notebook activity in Data Factory for Microsoft Fabric&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.coalesce.html&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Apache Spark docs: pyspark.sql.functions.coalesce&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;The second lesson of &lt;a href=&quot;/courses/lakehouse-in-three-layers/#clean-it-in-silver&quot;&gt;A lakehouse in three layers&lt;/a&gt; cleans bronze into silver with exactly this kind of quarantine, in your own Fabric workspace. It follows on from &lt;a href=&quot;/blog/medallion-architecture-fabric-lakehouse/&quot;&gt;bronze, silver and gold&lt;/a&gt;, and the pattern sits on &lt;a href=&quot;/work/#bad-rows-stop-early&quot;&gt;the map of my work&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Absenteeism rate: formula, Bradford factor and DAX</title>
    <link href="https://data.benibix.com/blog/absenteeism-rate-kpi/"/>
    <id>https://data.benibix.com/blog/absenteeism-rate-kpi/</id>
    <published>2026-10-23T12:00:00Z</published>
    <updated>2026-10-23T12:00:00Z</updated>
    <summary>How to calculate absenteeism rate, days lost to unplanned absence divided by scheduled working days, what counts as absence, frequency against duration, the Bradford factor for short repeated absences, the DAX on absence records and a working-day calendar, and a heat map by month.</summary>
    <category term="KPIs"/>
    <category term="People"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;absenteeism rate&lt;/strong&gt; = working days lost to &lt;strong&gt;unplanned&lt;/strong&gt; absence (sickness, unauthorised absence) / scheduled working days, for the same people and period. With 200 employees, 21 working days in a month and 168 days of sick leave, the rate is 168 / 4,200 = &lt;strong&gt;4.0%&lt;/strong&gt;. Planned absence (holidays, parental leave, training) does not count. Look at &lt;strong&gt;frequency&lt;/strong&gt; (how many separate absences) as well as days: many short absences disrupt work more than one long illness, which the &lt;strong&gt;Bradford factor&lt;/strong&gt; (S² × D) highlights.&lt;/p&gt;
&lt;p&gt;Absence data is personal and sensitive. Show rates by team and month, keep individual views to HR, and use the numbers to find workload or health problems, not to blame.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Team&lt;/th&gt;&lt;th&gt;Employees&lt;/th&gt;&lt;th&gt;Scheduled days&lt;/th&gt;&lt;th&gt;Days absent (unplanned)&lt;/th&gt;&lt;th&gt;Absence spells&lt;/th&gt;&lt;th&gt;Rate&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Warehouse&lt;/td&gt;&lt;td&gt;80&lt;/td&gt;&lt;td&gt;1,680&lt;/td&gt;&lt;td&gt;101&lt;/td&gt;&lt;td&gt;34&lt;/td&gt;&lt;td&gt;6.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Customer service&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;840&lt;/td&gt;&lt;td&gt;38&lt;/td&gt;&lt;td&gt;19&lt;/td&gt;&lt;td&gt;4.5%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Office&lt;/td&gt;&lt;td&gt;80&lt;/td&gt;&lt;td&gt;1,680&lt;/td&gt;&lt;td&gt;29&lt;/td&gt;&lt;td&gt;12&lt;/td&gt;&lt;td&gt;1.7%&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Company&lt;/td&gt;&lt;td&gt;200&lt;/td&gt;&lt;td&gt;4,200&lt;/td&gt;&lt;td&gt;168&lt;/td&gt;&lt;td&gt;65&lt;/td&gt;&lt;td&gt;4.0%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;September, by team&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;column&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;column chart: Jan 5.2; Feb 4.8; Mar 3.9; Apr 3.1; May 2.8; Jun 2.6; Jul 2.4; Aug 2.7; Sep 4&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;182&quot; x2=&quot;628&quot; y2=&quot;182&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;186&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;2&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;98&quot; x2=&quot;628&quot; y2=&quot;98&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;102&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;4&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;628&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;6&lt;/text&gt;&lt;rect x=&quot;62.2&quot; y=&quot;47.6&quot; width=&quot;41.5&quot; height=&quot;218.4&quot; rx=&quot;3&quot; class=&quot;m t-gold&quot;/&gt;&lt;text x=&quot;84&quot; y=&quot;41.6&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;5.2&lt;/text&gt;&lt;text x=&quot;84&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jan&lt;/text&gt;&lt;rect x=&quot;126.2&quot; y=&quot;64.4&quot; width=&quot;41.5&quot; height=&quot;201.6&quot; rx=&quot;3&quot; class=&quot;m t-gold&quot;/&gt;&lt;text x=&quot;148&quot; y=&quot;58.4&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;4.8&lt;/text&gt;&lt;text x=&quot;148&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Feb&lt;/text&gt;&lt;rect x=&quot;190.2&quot; y=&quot;102.2&quot; width=&quot;41.5&quot; height=&quot;163.8&quot; rx=&quot;3&quot; class=&quot;m t-blue&quot;/&gt;&lt;text x=&quot;212&quot; y=&quot;96.2&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;3.9&lt;/text&gt;&lt;text x=&quot;212&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Mar&lt;/text&gt;&lt;rect x=&quot;254.2&quot; y=&quot;135.8&quot; width=&quot;41.5&quot; height=&quot;130.2&quot; rx=&quot;3&quot; class=&quot;m t-blue&quot;/&gt;&lt;text x=&quot;276&quot; y=&quot;129.8&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;3.1&lt;/text&gt;&lt;text x=&quot;276&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Apr&lt;/text&gt;&lt;rect x=&quot;318.2&quot; y=&quot;148.4&quot; width=&quot;41.5&quot; height=&quot;117.6&quot; rx=&quot;3&quot; class=&quot;m t-blue&quot;/&gt;&lt;text x=&quot;340&quot; y=&quot;142.4&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;2.8&lt;/text&gt;&lt;text x=&quot;340&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;May&lt;/text&gt;&lt;rect x=&quot;382.2&quot; y=&quot;156.8&quot; width=&quot;41.5&quot; height=&quot;109.2&quot; rx=&quot;3&quot; class=&quot;m t-blue&quot;/&gt;&lt;text x=&quot;404&quot; y=&quot;150.8&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;2.6&lt;/text&gt;&lt;text x=&quot;404&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jun&lt;/text&gt;&lt;rect x=&quot;446.2&quot; y=&quot;165.2&quot; width=&quot;41.5&quot; height=&quot;100.8&quot; rx=&quot;3&quot; class=&quot;m t-blue&quot;/&gt;&lt;text x=&quot;468&quot; y=&quot;159.2&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;2.4&lt;/text&gt;&lt;text x=&quot;468&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jul&lt;/text&gt;&lt;rect x=&quot;510.2&quot; y=&quot;152.6&quot; width=&quot;41.5&quot; height=&quot;113.4&quot; rx=&quot;3&quot; class=&quot;m t-blue&quot;/&gt;&lt;text x=&quot;532&quot; y=&quot;146.6&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;2.7&lt;/text&gt;&lt;text x=&quot;532&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Aug&lt;/text&gt;&lt;rect x=&quot;574.2&quot; y=&quot;98&quot; width=&quot;41.5&quot; height=&quot;168&quot; rx=&quot;3&quot; class=&quot;m t-blue&quot;/&gt;&lt;text x=&quot;596&quot; y=&quot;92&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;4&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Sep&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Absenteeism rate by month (%)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;An Absences table with one row per absent working day (Employee ID, Date, Type, Spell ID), and a scheduled-days source: a working-day flag in the Date table times headcount, or a schedule table per employee.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Days Absent =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Absences ), Absences&lt;i class=&quot;m&quot;&gt;[Type]&lt;/i&gt; IN { &lt;i class=&quot;s&quot;&gt;&amp;quot;Sick&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Unauthorised&amp;quot;&lt;/i&gt; } )

Scheduled Days =
&lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Is Working Day]&lt;/i&gt; ),
    &lt;i class=&quot;m&quot;&gt;[Headcount on Date]&lt;/i&gt;
)

Absenteeism Rate = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Days Absent]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Scheduled Days]&lt;/i&gt; )

Absence Spells =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Absences&lt;i class=&quot;m&quot;&gt;[Spell ID]&lt;/i&gt; ), Absences&lt;i class=&quot;m&quot;&gt;[Type]&lt;/i&gt; IN { &lt;i class=&quot;s&quot;&gt;&amp;quot;Sick&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Unauthorised&amp;quot;&lt;/i&gt; } )

Avg Spell Length = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Days Absent]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Absence Spells]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;[Headcount on Date]&lt;/code&gt; is the measure from &lt;a href=&quot;/blog/employee-turnover-kpi/&quot;&gt;employee turnover&lt;/a&gt;; part-time staff count by their scheduled hours if you use hours instead of days. Storing one row per absent day (rather than start and end dates) makes every measure a simple count.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-bradford-factor&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-bradford-factor&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the Bradford factor?&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Bradford factor&lt;/strong&gt; = S² × D, where S is the number of spells and D the total days absent, usually over a rolling 52 weeks. One spell of 10 days scores 1² × 10 = &lt;strong&gt;10&lt;/strong&gt;; ten spells of one day score 10² × 10 = &lt;strong&gt;1,000&lt;/strong&gt;. It flags frequent short absences for a supportive conversation.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Bradford Factor =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; S = &lt;i class=&quot;m&quot;&gt;[Absence Spells]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; D = &lt;i class=&quot;m&quot;&gt;[Days Absent]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; S * S * D&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Use it carefully: it penalises people with chronic conditions or caring duties, which many employers must accommodate by law. Many organisations use it only as a prompt for a conversation, never alone.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Counting holidays.&lt;/strong&gt; Only unplanned absence belongs in the rate.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Calendar days as the base.&lt;/strong&gt; Weekends inflate the denominator; use scheduled days.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Long-term sickness hiding trends.&lt;/strong&gt; Report short-term and long-term absence apart.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Individual data on shared reports.&lt;/strong&gt; Aggregate to teams of a minimum size, and restrict detail with &lt;a href=&quot;/blog/userprincipalname-rls-dax/&quot;&gt;row-level security&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/distinctcount-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DISTINCTCOUNT function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/sumx-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SUMX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/guidance/rls-guidance&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Row-level security guidance&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add a working-day flag to the Date table, load one row per absent day, and show the rate by team and month. &lt;a href=&quot;/blog/time-to-hire-kpi/&quot;&gt;Time to hire&lt;/a&gt; covers filling the gaps.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Applied Skills or a certification: which should you earn?</title>
    <link href="https://data.benibix.com/blog/applied-skills-vs-certifications/"/>
    <id>https://data.benibix.com/blog/applied-skills-vs-certifications/</id>
    <published>2026-10-23T12:00:00Z</published>
    <updated>2026-10-23T12:00:00Z</updated>
    <summary>Microsoft Applied Skills credentials and Microsoft Certifications compared, scenario against role, lab against exam, one skill set against four to six, when each one is worth it, and how they work together.</summary>
    <category term="Exams"/>
    <category term="Choosing an exam"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;certification&lt;/strong&gt; proves you can do a job role and covers four to six skill sets in a proctored exam. An &lt;strong&gt;Applied Skills&lt;/strong&gt; credential proves you can do one specific scenario, such as one product task, in a hands-on lab assessment. Choose a certification to show you are ready for a role; choose Applied Skills to prove one skill a project needs, or as practice on the way to a certification. Microsoft says Applied Skills do not replace certifications.&lt;/p&gt;
&lt;h2 id=&quot;how-do-they-differ&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-they-differ&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do they differ?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;Certification&lt;/th&gt;&lt;th&gt;Applied Skills&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Proves&lt;/td&gt;&lt;td&gt;a job role&lt;/td&gt;&lt;td&gt;one scenario or business problem&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Breadth&lt;/td&gt;&lt;td&gt;usually 4 to 6 skill sets&lt;/td&gt;&lt;td&gt;one skill set&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Focus&lt;/td&gt;&lt;td&gt;role based&lt;/td&gt;&lt;td&gt;product based&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Format&lt;/td&gt;&lt;td&gt;proctored exam with many question types&lt;/td&gt;&lt;td&gt;lab-based assessment of real tasks&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Good for&lt;/td&gt;&lt;td&gt;job applications, partner requirements&lt;/td&gt;&lt;td&gt;a specific project, filling a gap, preparing&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Certification against Applied Skills&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;when-is-each-worth-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-each-worth-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is each worth it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Certification&lt;/b&gt;&lt;span&gt;you want a role (data analyst, data engineer, AI developer) or your employer needs certified staff&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Applied Skills&lt;/b&gt;&lt;span&gt;you need one skill for a project, or want proof of a task your certification does not cover&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Both&lt;/b&gt;&lt;span&gt;use Applied Skills labs to practise, then take the certification&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Pick by what you want to show&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Microsoft notes that the lab experience of Applied Skills can help you prepare for a related certification exam, since the exam also expects hands-on experience.&lt;/p&gt;
&lt;h2 id=&quot;where-do-you-find-them&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-find-them&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you find them?&lt;/h2&gt;
&lt;p&gt;Microsoft Learn lists Applied Skills by role, including Data Analyst and Data Engineer, Database Administrator, AI Engineer and Azure Administrator, and recently business-focused credentials for Microsoft 365 Copilot. Both kinds appear in your Learn profile under Credentials and can be shared from there.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/applied-skills/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Microsoft Applied Skills&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/support/applied-skills-faq&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Applied Skills frequently asked questions&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/cred-share-validate&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Sharing Microsoft Credentials&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;If you are aiming at a role, start with &lt;a href=&quot;/blog/microsoft-data-certification-path/&quot;&gt;the certification paths by role&lt;/a&gt;. If you need proof of one skill, browse the Applied Skills for your role on Learn.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Azure Data Factory triggers: schedule, tumbling, event</title>
    <link href="https://data.benibix.com/blog/azure-data-factory-triggers-explained/"/>
    <id>https://data.benibix.com/blog/azure-data-factory-triggers-explained/</id>
    <published>2026-10-23T12:00:00Z</published>
    <updated>2026-10-23T12:00:00Z</updated>
    <summary>The trigger types in Azure Data Factory, what each one is for, and why a tumbling window trigger suits loads that must cover every hour exactly once.</summary>
    <category term="Azure"/>
    <category term="Data Factory"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;trigger&lt;/strong&gt; starts a pipeline run. A &lt;strong&gt;schedule trigger&lt;/strong&gt; runs on a clock, a &lt;strong&gt;tumbling window trigger&lt;/strong&gt; runs once for each fixed time window (and can run past windows again), a &lt;strong&gt;storage event trigger&lt;/strong&gt; runs when a file arrives or is deleted, and a &lt;strong&gt;custom event trigger&lt;/strong&gt; runs on an Event Grid event you publish.&lt;/p&gt;
&lt;p&gt;Most pipelines start on a schedule trigger and that is fine. The others solve two specific problems: covering every time window exactly once, and starting as soon as a file lands instead of polling for it.&lt;/p&gt;
&lt;h2 id=&quot;which-trigger-does-what&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-trigger-does-what&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which trigger does what?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Trigger&lt;/th&gt;&lt;th&gt;Starts a run&lt;/th&gt;&lt;th&gt;Good for&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Schedule&lt;/td&gt;&lt;td&gt;at clock times, like 02:00 daily&lt;/td&gt;&lt;td&gt;most nightly loads&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Tumbling window&lt;/td&gt;&lt;td&gt;once per fixed window, back to a start date&lt;/td&gt;&lt;td&gt;loads per hour or day, with backfill&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Storage event&lt;/td&gt;&lt;td&gt;when a blob is created or deleted&lt;/td&gt;&lt;td&gt;files dropped by another system&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Custom event&lt;/td&gt;&lt;td&gt;on an Event Grid event you publish&lt;/td&gt;&lt;td&gt;other systems saying &amp;quot;ready&amp;quot;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Four triggers in Azure Data Factory&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;why-use-a-tumbling-window&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-use-a-tumbling-window&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why use a tumbling window?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;08:00 to 09:00&lt;/b&gt;&lt;span&gt;succeeded&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;red&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;09:00 to 10:00&lt;/b&gt;&lt;span&gt;failed, retried by the trigger&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;10:00 to 11:00&lt;/b&gt;&lt;span&gt;waits for 09:00 if it depends on it&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;11:00 to 12:00&lt;/b&gt;&lt;span&gt;runs when its hour is over&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Every hour once, even after an outage&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;A tumbling window trigger hands the pipeline the window it covers, so the copy reads exactly those rows:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;SELECT&lt;/i&gt; * &lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; dbo.Orders
&lt;i class=&quot;k&quot;&gt;WHERE&lt;/i&gt; ModifiedDate &amp;gt;= &lt;i class=&quot;s&quot;&gt;'@{trigger().outputs.windowStartTime}'&lt;/i&gt;
  &lt;i class=&quot;k&quot;&gt;AND&lt;/i&gt; ModifiedDate &amp;lt;  &lt;i class=&quot;s&quot;&gt;'@{trigger().outputs.windowEndTime}'&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Set its start date in the past and it runs every window since then: a backfill with no extra pipeline. It can also wait for another tumbling window trigger, retry a failed window on its own, and limit how many windows run at once.&lt;/p&gt;
&lt;p&gt;A schedule trigger knows none of this. If the 02:00 run fails, nothing reruns it, and the pipeline must work out for itself which rows to load; a watermark does that.&lt;/p&gt;
&lt;h2 id=&quot;when-does-a-storage-event-trigger-help&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-does-a-storage-event-trigger-help&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When does a storage event trigger help?&lt;/h2&gt;
&lt;p&gt;When another system drops files at unpredictable times. The trigger fires on &lt;code&gt;Blob created&lt;/code&gt; for a path you filter (for example, &lt;code&gt;/landing/blobs/orders/&lt;/code&gt; ending in &lt;code&gt;.csv&lt;/code&gt;) and passes the file to the pipeline in &lt;code&gt;@triggerBody().fileName&lt;/code&gt; and &lt;code&gt;@triggerBody().folderPath&lt;/code&gt;. It uses Azure Event Grid, so the subscription needs the &lt;code&gt;Microsoft.EventGrid&lt;/code&gt; resource provider registered.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A storage trigger fires before the file is complete.&lt;/strong&gt; Have the sender write to a temporary name and rename it when done, and filter on the final extension.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Time zones.&lt;/strong&gt; Schedule triggers take a time zone; tumbling windows run in UTC. Make sure &amp;quot;yesterday&amp;quot; means the same day in both.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The trigger is not started.&lt;/strong&gt; A trigger published but not started does nothing. Triggers are also stopped during a CI/CD release and need starting again.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/data-factory/concepts-pipeline-execution-triggers&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Pipeline execution and triggers&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/data-factory/how-to-create-tumbling-window-trigger&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create a tumbling window trigger&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/data-factory/how-to-create-event-trigger&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create a storage event trigger&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/blog/incremental-load-watermark-azure-data-factory/&quot;&gt;Load only the rows that changed, with a watermark&lt;/a&gt; is the pattern for a schedule trigger, and &lt;a href=&quot;/blog/azure-data-factory-git-ci-cd/&quot;&gt;Release Data Factory pipelines like code&lt;/a&gt; stops and starts the triggers around a release.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>BLANK in DAX: how blanks behave and how to handle them</title>
    <link href="https://data.benibix.com/blog/dax-blank-handling/"/>
    <id>https://data.benibix.com/blog/dax-blank-handling/</id>
    <published>2026-10-23T12:00:00Z</published>
    <updated>2026-10-23T12:00:00Z</updated>
    <summary>How BLANK works in DAX, the arithmetic and logic rules (BLANK + 5 is 5, BLANK * 5 is BLANK, 5 / BLANK is infinity), comparisons with 0 and empty text, ISBLANK, COALESCE and DIVIDE, why visuals hide blank rows, and why turning blanks into zeros hurts.</summary>
    <category term="DAX"/>
    <category term="Concepts"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;BLANK&lt;/strong&gt; is DAX's empty value, the equivalent of SQL's NULL. It follows its own rules: &lt;code&gt;BLANK + 5&lt;/code&gt; is 5, but &lt;code&gt;BLANK * 5&lt;/code&gt; is BLANK; &lt;code&gt;5 / BLANK&lt;/code&gt; is infinity; &lt;code&gt;BLANK = 0&lt;/code&gt; and &lt;code&gt;BLANK = &amp;quot;&amp;quot;&lt;/code&gt; are both TRUE. Visuals hide rows where every measure is BLANK, which is usually what you want. Test with &lt;code&gt;ISBLANK&lt;/code&gt;, replace with &lt;code&gt;COALESCE&lt;/code&gt;, divide with &lt;code&gt;DIVIDE&lt;/code&gt;, and do not turn every blank into 0: it fills visuals with empty rows and slows them down.&lt;/p&gt;
&lt;p&gt;A measure that returns 0 instead of BLANK for products that never sold makes a table of 40 products show 4,000 rows, one per product and customer, most of them zero. Knowing when DAX produces BLANK, and when to keep it, decides both the numbers and the speed of a report.&lt;/p&gt;
&lt;h2 id=&quot;how-does-blank-behave-in-arithmetic-and-logic&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-blank-behave-in-arithmetic-and-logic&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does BLANK behave in arithmetic and logic?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Expression&lt;/th&gt;&lt;th&gt;DAX&lt;/th&gt;&lt;th&gt;Excel&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;BLANK + BLANK&lt;/td&gt;&lt;td&gt;BLANK&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;BLANK + 5&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;BLANK * 5&lt;/td&gt;&lt;td&gt;BLANK&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;5 / BLANK&lt;/td&gt;&lt;td&gt;Infinity&lt;/td&gt;&lt;td&gt;Error&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;0 / BLANK&lt;/td&gt;&lt;td&gt;NaN&lt;/td&gt;&lt;td&gt;Error&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;BLANK / BLANK&lt;/td&gt;&lt;td&gt;BLANK&lt;/td&gt;&lt;td&gt;Error&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;FALSE OR BLANK&lt;/td&gt;&lt;td&gt;FALSE&lt;/td&gt;&lt;td&gt;FALSE&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;FALSE AND BLANK&lt;/td&gt;&lt;td&gt;FALSE&lt;/td&gt;&lt;td&gt;FALSE&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;TRUE OR BLANK&lt;/td&gt;&lt;td&gt;TRUE&lt;/td&gt;&lt;td&gt;TRUE&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;TRUE AND BLANK&lt;/td&gt;&lt;td&gt;FALSE&lt;/td&gt;&lt;td&gt;TRUE&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;BLANK OR BLANK&lt;/td&gt;&lt;td&gt;BLANK&lt;/td&gt;&lt;td&gt;Error&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;BLANK AND BLANK&lt;/td&gt;&lt;td&gt;BLANK&lt;/td&gt;&lt;td&gt;Error&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Microsoft's table of BLANK in DAX against Excel&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In comparisons, BLANK is converted to 0, &amp;quot;&amp;quot; or FALSE, depending on the other value. So &lt;code&gt;BLANK() = 0&lt;/code&gt; is TRUE. To tell blank from zero, use &lt;code&gt;ISBLANK&lt;/code&gt; or the strict operator &lt;code&gt;==&lt;/code&gt;: &lt;code&gt;BLANK() == 0&lt;/code&gt; is FALSE.&lt;/p&gt;
&lt;h2 id=&quot;where-do-blanks-come-from&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-blanks-come-from&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do blanks come from?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;A measure over &lt;strong&gt;no rows&lt;/strong&gt;: &lt;code&gt;SUM ( Sales[Amount] )&lt;/code&gt; for a product with no sales returns BLANK, not 0.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Empty source values&lt;/strong&gt;: nulls from the source become BLANK.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Missing relationship matches&lt;/strong&gt;: a sales row whose product key is not in the Product table goes to a blank row on the one side.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Functions&lt;/strong&gt; that find nothing: &lt;code&gt;SELECTEDVALUE&lt;/code&gt; with several values and no alternate result, &lt;code&gt;LOOKUPVALUE&lt;/code&gt; with no match, &lt;code&gt;DIVIDE&lt;/code&gt; by zero.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-test-and-replace-blanks&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-test-and-replace-blanks&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you test and replace blanks?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- test&lt;/i&gt;
Has Sales = NOT &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- replace, only where a 0 means something&lt;/i&gt;
Revenue or Zero = &lt;i class=&quot;f&quot;&gt;COALESCE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- divide safely: BLANK (or an alternate) when the denominator is 0 or BLANK&lt;/i&gt;
Margin % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Margin]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- compare to last year only when last year exists&lt;/i&gt;
Revenue vs LY =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; LY = &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( NOT &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( LY ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; - LY )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;COALESCE&lt;/code&gt; returns the first argument that is not BLANK; it takes two or more arguments.&lt;/p&gt;
&lt;h2 id=&quot;why-not-turn-every-blank-into-zero&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-not-turn-every-blank-into-zero&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why not turn every blank into zero?&lt;/h2&gt;
&lt;p&gt;Microsoft's guidance &amp;quot;Avoid converting BLANKs to values&amp;quot; explains it: visuals drop rows where all measures are BLANK. A measure like &lt;code&gt;[Revenue] + 0&lt;/code&gt; or &lt;code&gt;IF ( ISBLANK ( [Revenue] ), 0, [Revenue] )&lt;/code&gt; returns a value for every combination of the visual's fields, so a table of products by customers lists every pair, most with 0. The result is long, slow and hard to read.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- keeps blank rows out of visuals&lt;/i&gt;
Revenue = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- turns every product-customer pair into a row&lt;/i&gt;
Revenue Zero = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ) + &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Use zeros only where the reader needs to see &amp;quot;nothing sold&amp;quot; for a known list (for example on a card, or months in a line chart where a gap would mislead), and keep the zero-version for that visual only.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-show-the-blank-row&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-show-the-blank-row&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you show the blank row?&lt;/h2&gt;
&lt;p&gt;When the many side has keys not found on the one side, visuals show a &lt;strong&gt;(Blank)&lt;/strong&gt; item: sales without a known product. Count them:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Sales Without Product =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Sales ), &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;RELATED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product Key]&lt;/i&gt; ) ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;A simpler check: filter a visual on &lt;code&gt;'Product'[Product]&lt;/code&gt; is blank. Fix the keys in the source rather than hiding the row.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;= 0&lt;/code&gt; tests.&lt;/strong&gt; &lt;code&gt;IF ( [Revenue] = 0, ... )&lt;/code&gt; is also TRUE for BLANK; use &lt;code&gt;ISBLANK&lt;/code&gt; or &lt;code&gt;==&lt;/code&gt; when the difference matters.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Averages over zeros.&lt;/strong&gt; Turning blanks into zeros lowers averages; &lt;code&gt;AVERAGE&lt;/code&gt; skips blanks.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Division with &lt;code&gt;/&lt;/code&gt;.&lt;/strong&gt; &lt;code&gt;[A] / [B]&lt;/code&gt; gives infinity or an error; use &lt;code&gt;DIVIDE&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Blank text.&lt;/strong&gt; &lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt; and BLANK look alike in a visual; &lt;code&gt;ISBLANK ( &amp;quot;&amp;quot; )&lt;/code&gt; is FALSE.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-data-types&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Data types in Power BI Desktop (blanks, empty strings and zero values)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/best-practices/dax-avoid-converting-blank&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Avoid converting BLANKs to values&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/coalesce-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: COALESCE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Search your measures for &lt;code&gt;+ 0&lt;/code&gt; and &lt;code&gt;IF ( ISBLANK ( ... ), 0&lt;/code&gt; and remove the ones that only fill visuals with zeros. &lt;a href=&quot;/blog/divide-dax/&quot;&gt;DIVIDE in DAX&lt;/a&gt; covers safe division.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Fabric lakehouse or warehouse: which one do you need?</title>
    <link href="https://data.benibix.com/blog/fabric-lakehouse-or-warehouse/"/>
    <id>https://data.benibix.com/blog/fabric-lakehouse-or-warehouse/</id>
    <published>2026-10-23T12:00:00Z</published>
    <updated>2026-10-23T12:00:00Z</updated>
    <summary>The difference between a lakehouse and a warehouse in Microsoft Fabric, what each engine can write, and how to choose by your team's skills and your data.</summary>
    <category term="Fabric"/>
    <category term="Lakehouse"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; both store tables as Delta files in OneLake, and both can be read with T-SQL. A &lt;strong&gt;lakehouse&lt;/strong&gt; is written with &lt;strong&gt;Spark&lt;/strong&gt; (notebooks, Python) and also holds plain files. A &lt;strong&gt;warehouse&lt;/strong&gt; is written with &lt;strong&gt;T-SQL&lt;/strong&gt;: inserts, updates, merges and multi-table transactions. Choose by who builds it: a Spark team builds lakehouses, a SQL team builds warehouses, and many solutions use both.&lt;/p&gt;
&lt;p&gt;The two are less different than the names suggest, because they share the storage. What differs is which engine may write, and that follows the people more than the data.&lt;/p&gt;
&lt;h2 id=&quot;what-can-each-one-do&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-can-each-one-do&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What can each one do?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Question&lt;/th&gt;&lt;th&gt;Lakehouse&lt;/th&gt;&lt;th&gt;Warehouse&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Where is the data?&lt;/td&gt;&lt;td&gt;Delta tables in OneLake&lt;/td&gt;&lt;td&gt;Delta tables in OneLake&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Who writes tables?&lt;/td&gt;&lt;td&gt;Spark: notebooks, Spark jobs&lt;/td&gt;&lt;td&gt;T-SQL: INSERT, UPDATE, MERGE, CTAS&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Plain files (CSV, JSON, images)?&lt;/td&gt;&lt;td&gt;yes, in Files&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;T-SQL reads&lt;/td&gt;&lt;td&gt;yes, through its SQL analytics endpoint&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;T-SQL writes&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Transactions over several tables&lt;/td&gt;&lt;td&gt;per table&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Direct Lake semantic model&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Lakehouse and warehouse side by side&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-choose&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-choose&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you choose?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Who builds it?&lt;/b&gt;&lt;span&gt;the people decide the engine&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Lakehouse&lt;/b&gt;&lt;span&gt;Python and Spark skills, files of any shape, data science next to BI&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Warehouse&lt;/b&gt;&lt;span&gt;SQL skills, stored procedures, existing T-SQL to move over&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Start from the team, then the data&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;A common split follows the &lt;a href=&quot;/blog/medallion-architecture-fabric-lakehouse/&quot;&gt;bronze, silver and gold&lt;/a&gt; layers: bronze and silver in a lakehouse, because raw files land there and Spark cleans them; gold in a warehouse when the business logic is written in SQL by the BI team. A warehouse can read the lakehouse's tables in the same query:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;INSERT&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;INTO&lt;/i&gt; gold.&lt;i class=&quot;f&quot;&gt;fact_sales&lt;/i&gt; (OrderID, CustomerKey, Amount, OrderDate)
&lt;i class=&quot;k&quot;&gt;SELECT&lt;/i&gt; o.order_id, c.CustomerKey, o.amount, o.order_date
&lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; SilverLakehouse.dbo.silver_orders &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; o
&lt;i class=&quot;k&quot;&gt;JOIN&lt;/i&gt; gold.dim_customer &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; c &lt;i class=&quot;k&quot;&gt;ON&lt;/i&gt; c.CustomerID = o.customer_id &lt;i class=&quot;k&quot;&gt;AND&lt;/i&gt; c.IsCurrent = &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Writing through the SQL analytics endpoint.&lt;/strong&gt; A lakehouse's endpoint is read-only for tables; an &lt;code&gt;INSERT&lt;/code&gt; there fails. Write with Spark, or use a warehouse.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Two copies of the same table.&lt;/strong&gt; Gold in a warehouse should read silver, not copy it into the warehouse first.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Choosing by data size alone.&lt;/strong&gt; Both scale far; the team's language is the better guide.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/fundamentals/decision-guide-lakehouse-warehouse&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Fabric decision guide: choose between warehouse and lakehouse&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What is a lakehouse in Microsoft Fabric?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/data-warehouse/data-warehousing&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What is data warehousing in Microsoft Fabric?&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;The open course &lt;a href=&quot;/courses/lakehouse-in-three-layers/&quot;&gt;A lakehouse in three layers&lt;/a&gt; builds the lakehouse side in your own workspace; the gold layer it ends with is the part you could also build in a warehouse.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>FILTER in DAX: when to use it and when not</title>
    <link href="https://data.benibix.com/blog/filter-function-dax/"/>
    <id>https://data.benibix.com/blog/filter-function-dax/</id>
    <published>2026-10-23T12:00:00Z</published>
    <updated>2026-10-23T12:00:00Z</updated>
    <summary>How the FILTER function works in DAX, iterating a table and keeping rows that meet a condition, using it inside CALCULATE, COUNTROWS and SUMX, why Boolean filters are faster for simple conditions, filtering on measures, and filtering columns instead of whole tables.</summary>
    <category term="DAX"/>
    <category term="Filter functions"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;code&gt;FILTER ( table, condition )&lt;/code&gt; goes through a table row by row and returns the rows where the condition is TRUE. It is an iterator, so the condition can use the row's columns and measures. Use it when a filter needs a &lt;strong&gt;measure&lt;/strong&gt; (&lt;code&gt;[Revenue] &amp;gt; 10000&lt;/code&gt;), compares &lt;strong&gt;columns of different tables&lt;/strong&gt;, or must be built from a &lt;strong&gt;table variable&lt;/strong&gt;. For simple conditions on one column, a Boolean filter in &lt;code&gt;CALCULATE&lt;/code&gt; (&lt;code&gt;'Product'[Color] = &amp;quot;Red&amp;quot;&lt;/code&gt;) is shorter and usually faster. Filter a &lt;strong&gt;column&lt;/strong&gt; (&lt;code&gt;VALUES ( Customer[Customer] )&lt;/code&gt;), not a whole fact table.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;FILTER&lt;/code&gt; is the most overused function in DAX. It is also the only way to say &amp;quot;customers whose revenue is over 10,000&amp;quot;. The difference is in what you pass it.&lt;/p&gt;
&lt;h2 id=&quot;how-does-filter-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-filter-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does FILTER work?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:3&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Table&lt;/b&gt;&lt;span&gt;VALUES ( Customer[Customer] ): Ana, Ben, Chen, Dana&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Each row&lt;/b&gt;&lt;span&gt;evaluate [Revenue] &amp;gt; 10000 for that customer&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Result&lt;/b&gt;&lt;span&gt;Ben, Dana: a table that can filter or be counted&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;FILTER over the customers in the current filter context&lt;/figcaption&gt;&lt;/figure&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Big Customers =
&lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;10000&lt;/i&gt; ) )

Revenue from Big Customers =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;10000&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Inside &lt;code&gt;FILTER&lt;/code&gt;, &lt;code&gt;[Revenue]&lt;/code&gt; is evaluated per customer through context transition.&lt;/p&gt;
&lt;h2 id=&quot;when-should-you-use-a-boolean-filter-instead&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-should-you-use-a-boolean-filter-instead&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When should you use a Boolean filter instead?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- good: Boolean filter on one column&lt;/i&gt;
Red Revenue = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Color]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Red&amp;quot;&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- same result, more work: FILTER over the whole Product table&lt;/i&gt;
Red Revenue Slow = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Color]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Red&amp;quot;&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Microsoft's guidance &amp;quot;Avoid using FILTER as a filter argument&amp;quot; explains: the Boolean form is translated into an efficient filter on the column, while &lt;code&gt;FILTER&lt;/code&gt; over a table returns a table of all its columns, which is slower and can keep filters on other columns of that table. There is also a difference in meaning: &lt;code&gt;FILTER ( 'Product', ... )&lt;/code&gt; iterates the products in the current filter context, so it combines with existing filters, while the Boolean filter replaces the filter on Color. To get the Boolean result with &lt;code&gt;FILTER&lt;/code&gt;, write &lt;code&gt;FILTER ( ALL ( 'Product'[Color] ), 'Product'[Color] = &amp;quot;Red&amp;quot; )&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;which-conditions-need-filter&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-conditions-need-filter&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which conditions need FILTER?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- 1 a measure in the condition&lt;/i&gt;
Profitable Products =
&lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Margin]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; ) )

&lt;i class=&quot;c&quot;&gt;-- 2 two columns of the same table compared&lt;/i&gt;
Orders Shipped Late =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Orders ),
    &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( Orders&lt;i class=&quot;m&quot;&gt;[Ship Date]&lt;/i&gt;, Orders&lt;i class=&quot;m&quot;&gt;[Due Date]&lt;/i&gt; ), Orders&lt;i class=&quot;m&quot;&gt;[Ship Date]&lt;/i&gt; &amp;gt; Orders&lt;i class=&quot;m&quot;&gt;[Due Date]&lt;/i&gt; )
)

&lt;i class=&quot;c&quot;&gt;-- 3 a condition on a related table's column per row&lt;/i&gt;
Sales Under List Price =
&lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( Sales, Sales&lt;i class=&quot;m&quot;&gt;[Unit Price]&lt;/i&gt; &amp;lt; &lt;i class=&quot;f&quot;&gt;RELATED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[List Price]&lt;/i&gt; ) ) )

&lt;i class=&quot;c&quot;&gt;-- 4 keep only rows of a summary&lt;/i&gt;
Months Above Target =
&lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month]&lt;/i&gt; ),
        &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; &amp;gt;= &lt;i class=&quot;m&quot;&gt;[Revenue Target]&lt;/i&gt;
    )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;In example 2, filtering the two columns rather than the whole Orders table keeps the filter small.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-make-filter-fast&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-make-filter-fast&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you make FILTER fast?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Iterate the smallest table&lt;/strong&gt;: a column of distinct values (&lt;code&gt;VALUES&lt;/code&gt;, &lt;code&gt;ALL ( column )&lt;/code&gt;), not the fact table.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Filter columns before measures&lt;/strong&gt;: when a condition is on a column, apply it as a Boolean filter in &lt;code&gt;CALCULATE&lt;/code&gt; and keep only the measure test inside &lt;code&gt;FILTER&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Avoid FILTER inside FILTER&lt;/strong&gt; on large tables; compute a table variable once.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Let CALCULATE filter first&lt;/strong&gt;: &lt;code&gt;CALCULATE ( COUNTROWS ( FILTER ( VALUES ( Customer[Customer] ), [Revenue] &amp;gt; 1000 ) ), 'Date'[Year] = 2026 )&lt;/code&gt; narrows the customers before the loop.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;FILTER ( Sales, ... )&lt;/code&gt; everywhere.&lt;/strong&gt; Scanning millions of rows with all columns; filter a column instead.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Different results than expected.&lt;/strong&gt; &lt;code&gt;FILTER ( 'Product', ... )&lt;/code&gt; respects existing filters; a Boolean filter overrides them.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Measures in a Boolean filter.&lt;/strong&gt; Not allowed; that is exactly where &lt;code&gt;FILTER&lt;/code&gt; is needed.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;FILTER returning many columns into CALCULATE.&lt;/strong&gt; Extra columns become filters too; return only the columns you mean.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/filter-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: FILTER function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/best-practices/dax-avoid-avoid-filter-as-filter-argument&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Avoid using FILTER as a filter argument&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/calculate-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: CALCULATE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Search your model for &lt;code&gt;FILTER ( &amp;lt;fact table&amp;gt;,&lt;/code&gt; and replace each simple one with a Boolean filter or a &lt;code&gt;FILTER&lt;/code&gt; over a single column. &lt;a href=&quot;/blog/calculate-function-dax/&quot;&gt;CALCULATE&lt;/a&gt; explains what happens to the filter after &lt;code&gt;FILTER&lt;/code&gt; builds it.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Using Microsoft Learn during the exam: how open book works</title>
    <link href="https://data.benibix.com/blog/microsoft-learn-during-the-exam/"/>
    <id>https://data.benibix.com/blog/microsoft-learn-during-the-exam/</id>
    <published>2026-10-23T12:00:00Z</published>
    <updated>2026-10-23T12:00:00Z</updated>
    <summary>How the Microsoft Learn open-book option works on associate and expert certification exams in 2026, which exams have it, what you can and cannot open, why it costs time, and when it is worth using.</summary>
    <category term="Exams"/>
    <category term="Exam tips"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; on &lt;strong&gt;associate and expert&lt;/strong&gt; exams you can open &lt;strong&gt;Microsoft Learn&lt;/strong&gt; in a split screen beside the question. You can browse all of learn.microsoft.com except Q&amp;amp;A, practice assessments and your profile, and search a page with Ctrl+F. &lt;strong&gt;No extra time&lt;/strong&gt; is added and the clock keeps running. It is &lt;strong&gt;not available&lt;/strong&gt; on fundamentals exams, GitHub exams or Office (MOS) exams. Use it to confirm a detail, never to learn a topic.&lt;/p&gt;
&lt;h2 id=&quot;how-does-it-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-it-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does it work?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Button&lt;/b&gt;&lt;span&gt;the Microsoft Learn icon in the left pane&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Split screen&lt;/b&gt;&lt;span&gt;Learn opens beside the question, resizable&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Navigate&lt;/b&gt;&lt;span&gt;several tabs, full screen if needed, Ctrl+F on a page&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Close&lt;/b&gt;&lt;span&gt;search history resets when you close the window&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Using Learn on a question&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Links to other sites (GitHub, blogs) are blocked; only the Learn domain opens.&lt;/p&gt;
&lt;h2 id=&quot;which-exams-have-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-exams-have-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which exams have it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Exam type&lt;/th&gt;&lt;th&gt;Microsoft Learn available?&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Associate (PL-300, DP-600, DP-700, AZ-104...)&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Expert (AZ-305, AB-100)&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Fundamentals (AZ-900, DP-900, AI-901...)&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;GitHub (GH-900, GH-300)&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Microsoft Office Specialist&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Open book by exam type&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;when-is-it-worth-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-it-worth-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is it worth it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:1&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Worth it&lt;/b&gt;&lt;span&gt;a limit, a tier, a parameter name, a function's syntax, which SKU has a feature&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;red&quot;&gt;&lt;b&gt;Not worth it&lt;/b&gt;&lt;span&gt;a concept you do not know; finding and reading it eats minutes you need elsewhere&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Use it or not&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Know where things live before the exam: the DAX function reference, the Fabric and Azure &amp;quot;limits&amp;quot; pages, the product comparison tables. Practise finding them quickly while you study, since search inside Learn takes time.&lt;/p&gt;
&lt;h2 id=&quot;how-much-time-can-you-spare&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-much-time-can-you-spare&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How much time can you spare?&lt;/h2&gt;
&lt;p&gt;Associate and expert exams give 100 or 120 minutes. With 40 to 60 questions, that is about two minutes a question. Two or three lookups of a minute each are affordable; ten are not. Mark the question for review, answer the rest, and look things up at the end if time is left (except in sections you cannot return to).&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/support/exam-duration-exam-experience&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Exam duration and exam experience&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;While studying, bookmark in your head the three Learn pages you would need for your exam. &lt;a href=&quot;/blog/exam-time-and-breaks/&quot;&gt;Exam time and breaks&lt;/a&gt; covers how to spend the rest of the clock.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Area charts in Power BI: basic, stacked and 100%</title>
    <link href="https://data.benibix.com/blog/area-chart-power-bi/"/>
    <id>https://data.benibix.com/blog/area-chart-power-bi/</id>
    <published>2026-10-22T12:00:00Z</published>
    <updated>2026-10-22T12:00:00Z</updated>
    <summary>How basic (layered), stacked and 100% stacked area charts in Power BI differ, which question each answers, why layered areas hide each other, the DAX for shares, and when a line chart is better.</summary>
    <category term="Visuals"/>
    <category term="Trends"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; an &lt;strong&gt;area chart&lt;/strong&gt; is a line chart with the space under the line filled, so it stresses volume over time. Power BI has three: the &lt;strong&gt;area chart&lt;/strong&gt; (Microsoft also calls it a basic or layered area chart: series drawn over each other, see-through), the &lt;strong&gt;stacked area chart&lt;/strong&gt; (series piled up, the top edge is the total) and the &lt;strong&gt;100% stacked area chart&lt;/strong&gt; (every point is 100%, so it shows the mix). Layered areas work for two or three series at most; with more, use stacked areas or lines.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The chart, part by part:&lt;/strong&gt; &lt;a href=&quot;/visuals/area-chart/&quot;&gt;What is an area chart?&lt;/a&gt; draws its parts and shows how to read one, its kinds and the mistakes to avoid.&lt;/p&gt;
&lt;p&gt;A line says &amp;quot;revenue went up&amp;quot;. A filled area says &amp;quot;this much revenue&amp;quot;, because the eye reads the filled surface as an amount. That is the area chart's strength and the reason it misleads when it is the wrong one of the three.&lt;/p&gt;
&lt;h2 id=&quot;which-of-the-three-answers-which-question&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-of-the-three-answers-which-question&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which of the three answers which question?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Chart&lt;/th&gt;&lt;th&gt;Answers&lt;/th&gt;&lt;th&gt;Watch out for&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Area (basic, layered)&lt;/td&gt;&lt;td&gt;how do two or three volumes trend, and which is bigger?&lt;/td&gt;&lt;td&gt;areas hide each other; Power BI uses transparency for the overlap&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Stacked area&lt;/td&gt;&lt;td&gt;how does the total trend, and what is it made of?&lt;/td&gt;&lt;td&gt;only the bottom series has a flat baseline&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;100% stacked area&lt;/td&gt;&lt;td&gt;how does the mix change over time?&lt;/td&gt;&lt;td&gt;absolute numbers disappear&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The three area charts&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-do-they-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-do-they-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What do they look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;area&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;Revenue&lt;/li&gt;&lt;li class=&quot;k1&quot;&gt;Cost&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;area chart: Jan 80, 50; Feb 95, 60; Mar 90, 55; Apr 118, 70; May 130, 74; Jun 125, 77&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;182&quot; x2=&quot;626&quot; y2=&quot;182&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;186&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;50&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;98&quot; x2=&quot;626&quot; y2=&quot;98&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;102&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;626&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;150&lt;/text&gt;&lt;polygon points=&quot;52,182 166.8,165.2 281.6,173.6 396.4,148.4 511.2,141.7 626,136.6 626,266 52,266&quot; class=&quot;ar k1&quot;/&gt;&lt;polyline points=&quot;52,182 166.8,165.2 281.6,173.6 396.4,148.4 511.2,141.7 626,136.6&quot; class=&quot;ln k1&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;182&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;166.8&quot; cy=&quot;165.2&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;281.6&quot; cy=&quot;173.6&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;396.4&quot; cy=&quot;148.4&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;511.2&quot; cy=&quot;141.7&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;136.6&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;polygon points=&quot;52,131.6 166.8,106.4 281.6,114.8 396.4,67.8 511.2,47.6 626,56 626,266 52,266&quot; class=&quot;ar k0&quot;/&gt;&lt;polyline points=&quot;52,131.6 166.8,106.4 281.6,114.8 396.4,67.8 511.2,47.6 626,56&quot; class=&quot;ln k0&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;131.6&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;166.8&quot; cy=&quot;106.4&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;281.6&quot; cy=&quot;114.8&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;396.4&quot; cy=&quot;67.8&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;511.2&quot; cy=&quot;47.6&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;56&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;text x=&quot;52&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jan&lt;/text&gt;&lt;text x=&quot;166.8&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Feb&lt;/text&gt;&lt;text x=&quot;281.6&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Mar&lt;/text&gt;&lt;text x=&quot;396.4&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Apr&lt;/text&gt;&lt;text x=&quot;511.2&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;May&lt;/text&gt;&lt;text x=&quot;626&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jun&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Basic area: revenue and cost per month, cost drawn over revenue&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The space between the two edges is the gross profit, and its widening in April is easy to see.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;stacked-area&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;Basic&lt;/li&gt;&lt;li class=&quot;k1&quot;&gt;Pro&lt;/li&gt;&lt;li class=&quot;k2&quot;&gt;Team&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;stacked area chart: 2022 410, 120, 30; 2023 450, 190, 70; 2024 470, 260, 140; 2025 455, 330, 230; 2026 440, 390, 310&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;626&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;250&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;626&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;500&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;626&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;750&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;626&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;1,000&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;626&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;1,250&lt;/text&gt;&lt;polygon points=&quot;52,153.1 195.5,122.9 339,90.6 482.5,61.4 626,36.2 626,98.7 482.5,107.7 339,118.8 195.5,137 52,159.2&quot; class=&quot;ar k2&quot;/&gt;&lt;polyline points=&quot;52,153.1 195.5,122.9 339,90.6 482.5,61.4 626,36.2&quot; class=&quot;ln k2&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;153.1&quot; r=&quot;3.5&quot; class=&quot;dt k2&quot;/&gt;&lt;circle cx=&quot;195.5&quot; cy=&quot;122.9&quot; r=&quot;3.5&quot; class=&quot;dt k2&quot;/&gt;&lt;circle cx=&quot;339&quot; cy=&quot;90.6&quot; r=&quot;3.5&quot; class=&quot;dt k2&quot;/&gt;&lt;circle cx=&quot;482.5&quot; cy=&quot;61.4&quot; r=&quot;3.5&quot; class=&quot;dt k2&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;36.2&quot; r=&quot;3.5&quot; class=&quot;dt k2&quot;/&gt;&lt;polygon points=&quot;52,159.2 195.5,137 339,118.8 482.5,107.7 626,98.7 626,177.3 482.5,174.3 339,171.2 195.5,175.3 52,183.3&quot; class=&quot;ar k1&quot;/&gt;&lt;polyline points=&quot;52,159.2 195.5,137 339,118.8 482.5,107.7 626,98.7&quot; class=&quot;ln k1&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;159.2&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;195.5&quot; cy=&quot;137&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;339&quot; cy=&quot;118.8&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;482.5&quot; cy=&quot;107.7&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;98.7&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;polygon points=&quot;52,183.3 195.5,175.3 339,171.2 482.5,174.3 626,177.3 626,266 52,266&quot; class=&quot;ar k0&quot;/&gt;&lt;polyline points=&quot;52,183.3 195.5,175.3 339,171.2 482.5,174.3 626,177.3&quot; class=&quot;ln k0&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;183.3&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;195.5&quot; cy=&quot;175.3&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;339&quot; cy=&quot;171.2&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;482.5&quot; cy=&quot;174.3&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;177.3&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;text x=&quot;52&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;2022&lt;/text&gt;&lt;text x=&quot;195.5&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;2023&lt;/text&gt;&lt;text x=&quot;339&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;2024&lt;/text&gt;&lt;text x=&quot;482.5&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;2025&lt;/text&gt;&lt;text x=&quot;626&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;2026&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Stacked area: subscriptions by plan, the top edge is all subscriptions&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Total subscriptions grew every year. The stack also shows that Basic stopped growing in 2024, but whether Pro or Team grew faster is hard to judge: they sit on moving baselines. The 100% version answers that:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;stacked-area&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;Basic&lt;/li&gt;&lt;li class=&quot;k1&quot;&gt;Pro&lt;/li&gt;&lt;li class=&quot;k2&quot;&gt;Team&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;stacked area chart: 2022 73, 21, 5; 2023 64, 27, 10; 2024 54, 30, 16; 2025 45, 32, 23; 2026 39, 34, 27&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;626&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;25&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;626&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;50&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;626&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;75&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;626&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;626&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;125&lt;/text&gt;&lt;polygon points=&quot;52,66.4 195.5,62.4 339,64.4 482.5,64.4 626,64.4 626,118.8 482.5,110.8 339,96.7 195.5,82.5 52,76.5&quot; class=&quot;ar k2&quot;/&gt;&lt;polyline points=&quot;52,66.4 195.5,62.4 339,64.4 482.5,64.4 626,64.4&quot; class=&quot;ln k2&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;66.4&quot; r=&quot;3.5&quot; class=&quot;dt k2&quot;/&gt;&lt;circle cx=&quot;195.5&quot; cy=&quot;62.4&quot; r=&quot;3.5&quot; class=&quot;dt k2&quot;/&gt;&lt;circle cx=&quot;339&quot; cy=&quot;64.4&quot; r=&quot;3.5&quot; class=&quot;dt k2&quot;/&gt;&lt;circle cx=&quot;482.5&quot; cy=&quot;64.4&quot; r=&quot;3.5&quot; class=&quot;dt k2&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;64.4&quot; r=&quot;3.5&quot; class=&quot;dt k2&quot;/&gt;&lt;polygon points=&quot;52,76.5 195.5,82.5 339,96.7 482.5,110.8 626,118.8 626,187.4 482.5,175.3 339,157.1 195.5,137 52,118.8&quot; class=&quot;ar k1&quot;/&gt;&lt;polyline points=&quot;52,76.5 195.5,82.5 339,96.7 482.5,110.8 626,118.8&quot; class=&quot;ln k1&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;76.5&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;195.5&quot; cy=&quot;82.5&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;339&quot; cy=&quot;96.7&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;482.5&quot; cy=&quot;110.8&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;118.8&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;polygon points=&quot;52,118.8 195.5,137 339,157.1 482.5,175.3 626,187.4 626,266 52,266&quot; class=&quot;ar k0&quot;/&gt;&lt;polyline points=&quot;52,118.8 195.5,137 339,157.1 482.5,175.3 626,187.4&quot; class=&quot;ln k0&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;118.8&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;195.5&quot; cy=&quot;137&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;339&quot; cy=&quot;157.1&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;482.5&quot; cy=&quot;175.3&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;187.4&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;text x=&quot;52&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;2022&lt;/text&gt;&lt;text x=&quot;195.5&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;2023&lt;/text&gt;&lt;text x=&quot;339&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;2024&lt;/text&gt;&lt;text x=&quot;482.5&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;2025&lt;/text&gt;&lt;text x=&quot;626&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;2026&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;The same numbers as shares of each year (drawn as 100% stacked)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Team went from 5% to 27% of all subscriptions; Basic fell from 73% to 39%.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-build-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build one?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;In &lt;strong&gt;Visualizations&lt;/strong&gt; pick &lt;strong&gt;Area chart&lt;/strong&gt;, &lt;strong&gt;Stacked area chart&lt;/strong&gt; or &lt;strong&gt;100% stacked area chart&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Drag the date to &lt;strong&gt;X-axis&lt;/strong&gt; and the measure to &lt;strong&gt;Y-axis&lt;/strong&gt;; for series, a field to &lt;strong&gt;Legend&lt;/strong&gt; or several measures to the Y-axis.&lt;/li&gt;&lt;li&gt;Sort the time axis by date: &lt;strong&gt;More options (...)&lt;/strong&gt;, &lt;strong&gt;Sort axis&lt;/strong&gt;, by the date field, ascending.&lt;/li&gt;&lt;li&gt;The &lt;strong&gt;Lines&lt;/strong&gt; and &lt;strong&gt;Shade area&lt;/strong&gt; settings in &lt;strong&gt;Format visual&lt;/strong&gt; set line width and how strong the fill is.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;One behaviour is different from other visuals: Microsoft notes that selecting an area in a basic area chart highlights it but does not cross-filter the other visuals on the page. Clicking other visuals still filters the area chart.&lt;/p&gt;
&lt;h2 id=&quot;what-dax-goes-with-an-area-chart&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-dax-goes-with-an-area-chart&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What DAX goes with an area chart?&lt;/h2&gt;
&lt;p&gt;The 100% chart computes shares by itself. For a table or tooltip next to it, the share of each plan in its year:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Subscriptions = &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Subscriptions&lt;i class=&quot;m&quot;&gt;[Subscription ID]&lt;/i&gt; )

Share of Year =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; (
    &lt;i class=&quot;m&quot;&gt;[Subscriptions]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Subscriptions]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;REMOVEFILTERS&lt;/i&gt; ( Plans&lt;i class=&quot;m&quot;&gt;[Plan]&lt;/i&gt; ) )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;For subscriptions, which are counted at a point in time, the value at the end of each period is usually what you want, not a sum over the days. A semi-additive measure handles it:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Active Subscriptions =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;m&quot;&gt;[Subscriptions]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;LASTDATE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href=&quot;/blog/opening-closing-balance-dax/&quot;&gt;Opening and closing balances in DAX&lt;/a&gt; explains why stock-like numbers need this.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Layered areas with many series.&lt;/strong&gt; The front area covers the back ones; past three series, nothing is readable. Use lines.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Reading a middle band as a trend.&lt;/strong&gt; In a stacked area, a band that looks like it shrinks may only be squeezed by the band under it growing. Compare middle series with lines or small multiples.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;An axis above zero.&lt;/strong&gt; The area's size is read as an amount, so it must start at zero; a zoomed axis is a line chart's privilege.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Categories on the X-axis.&lt;/strong&gt; Filling between &amp;quot;North&amp;quot; and &amp;quot;South&amp;quot; invents a continuity; areas are for time.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Summing stock numbers.&lt;/strong&gt; Headcount, subscriptions and balances summed over days give huge wrong totals; use a closing value.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-basic-area-chart&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create and use basic area charts&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-line-chart&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Line charts in Power BI (line and area variants)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/lastdate-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: LASTDATE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Use a stacked area when the total and its parts matter, a 100% stacked area when only the mix matters, and a basic area for two series at most. For anything else a &lt;a href=&quot;/blog/line-chart-power-bi/&quot;&gt;line chart&lt;/a&gt; is clearer.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Conditional formatting in Power BI: gradients and rules</title>
    <link href="https://data.benibix.com/blog/conditional-formatting-power-bi/"/>
    <id>https://data.benibix.com/blog/conditional-formatting-power-bi/</id>
    <published>2026-10-22T12:00:00Z</published>
    <updated>2026-11-02T12:00:00Z</updated>
    <summary>How conditional formatting in Power BI colours cells, columns, titles and text by data, the three format styles (gradient, rules, field value), data bars and icons in tables, theme colour names like good and bad in DAX, and the traps of colour.</summary>
    <category term="Visuals"/>
    <category term="Report features"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;conditional formatting&lt;/strong&gt; sets a colour, an icon or a bar from the data. Anywhere you see the &lt;strong&gt;fx&lt;/strong&gt; button in the format pane (column colours, font colours, backgrounds, titles, borders), you can pick one of three &lt;strong&gt;format styles&lt;/strong&gt;: &lt;strong&gt;Gradient&lt;/strong&gt; (a colour scale between a minimum and maximum), &lt;strong&gt;Rules&lt;/strong&gt; (&amp;quot;if the value is below 0, red&amp;quot;) or &lt;strong&gt;Field value&lt;/strong&gt; (a measure returns the colour itself). Tables and matrices add &lt;strong&gt;data bars&lt;/strong&gt;, &lt;strong&gt;icons&lt;/strong&gt; and &lt;strong&gt;web URLs&lt;/strong&gt;. A measure can return a hex colour, or a theme colour name such as &lt;code&gt;good&lt;/code&gt;, &lt;code&gt;bad&lt;/code&gt; or &lt;code&gt;neutral&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;A table of 30 numbers takes a minute to read. The same table with the three red cells that matter takes a second. Colour used for one message per visual turns a report into an alert; colour everywhere turns it into noise.&lt;/p&gt;
&lt;p&gt;The short video below shows how to pick colours everyone can read, including people with colour blindness, and why colour should never carry the meaning alone.&lt;/p&gt;
&lt;h2 id=&quot;what-can-be-formatted&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-can-be-formatted&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What can be formatted?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Element&lt;/th&gt;&lt;th&gt;Options&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Table and matrix cells&lt;/td&gt;&lt;td&gt;background colour, font colour, data bars, icons, web URL&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Chart columns, bars, lines, markers&lt;/td&gt;&lt;td&gt;colour (fx)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Card callout and reference labels&lt;/td&gt;&lt;td&gt;font colour, background&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Visual title, subtitle, borders&lt;/td&gt;&lt;td&gt;colour, and the title text itself (field value)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Shapes, buttons, text&lt;/td&gt;&lt;td&gt;fill, text colour&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Where conditional formatting applies&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;which-format-style-should-you-use&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-format-style-should-you-use&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which format style should you use?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Style&lt;/th&gt;&lt;th&gt;How it decides&lt;/th&gt;&lt;th&gt;Use for&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Gradient&lt;/td&gt;&lt;td&gt;a colour scale from the lowest to the highest value, optional centre&lt;/td&gt;&lt;td&gt;heatmaps, &amp;quot;more is darker&amp;quot;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Rules&lt;/td&gt;&lt;td&gt;ranges of values or percentages map to colours&lt;/td&gt;&lt;td&gt;thresholds: below target, near, above&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Field value&lt;/td&gt;&lt;td&gt;a measure or column returns the colour&lt;/td&gt;&lt;td&gt;any logic you can write in DAX&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;Microsoft's column chart example shows all three: a gradient on sales variance (red for low, blue for high), rules on a status measure, and a field value measure &lt;code&gt;Color status = IF([This Year Sales] &amp;gt; 2000000, &amp;quot;#200AE8&amp;quot;, &amp;quot;#F00938&amp;quot;)&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-write-a-colour-measure&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-write-a-colour-measure&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you write a colour measure?&lt;/h2&gt;
&lt;p&gt;Return a hex code, a colour name, or a theme colour name. Theme names keep the report consistent when the theme changes:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Target Status Colour =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Attainment = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue Target]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;SWITCH&lt;/i&gt; (
        &lt;i class=&quot;k&quot;&gt;TRUE&lt;/i&gt; (),
        &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( Attainment ), &lt;i class=&quot;f&quot;&gt;BLANK&lt;/i&gt; (),
        Attainment &amp;gt;= &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;good&amp;quot;&lt;/i&gt;,
        Attainment &amp;gt;= &lt;i class=&quot;n&quot;&gt;0.9&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;neutral&amp;quot;&lt;/i&gt;,
        &lt;i class=&quot;s&quot;&gt;&amp;quot;bad&amp;quot;&lt;/i&gt;
    )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;With &lt;strong&gt;Field value&lt;/strong&gt;, Power BI uses the current theme's good, neutral and bad colours. Returning &lt;code&gt;BLANK()&lt;/code&gt; leaves the default colour. For hex codes, use &lt;code&gt;&amp;quot;#1A9E75&amp;quot;&lt;/code&gt;-style strings.&lt;/p&gt;
&lt;h2 id=&quot;how-do-data-bars-and-icons-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-data-bars-and-icons-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do data bars and icons work?&lt;/h2&gt;
&lt;p&gt;In a table or matrix, open the arrow next to a measure in the well, &lt;strong&gt;Conditional formatting&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Data bars&lt;/strong&gt;: a bar in the cell, scaled from the lowest to the highest value (or fixed minimum and maximum), with separate colours for positive and negative, and &lt;strong&gt;Show bar only&lt;/strong&gt; to hide the number.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Icons&lt;/strong&gt;: arrows, traffic lights or shapes by rules, placed left or right of the value; or a measure that returns an icon name.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Apply to&lt;/strong&gt;: values only, values and totals, or totals only.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;A rule-based icon for change against last year: up arrow above +2%, sideways between -2% and +2%, down arrow below -2%.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Colour on everything.&lt;/strong&gt; Formatting every column means none stands out; format the one column that carries the message.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Red and green only.&lt;/strong&gt; About one in twelve men has trouble telling red from green; add icons or use blue and orange.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Gradients across totals.&lt;/strong&gt; A total row in a gradient is the darkest cell and dominates; apply to values only.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Hex codes everywhere.&lt;/strong&gt; A rebrand means editing every measure; return theme names (good, bad, neutral) or keep colours in one measure.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Blank cells coloured as zero.&lt;/strong&gt; A gradient may treat blanks as the minimum; decide in the dialog how to format blanks.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Apply conditional formatting in tables and matrixes&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-column-charts&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create and use column charts in Power BI (conditional formatting)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-report-themes&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Use report themes in Power BI (theme colours in DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Write one status measure that returns good, neutral or bad, and use it with Field value on the visuals where the status matters. &lt;a href=&quot;/blog/report-theme-json-power-bi/&quot;&gt;Report themes&lt;/a&gt; set what good, neutral and bad look like.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>DAX filter functions: every one with an example</title>
    <link href="https://data.benibix.com/blog/filter-functions-dax-reference/"/>
    <id>https://data.benibix.com/blog/filter-functions-dax-reference/</id>
    <published>2026-10-22T12:00:00Z</published>
    <updated>2026-10-22T12:00:00Z</updated>
    <summary>A reference of all DAX filter functions, CALCULATE, CALCULATETABLE, FILTER, ALL, ALLEXCEPT, ALLSELECTED, ALLNOBLANKROW, ALLCROSSFILTERED, REMOVEFILTERS, KEEPFILTERS, SELECTEDVALUE, LOOKUPVALUE, EARLIER, EARLIEST, and the window and visual calculation functions, each with what it does and a short example.</summary>
    <category term="DAX"/>
    <category term="Reference"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; DAX's filter functions change or read the &lt;strong&gt;filter context&lt;/strong&gt;. &lt;code&gt;CALCULATE&lt;/code&gt; and &lt;code&gt;CALCULATETABLE&lt;/code&gt; evaluate an expression under changed filters. &lt;code&gt;FILTER&lt;/code&gt; returns the rows that meet a condition. The &lt;strong&gt;ALL family&lt;/strong&gt; (&lt;code&gt;ALL&lt;/code&gt;, &lt;code&gt;ALLEXCEPT&lt;/code&gt;, &lt;code&gt;ALLSELECTED&lt;/code&gt;, &lt;code&gt;ALLNOBLANKROW&lt;/code&gt;, &lt;code&gt;ALLCROSSFILTERED&lt;/code&gt;, &lt;code&gt;REMOVEFILTERS&lt;/code&gt;) removes filters, and &lt;code&gt;KEEPFILTERS&lt;/code&gt; adds instead of replacing. &lt;code&gt;SELECTEDVALUE&lt;/code&gt; reads a single selection, &lt;code&gt;LOOKUPVALUE&lt;/code&gt; finds a value by keys, and &lt;code&gt;EARLIER&lt;/code&gt; reaches an outer row. Microsoft's filter group also holds the window functions (&lt;code&gt;OFFSET&lt;/code&gt;, &lt;code&gt;INDEX&lt;/code&gt;, &lt;code&gt;WINDOW&lt;/code&gt;, &lt;code&gt;RANK&lt;/code&gt;, &lt;code&gt;ROWNUMBER&lt;/code&gt;) and the visual calculation functions.&lt;/p&gt;
&lt;p&gt;This page lists them all, with one example each, and links to the posts that explain the important ones in depth.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-change-the-filter-context&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-change-the-filter-context&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions change the filter context?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Does&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;CALCULATE&lt;/td&gt;&lt;td&gt;evaluates a scalar expression with changed filters&lt;/td&gt;&lt;td&gt;CALCULATE ( [Revenue], 'Product'[Color] = &amp;quot;Red&amp;quot; )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CALCULATETABLE&lt;/td&gt;&lt;td&gt;evaluates a table expression with changed filters&lt;/td&gt;&lt;td&gt;CALCULATETABLE ( VALUES ( Customer[Customer] ), 'Date'[Year] = 2026 )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;FILTER&lt;/td&gt;&lt;td&gt;returns the rows of a table that meet a condition&lt;/td&gt;&lt;td&gt;FILTER ( VALUES ( Customer[Customer] ), [Revenue] &amp;gt; 10000 )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;KEEPFILTERS&lt;/td&gt;&lt;td&gt;makes a filter intersect with existing filters&lt;/td&gt;&lt;td&gt;CALCULATE ( [Revenue], KEEPFILTERS ( 'Product'[Color] = &amp;quot;Red&amp;quot; ) )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Filter context functions&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In depth: &lt;a href=&quot;/blog/calculate-function-dax/&quot;&gt;CALCULATE&lt;/a&gt;, &lt;a href=&quot;/blog/filter-function-dax/&quot;&gt;FILTER&lt;/a&gt;, &lt;a href=&quot;/blog/keepfilters-dax/&quot;&gt;KEEPFILTERS&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-remove-filters&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-remove-filters&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions remove filters?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Returns a table?&lt;/th&gt;&lt;th&gt;Does&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;ALL&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;all rows or distinct values, ignoring filters; removes filters in CALCULATE&lt;/td&gt;&lt;td&gt;COUNTROWS ( ALL ( 'Product' ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ALLEXCEPT&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;removes all filters on a table except the listed columns&lt;/td&gt;&lt;td&gt;CALCULATE ( [Revenue], ALLEXCEPT ( 'Product', 'Product'[Category] ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ALLSELECTED&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;removes the visual's row and column filters, keeps slicers&lt;/td&gt;&lt;td&gt;CALCULATE ( [Revenue], ALLSELECTED ( 'Product' ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ALLNOBLANKROW&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;like ALL, without the blank row of unmatched keys&lt;/td&gt;&lt;td&gt;COUNTROWS ( ALLNOBLANKROW ( 'Product' ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ALLCROSSFILTERED&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;clears all filters applied to a table, also those from other tables&lt;/td&gt;&lt;td&gt;CALCULATE ( [Revenue], ALLCROSSFILTERED ( Sales ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;REMOVEFILTERS&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;removes filters from tables or columns; preferred for just removing&lt;/td&gt;&lt;td&gt;CALCULATE ( [Revenue], REMOVEFILTERS ( 'Product' ) )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The ALL family&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In depth: &lt;a href=&quot;/blog/all-allexcept-removefilters-dax/&quot;&gt;ALL, ALLEXCEPT and REMOVEFILTERS&lt;/a&gt;, &lt;a href=&quot;/blog/allselected-dax/&quot;&gt;ALLSELECTED&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-read-values&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-read-values&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions read values?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Does&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;SELECTEDVALUE&lt;/td&gt;&lt;td&gt;the value when exactly one is filtered, else an alternate&lt;/td&gt;&lt;td&gt;SELECTEDVALUE ( 'Date'[Year], &amp;quot;All years&amp;quot; )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;LOOKUPVALUE&lt;/td&gt;&lt;td&gt;the value in the row matching all search values&lt;/td&gt;&lt;td&gt;LOOKUPVALUE ( Rates[Rate], Rates[Currency], &amp;quot;USD&amp;quot;, Rates[Date], DATE ( 2026, 10, 1 ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;EARLIER&lt;/td&gt;&lt;td&gt;a column's value in the outer row context&lt;/td&gt;&lt;td&gt;FILTER ( Sales, Sales[Date] &amp;lt;= EARLIER ( Sales[Date] ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;EARLIEST&lt;/td&gt;&lt;td&gt;the value in the outermost row context&lt;/td&gt;&lt;td&gt;EARLIEST ( Sales[Date] )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Reading the context and other rows&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In depth: &lt;a href=&quot;/blog/selectedvalue-hasonevalue-dax/&quot;&gt;SELECTEDVALUE and HASONEVALUE&lt;/a&gt;, &lt;a href=&quot;/blog/lookupvalue-dax/&quot;&gt;LOOKUPVALUE&lt;/a&gt;, &lt;a href=&quot;/blog/earlier-earliest-dax/&quot;&gt;EARLIER and EARLIEST&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;which-window-functions-are-filter-functions&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-window-functions-are-filter-functions&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which window functions are filter functions?&lt;/h2&gt;
&lt;p&gt;They return rows relative to the current one, in a table ordered and partitioned as you say:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Returns&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;OFFSET&lt;/td&gt;&lt;td&gt;the row a given distance away&lt;/td&gt;&lt;td&gt;CALCULATE ( [Revenue], OFFSET ( -1, ALLSELECTED ( 'Date'[Year Month] ), ORDERBY ( 'Date'[Year Month] ) ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;INDEX&lt;/td&gt;&lt;td&gt;the row at an absolute position&lt;/td&gt;&lt;td&gt;CALCULATE ( [Revenue], INDEX ( 1, ALLSELECTED ( 'Date'[Year Month] ), ORDERBY ( 'Date'[Year Month] ) ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;WINDOW&lt;/td&gt;&lt;td&gt;a range of rows, absolute or relative&lt;/td&gt;&lt;td&gt;CALCULATE ( [Revenue], WINDOW ( -2, REL, 0, REL, ALLSELECTED ( 'Date'[Year Month] ), ORDERBY ( 'Date'[Year Month] ) ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;RANK&lt;/td&gt;&lt;td&gt;the rank of the current row by columns, with ties (DENSE or SKIP)&lt;/td&gt;&lt;td&gt;RANK ( DENSE, ALLSELECTED ( 'Product'[List Price] ), ORDERBY ( 'Product'[List Price], DESC ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ROWNUMBER&lt;/td&gt;&lt;td&gt;a unique number for the current row&lt;/td&gt;&lt;td&gt;ROWNUMBER ( ALLSELECTED ( Customer[Customer] ), ORDERBY ( Customer[Customer] ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ORDERBY&lt;/td&gt;&lt;td&gt;the sort of the window's rows&lt;/td&gt;&lt;td&gt;ORDERBY ( 'Date'[Year Month], ASC )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PARTITIONBY&lt;/td&gt;&lt;td&gt;the groups the window restarts in&lt;/td&gt;&lt;td&gt;PARTITIONBY ( 'Date'[Year] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;MATCHBY&lt;/td&gt;&lt;td&gt;the columns that identify the current row&lt;/td&gt;&lt;td&gt;MATCHBY ( 'Date'[Year Month] )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Window functions&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Microsoft notes that &lt;code&gt;RANK&lt;/code&gt; does not relate to &lt;code&gt;RANKX&lt;/code&gt; as &lt;code&gt;SUM&lt;/code&gt; to &lt;code&gt;SUMX&lt;/code&gt;: &lt;code&gt;RANK&lt;/code&gt; orders by columns of the relation, while &lt;a href=&quot;/blog/rankx-dax/&quot;&gt;RANKX&lt;/a&gt; ranks by any expression, such as a measure. In depth: &lt;a href=&quot;/blog/offset-dax/&quot;&gt;OFFSET&lt;/a&gt;, &lt;a href=&quot;/blog/window-dax/&quot;&gt;WINDOW&lt;/a&gt;, &lt;a href=&quot;/blog/index-rank-rownumber-dax/&quot;&gt;INDEX, RANK and ROWNUMBER&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;which-are-visual-calculation-functions&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-are-visual-calculation-functions&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which are visual calculation functions?&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;RUNNINGSUM&lt;/code&gt;, &lt;code&gt;MOVINGAVERAGE&lt;/code&gt;, &lt;code&gt;PREVIOUS&lt;/code&gt;, &lt;code&gt;NEXT&lt;/code&gt;, &lt;code&gt;FIRST&lt;/code&gt;, &lt;code&gt;LAST&lt;/code&gt;, &lt;code&gt;RANGE&lt;/code&gt;, &lt;code&gt;LOOKUP&lt;/code&gt; and &lt;code&gt;LOOKUPWITHTOTALS&lt;/code&gt; work in &lt;a href=&quot;/blog/visual-calculations-power-bi/&quot;&gt;visual calculations&lt;/a&gt;, on the visual's own rows and columns:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Running sum = &lt;i class=&quot;f&quot;&gt;RUNNINGSUM&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sales Amount]&lt;/i&gt; )
Versus previous = &lt;i class=&quot;m&quot;&gt;[Sales Amount]&lt;/i&gt; - &lt;i class=&quot;f&quot;&gt;PREVIOUS&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sales Amount]&lt;/i&gt; )
Bikes value = &lt;i class=&quot;f&quot;&gt;LOOKUP&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sales Amount]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Bikes&amp;quot;&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;All of them: &lt;a href=&quot;/blog/visual-calculation-functions-dax/&quot;&gt;visual calculation functions&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;REMOVEFILTERS where a table is needed.&lt;/strong&gt; It only removes filters; to iterate or count all rows, use &lt;code&gt;ALL&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;ALLCROSSFILTERED as a table.&lt;/strong&gt; Like &lt;code&gt;REMOVEFILTERS&lt;/code&gt;, it cannot return a table.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Window functions without a stable order.&lt;/strong&gt; Ties in &lt;code&gt;ORDERBY&lt;/code&gt; make &lt;code&gt;OFFSET&lt;/code&gt; and &lt;code&gt;INDEX&lt;/code&gt; ambiguous; order by a unique column or add one.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;DirectQuery limits.&lt;/strong&gt; Several of these functions are not supported in calculated columns or RLS rules in DirectQuery mode; check each function's page.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/filter-functions-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Filter functions (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/allcrossfiltered-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: ALLCROSSFILTERED function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/calculatetable-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: CALCULATETABLE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Learn &lt;code&gt;CALCULATE&lt;/code&gt;, &lt;code&gt;FILTER&lt;/code&gt;, &lt;code&gt;REMOVEFILTERS&lt;/code&gt; and &lt;code&gt;SELECTEDVALUE&lt;/code&gt; first: they cover most measures. Then &lt;a href=&quot;/blog/offset-dax/&quot;&gt;OFFSET&lt;/a&gt; for comparisons with the previous row.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>INDEX, RANK and ROWNUMBER in DAX window functions</title>
    <link href="https://data.benibix.com/blog/index-rank-rownumber-dax/"/>
    <id>https://data.benibix.com/blog/index-rank-rownumber-dax/</id>
    <published>2026-10-22T12:00:00Z</published>
    <updated>2026-10-22T12:00:00Z</updated>
    <summary>How the DAX window functions INDEX, RANK and ROWNUMBER work, the first or last row of a sorted table with INDEX, rank with DENSE or SKIP ties, unique row numbers, PARTITIONBY for groups, totals, and when RANKX is still the better choice.</summary>
    <category term="DAX"/>
    <category term="Window functions"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;&lt;code&gt;INDEX ( position, relation, ORDERBY ( ... ) )&lt;/code&gt;&lt;/strong&gt; returns the row at an absolute position of a sorted table: 1 is the first, -1 the last. In &lt;code&gt;CALCULATE&lt;/code&gt;, it gives &amp;quot;the first month's revenue&amp;quot; or &amp;quot;the best product's revenue&amp;quot;. &lt;strong&gt;&lt;code&gt;RANK ( [ties], relation, ORDERBY ( ... ) )&lt;/code&gt;&lt;/strong&gt; returns the current row's rank by columns, with &lt;strong&gt;DENSE&lt;/strong&gt; or &lt;strong&gt;SKIP&lt;/strong&gt; ties. &lt;strong&gt;&lt;code&gt;ROWNUMBER ( relation, ORDERBY ( ... ) )&lt;/code&gt;&lt;/strong&gt; gives a unique number, and needs an order without ties. All take &lt;code&gt;PARTITIONBY&lt;/code&gt; to restart per group. To rank by a &lt;strong&gt;measure&lt;/strong&gt; in a model measure, &lt;a href=&quot;/blog/rankx-dax/&quot;&gt;RANKX&lt;/a&gt; remains the tool.&lt;/p&gt;
&lt;p&gt;These functions bring SQL's window functions to DAX. They shine with sorted columns (dates, codes, list prices) and in visual calculations.&lt;/p&gt;
&lt;h2 id=&quot;what-does-each-return&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-each-return&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does each return?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Product&lt;/th&gt;&lt;th&gt;List Price&lt;/th&gt;&lt;th&gt;RANK (SKIP)&lt;/th&gt;&lt;th&gt;RANK (DENSE)&lt;/th&gt;&lt;th&gt;ROWNUMBER&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Road-150&lt;/td&gt;&lt;td&gt;3,578&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Mountain-200&lt;/td&gt;&lt;td&gt;2,320&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Touring-1000&lt;/td&gt;&lt;td&gt;2,320&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Helmet&lt;/td&gt;&lt;td&gt;35&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Bottle&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Products sorted by list price&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;code&gt;ROWNUMBER&lt;/code&gt; gives every row a unique number. When the order has ties, Microsoft's reference says it looks for the fewest extra columns of the relation that make each row unique and appends them to the order; if none exist and a tie is found, it returns an error. Name the tie-breaker yourself so the order is the one you want (here &lt;code&gt;ORDERBY ( 'Product'[List Price], DESC, 'Product'[Product], ASC )&lt;/code&gt;).&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- calculated column on Product&lt;/i&gt;
Price Rank = &lt;i class=&quot;f&quot;&gt;RANK&lt;/i&gt; ( DENSE, &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;ORDERBY&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[List Price]&lt;/i&gt;, DESC ) )

Price Row =
&lt;i class=&quot;f&quot;&gt;ROWNUMBER&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;ORDERBY&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[List Price]&lt;/i&gt;, DESC, &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt;, ASC )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-does-index-pick-a-row&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-index-pick-a-row&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does INDEX pick a row?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- revenue of the first month in the selection&lt;/i&gt;
First Month Revenue =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;INDEX&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;ORDERBY&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; ) )
)

&lt;i class=&quot;c&quot;&gt;-- the last month&lt;/i&gt;
Last Month Revenue =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;INDEX&lt;/i&gt; ( -&lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;ORDERBY&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; ) )
)

&lt;i class=&quot;c&quot;&gt;-- growth from first to last month of the selection&lt;/i&gt;
Growth First to Last = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Last Month Revenue]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[First Month Revenue]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[First Month Revenue]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;INDEX&lt;/code&gt; returns an empty table for position 0, BLANK or out of range.&lt;/p&gt;
&lt;h2 id=&quot;how-do-they-behave-in-visuals-and-totals&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-they-behave-in-visuals-and-totals&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do they behave in visuals and totals?&lt;/h2&gt;
&lt;p&gt;The current row is matched by the visual's values for the relation's columns, so the relation must contain the columns on the visual. Microsoft notes that &lt;code&gt;RANK&lt;/code&gt; returns blank for total rows. In visual calculations the same functions work on the visual's axis without a relation:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Sales Rank Within Year = &lt;i class=&quot;f&quot;&gt;RANK&lt;/i&gt; ( DENSE, &lt;i class=&quot;f&quot;&gt;ORDERBY&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[SalesAmount]&lt;/i&gt;, DESC ), &lt;i class=&quot;f&quot;&gt;PARTITIONBY&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[CalendarYear]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;That is Microsoft's visual calculation example, and in visual calculations ordering by a measure is natural, because the visual's rows already hold the values.&lt;/p&gt;
&lt;h2 id=&quot;rank-or-rankx&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#rank-or-rankx&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;RANK or RANKX?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Need&lt;/th&gt;&lt;th&gt;Use&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;rank by a column (price, date, code)&lt;/td&gt;&lt;td&gt;&lt;code&gt;RANK&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;rank by a measure in a model measure&lt;/td&gt;&lt;td&gt;&lt;code&gt;RANKX ( ALLSELECTED ( ... ), [Revenue] )&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;rank by a measure on one visual&lt;/td&gt;&lt;td&gt;&lt;code&gt;RANK&lt;/code&gt; in a visual calculation&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;unique sequence numbers&lt;/td&gt;&lt;td&gt;&lt;code&gt;ROWNUMBER&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;Microsoft states that &lt;code&gt;RANK&lt;/code&gt; does not relate to &lt;code&gt;RANKX&lt;/code&gt; the way &lt;code&gt;SUM&lt;/code&gt; relates to &lt;code&gt;SUMX&lt;/code&gt;: they are different functions for different jobs.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;ROWNUMBER with ties.&lt;/strong&gt; It adds tie-breaker columns itself, or errors when it cannot; name the tie-breaker so the order is predictable.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Relation without the visual's columns.&lt;/strong&gt; Rows cannot be matched; results repeat or are blank.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Ranking by a measure with RANK in a model measure.&lt;/strong&gt; Use &lt;code&gt;RANKX&lt;/code&gt;, or a visual calculation.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Sorting text months.&lt;/strong&gt; Order by a sortable key.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/index-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: INDEX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/rank-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: RANK function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/rownumber-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: ROWNUMBER function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Write &lt;code&gt;First Month Revenue&lt;/code&gt; and &lt;code&gt;Last Month Revenue&lt;/code&gt; with &lt;code&gt;INDEX&lt;/code&gt; and show the growth across whatever period the reader selects. &lt;a href=&quot;/blog/visual-calculation-functions-dax/&quot;&gt;Visual calculation functions&lt;/a&gt; cover the same ideas on one visual.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Net Promoter Score (NPS): calculation and DAX</title>
    <link href="https://data.benibix.com/blog/net-promoter-score-kpi/"/>
    <id>https://data.benibix.com/blog/net-promoter-score-kpi/</id>
    <published>2026-10-22T12:00:00Z</published>
    <updated>2026-10-22T12:00:00Z</updated>
    <summary>How to calculate Net Promoter Score from 0 to 10 survey answers, promoters (9 and 10), passives (7 and 8) and detractors (0 to 6), the score from -100 to +100, a worked example, NPS by segment and over time, sample size and margin of error, and the DAX with a 100% stacked bar.</summary>
    <category term="KPIs"/>
    <category term="Customers"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;Net Promoter Score (NPS)&lt;/strong&gt; comes from one question, &amp;quot;How likely are you to recommend us to a friend or colleague?&amp;quot;, answered from 0 to 10. Answers of &lt;strong&gt;9 and 10&lt;/strong&gt; are &lt;strong&gt;promoters&lt;/strong&gt;, &lt;strong&gt;7 and 8&lt;/strong&gt; are &lt;strong&gt;passives&lt;/strong&gt;, &lt;strong&gt;0 to 6&lt;/strong&gt; are &lt;strong&gt;detractors&lt;/strong&gt;. NPS = &lt;strong&gt;% promoters - % detractors&lt;/strong&gt;, a number from -100 to +100 (not a percentage). With 50% promoters, 30% passives and 20% detractors, NPS = &lt;strong&gt;+30&lt;/strong&gt;. Passives count in the total but in neither group.&lt;/p&gt;
&lt;p&gt;NPS is popular because it is one number that is easy to explain. It is useful when tracked over time and by segment, with the comments that come with the scores, and misleading as a single figure from 40 answers.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Score&lt;/th&gt;&lt;th&gt;Answers&lt;/th&gt;&lt;th&gt;Group&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;td&gt;promoter&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;9&lt;/td&gt;&lt;td&gt;80&lt;/td&gt;&lt;td&gt;promoter&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;8&lt;/td&gt;&lt;td&gt;70&lt;/td&gt;&lt;td&gt;passive&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;7&lt;/td&gt;&lt;td&gt;50&lt;/td&gt;&lt;td&gt;passive&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;td&gt;detractor&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;0 to 5&lt;/td&gt;&lt;td&gt;50&lt;/td&gt;&lt;td&gt;detractor&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;400 survey answers&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;Promoters = 200 / 400 = 50%&lt;/li&gt;&lt;li&gt;Passives = 120 / 400 = 30%&lt;/li&gt;&lt;li&gt;Detractors = 80 / 400 = 20%&lt;/li&gt;&lt;li&gt;&lt;strong&gt;NPS = 50 - 20 = +30&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;pct-bar&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;Detractors&lt;/li&gt;&lt;li class=&quot;k1&quot;&gt;Passives&lt;/li&gt;&lt;li class=&quot;k2&quot;&gt;Promoters&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;pct bar chart: Q1 26, 32, 42; Q2 23, 31, 46; Q3 20, 30, 50&quot;&gt;&lt;line x1=&quot;37.6&quot; y1=&quot;8&quot; x2=&quot;37.6&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;37.6&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0%&lt;/text&gt;&lt;line x1=&quot;149.3&quot; y1=&quot;8&quot; x2=&quot;149.3&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;149.3&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;20%&lt;/text&gt;&lt;line x1=&quot;261&quot; y1=&quot;8&quot; x2=&quot;261&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;261&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;40%&lt;/text&gt;&lt;line x1=&quot;372.6&quot; y1=&quot;8&quot; x2=&quot;372.6&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;372.6&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;60%&lt;/text&gt;&lt;line x1=&quot;484.3&quot; y1=&quot;8&quot; x2=&quot;484.3&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;484.3&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;80%&lt;/text&gt;&lt;line x1=&quot;596&quot; y1=&quot;8&quot; x2=&quot;596&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;596&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;100%&lt;/text&gt;&lt;rect x=&quot;37.6&quot; y=&quot;22.8&quot; width=&quot;145.2&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;182.8&quot; y=&quot;22.8&quot; width=&quot;178.7&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;rect x=&quot;361.5&quot; y=&quot;22.8&quot; width=&quot;234.5&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k2&quot;/&gt;&lt;text x=&quot;27.6&quot; y=&quot;55.7&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Q1&lt;/text&gt;&lt;rect x=&quot;37.6&quot; y=&quot;110.2&quot; width=&quot;128.4&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;166&quot; y=&quot;110.2&quot; width=&quot;173.1&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;rect x=&quot;339.1&quot; y=&quot;110.2&quot; width=&quot;256.9&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k2&quot;/&gt;&lt;text x=&quot;27.6&quot; y=&quot;143&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Q2&lt;/text&gt;&lt;rect x=&quot;37.6&quot; y=&quot;197.5&quot; width=&quot;111.7&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;149.3&quot; y=&quot;197.5&quot; width=&quot;167.5&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;rect x=&quot;316.8&quot; y=&quot;197.5&quot; width=&quot;279.2&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k2&quot;/&gt;&lt;text x=&quot;27.6&quot; y=&quot;230.3&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Q3&lt;/text&gt;&lt;line x1=&quot;37.6&quot; y1=&quot;8&quot; x2=&quot;37.6&quot; y2=&quot;270&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Answers by group per quarter (%)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Show the three groups as a 100% stacked bar next to the score: an NPS of +30 can be 50 - 20 or 35 - 5, which are different businesses.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;A Survey table with one row per answer: Response ID, Date, Score (0 to 10), Segment, Comment.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Responses = &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Survey )
Promoters = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Responses]&lt;/i&gt;, Survey&lt;i class=&quot;m&quot;&gt;[Score]&lt;/i&gt; &amp;gt;= &lt;i class=&quot;n&quot;&gt;9&lt;/i&gt; )
Detractors = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Responses]&lt;/i&gt;, Survey&lt;i class=&quot;m&quot;&gt;[Score]&lt;/i&gt; &amp;lt;= &lt;i class=&quot;n&quot;&gt;6&lt;/i&gt; )
Passives = &lt;i class=&quot;m&quot;&gt;[Responses]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Promoters]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Detractors]&lt;/i&gt;

Promoters % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Promoters]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Responses]&lt;/i&gt; )
Detractors % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Detractors]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Responses]&lt;/i&gt; )

NPS = ( &lt;i class=&quot;m&quot;&gt;[Promoters %]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Detractors %]&lt;/i&gt; ) * &lt;i class=&quot;n&quot;&gt;100&lt;/i&gt;

&lt;i class=&quot;c&quot;&gt;-- a column for the stacked bar and colours&lt;/i&gt;
NPS &lt;i class=&quot;f&quot;&gt;Group&lt;/i&gt; (column) =
&lt;i class=&quot;f&quot;&gt;SWITCH&lt;/i&gt; ( &lt;i class=&quot;k&quot;&gt;TRUE&lt;/i&gt; (), Survey&lt;i class=&quot;m&quot;&gt;[Score]&lt;/i&gt; &amp;gt;= &lt;i class=&quot;n&quot;&gt;9&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Promoter&amp;quot;&lt;/i&gt;, Survey&lt;i class=&quot;m&quot;&gt;[Score]&lt;/i&gt; &amp;gt;= &lt;i class=&quot;n&quot;&gt;7&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Passive&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Detractor&amp;quot;&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Format &lt;code&gt;NPS&lt;/code&gt; as a whole number with a sign (&lt;code&gt;+0;-0;0&lt;/code&gt;), not as a percentage.&lt;/p&gt;
&lt;h2 id=&quot;how-many-answers-do-you-need&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-many-answers-do-you-need&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How many answers do you need?&lt;/h2&gt;
&lt;p&gt;NPS swings a lot with few answers. A rough 95% margin of error:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;NPS Margin of Error =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; N = &lt;i class=&quot;m&quot;&gt;[Responses]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; P = &lt;i class=&quot;m&quot;&gt;[Promoters %]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; D = &lt;i class=&quot;m&quot;&gt;[Detractors %]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; V = P + D - &lt;i class=&quot;f&quot;&gt;POWER&lt;/i&gt; ( P - D, &lt;i class=&quot;n&quot;&gt;2&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;n&quot;&gt;1.96&lt;/i&gt; * &lt;i class=&quot;f&quot;&gt;SQRT&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( V, N ) ) * &lt;i class=&quot;n&quot;&gt;100&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;With 400 answers as above, the margin is about &lt;strong&gt;±8 points&lt;/strong&gt;; with 50 answers, about ±22. A move from +30 to +34 on 400 answers is noise. Show the number of responses on every NPS visual.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-make-nps-useful&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-make-nps-useful&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you make NPS useful?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;By segment&lt;/strong&gt;: plan, region, customer age, support contact or not.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Over time&lt;/strong&gt;: by quarter, with the response count.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;With comments&lt;/strong&gt;: the text answers say why; read the detractors' first, or group them with &lt;a href=&quot;/blog/key-influencers-power-bi/&quot;&gt;key influencers&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Close the loop&lt;/strong&gt;: detractors contacted within days are the most useful action NPS triggers.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;NPS as a percentage.&lt;/strong&gt; +30 is points, not 30%.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Averaging NPS across segments.&lt;/strong&gt; Recalculate from the answers; segment scores weighted equally mislead.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Small samples.&lt;/strong&gt; Show the margin of error or the count.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Survey timing.&lt;/strong&gt; Asking right after a support ticket gives a different score than a quarterly survey; keep the method fixed.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://www.netpromotersystem.com/about/measuring-your-net-promoter-score/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Net Promoter System: Measuring your Net Promoter Score&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-influencers&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Key influencers visualizations&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-types-for-reports-and-q-and-a&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Visualization types in Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Load the survey answers with their date and segment, build NPS with the response count, and show the three groups as a stacked bar. &lt;a href=&quot;/blog/csat-and-ces-kpi/&quot;&gt;CSAT and CES&lt;/a&gt; measure single interactions instead of the relationship.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>PL-300 in 2026: what the exam covers and how to study</title>
    <link href="https://data.benibix.com/blog/pl-300-study-guide/"/>
    <id>https://data.benibix.com/blog/pl-300-study-guide/</id>
    <published>2026-10-22T12:00:00Z</published>
    <updated>2026-10-22T12:00:00Z</updated>
    <summary>What the PL-300 Power BI Data Analyst exam measures since April 2026, how its four areas are weighted, and a study plan that builds every skill in Power BI itself.</summary>
    <category term="Exams"/>
    <category term="Data and BI"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; PL-300 earns the &lt;strong&gt;Power BI Data Analyst Associate&lt;/strong&gt; certification. It weighs preparing the data, modelling it, and visualising it about equally (25 to 30% each), with managing and securing Power BI at 15 to 20%. You need 700 out of 1,000 to pass. Study by building: one model from raw data to a published, secured report covers most of the list.&lt;/p&gt;
&lt;p&gt;I passed PL-300 in April 2026. This is the plan I would follow again, built on Microsoft's study guide for the skills measured as of 20 April 2026.&lt;/p&gt;
&lt;h2 id=&quot;what-does-pl-300-cover&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-pl-300-cover&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does PL-300 cover?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Prepare the data&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;25-30%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Model the data&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;25-30%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Visualize and analyze the data&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;25-30%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;b&gt;Manage and secure Power BI&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:66.7%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;15-20%&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;PL-300 skills, by weight in the exam&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In plain words:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Prepare the data&lt;/strong&gt;: connecting to sources (including choosing Import, DirectQuery or Direct Lake), profiling and cleaning in Power Query, and shaping tables into facts and dimensions with the right keys.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Model the data&lt;/strong&gt;: relationships and their direction, a date table, role-playing dimensions, and DAX: CALCULATE, time intelligence, semi-additive measures and calculation groups. Performance Analyzer and DAX query view to find what is slow.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Visualize and analyze&lt;/strong&gt;: choosing and formatting visuals, themes, bookmarks, drillthrough, tooltips, mobile layouts and accessibility, plus Copilot features and AI visuals.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Manage and secure&lt;/strong&gt;: workspaces and apps, refresh and gateways, endorsement, row-level security and sensitivity labels.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-changed-in-2026&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-changed-in-2026&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What changed in 2026?&lt;/h2&gt;
&lt;p&gt;The April 2026 update made minor changes in three groups: getting data, report usability, and workspaces. The weights stayed the same. If you studied from older notes, check the current list for Direct Lake in &amp;quot;get or connect to data&amp;quot; and the Copilot items in the reporting group.&lt;/p&gt;
&lt;h2 id=&quot;how-would-i-study-for-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-would-i-study-for-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How would I study for it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Study guide&lt;/b&gt;&lt;span&gt;read the skills list once, mark what is new to you&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Build&lt;/b&gt;&lt;span&gt;one model from raw data to a secured app&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Learn path&lt;/b&gt;&lt;span&gt;Microsoft's free modules for the gaps&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Practice assessment&lt;/b&gt;&lt;span&gt;Microsoft's free questions, twice&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Exam&lt;/b&gt;&lt;span&gt;when the practice score is steady&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;A study plan that builds instead of reads&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The build is what makes it stick. Take any dataset with a few tables and do every step yourself: clean it in Power Query, build a star schema, write the measures, design the pages, publish, add row-level security, and share it as an app. Each step is a line on the skills list.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Area&lt;/th&gt;&lt;th&gt;Practise it with&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Prepare the data&lt;/td&gt;&lt;td&gt;Star schema in gold: A lakehouse in three layers, lesson 3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Model the data&lt;/td&gt;&lt;td&gt;DAX measures that add up (open course)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Model the data&lt;/td&gt;&lt;td&gt;Every KPI once: measures and calculation groups&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Visualize and analyze&lt;/td&gt;&lt;td&gt;How I design a Power BI report page&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Manage and secure&lt;/td&gt;&lt;td&gt;Row-level security that holds (open course)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Where each area is practised on this site&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-helps-on-the-day&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-helps-on-the-day&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What helps on the day?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Try the exam sandbox first.&lt;/strong&gt; Microsoft's demo shows the question types and the screen, so nothing about the format is new on the day.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Read what the question asks for.&lt;/strong&gt; Many questions describe a situation and ask for the least effort, the fewest steps, or the option that meets every requirement. All the options may work; one fits the words.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Do not get stuck.&lt;/strong&gt; Mark a hard question for review and come back. Case studies come in their own section; check the instructions on whether you can go back.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-keep-the-certification&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-keep-the-certification&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you keep the certification?&lt;/h2&gt;
&lt;p&gt;Associate certifications last a year. You renew with a free online assessment on Microsoft Learn, which opens in the six months before it expires; if you do not pass, you can try again.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/pl-300&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam PL-300&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/power-bi-data-analyst-associate/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Microsoft Certified: Power BI Data Analyst Associate&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/exam-scoring-reports&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Exam scoring and score reports&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/renew-your-microsoft-certification&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Renew your Microsoft Certification&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Start with the build. &lt;a href=&quot;/courses/dax-measures-that-add-up/&quot;&gt;DAX measures that add up&lt;/a&gt; and &lt;a href=&quot;/courses/row-level-security/&quot;&gt;Row-level security that holds&lt;/a&gt; are open courses for the two areas people find hardest, and &lt;a href=&quot;https://tools.benibix.com/data/kpi-atlas/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;KPI Atlas&lt;/a&gt; has the DAX for 455 KPIs to practise measures on. My credential is on &lt;a href=&quot;/about/&quot;&gt;the About page&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>RELATED, USERELATIONSHIP and CROSSFILTER in DAX</title>
    <link href="https://data.benibix.com/blog/dax-relationship-functions/"/>
    <id>https://data.benibix.com/blog/dax-relationship-functions/</id>
    <published>2026-10-22T12:00:00Z</published>
    <updated>2026-10-22T12:00:00Z</updated>
    <summary>How the DAX relationship functions work, RELATED and RELATEDTABLE to follow a relationship from a row, USERELATIONSHIP to use an inactive relationship such as ship date, CROSSFILTER to change the filter direction in one measure, and TREATAS for virtual relationships.</summary>
    <category term="DAX"/>
    <category term="Concepts"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; relationships carry filters between tables, and four functions control them in DAX. &lt;code&gt;RELATED&lt;/code&gt; reads a value from the one side for the current row; &lt;code&gt;RELATEDTABLE&lt;/code&gt; returns the matching rows on the many side. &lt;code&gt;USERELATIONSHIP&lt;/code&gt; makes an &lt;strong&gt;inactive&lt;/strong&gt; relationship active inside one &lt;code&gt;CALCULATE&lt;/code&gt;, for example sales by ship date instead of order date. &lt;code&gt;CROSSFILTER&lt;/code&gt; changes the &lt;strong&gt;direction&lt;/strong&gt; of a relationship (one way, both, none) for one calculation. For tables with no relationship at all, &lt;code&gt;TREATAS&lt;/code&gt; applies values as a filter.&lt;/p&gt;
&lt;p&gt;A model can have only one active path between two tables. A Sales table with an order date, a ship date and a due date has three relationships to the Date table, two of them inactive. These functions are how a measure picks the one it needs.&lt;/p&gt;
&lt;h2 id=&quot;what-does-each-function-do&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-each-function-do&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does each function do?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Use in&lt;/th&gt;&lt;th&gt;Does&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;RELATED ( Table[Column] )&lt;/td&gt;&lt;td&gt;row context on the many side&lt;/td&gt;&lt;td&gt;returns the related value from the one side&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;RELATEDTABLE ( Table )&lt;/td&gt;&lt;td&gt;row context on the one side&lt;/td&gt;&lt;td&gt;returns the related rows from the many side&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;USERELATIONSHIP ( Col1, Col2 )&lt;/td&gt;&lt;td&gt;CALCULATE filter argument&lt;/td&gt;&lt;td&gt;uses an existing relationship (active or not) for this calculation&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CROSSFILTER ( Col1, Col2, Direction )&lt;/td&gt;&lt;td&gt;CALCULATE filter argument&lt;/td&gt;&lt;td&gt;sets the filter direction: None, OneWay, Both, OneWay_LeftFiltersRight, OneWay_RightFiltersLeft&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;TREATAS ( Table, Col )&lt;/td&gt;&lt;td&gt;CALCULATE filter argument&lt;/td&gt;&lt;td&gt;applies values to columns of a table with no relationship&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The relationship functions&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-use-related-and-relatedtable&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-use-related-and-relatedtable&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you use RELATED and RELATEDTABLE?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- calculated column on Sales: the product's category&lt;/i&gt;
Category = &lt;i class=&quot;f&quot;&gt;RELATED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- measure: revenue at list price&lt;/i&gt;
Revenue at List = &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Sales, Sales&lt;i class=&quot;m&quot;&gt;[Quantity]&lt;/i&gt; * &lt;i class=&quot;f&quot;&gt;RELATED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[List Price]&lt;/i&gt; ) )

&lt;i class=&quot;c&quot;&gt;-- calculated column on Customer: number of orders&lt;/i&gt;
Order Count = &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;RELATEDTABLE&lt;/i&gt; ( Sales ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Both need a row context and an existing relationship. &lt;code&gt;RELATED&lt;/code&gt; can follow several relationships in a chain (Sales to Product to Product Category), as long as each step goes to the one side.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-use-an-inactive-relationship&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-use-an-inactive-relationship&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you use an inactive relationship?&lt;/h2&gt;
&lt;p&gt;Sales has &lt;code&gt;Order Date&lt;/code&gt; (active to &lt;code&gt;'Date'[Date]&lt;/code&gt;) and &lt;code&gt;Ship Date&lt;/code&gt; (inactive, the dashed line in the model).&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue by Ship Date =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;USERELATIONSHIP&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Ship Date]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
)

Orders Shipped =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Sales ),
    &lt;i class=&quot;f&quot;&gt;USERELATIONSHIP&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Ship Date]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;column&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;By order date&lt;/li&gt;&lt;li class=&quot;k1&quot;&gt;By ship date&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;column chart: Jan 120, 98; Feb 135, 128; Mar 150, 141; Apr 142, 149&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;182&quot; x2=&quot;628&quot; y2=&quot;182&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;186&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;50&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;98&quot; x2=&quot;628&quot; y2=&quot;98&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;102&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;628&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;150&lt;/text&gt;&lt;rect x=&quot;75&quot; y=&quot;64.4&quot; width=&quot;47&quot; height=&quot;201.6&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;124&quot; y=&quot;101.4&quot; width=&quot;47&quot; height=&quot;164.6&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;text x=&quot;124&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jan&lt;/text&gt;&lt;rect x=&quot;219&quot; y=&quot;39.2&quot; width=&quot;47&quot; height=&quot;226.8&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;268&quot; y=&quot;51&quot; width=&quot;47&quot; height=&quot;215&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;text x=&quot;268&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Feb&lt;/text&gt;&lt;rect x=&quot;363&quot; y=&quot;14&quot; width=&quot;47&quot; height=&quot;252&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;412&quot; y=&quot;29.1&quot; width=&quot;47&quot; height=&quot;236.9&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;text x=&quot;412&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Mar&lt;/text&gt;&lt;rect x=&quot;507&quot; y=&quot;27.4&quot; width=&quot;47&quot; height=&quot;238.6&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;556&quot; y=&quot;15.7&quot; width=&quot;47&quot; height=&quot;250.3&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;text x=&quot;556&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Apr&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Revenue in 2026 by month, order date against ship date (thousands)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Inside the &lt;code&gt;CALCULATE&lt;/code&gt;, the ship date relationship is used and the order date relationship is ignored for that pair of tables. Microsoft notes that &lt;code&gt;USERELATIONSHIP&lt;/code&gt; cannot be used when row-level security is defined for the table that the measure is in, and that the relationship must exist in the model.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-change-the-filter-direction&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-change-the-filter-direction&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you change the filter direction?&lt;/h2&gt;
&lt;p&gt;Relationships filter from the one side to the many side. To count the products a filtered set of customers bought, the filter must go from Sales back to Product:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Products Bought =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product Key]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;CROSSFILTER&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Product Key]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product Key]&lt;/i&gt;, Both )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;A simpler form that needs no direction change: &lt;code&gt;DISTINCTCOUNT ( Sales[Product Key] )&lt;/code&gt;. Use &lt;code&gt;CROSSFILTER ... Both&lt;/code&gt; in one measure rather than setting the relationship to both directions in the model, which affects every visual and can make filters ambiguous. &lt;code&gt;None&lt;/code&gt; turns a relationship off for the calculation.&lt;/p&gt;
&lt;h2 id=&quot;what-if-there-is-no-relationship&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-if-there-is-no-relationship&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What if there is no relationship?&lt;/h2&gt;
&lt;p&gt;A Budget table at month and category grain cannot relate to the daily Date table directly. &lt;code&gt;TREATAS&lt;/code&gt; applies the visible values as a filter:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Budget =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Budget&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;TREATAS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month]&lt;/i&gt; ), Budget&lt;i class=&quot;m&quot;&gt;[Month]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;TREATAS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; ), Budget&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;See &lt;a href=&quot;/blog/treatas-dax/&quot;&gt;TREATAS&lt;/a&gt; for more.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;RELATED from the one side.&lt;/strong&gt; It only goes to the one side; use &lt;code&gt;RELATEDTABLE&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;USERELATIONSHIP without the relationship.&lt;/strong&gt; It must exist, inactive or active; create it in the model.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Both-direction relationships in the model.&lt;/strong&gt; They spread filters into unexpected tables and can create ambiguous paths; keep them single and use &lt;code&gt;CROSSFILTER&lt;/code&gt; in measures.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Row-level security.&lt;/strong&gt; &lt;code&gt;USERELATIONSHIP&lt;/code&gt; errors on tables with RLS; consider a second date role table instead.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/userelationship-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: USERELATIONSHIP function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/crossfilter-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: CROSSFILTER function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/guidance/relationships-active-inactive&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Active vs inactive relationship guidance&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add the inactive ship date relationship and a &lt;code&gt;Revenue by Ship Date&lt;/code&gt; measure, and put both measures on one chart. The &lt;a href=&quot;/blog/date-table-dax/&quot;&gt;date table&lt;/a&gt; post shows how to build the table these relationships point at.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>AB-100 in 2026: what the exam covers and how to study</title>
    <link href="https://data.benibix.com/blog/ab-100-study-guide/"/>
    <id>https://data.benibix.com/blog/ab-100-study-guide/</id>
    <published>2026-10-21T12:00:00Z</published>
    <updated>2026-10-21T12:00:00Z</updated>
    <summary>What the AB-100 Agentic AI Business Solutions Architect exam measures from 16 November 2026, how its three areas are weighted, which associate certification you need with it, and how I studied for it as a design exam about agents in business apps.</summary>
    <category term="Exams"/>
    <category term="AI"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; AB-100 earns &lt;strong&gt;Microsoft Certified: Agentic AI Business Solutions Architect Expert&lt;/strong&gt;, but only with one associate certification from Microsoft's list beside it, such as &lt;a href=&quot;/blog/ai-103-study-guide/&quot;&gt;AI-103&lt;/a&gt;, AI-300, PL-200, PL-400 or a Dynamics 365 associate. From 16 November 2026 it weighs planning AI business solutions at 35 to 40%, designing them at 30 to 35%, and deploying them at 20 to 25%. You need 700 out of 1,000 and renew it each year for free.&lt;/p&gt;
&lt;p&gt;I passed AB-100 in September 2026, with AI-103 as my associate. It is an architect exam about agents inside business processes: when an agent is worth it, how it is grounded, extended, tested, governed and paid for.&lt;/p&gt;
&lt;h2 id=&quot;what-does-ab-100-cover&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-ab-100-cover&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does AB-100 cover?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;Plan AI-powered business solutions&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;35-40%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;Design AI-powered business solutions&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:87.5%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;30-35%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;b&gt;Deploy AI-powered business solutions&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:62.5%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;20-25%&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;AB-100 skills from 16 November 2026, by weight&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Plan&lt;/strong&gt;: where agents help (task automation, analytics, decisions), whether the grounding data is accurate, timely and available, the AI adoption process in the Cloud Adoption Framework, and an ROI analysis with total cost of ownership.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Design&lt;/strong&gt;: Copilot and agents in Dynamics 365 apps, custom models in Microsoft Foundry, agents in Microsoft 365 Copilot and Copilot Studio, and orchestrating the prebuilt AI features in finance, supply chain and customer apps.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Deploy&lt;/strong&gt;: monitoring and tuning agents, testing agents and validating custom models, application lifecycle management (ALM) for data, agents, connectors and actions, and responsible AI, security and governance for agents.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;The 16 November update raises the weight of planning and design and lowers deployment; the topics themselves change only a little.&lt;/p&gt;
&lt;h2 id=&quot;which-associate-counts-as-the-prerequisite&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-associate-counts-as-the-prerequisite&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which associate counts as the prerequisite?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Background&lt;/th&gt;&lt;th&gt;Associate&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Azure AI developer&lt;/td&gt;&lt;td&gt;AI-103 Azure AI Apps and Agents Developer&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;MLOps&lt;/td&gt;&lt;td&gt;AI-300 Machine Learning Operations Engineer&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Power Platform&lt;/td&gt;&lt;td&gt;PL-200 Functional Consultant or PL-400 Developer&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Agents in Copilot Studio&lt;/td&gt;&lt;td&gt;AB-620 AI Agent Builder&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Dynamics 365&lt;/td&gt;&lt;td&gt;for example MB-280, MB-310, MB-800 or AB-210&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;A few of the accepted associate certifications&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The full list is on the exam page; pick the associate closest to your daily work.&lt;/p&gt;
&lt;h2 id=&quot;how-would-i-study-for-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-would-i-study-for-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How would I study for it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Process&lt;/b&gt;&lt;span&gt;pick one real process, for example handling customer emails&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Value&lt;/b&gt;&lt;span&gt;estimate the ROI and the total cost of ownership&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Design&lt;/b&gt;&lt;span&gt;prebuilt feature, Copilot Studio agent or custom Foundry model, and why&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Ground&lt;/b&gt;&lt;span&gt;which data, how fresh, who may see it&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Govern&lt;/b&gt;&lt;span&gt;testing, ALM, monitoring, security and responsible AI&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Design one business case end to end&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Like &lt;a href=&quot;/blog/az-305-study-guide/&quot;&gt;AZ-305&lt;/a&gt;, it rewards a decision for each requirement over knowing every setting.&lt;/p&gt;
&lt;h2 id=&quot;what-helps-on-the-day&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-helps-on-the-day&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What helps on the day?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Choose the smallest thing that works.&lt;/strong&gt; A prebuilt agent or Copilot feature often beats a custom build when it meets the requirement.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Think in governance.&lt;/strong&gt; Security, ALM and responsible AI appear across the exam, not only in their own section.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Use the free practice assessment.&lt;/strong&gt; Microsoft offers one for AB-100.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-keep-the-certification&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-keep-the-certification&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you keep the certification?&lt;/h2&gt;
&lt;p&gt;It expires after a year; renew it with the free online assessment in the six months before. It does not expire when your associate does; each is renewed separately.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/ab-100&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam AB-100&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/exams/ab-100/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Exam AB-100&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/practice-assessments-for-microsoft-certifications&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Practice assessments&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Earn or check your associate first, then design one real process as above. My credential is on &lt;a href=&quot;/about/&quot;&gt;the About page&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Bar charts in Power BI: when bars beat columns</title>
    <link href="https://data.benibix.com/blog/bar-chart-power-bi/"/>
    <id>https://data.benibix.com/blog/bar-chart-power-bi/</id>
    <published>2026-10-21T12:00:00Z</published>
    <updated>2026-11-02T12:00:00Z</updated>
    <summary>When to use a horizontal bar chart in Power BI instead of columns, the clustered, stacked and 100% stacked kinds, a Top N ranking with DAX, and the mistakes that make bar charts hard to read.</summary>
    <category term="Visuals"/>
    <category term="Comparison"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;bar chart&lt;/strong&gt; is a column chart turned on its side: the categories run down the Y-axis and the length of each bar is the value. Use it when the category names are long, when there are more than about 12 categories, or when the chart is a ranking read from top to bottom. Like columns, it comes as &lt;strong&gt;clustered&lt;/strong&gt;, &lt;strong&gt;stacked&lt;/strong&gt; and &lt;strong&gt;100% stacked&lt;/strong&gt;, and the axis must start at zero.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The chart, part by part:&lt;/strong&gt; &lt;a href=&quot;/visuals/bar-chart/&quot;&gt;What is a bar chart?&lt;/a&gt; draws its parts and shows how to read one, its kinds and the mistakes to avoid.&lt;/p&gt;
&lt;p&gt;A column chart with 25 product names on its X-axis turns the names sideways or cuts them off. The same data as bars has room for every name, sorted, with the biggest on top: a list the eye can read like a table.&lt;/p&gt;
&lt;p&gt;The short video below shows the three rules that fix most bar charts: sort the bars, start the axis at zero, and turn the bars sideways when the labels are long.&lt;/p&gt;
&lt;h2 id=&quot;when-should-you-pick-bars-over-columns&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-should-you-pick-bars-over-columns&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When should you pick bars over columns?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;The data&lt;/th&gt;&lt;th&gt;Pick&lt;/th&gt;&lt;th&gt;Why&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Up to 12 short categories&lt;/td&gt;&lt;td&gt;columns or bars&lt;/td&gt;&lt;td&gt;both work; columns save height&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Long names (products, customers, campaigns)&lt;/td&gt;&lt;td&gt;bars&lt;/td&gt;&lt;td&gt;the name sits horizontally, in full&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;More than 12 categories&lt;/td&gt;&lt;td&gt;bars&lt;/td&gt;&lt;td&gt;the chart grows downwards and scrolls&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;A ranking, best first&lt;/td&gt;&lt;td&gt;bars&lt;/td&gt;&lt;td&gt;read top to bottom like a list&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Time (months, quarters)&lt;/td&gt;&lt;td&gt;columns or a line&lt;/td&gt;&lt;td&gt;time runs left to right&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Bars or columns&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Take the ten best products of a bike shop by revenue. As bars, sorted descending, the top product is the first thing anyone reads.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;bar&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;bar chart: Mountain-200 Black, 42 1,250; Road-150 Red, 48 980; Touring-1000 Blue, 50 760; Mountain-100 Silver, 38 610; Road-650 Black, 52 480; Sport-100 Helmet, Red 220&quot;&gt;&lt;line x1=&quot;180.4&quot; y1=&quot;8&quot; x2=&quot;180.4&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;180.4&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;263.5&quot; y1=&quot;8&quot; x2=&quot;263.5&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;263.5&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;250&lt;/text&gt;&lt;line x1=&quot;346.6&quot; y1=&quot;8&quot; x2=&quot;346.6&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;346.6&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;500&lt;/text&gt;&lt;line x1=&quot;429.8&quot; y1=&quot;8&quot; x2=&quot;429.8&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;429.8&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;750&lt;/text&gt;&lt;line x1=&quot;512.9&quot; y1=&quot;8&quot; x2=&quot;512.9&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;512.9&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;1,000&lt;/text&gt;&lt;line x1=&quot;596&quot; y1=&quot;8&quot; x2=&quot;596&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;596&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;1,250&lt;/text&gt;&lt;rect x=&quot;180.4&quot; y=&quot;15.4&quot; width=&quot;415.6&quot; height=&quot;26.8&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;602&quot; y=&quot;33.8&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;1,250&lt;/text&gt;&lt;text x=&quot;170.4&quot; y=&quot;33.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Mountain-200 Black, 42&lt;/text&gt;&lt;rect x=&quot;180.4&quot; y=&quot;59.1&quot; width=&quot;325.8&quot; height=&quot;26.8&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;512.2&quot; y=&quot;77.5&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;980&lt;/text&gt;&lt;text x=&quot;170.4&quot; y=&quot;77.5&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Road-150 Red, 48&lt;/text&gt;&lt;rect x=&quot;180.4&quot; y=&quot;102.8&quot; width=&quot;252.7&quot; height=&quot;26.8&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;439.1&quot; y=&quot;121.2&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;760&lt;/text&gt;&lt;text x=&quot;170.4&quot; y=&quot;121.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Touring-1000 Blue, 50&lt;/text&gt;&lt;rect x=&quot;180.4&quot; y=&quot;146.4&quot; width=&quot;202.8&quot; height=&quot;26.8&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;389.2&quot; y=&quot;164.8&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;610&lt;/text&gt;&lt;text x=&quot;170.4&quot; y=&quot;164.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Mountain-100 Silver, 38&lt;/text&gt;&lt;rect x=&quot;180.4&quot; y=&quot;190.1&quot; width=&quot;159.6&quot; height=&quot;26.8&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;346&quot; y=&quot;208.5&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;480&lt;/text&gt;&lt;text x=&quot;170.4&quot; y=&quot;208.5&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Road-650 Black, 52&lt;/text&gt;&lt;rect x=&quot;180.4&quot; y=&quot;233.8&quot; width=&quot;73.1&quot; height=&quot;26.8&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;259.5&quot; y=&quot;252.2&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;220&lt;/text&gt;&lt;text x=&quot;170.4&quot; y=&quot;252.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Sport-100 Helmet, Red&lt;/text&gt;&lt;line x1=&quot;180.4&quot; y1=&quot;8&quot; x2=&quot;180.4&quot; y2=&quot;270&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Top products by revenue (in thousands), sorted descending&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-do-clustered-stacked-and-100-stacked-bars-show&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-do-clustered-stacked-and-100-stacked-bars-show&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What do clustered, stacked and 100% stacked bars show?&lt;/h2&gt;
&lt;p&gt;The same as for &lt;a href=&quot;/blog/column-chart-power-bi/&quot;&gt;column charts&lt;/a&gt;, turned sideways. Clustered bars compare series inside each category; stacked bars show the total and its parts; 100% stacked bars show only the mix, which suits survey answers well:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;pct-bar&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;Easy&lt;/li&gt;&lt;li class=&quot;k1&quot;&gt;Neutral&lt;/li&gt;&lt;li class=&quot;k2&quot;&gt;Hard&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;pct bar chart: Desktop 72, 18, 10; Tablet 61, 24, 15; Phone 48, 27, 25&quot;&gt;&lt;line x1=&quot;71.6&quot; y1=&quot;8&quot; x2=&quot;71.6&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;71.6&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0%&lt;/text&gt;&lt;line x1=&quot;176.5&quot; y1=&quot;8&quot; x2=&quot;176.5&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;176.5&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;20%&lt;/text&gt;&lt;line x1=&quot;281.4&quot; y1=&quot;8&quot; x2=&quot;281.4&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;281.4&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;40%&lt;/text&gt;&lt;line x1=&quot;386.2&quot; y1=&quot;8&quot; x2=&quot;386.2&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;386.2&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;60%&lt;/text&gt;&lt;line x1=&quot;491.1&quot; y1=&quot;8&quot; x2=&quot;491.1&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;491.1&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;80%&lt;/text&gt;&lt;line x1=&quot;596&quot; y1=&quot;8&quot; x2=&quot;596&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;596&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;100%&lt;/text&gt;&lt;rect x=&quot;71.6&quot; y=&quot;22.8&quot; width=&quot;377.6&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;449.2&quot; y=&quot;22.8&quot; width=&quot;94.4&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;rect x=&quot;543.6&quot; y=&quot;22.8&quot; width=&quot;52.4&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k2&quot;/&gt;&lt;text x=&quot;61.6&quot; y=&quot;55.7&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Desktop&lt;/text&gt;&lt;rect x=&quot;71.6&quot; y=&quot;110.2&quot; width=&quot;319.9&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;391.5&quot; y=&quot;110.2&quot; width=&quot;125.9&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;rect x=&quot;517.3&quot; y=&quot;110.2&quot; width=&quot;78.7&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k2&quot;/&gt;&lt;text x=&quot;61.6&quot; y=&quot;143&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Tablet&lt;/text&gt;&lt;rect x=&quot;71.6&quot; y=&quot;197.5&quot; width=&quot;251.7&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;rect x=&quot;323.3&quot; y=&quot;197.5&quot; width=&quot;141.6&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;rect x=&quot;464.9&quot; y=&quot;197.5&quot; width=&quot;131.1&quot; height=&quot;57.6&quot; rx=&quot;3&quot; class=&quot;m k2&quot;/&gt;&lt;text x=&quot;61.6&quot; y=&quot;230.3&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Phone&lt;/text&gt;&lt;line x1=&quot;71.6&quot; y1=&quot;8&quot; x2=&quot;71.6&quot; y2=&quot;270&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Answers to &amp;quot;How easy was checkout?&amp;quot; by device, as shares&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;On a phone, a quarter of the answers say &amp;quot;Hard&amp;quot;: the 100% bar shows it at once, whatever the number of answers per device.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-show-only-the-top-10&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-show-only-the-top-10&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you show only the top 10?&lt;/h2&gt;
&lt;p&gt;Two ways. The quick one is the visual filter: in the &lt;strong&gt;Filters&lt;/strong&gt; pane, on the product field, &lt;strong&gt;Filter type: Top N&lt;/strong&gt;, &lt;strong&gt;Show items: Top 10&lt;/strong&gt;, &lt;strong&gt;By value: Sales Amount&lt;/strong&gt;. It is fixed to that visual.&lt;/p&gt;
&lt;p&gt;The measure way keeps the rank available for titles, tooltips and other visuals:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Product Rank =
&lt;i class=&quot;f&quot;&gt;RANKX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Sales Amount]&lt;/i&gt;, , DESC, DENSE )

Sales Top &lt;i class=&quot;n&quot;&gt;10&lt;/i&gt; =
&lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Product Rank]&lt;/i&gt; &amp;lt;= &lt;i class=&quot;n&quot;&gt;10&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Sales Amount]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Put &lt;code&gt;Sales Top 10&lt;/code&gt; on the X-axis: products outside the top 10 return blank and drop out of the chart. &lt;code&gt;ALLSELECTED&lt;/code&gt; ranks within what the slicers leave, so with a &amp;quot;Bikes&amp;quot; slicer the chart shows the ten best bikes.&lt;/p&gt;
&lt;p&gt;To add an &amp;quot;Others&amp;quot; line that keeps the total honest, the product list needs a row called Others (a small calculated table) and a measure that returns the rest for it. &lt;a href=&quot;/blog/topn-dax/&quot;&gt;TOPN in DAX&lt;/a&gt; builds that pattern step by step.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-build-one-step-by-step&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-one-step-by-step&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build one, step by step?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;In &lt;strong&gt;Visualizations&lt;/strong&gt; pick &lt;strong&gt;Clustered bar chart&lt;/strong&gt; (or stacked, or 100% stacked).&lt;/li&gt;&lt;li&gt;Drag the category to &lt;strong&gt;Y-axis&lt;/strong&gt; and the measure to &lt;strong&gt;X-axis&lt;/strong&gt;; a series field goes to &lt;strong&gt;Legend&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;More options (...)&lt;/strong&gt;, &lt;strong&gt;Sort axis&lt;/strong&gt;, by the measure, &lt;strong&gt;Sort descending&lt;/strong&gt;: the biggest bar is on top.&lt;/li&gt;&lt;li&gt;In &lt;strong&gt;Format visual&lt;/strong&gt;, turn on &lt;strong&gt;Data labels&lt;/strong&gt; and turn off the X-axis values if the labels carry the numbers; widen the &lt;strong&gt;Y-axis&lt;/strong&gt; if names are cut.&lt;/li&gt;&lt;li&gt;With many categories, keep the visual tall enough for a readable bar height; the visual scrolls when the bars do not fit.&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Sorted alphabetically.&lt;/strong&gt; The default sort can be by name; a ranking is sorted by value, descending.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Cut-off names.&lt;/strong&gt; Power BI shortens long Y-axis labels; give the axis more width in the format pane or shorten names in the model (a &amp;quot;Short Name&amp;quot; column).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;An axis that starts above zero.&lt;/strong&gt; A bar's length is its value; an axis from 500 makes 600 look twice as long as 550.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Top N without context.&lt;/strong&gt; A top 10 hides how much the rest sells. Add an &amp;quot;Others&amp;quot; bar or put the share of the total in a tooltip.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Bars for time.&lt;/strong&gt; Months stacked downwards read against habit; time goes left to right as columns or a &lt;a href=&quot;/blog/line-chart-power-bi/&quot;&gt;line&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-types-for-reports-and-q-and-a&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Visualization types in Power BI (bar and column charts)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-column-charts&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create and use column charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/rankx-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: RANKX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-report-filter&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Filter a report in Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Pick bars whenever the names are long or the chart is a ranking, sort by value and start at zero. &lt;a href=&quot;/blog/rankx-dax/&quot;&gt;RANKX in DAX&lt;/a&gt; explains the ranking measure in full, and &lt;a href=&quot;/blog/which-power-bi-chart/&quot;&gt;which chart for which question&lt;/a&gt; compares bars with the rest.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Button, list and input slicers in Power BI</title>
    <link href="https://data.benibix.com/blog/button-slicer-power-bi/"/>
    <id>https://data.benibix.com/blog/button-slicer-power-bi/</id>
    <published>2026-10-21T12:00:00Z</published>
    <updated>2026-10-21T12:00:00Z</updated>
    <summary>How the button slicer, list slicer and input slicer in Power BI work, button layouts and images, highlight labels with a measure, list hierarchies and dropdown mode, the input slicer's operators and numeric ranges, and when to use each.</summary>
    <category term="Visuals"/>
    <category term="Filters and navigation"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; the three newer slicers each do one job better than the classic slicer. The &lt;strong&gt;button slicer&lt;/strong&gt; shows values as styled buttons in a row, column or grid, with images and a &lt;strong&gt;highlight label&lt;/strong&gt; (a measure under each button). The &lt;strong&gt;list slicer&lt;/strong&gt; (in preview) is a list or dropdown with pictures, labels, &lt;strong&gt;hierarchies&lt;/strong&gt; and search. The &lt;strong&gt;input slicer&lt;/strong&gt; (called text slicer during preview) lets readers type values, which become filter pills, with operators like &lt;strong&gt;contains any&lt;/strong&gt; and numeric ranges like &lt;code&gt;4-5&lt;/code&gt; or &lt;code&gt;&amp;gt;600&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The classic slicer is a plain list. A report for a sales team needs region buttons with the region's revenue under each name, a product list that opens by category, and a box to paste an order number. Each of those is now one visual.&lt;/p&gt;
&lt;h2 id=&quot;what-does-each-slicer-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-each-slicer-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does each slicer look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Button slicer&lt;/b&gt;&lt;ul&gt;&lt;li&gt;four buttons in a grid: North, South, East, West&lt;/li&gt;&lt;li&gt;each shows its revenue as a highlight label&lt;/li&gt;&lt;li&gt;the selected one is filled&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;List slicer&lt;/b&gt;&lt;ul&gt;&lt;li&gt;a dropdown: Bikes opens to Mountain, Road, Touring&lt;/li&gt;&lt;li&gt;pictures next to items&lt;/li&gt;&lt;li&gt;selected items first&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Input slicer&lt;/b&gt;&lt;ul&gt;&lt;li&gt;a text box: typing 10442 and 10519 makes two pills&lt;/li&gt;&lt;li&gt;the report filters to those orders&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Three slicers on one page&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-set-up-the-button-slicer&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-set-up-the-button-slicer&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you set up the button slicer?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;With nothing selected, pick &lt;strong&gt;Button slicer&lt;/strong&gt; in &lt;strong&gt;Visualizations&lt;/strong&gt; and select a field.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Format visual, Multi-button layout&lt;/strong&gt;: vertical, horizontal or grid. &lt;strong&gt;Fixed size&lt;/strong&gt; sets each button's height and width in pixels; &lt;strong&gt;Fit to space&lt;/strong&gt; (previously Autogrid) makes buttons grow or shrink to fill the visual, or, when off, reserves room for the set number of buttons.&lt;/li&gt;&lt;li&gt;Add images or icons per button, and style the states (default, hover, pressed, selected).&lt;/li&gt;&lt;li&gt;Drag a measure to &lt;strong&gt;Highlight label&lt;/strong&gt;: each button shows the value below its name. When readers select something in another visual, the related buttons stay highlighted and the others dim.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Conditional formatting&lt;/strong&gt; colours the buttons by a measure, for example red for regions below target.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;The highlight label measure works like any other:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )

Revenue vs Target Colour =
&lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; &amp;gt;= &lt;i class=&quot;m&quot;&gt;[Revenue Target]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#1A9E75&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#D64550&amp;quot;&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-do-you-set-up-the-list-slicer&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-set-up-the-list-slicer&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you set up the list slicer?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;Pick &lt;strong&gt;List slicer&lt;/strong&gt; and drag a field to &lt;strong&gt;Values&lt;/strong&gt;. Several fields make a &lt;strong&gt;hierarchy&lt;/strong&gt; (Category, then Subcategory); readers expand and collapse groups.&lt;/li&gt;&lt;li&gt;Choose list or &lt;strong&gt;dropdown mode&lt;/strong&gt;: the dropdown opens a drawer whose height and width you set, and &lt;strong&gt;Show selected first&lt;/strong&gt; keeps the current picks at the top.&lt;/li&gt;&lt;li&gt;Add pictures and labels next to items, and set the item layout (fixed size or fit to space) as for buttons.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;The list slicer is in preview, so check the preview status before relying on it in a production report.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-set-up-the-input-slicer&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-set-up-the-input-slicer&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you set up the input slicer?&lt;/h2&gt;
&lt;p&gt;The input slicer has two modes:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;With a data column&lt;/strong&gt; (filtering mode): typed values filter the report. Operators decide how text matches: for example &lt;strong&gt;Contains all&lt;/strong&gt; or &lt;strong&gt;Contains any&lt;/strong&gt;. &lt;strong&gt;Format, Slicer settings, Options&lt;/strong&gt; sets single or multiple values.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Without a data column&lt;/strong&gt; (input mode): the text is not a filter but an input, for example for translytical task flows that write back data; it can be limited to numbers.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;For a numeric column, the input slicer reads expressions: a range &lt;code&gt;1-2&lt;/code&gt;, &lt;code&gt;&amp;gt;2&lt;/code&gt;, &lt;code&gt;&amp;lt;2&lt;/code&gt; or a single value &lt;code&gt;1&lt;/code&gt;. Several pills combine, such as &lt;code&gt;1&lt;/code&gt;, &lt;code&gt;2&lt;/code&gt;, &lt;code&gt;4-5&lt;/code&gt; and &lt;code&gt;&amp;gt;600&lt;/code&gt;. Double-click a pill to edit it.&lt;/p&gt;
&lt;p&gt;A typical use: support staff paste three order numbers and see those orders' details. Pair the input slicer with a &lt;a href=&quot;/blog/table-visual-power-bi/&quot;&gt;table&lt;/a&gt; and a measure that says what was found:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Orders Found =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; N = &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Orders&lt;i class=&quot;m&quot;&gt;[Order ID]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ISFILTERED&lt;/i&gt; ( Orders&lt;i class=&quot;m&quot;&gt;[Order ID]&lt;/i&gt; ), N &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot; orders found&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Type an order number&amp;quot;&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;which-one-should-you-use&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-one-should-you-use&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which one should you use?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;The field&lt;/th&gt;&lt;th&gt;Slicer&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;2 to 8 values people switch often&lt;/td&gt;&lt;td&gt;button slicer&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;dozens to thousands of values, maybe with a hierarchy&lt;/td&gt;&lt;td&gt;list slicer (or classic dropdown)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;IDs and codes people already know&lt;/td&gt;&lt;td&gt;input slicer&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;dates and numeric ranges&lt;/td&gt;&lt;td&gt;classic slicer: between, relative date, date picker&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Too many buttons.&lt;/strong&gt; Twenty buttons is a wall; use the list slicer.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Highlight labels that confuse.&lt;/strong&gt; The measure under a button follows other filters on the page; label it (&amp;quot;Revenue, this year&amp;quot;) in the title.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Preview in production.&lt;/strong&gt; The list slicer may change before general availability.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Input slicer with the wrong operator.&lt;/strong&gt; &amp;quot;Contains any&amp;quot; with a short word (&amp;quot;10&amp;quot;) matches thousands of order numbers; use exact values or whole IDs.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-button-slicer&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create and use a button slicer&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-list-slicer&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create and use a list slicer (preview)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-input-slicer&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create and use an input slicer&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-slicers&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Slicers overview in Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Turn the one or two most-used filters into button slicers with a highlight label, and add an input slicer wherever people look things up by ID. &lt;a href=&quot;/blog/slicer-power-bi/&quot;&gt;Slicers in Power BI&lt;/a&gt; covers syncing and Select all for all four kinds.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Conversion rate KPI: funnel steps, formula and DAX</title>
    <link href="https://data.benibix.com/blog/conversion-rate-kpi/"/>
    <id>https://data.benibix.com/blog/conversion-rate-kpi/</id>
    <published>2026-10-21T12:00:00Z</published>
    <updated>2026-11-23T12:00:00Z</updated>
    <summary>How to calculate conversion rate, conversions divided by sessions or visitors, step-by-step funnel conversion from visit to purchase, by channel and device, sessions against users as the base, statistical noise on small numbers, the DAX on web analytics data, and a funnel chart.</summary>
    <category term="KPIs"/>
    <category term="Marketing"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;conversion rate&lt;/strong&gt; = conversions / the base that could convert. For a shop, usually orders / sessions: 1,800 orders from 60,000 sessions = &lt;strong&gt;3.0%&lt;/strong&gt;. Pick the base once and say it: per &lt;strong&gt;session&lt;/strong&gt; (each visit counts) or per &lt;strong&gt;user&lt;/strong&gt; (each person counts once) give different numbers. Break the overall rate into &lt;strong&gt;funnel steps&lt;/strong&gt; (visit, product view, add to cart, checkout, purchase): each step's rate shows where people drop off, which one overall number cannot.&lt;/p&gt;
&lt;p&gt;A conversion rate going from 3.0% to 2.6% is a 13% drop in sales at the same traffic. The funnel shows whether the cart, the checkout or the traffic mix caused it.&lt;/p&gt;
&lt;h2 id=&quot;how-does-a-funnel-break-it-down&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-a-funnel-break-it-down&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does a funnel break it down?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Step&lt;/th&gt;&lt;th&gt;Sessions&lt;/th&gt;&lt;th&gt;Step conversion&lt;/th&gt;&lt;th&gt;From visit&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Visit&lt;/td&gt;&lt;td&gt;60,000&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;100%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Product view&lt;/td&gt;&lt;td&gt;33,000&lt;/td&gt;&lt;td&gt;55.0%&lt;/td&gt;&lt;td&gt;55.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Add to cart&lt;/td&gt;&lt;td&gt;6,600&lt;/td&gt;&lt;td&gt;20.0%&lt;/td&gt;&lt;td&gt;11.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Checkout started&lt;/td&gt;&lt;td&gt;3,300&lt;/td&gt;&lt;td&gt;50.0%&lt;/td&gt;&lt;td&gt;5.5%&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Purchase&lt;/td&gt;&lt;td&gt;1,800&lt;/td&gt;&lt;td&gt;54.5%&lt;/td&gt;&lt;td&gt;3.0%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;September, sessions&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;funnel&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;funnel chart: Visit 60K; Product view 33K; Add to cart 6,600; Checkout started 3,300; Purchase 1,800&quot;&gt;&lt;rect x=&quot;150&quot; y=&quot;13.5&quot; width=&quot;420&quot; height=&quot;42.6&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;360&quot; y=&quot;38.8&quot; class=&quot;tin3&quot; text-anchor=&quot;middle&quot;&gt;60K&lt;/text&gt;&lt;text x=&quot;12&quot; y=&quot;38.8&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Visit&lt;/text&gt;&lt;rect x=&quot;244.5&quot; y=&quot;71.1&quot; width=&quot;231&quot; height=&quot;42.6&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;360&quot; y=&quot;96.4&quot; class=&quot;tin3&quot; text-anchor=&quot;middle&quot;&gt;33K&lt;/text&gt;&lt;text x=&quot;12&quot; y=&quot;96.4&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Product view&lt;/text&gt;&lt;text x=&quot;632&quot; y=&quot;96.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;55%&lt;/text&gt;&lt;rect x=&quot;336.9&quot; y=&quot;128.7&quot; width=&quot;46.2&quot; height=&quot;42.6&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;391.1&quot; y=&quot;154&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;6,600&lt;/text&gt;&lt;text x=&quot;12&quot; y=&quot;154&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Add to cart&lt;/text&gt;&lt;text x=&quot;632&quot; y=&quot;154&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;11%&lt;/text&gt;&lt;rect x=&quot;348.5&quot; y=&quot;186.3&quot; width=&quot;23.1&quot; height=&quot;42.6&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;379.6&quot; y=&quot;211.6&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;3,300&lt;/text&gt;&lt;text x=&quot;12&quot; y=&quot;211.6&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Checkout started&lt;/text&gt;&lt;text x=&quot;632&quot; y=&quot;211.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;6%&lt;/text&gt;&lt;rect x=&quot;353.7&quot; y=&quot;243.9&quot; width=&quot;12.6&quot; height=&quot;42.6&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;374.3&quot; y=&quot;269.2&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;1,800&lt;/text&gt;&lt;text x=&quot;12&quot; y=&quot;269.2&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Purchase&lt;/text&gt;&lt;text x=&quot;632&quot; y=&quot;269.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;3%&lt;/text&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Sessions by funnel step&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The biggest loss in absolute terms is between product view and add to cart (26,400 sessions); the checkout loses 45% of those who start it, often the easiest step to fix.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;From a sessions table with one row per session and flags for the steps reached (or an events table, counted by distinct session):&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Sessions = &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Sessions )
Product View Sessions = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sessions]&lt;/i&gt;, Sessions&lt;i class=&quot;m&quot;&gt;[Viewed Product]&lt;/i&gt; = &lt;i class=&quot;k&quot;&gt;TRUE&lt;/i&gt; () )
Cart Sessions = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sessions]&lt;/i&gt;, Sessions&lt;i class=&quot;m&quot;&gt;[Added to Cart]&lt;/i&gt; = &lt;i class=&quot;k&quot;&gt;TRUE&lt;/i&gt; () )
Checkout Sessions = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sessions]&lt;/i&gt;, Sessions&lt;i class=&quot;m&quot;&gt;[Started Checkout]&lt;/i&gt; = &lt;i class=&quot;k&quot;&gt;TRUE&lt;/i&gt; () )
Purchase Sessions = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Sessions]&lt;/i&gt;, Sessions&lt;i class=&quot;m&quot;&gt;[Purchased]&lt;/i&gt; = &lt;i class=&quot;k&quot;&gt;TRUE&lt;/i&gt; () )

Conversion Rate = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Purchase Sessions]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Sessions]&lt;/i&gt; )
Cart to Checkout % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Checkout Sessions]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Cart Sessions]&lt;/i&gt; )
Checkout Completion % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Purchase Sessions]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Checkout Sessions]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- per user instead of per session&lt;/i&gt;
User Conversion Rate =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Sessions&lt;i class=&quot;m&quot;&gt;[User ID]&lt;/i&gt; ), Sessions&lt;i class=&quot;m&quot;&gt;[Purchased]&lt;/i&gt; = &lt;i class=&quot;k&quot;&gt;TRUE&lt;/i&gt; () ),
    &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Sessions&lt;i class=&quot;m&quot;&gt;[User ID]&lt;/i&gt; )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;From an events table with one row per event, count sessions per step with &lt;code&gt;CALCULATE ( DISTINCTCOUNT ( Events[Session ID] ), Events[Event] = &amp;quot;add_to_cart&amp;quot; )&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;which-breakdowns-explain-a-change&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-breakdowns-explain-a-change&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which breakdowns explain a change?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Channel&lt;/strong&gt;: email and brand search convert far better than paid social; a traffic mix shift moves the total without anything changing on the site.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Device&lt;/strong&gt;: mobile usually converts lower; a mobile checkout bug shows here first.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;New and returning visitors&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Landing page or product category&lt;/strong&gt;.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;When the total moves, check the mix first: if each channel's rate is flat but the share of low-converting traffic grew, the site is not the problem.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-tell-a-real-change-from-noise&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-tell-a-real-change-from-noise&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you tell a real change from noise?&lt;/h2&gt;
&lt;p&gt;With 200 sessions a day, a few orders more or less swing the daily rate by a point. Look at weekly rates, show the session count, and for A/B tests use a significance test. A rough 95% range for a rate p on n sessions is p ± 1.96 × √(p × (1 - p) / n): for 3% on 60,000 sessions that is ±0.14 points; on 2,000 sessions, ±0.75.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Mixing bases.&lt;/strong&gt; Orders per user against orders per session; say which.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Bots and internal traffic.&lt;/strong&gt; Inflate sessions and lower the rate; filter them out.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Cookie consent.&lt;/strong&gt; Visitors who decline tracking are missing from sessions but present in orders, which inflates the rate; compare against the order system.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Averaging daily rates.&lt;/strong&gt; Divide total conversions by total sessions.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-funnel-charts&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Funnel charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/distinctcount-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DISTINCTCOUNT function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/divide-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DIVIDE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Build the five-step funnel by week and by device, and fix the step with the biggest loss first. &lt;a href=&quot;/blog/ctr-cpc-cpm-kpi/&quot;&gt;CTR, CPC and CPM&lt;/a&gt; cover the ads that bring the visits.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>DAX information functions: every one with an example</title>
    <link href="https://data.benibix.com/blog/information-functions-dax-reference/"/>
    <id>https://data.benibix.com/blog/information-functions-dax-reference/</id>
    <published>2026-10-21T12:00:00Z</published>
    <updated>2026-10-21T12:00:00Z</updated>
    <summary>A reference of all DAX information functions, the IS tests (ISBLANK, ISERROR, ISNUMBER, ISTEXT and more), filter state (ISFILTERED, ISCROSSFILTERED, HASONEVALUE, HASONEFILTER, ISINSCOPE), CONTAINS and CONTAINSSTRING, calculation group functions, user functions and newer ones like TEXTCONTAINS.</summary>
    <category term="DAX"/>
    <category term="Reference"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; DAX information functions &lt;strong&gt;test&lt;/strong&gt; something and usually return TRUE or FALSE: the type of a value (&lt;code&gt;ISNUMBER&lt;/code&gt;, &lt;code&gt;ISTEXT&lt;/code&gt;, &lt;code&gt;ISBLANK&lt;/code&gt;), the &lt;strong&gt;filter state&lt;/strong&gt; of a column (&lt;code&gt;ISFILTERED&lt;/code&gt;, &lt;code&gt;HASONEVALUE&lt;/code&gt;, &lt;code&gt;ISINSCOPE&lt;/code&gt;), whether a table &lt;strong&gt;contains&lt;/strong&gt; a value (&lt;code&gt;CONTAINS&lt;/code&gt;, &lt;code&gt;CONTAINSROW&lt;/code&gt;, &lt;code&gt;CONTAINSSTRING&lt;/code&gt;), which measure a &lt;strong&gt;calculation group&lt;/strong&gt; is applied to (&lt;code&gt;SELECTEDMEASURE&lt;/code&gt;), and &lt;strong&gt;who&lt;/strong&gt; is viewing (&lt;code&gt;USERPRINCIPALNAME&lt;/code&gt;). This page lists every function in the group with an example.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-test-a-value&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-test-a-value&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions test a value?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;TRUE when&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;ISBLANK&lt;/td&gt;&lt;td&gt;the value is BLANK&lt;/td&gt;&lt;td&gt;ISBLANK ( [Revenue LY] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ISERROR&lt;/td&gt;&lt;td&gt;the expression returns an error&lt;/td&gt;&lt;td&gt;ISERROR ( VALUE ( Settings[Text] ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ISNUMBER, ISNUMERIC&lt;/td&gt;&lt;td&gt;the value is a number&lt;/td&gt;&lt;td&gt;ISNUMBER ( [Input] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ISTEXT, ISSTRING&lt;/td&gt;&lt;td&gt;the value is text&lt;/td&gt;&lt;td&gt;ISTEXT ( Customer[Code] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ISNONTEXT&lt;/td&gt;&lt;td&gt;the value is not text (blank counts as not text)&lt;/td&gt;&lt;td&gt;ISNONTEXT ( Customer[Code] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ISLOGICAL, ISBOOLEAN&lt;/td&gt;&lt;td&gt;the value is TRUE or FALSE&lt;/td&gt;&lt;td&gt;ISLOGICAL ( Sales[Is Return] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ISINT64, ISINTEGER&lt;/td&gt;&lt;td&gt;the value is a whole number&lt;/td&gt;&lt;td&gt;ISINTEGER ( [Units] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ISDECIMAL, ISCURRENCY&lt;/td&gt;&lt;td&gt;the value is a fixed decimal (currency)&lt;/td&gt;&lt;td&gt;ISCURRENCY ( Sales[Amount] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ISDOUBLE&lt;/td&gt;&lt;td&gt;the value is a floating-point number&lt;/td&gt;&lt;td&gt;ISDOUBLE ( [Rate] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ISDATETIME&lt;/td&gt;&lt;td&gt;the value is a date or time&lt;/td&gt;&lt;td&gt;ISDATETIME ( Orders[Shipped] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ISEVEN, ISODD&lt;/td&gt;&lt;td&gt;the number is even or odd&lt;/td&gt;&lt;td&gt;ISEVEN ( 'Date'[Day] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ISEMPTY&lt;/td&gt;&lt;td&gt;a table has no rows&lt;/td&gt;&lt;td&gt;ISEMPTY ( RELATEDTABLE ( Sales ) )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Value tests&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;which-functions-read-the-filter-state&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-read-the-filter-state&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions read the filter state?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;TRUE when&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;ISFILTERED&lt;/td&gt;&lt;td&gt;the column is filtered directly&lt;/td&gt;&lt;td&gt;ISFILTERED ( 'Product'[Color] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ISCROSSFILTERED&lt;/td&gt;&lt;td&gt;the column is filtered directly or through other columns or tables&lt;/td&gt;&lt;td&gt;ISCROSSFILTERED ( 'Product'[Color] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;HASONEVALUE&lt;/td&gt;&lt;td&gt;exactly one value of the column is visible&lt;/td&gt;&lt;td&gt;HASONEVALUE ( 'Date'[Year] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;HASONEFILTER&lt;/td&gt;&lt;td&gt;exactly one value is directly filtered&lt;/td&gt;&lt;td&gt;HASONEFILTER ( 'Date'[Year] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ISINSCOPE&lt;/td&gt;&lt;td&gt;the column is a grouping level of the current cell&lt;/td&gt;&lt;td&gt;ISINSCOPE ( 'Product'[Product] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ISSUBTOTAL&lt;/td&gt;&lt;td&gt;in SUMMARIZE, the row is a subtotal for the column&lt;/td&gt;&lt;td&gt;ISSUBTOTAL ( 'Product'[Category] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;NONVISUAL&lt;/td&gt;&lt;td&gt;marks a filter in SUMMARIZECOLUMNS as not affecting measures&lt;/td&gt;&lt;td&gt;NONVISUAL ( TREATAS ( { 2026 }, 'Date'[Year] ) )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Filter state&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In depth: &lt;a href=&quot;/blog/selectedvalue-hasonevalue-dax/&quot;&gt;SELECTEDVALUE and HASONEVALUE&lt;/a&gt;, &lt;a href=&quot;/blog/isinscope-dax/&quot;&gt;ISINSCOPE&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-search&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-search&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions search?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Returns&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;CONTAINS&lt;/td&gt;&lt;td&gt;TRUE if a table has a row with the given column values&lt;/td&gt;&lt;td&gt;CONTAINS ( Sales, Sales[Product Key], 42 )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CONTAINSROW&lt;/td&gt;&lt;td&gt;TRUE if a row of values exists in a table (what IN uses)&lt;/td&gt;&lt;td&gt;CONTAINSROW ( { &amp;quot;DE&amp;quot;, &amp;quot;AT&amp;quot; }, Customer[Country] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CONTAINSSTRING&lt;/td&gt;&lt;td&gt;TRUE if text contains text, not case-sensitive&lt;/td&gt;&lt;td&gt;CONTAINSSTRING ( 'Product'[Name], &amp;quot;bike&amp;quot; )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CONTAINSSTRINGEXACT&lt;/td&gt;&lt;td&gt;as above, case-sensitive&lt;/td&gt;&lt;td&gt;CONTAINSSTRINGEXACT ( 'Product'[Code], &amp;quot;BK&amp;quot; )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;TEXTCONTAINS&lt;/td&gt;&lt;td&gt;TRUE if text matches by full-text search (needs a full-text index)&lt;/td&gt;&lt;td&gt;TEXTCONTAINS ( Tickets[Text], &amp;quot;refund&amp;quot; )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;TEXTSIMILARITY&lt;/td&gt;&lt;td&gt;a relevance score of a full-text match&lt;/td&gt;&lt;td&gt;TEXTSIMILARITY ( Tickets[Text], &amp;quot;late delivery&amp;quot; )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ISAFTER, ISONORAFTER&lt;/td&gt;&lt;td&gt;TRUE for rows after (or at) given values, like START AT&lt;/td&gt;&lt;td&gt;FILTER ( T, ISONORAFTER ( T[Date], DATE ( 2026, 1, 1 ), ASC ) )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Searching&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Microsoft notes &lt;code&gt;TEXTCONTAINS&lt;/code&gt; needs a persisted full-text index on the column and works in Import, Dual and Direct Lake modes.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-serve-calculation-groups-and-references&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-serve-calculation-groups-and-references&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions serve calculation groups and references?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Returns&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;SELECTEDMEASURE&lt;/td&gt;&lt;td&gt;the measure a calculation item is applied to&lt;/td&gt;&lt;td&gt;CALCULATE ( SELECTEDMEASURE ( ), DATESYTD ( 'Date'[Date] ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SELECTEDMEASURENAME&lt;/td&gt;&lt;td&gt;its name&lt;/td&gt;&lt;td&gt;SELECTEDMEASURENAME ( )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SELECTEDMEASUREFORMATSTRING&lt;/td&gt;&lt;td&gt;its format string&lt;/td&gt;&lt;td&gt;SELECTEDMEASUREFORMATSTRING ( )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ISSELECTEDMEASURE&lt;/td&gt;&lt;td&gt;TRUE if it is one of the listed measures&lt;/td&gt;&lt;td&gt;ISSELECTEDMEASURE ( [Margin %] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;NAMEOF&lt;/td&gt;&lt;td&gt;the name of a column or measure as text&lt;/td&gt;&lt;td&gt;NAMEOF ( [Revenue] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;TABLEOF&lt;/td&gt;&lt;td&gt;a reference to the table of a column, measure or calendar&lt;/td&gt;&lt;td&gt;TABLEOF ( [Revenue] )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;COLUMNSTATISTICS&lt;/td&gt;&lt;td&gt;statistics for every column in the model&lt;/td&gt;&lt;td&gt;EVALUATE COLUMNSTATISTICS ( )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Calculation groups and references&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In depth: &lt;a href=&quot;/blog/calculation-groups-power-bi-time-intelligence/&quot;&gt;calculation groups&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-identify-the-user&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-identify-the-user&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions identify the user?&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;USERPRINCIPALNAME&lt;/code&gt;, &lt;code&gt;USERNAME&lt;/code&gt;, &lt;code&gt;USEROBJECTID&lt;/code&gt;, &lt;code&gt;CUSTOMDATA&lt;/code&gt; and &lt;code&gt;USERCULTURE&lt;/code&gt;: see &lt;a href=&quot;/blog/userprincipalname-rls-dax/&quot;&gt;dynamic row-level security&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;ISBLANK on 0.&lt;/strong&gt; &lt;code&gt;ISBLANK ( 0 )&lt;/code&gt; is FALSE; a value that is 0 is not blank.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;ISFILTERED for &amp;quot;one value selected&amp;quot;.&lt;/strong&gt; It is TRUE for any direct filter, also with several values; use &lt;code&gt;HASONEVALUE&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;CONTAINSSTRING with wildcards.&lt;/strong&gt; It supports &lt;code&gt;?&lt;/code&gt; and &lt;code&gt;*&lt;/code&gt; wildcards; escape them with &lt;code&gt;~&lt;/code&gt; when you mean the characters.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;ISERROR around everything.&lt;/strong&gt; Hides problems and costs time; prevent errors instead.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/information-functions-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Information functions (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/containsstring-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: CONTAINSSTRING function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/textcontains-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: TEXTCONTAINS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Learn &lt;code&gt;ISBLANK&lt;/code&gt;, &lt;code&gt;HASONEVALUE&lt;/code&gt;, &lt;code&gt;ISINSCOPE&lt;/code&gt; and &lt;code&gt;SELECTEDMEASURE&lt;/code&gt;; they cover most uses. &lt;a href=&quot;/blog/logical-functions-dax-reference/&quot;&gt;Logical functions&lt;/a&gt; combine these tests into conditions.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Delta tables and V-Order in Fabric, explained</title>
    <link href="https://data.benibix.com/blog/delta-tables-and-v-order-fabric/"/>
    <id>https://data.benibix.com/blog/delta-tables-and-v-order-fabric/</id>
    <published>2026-10-21T12:00:00Z</published>
    <updated>2026-10-21T12:00:00Z</updated>
    <summary>What a Delta table is, what its transaction log gives you, what V-Order does to Parquet files in Fabric, and how OPTIMIZE and VACUUM keep tables fast.</summary>
    <category term="Fabric"/>
    <category term="Lakehouse"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;Delta table&lt;/strong&gt; is a folder of Parquet files plus a transaction log (&lt;code&gt;_delta_log&lt;/code&gt;) that records every change. The log gives a lake table what a database has: all-or-nothing writes, updates and merges, and time travel to earlier versions. &lt;strong&gt;V-Order&lt;/strong&gt; is a Fabric write option that lays out the Parquet files for faster reads; it costs some write time and is off by default in new workspaces.&lt;/p&gt;
&lt;p&gt;Every table in Fabric is a Delta table, whether a notebook, a pipeline or a warehouse wrote it. Knowing how it is stored explains most of what makes it fast or slow.&lt;/p&gt;
&lt;h2 id=&quot;what-is-inside-a-delta-table&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-inside-a-delta-table&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is inside a Delta table?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;layers&quot;&gt;&lt;ol class=&quot;dfig-stack&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;_delta_log&lt;/b&gt;&lt;span&gt;JSON entries per change, plus checkpoints: the table's history&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Parquet files&lt;/b&gt;&lt;span&gt;the rows, in columns, compressed&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;b&gt;Old files&lt;/b&gt;&lt;span&gt;kept for time travel until VACUUM removes them&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One table on disk&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;A write adds new Parquet files and then one log entry that names them. A reader that starts before the entry sees the old version; after it, the new one. Nobody ever sees half a write.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;DESCRIBE HISTORY silver_orders;
&lt;i class=&quot;k&quot;&gt;SELECT&lt;/i&gt; * &lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; silver_orders VERSION &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; OF &lt;i class=&quot;n&quot;&gt;12&lt;/i&gt;;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-does-v-order-change&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-v-order-change&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does V-Order change?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Question&lt;/th&gt;&lt;th&gt;Answer&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;What it does&lt;/td&gt;&lt;td&gt;sorts, groups and encodes the Parquet files for faster reads&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Cost&lt;/td&gt;&lt;td&gt;writes take longer, about 15% on average&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Default&lt;/td&gt;&lt;td&gt;off in new workspaces&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Still Parquet?&lt;/td&gt;&lt;td&gt;yes, any Parquet reader can read the files&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Worth it for&lt;/td&gt;&lt;td&gt;tables read often: gold tables, Direct Lake models&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;V-Order in Fabric&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Turn it on for one table, so only that table's writes pay the cost:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;ALTER&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;TABLE&lt;/i&gt; gold_fact_sales &lt;i class=&quot;k&quot;&gt;SET&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;TBLPROPERTIES&lt;/i&gt; (&lt;i class=&quot;s&quot;&gt;&amp;quot;delta.parquet.vorder.enabled&amp;quot;&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;true&amp;quot;&lt;/i&gt;);&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-do-you-keep-a-table-fast&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-keep-a-table-fast&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you keep a table fast?&lt;/h2&gt;
&lt;p&gt;Small appends leave many small files, and every reader opens each one. Two commands keep that in check:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;OPTIMIZE gold_fact_sales VORDER;
VACUUM gold_fact_sales RETAIN &lt;i class=&quot;n&quot;&gt;168&lt;/i&gt; HOURS;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;OPTIMIZE&lt;/code&gt; rewrites small files into fewer large ones (and with &lt;code&gt;VORDER&lt;/code&gt;, applies V-Order as it does). &lt;code&gt;VACUUM&lt;/code&gt; deletes files that no version within the retention still needs; 168 hours is Delta's default of seven days. After a vacuum, time travel cannot go back further than the retention.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Thousands of tiny files.&lt;/strong&gt; A streaming or per-row load without regular &lt;code&gt;OPTIMIZE&lt;/code&gt; gets slower every week.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;VACUUM with a short retention.&lt;/strong&gt; A reader still on an old version loses its files. Keep the default unless storage forces you.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;V-Order everywhere.&lt;/strong&gt; Bronze tables written often and read rarely only pay its cost. Use it where reads dominate.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/data-engineering/delta-optimization-and-v-order&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Optimize Delta Lake tables with V-Order in Fabric&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-and-delta-tables&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Lakehouse and Delta Lake tables&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://docs.delta.io/latest/delta-utility.html#remove-files-no-longer-referenced-by-a-delta-table&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Delta Lake docs: Remove files no longer referenced by a Delta table&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/blog/direct-lake-power-bi-explained/&quot;&gt;Direct Lake: Power BI reports straight from the lake&lt;/a&gt; is where V-Order pays off most, and the open course &lt;a href=&quot;/courses/incremental-lakehouse-loads/&quot;&gt;Incremental loads in a lakehouse&lt;/a&gt; writes the kind of table that needs &lt;code&gt;OPTIMIZE&lt;/code&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>LOOKUPVALUE in DAX: when to use it, and RELATED instead</title>
    <link href="https://data.benibix.com/blog/lookupvalue-dax/"/>
    <id>https://data.benibix.com/blog/lookupvalue-dax/</id>
    <published>2026-10-21T12:00:00Z</published>
    <updated>2026-10-21T12:00:00Z</updated>
    <summary>How LOOKUPVALUE finds a value in DAX by one or more search columns, the alternate result, the error when several different values match, examples for prices by date and exchange rates, and why RELATED or a relationship is usually better.</summary>
    <category term="DAX"/>
    <category term="Filter functions"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;code&gt;LOOKUPVALUE ( result_column, search_column, search_value, ... [, alternate] )&lt;/code&gt; returns the value of &lt;code&gt;result_column&lt;/code&gt; in the row where every search column equals its search value, like a VLOOKUP with several keys. No match returns BLANK (or the alternate); several matching rows with &lt;strong&gt;different&lt;/strong&gt; results return an error (or the alternate). If a relationship exists between the tables, Microsoft notes &lt;code&gt;RELATED&lt;/code&gt; is usually more efficient. Use &lt;code&gt;LOOKUPVALUE&lt;/code&gt; for lookups without a relationship: a rate valid on a date, a value by two keys.&lt;/p&gt;
&lt;p&gt;People coming from Excel reach for &lt;code&gt;LOOKUPVALUE&lt;/code&gt; for every lookup. In a model with relationships, most lookups are &lt;code&gt;RELATED&lt;/code&gt;, and the rest are often better solved in Power Query.&lt;/p&gt;
&lt;h2 id=&quot;what-does-it-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-it-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does it look like?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- calculated column on Sales: the exchange rate for the order's currency and date&lt;/i&gt;
Rate =
&lt;i class=&quot;f&quot;&gt;LOOKUPVALUE&lt;/i&gt; (
    Rates&lt;i class=&quot;m&quot;&gt;[Rate]&lt;/i&gt;,
    Rates&lt;i class=&quot;m&quot;&gt;[Currency]&lt;/i&gt;, Sales&lt;i class=&quot;m&quot;&gt;[Currency]&lt;/i&gt;,
    Rates&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, Sales&lt;i class=&quot;m&quot;&gt;[Order Date]&lt;/i&gt;,
    &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;
)

Amount EUR = Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; * Sales&lt;i class=&quot;m&quot;&gt;[Rate]&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The last argument, &lt;code&gt;1&lt;/code&gt;, is the alternate result: rows with no rate get 1. Without it they would get BLANK.&lt;/p&gt;
&lt;h2 id=&quot;how-does-it-behave-with-matches&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-it-behave-with-matches&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does it behave with matches?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Matching rows&lt;/th&gt;&lt;th&gt;Result values&lt;/th&gt;&lt;th&gt;Returns&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;none&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;BLANK or alternate&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;one&lt;/td&gt;&lt;td&gt;0.92&lt;/td&gt;&lt;td&gt;0.92&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;several&lt;/td&gt;&lt;td&gt;all 0.92&lt;/td&gt;&lt;td&gt;0.92&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;several&lt;/td&gt;&lt;td&gt;0.92 and 0.95&lt;/td&gt;&lt;td&gt;error, or the alternate if given&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;LOOKUPVALUE outcomes&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The error is &amp;quot;A table of multiple values was supplied where a single value was expected&amp;quot;. It usually means the lookup table has duplicates; fix the data rather than hiding it with an alternate.&lt;/p&gt;
&lt;h2 id=&quot;when-is-related-better&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-related-better&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is RELATED better?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- with a relationship Sales[Product Key] to Product[Product Key]&lt;/i&gt;
Category = &lt;i class=&quot;f&quot;&gt;RELATED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- the same without using the relationship, slower&lt;/i&gt;
Category Lookup = &lt;i class=&quot;f&quot;&gt;LOOKUPVALUE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product Key]&lt;/i&gt;, Sales&lt;i class=&quot;m&quot;&gt;[Product Key]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Relationships are indexed; &lt;code&gt;LOOKUPVALUE&lt;/code&gt; searches. A relationship also filters in visuals, which a looked-up column does not.&lt;/p&gt;
&lt;h2 id=&quot;what-about-the-price-valid-on-that-date&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-about-the-price-valid-on-that-date&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What about &amp;quot;the price valid on that date&amp;quot;?&lt;/h2&gt;
&lt;p&gt;Price lists with valid-from dates have no exact date match. &lt;code&gt;LOOKUPVALUE&lt;/code&gt; needs exact matches, so use the latest row on or before the date:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- calculated column on Sales&lt;/i&gt;
Unit List Price =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; D = Sales&lt;i class=&quot;m&quot;&gt;[Order Date]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; P = Sales&lt;i class=&quot;m&quot;&gt;[Product Key]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;MAXX&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;TOPN&lt;/i&gt; (
            &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;,
            &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( Prices, Prices&lt;i class=&quot;m&quot;&gt;[Product Key]&lt;/i&gt; = P &amp;amp;&amp;amp; Prices&lt;i class=&quot;m&quot;&gt;[Valid From]&lt;/i&gt; &amp;lt;= D ),
            Prices&lt;i class=&quot;m&quot;&gt;[Valid From]&lt;/i&gt;, DESC
        ),
        Prices&lt;i class=&quot;m&quot;&gt;[Price]&lt;/i&gt;
    )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;For large tables, do this join in Power Query or the source.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Duplicates in the lookup table.&lt;/strong&gt; The error appears only for keys with different results; check with &lt;code&gt;COUNTROWS&lt;/code&gt; per key.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Using it in measures over many rows.&lt;/strong&gt; Each call searches; in an iterator over millions of rows this is slow.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Types that differ.&lt;/strong&gt; A text key against a number key never matches; align data types.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Instead of a relationship.&lt;/strong&gt; If the key is unique on one side, create the relationship and use &lt;code&gt;RELATED&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/lookupvalue-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: LOOKUPVALUE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/related-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: RELATED function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/topn-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: TOPN function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Replace each &lt;code&gt;LOOKUPVALUE&lt;/code&gt; that follows an existing relationship with &lt;code&gt;RELATED&lt;/code&gt;, and move date-range lookups to Power Query. &lt;a href=&quot;/blog/dax-relationship-functions/&quot;&gt;Relationship functions&lt;/a&gt; covers &lt;code&gt;RELATED&lt;/code&gt; and inactive relationships.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Current ratio and quick ratio: liquidity KPIs in DAX</title>
    <link href="https://data.benibix.com/blog/current-and-quick-ratio-kpi/"/>
    <id>https://data.benibix.com/blog/current-and-quick-ratio-kpi/</id>
    <published>2026-10-20T12:00:00Z</published>
    <updated>2026-11-05T12:00:00Z</updated>
    <summary>How to calculate the current ratio, quick ratio and cash ratio from a balance sheet, a worked example, what the ratios say about paying short-term debts, working capital, the DAX on balance sheet accounts with closing balances, and a trend chart by quarter.</summary>
    <category term="KPIs"/>
    <category term="Finance"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; liquidity ratios compare what a company can turn into cash soon with what it must pay soon. &lt;strong&gt;Current ratio&lt;/strong&gt; = current assets / current liabilities. &lt;strong&gt;Quick ratio&lt;/strong&gt; = (cash + short-term investments + receivables) / current liabilities, leaving out inventory, which may be slow to sell. &lt;strong&gt;Cash ratio&lt;/strong&gt; = (cash + short-term investments) / current liabilities. A current ratio of 1.8 means 1.80 of short-term assets for each euro due within a year. &lt;strong&gt;Working capital&lt;/strong&gt; = current assets - current liabilities, the same comparison in money.&lt;/p&gt;
&lt;p&gt;Banks and suppliers look at these first. A falling quick ratio is an early sign that growth is being paid for with short-term debt.&lt;/p&gt;
&lt;p&gt;The short video below shows working capital and the current ratio with one worked example, and why unpaid invoices can make both look better than they are.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Item&lt;/th&gt;&lt;th&gt;Amount&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Cash&lt;/td&gt;&lt;td&gt;400&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Short-term investments&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Receivables&lt;/td&gt;&lt;td&gt;1,250&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Inventory&lt;/td&gt;&lt;td&gt;1,200&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Prepaid expenses&lt;/td&gt;&lt;td&gt;50&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Current assets&lt;/td&gt;&lt;td&gt;3,000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Payables&lt;/td&gt;&lt;td&gt;900&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Short-term debt&lt;/td&gt;&lt;td&gt;500&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Accrued expenses&lt;/td&gt;&lt;td&gt;267&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Current liabilities&lt;/td&gt;&lt;td&gt;1,667&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Balance sheet at 31 Dec (k)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;Current ratio = 3,000 / 1,667 = &lt;strong&gt;1.80&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;Quick ratio = (400 + 100 + 1,250) / 1,667 = &lt;strong&gt;1.05&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;Cash ratio = (400 + 100) / 1,667 = &lt;strong&gt;0.30&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;Working capital = 3,000 - 1,667 = &lt;strong&gt;1,333k&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;line&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;Current ratio&lt;/li&gt;&lt;li class=&quot;k1&quot;&gt;Quick ratio&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;line chart: Q1 2.1, 1.3; Q2 2, 1.2; Q3 1.9, 1.1; Q4 1.8, 1.1&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;626&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0.5&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;626&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;1&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;626&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;1.5&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;626&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;2&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;626&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;2.5&lt;/text&gt;&lt;polyline points=&quot;52,135 243.3,147.1 434.7,155.1 626,160.2&quot; class=&quot;ln k1&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;135&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;243.3&quot; cy=&quot;147.1&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;434.7&quot; cy=&quot;155.1&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;160.2&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;polyline points=&quot;52,59.4 243.3,69.4 434.7,78.5 626,84.6&quot; class=&quot;ln k0&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;59.4&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;243.3&quot; cy=&quot;69.4&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;434.7&quot; cy=&quot;78.5&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;84.6&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;text x=&quot;52&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q1&lt;/text&gt;&lt;text x=&quot;243.3&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q2&lt;/text&gt;&lt;text x=&quot;434.7&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q3&lt;/text&gt;&lt;text x=&quot;626&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q4&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Current and quick ratio by quarter&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Both falling while the gap stays similar: liabilities grow faster than assets. A widening gap would point to inventory building up.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;Balance-sheet accounts are mapped to lines (Cash, Investments, Receivables, Inventory, Other current assets, Current liabilities). Balances are taken at the period's last date:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Balance =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( BS&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;LASTNONBLANK&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( BS&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ) ) )
)

Current Assets = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Balance]&lt;/i&gt;, Accounts&lt;i class=&quot;m&quot;&gt;[Group]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Current assets&amp;quot;&lt;/i&gt; )
Current Liabilities = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Balance]&lt;/i&gt;, Accounts&lt;i class=&quot;m&quot;&gt;[Group]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Current liabilities&amp;quot;&lt;/i&gt; )
Quick Assets = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Balance]&lt;/i&gt;, Accounts&lt;i class=&quot;m&quot;&gt;[Line]&lt;/i&gt; IN { &lt;i class=&quot;s&quot;&gt;&amp;quot;Cash&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Investments&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Receivables&amp;quot;&lt;/i&gt; } )
Cash Assets = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Balance]&lt;/i&gt;, Accounts&lt;i class=&quot;m&quot;&gt;[Line]&lt;/i&gt; IN { &lt;i class=&quot;s&quot;&gt;&amp;quot;Cash&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Investments&amp;quot;&lt;/i&gt; } )

Current Ratio = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Current Assets]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Current Liabilities]&lt;/i&gt; )
Quick Ratio = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Quick Assets]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Current Liabilities]&lt;/i&gt; )
Cash Ratio = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Cash Assets]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Current Liabilities]&lt;/i&gt; )
Working Capital = &lt;i class=&quot;m&quot;&gt;[Current Assets]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Current Liabilities]&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;If liabilities are stored as negative amounts, flip the sign with an account sign column once. In depth: &lt;a href=&quot;/blog/opening-closing-balance-dax/&quot;&gt;opening and closing balances&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;how-should-the-ratios-be-read&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-should-the-ratios-be-read&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How should the ratios be read?&lt;/h2&gt;
&lt;p&gt;There is no single good value: it depends on the industry and how fast inventory and receivables turn. Compare with your own history and with companies in the same business. Very high ratios are not always good either: they can mean idle cash or stock.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Summing balances over time.&lt;/strong&gt; Use the closing balance of each period.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Counting long-term items.&lt;/strong&gt; Only assets and liabilities due within a year count as current.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;One date.&lt;/strong&gt; A ratio on 31 December can be dressed up; show the quarterly trend.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Ignoring the cycle.&lt;/strong&gt; Pair with the &lt;a href=&quot;/blog/cash-conversion-cycle-kpi/&quot;&gt;cash conversion cycle&lt;/a&gt;: a short cycle can run safely on a lower ratio.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/lastnonblank-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: LASTNONBLANK function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/closingbalancequarter-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: CLOSINGBALANCEQUARTER function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/divide-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DIVIDE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Map your balance-sheet accounts to the six lines and plot the three ratios by quarter. &lt;a href=&quot;/blog/burn-rate-and-runway-kpi/&quot;&gt;Burn rate and runway&lt;/a&gt; is the cash view for companies that are not yet profitable.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>DAX financial functions: every one with an example</title>
    <link href="https://data.benibix.com/blog/financial-functions-dax-reference/"/>
    <id>https://data.benibix.com/blog/financial-functions-dax-reference/</id>
    <published>2026-10-20T12:00:00Z</published>
    <updated>2026-10-20T12:00:00Z</updated>
    <summary>A reference of all DAX financial functions, loans and annuities (PMT, IPMT, PPMT, FV, PV, NPER, RATE), investment returns (XNPV, XIRR, RRI, PDURATION), depreciation (SLN, DB, DDB, SYD, VDB, AMORLINC), interest rates (EFFECT, NOMINAL) and the bond and security functions, with worked examples.</summary>
    <category term="DAX"/>
    <category term="Reference"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; DAX has the Excel financial functions: &lt;strong&gt;loans and savings&lt;/strong&gt; (&lt;code&gt;PMT&lt;/code&gt;, &lt;code&gt;IPMT&lt;/code&gt;, &lt;code&gt;PPMT&lt;/code&gt;, &lt;code&gt;FV&lt;/code&gt;, &lt;code&gt;PV&lt;/code&gt;, &lt;code&gt;NPER&lt;/code&gt;, &lt;code&gt;RATE&lt;/code&gt;, &lt;code&gt;CUMIPMT&lt;/code&gt;, &lt;code&gt;CUMPRINC&lt;/code&gt;), &lt;strong&gt;investment returns&lt;/strong&gt; on dated cash flows (&lt;code&gt;XNPV&lt;/code&gt;, &lt;code&gt;XIRR&lt;/code&gt;), &lt;strong&gt;growth&lt;/strong&gt; (&lt;code&gt;RRI&lt;/code&gt;, &lt;code&gt;PDURATION&lt;/code&gt;), &lt;strong&gt;depreciation&lt;/strong&gt; (&lt;code&gt;SLN&lt;/code&gt;, &lt;code&gt;DB&lt;/code&gt;, &lt;code&gt;DDB&lt;/code&gt;, &lt;code&gt;SYD&lt;/code&gt;, &lt;code&gt;VDB&lt;/code&gt;, &lt;code&gt;AMORLINC&lt;/code&gt;, &lt;code&gt;AMORDEGRC&lt;/code&gt;), &lt;strong&gt;rate conversion&lt;/strong&gt; (&lt;code&gt;EFFECT&lt;/code&gt;, &lt;code&gt;NOMINAL&lt;/code&gt;) and about 25 &lt;strong&gt;bond and security&lt;/strong&gt; functions (&lt;code&gt;PRICE&lt;/code&gt;, &lt;code&gt;YIELD&lt;/code&gt;, &lt;code&gt;DURATION&lt;/code&gt;, &lt;code&gt;ACCRINT&lt;/code&gt; and more). Money paid out is negative and money received positive, as in Excel.&lt;/p&gt;
&lt;p&gt;They let a model compare projects, show loan schedules or depreciation without exporting to Excel. &lt;code&gt;XNPV&lt;/code&gt; and &lt;code&gt;XIRR&lt;/code&gt; are the most useful in reports, because they take a &lt;strong&gt;table&lt;/strong&gt; of dated cash flows.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-handle-loans-and-savings&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-handle-loans-and-savings&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions handle loans and savings?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;th&gt;Result&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;PMT ( rate, nper, pv )&lt;/td&gt;&lt;td&gt;PMT ( 0.05 / 12, 60, 20000 )&lt;/td&gt;&lt;td&gt;-377.42 a month&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;IPMT ( rate, per, nper, pv )&lt;/td&gt;&lt;td&gt;IPMT ( 0.05 / 12, 1, 60, 20000 )&lt;/td&gt;&lt;td&gt;-83.33 interest in month 1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PPMT ( rate, per, nper, pv )&lt;/td&gt;&lt;td&gt;PPMT ( 0.05 / 12, 1, 60, 20000 )&lt;/td&gt;&lt;td&gt;-294.09 principal in month 1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CUMIPMT ( rate, nper, pv, start, end, type )&lt;/td&gt;&lt;td&gt;CUMIPMT ( 0.05 / 12, 60, 20000, 1, 12, 0 )&lt;/td&gt;&lt;td&gt;interest in year 1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;NPER ( rate, pmt, pv )&lt;/td&gt;&lt;td&gt;NPER ( 0.05 / 12, -500, 20000 )&lt;/td&gt;&lt;td&gt;43.8 months at 500 a month&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;RATE ( nper, pmt, pv )&lt;/td&gt;&lt;td&gt;RATE ( 60, -377.42, 20000 ) * 12&lt;/td&gt;&lt;td&gt;5%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;FV ( rate, nper, pmt, pv )&lt;/td&gt;&lt;td&gt;FV ( 0.04, 10, 0, -10000 )&lt;/td&gt;&lt;td&gt;14,802.44&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PV ( rate, nper, pmt )&lt;/td&gt;&lt;td&gt;PV ( 0.06, 10, -1000 )&lt;/td&gt;&lt;td&gt;7,360.09&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ISPMT ( rate, per, nper, pv )&lt;/td&gt;&lt;td&gt;ISPMT ( 0.05 / 12, 1, 60, 20000 )&lt;/td&gt;&lt;td&gt;interest of a straight-line loan&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;A loan of 20,000 at 5% a year over 60 months&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The optional &lt;code&gt;type&lt;/code&gt; is 0 for payments at the end of each period (the default) and 1 for the start.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-calculate-return-on-dated-cash-flows&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-calculate-return-on-dated-cash-flows&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you calculate return on dated cash flows?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Date&lt;/th&gt;&lt;th&gt;Cash flow&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;2026-01-01&lt;/td&gt;&lt;td&gt;-10,000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2026-07-01&lt;/td&gt;&lt;td&gt;3,000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2027-01-01&lt;/td&gt;&lt;td&gt;4,000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2027-07-01&lt;/td&gt;&lt;td&gt;5,000&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Project cash flows&lt;/figcaption&gt;&lt;/figure&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Project NPV &lt;i class=&quot;n&quot;&gt;8&lt;/i&gt;% = &lt;i class=&quot;f&quot;&gt;XNPV&lt;/i&gt; ( Cashflows, Cashflows&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt;, Cashflows&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;0.08&lt;/i&gt; )
Project IRR = &lt;i class=&quot;f&quot;&gt;XIRR&lt;/i&gt; ( Cashflows, Cashflows&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt;, Cashflows&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;For these flows &lt;code&gt;XNPV&lt;/code&gt; at 8% is about 1,048 and &lt;code&gt;XIRR&lt;/code&gt; about 18.6% a year. Both take the table, so they respect slicers: filter by project and each row shows its own return. &lt;code&gt;XIRR&lt;/code&gt; takes an optional guess and an alternate result for when it cannot find a rate.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-handle-growth-and-rates&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-handle-growth-and-rates&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions handle growth and rates?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;th&gt;Result&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;RRI ( nper, pv, fv )&lt;/td&gt;&lt;td&gt;RRI ( 5, 1000, 1500 )&lt;/td&gt;&lt;td&gt;8.45% a year (equivalent growth rate)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PDURATION ( rate, pv, fv )&lt;/td&gt;&lt;td&gt;PDURATION ( 0.05, 1000, 2000 )&lt;/td&gt;&lt;td&gt;14.2 periods to double&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;EFFECT ( nominal, npery )&lt;/td&gt;&lt;td&gt;EFFECT ( 0.05, 12 )&lt;/td&gt;&lt;td&gt;5.12% effective&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;NOMINAL ( effect, npery )&lt;/td&gt;&lt;td&gt;NOMINAL ( 0.0512, 12 )&lt;/td&gt;&lt;td&gt;about 5% nominal&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Growth and rates&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;code&gt;RRI&lt;/code&gt; is the compound annual growth rate: &lt;code&gt;RRI ( Years, [First Year Revenue], [Last Year Revenue] )&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-depreciate-assets&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-depreciate-assets&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions depreciate assets?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Method&lt;/th&gt;&lt;th&gt;Year 1&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;SLN ( cost, salvage, life )&lt;/td&gt;&lt;td&gt;straight line&lt;/td&gt;&lt;td&gt;1,800&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DB ( cost, salvage, life, period )&lt;/td&gt;&lt;td&gt;fixed declining balance&lt;/td&gt;&lt;td&gt;3,690&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DDB ( cost, salvage, life, period [, factor] )&lt;/td&gt;&lt;td&gt;double declining balance&lt;/td&gt;&lt;td&gt;4,000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SYD ( cost, salvage, life, period )&lt;/td&gt;&lt;td&gt;sum of years' digits&lt;/td&gt;&lt;td&gt;3,000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;VDB ( cost, salvage, life, start, end )&lt;/td&gt;&lt;td&gt;declining balance for any span, switching to straight line&lt;/td&gt;&lt;td&gt;4,000 for period 0 to 1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;AMORLINC, AMORDEGRC&lt;/td&gt;&lt;td&gt;French accounting system&lt;/td&gt;&lt;td&gt;per period&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;An asset of 10,000, salvage 1,000, 5 years, year 1&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;which-functions-price-bonds-and-securities&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-price-bonds-and-securities&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions price bonds and securities?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Group&lt;/th&gt;&lt;th&gt;Functions&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;price and yield&lt;/td&gt;&lt;td&gt;PRICE, YIELD, PRICEDISC, YIELDDISC, PRICEMAT, YIELDMAT&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;odd periods&lt;/td&gt;&lt;td&gt;ODDFPRICE, ODDFYIELD, ODDLPRICE, ODDLYIELD&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;duration&lt;/td&gt;&lt;td&gt;DURATION, MDURATION&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;accrued interest&lt;/td&gt;&lt;td&gt;ACCRINT, ACCRINTM&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;coupons&lt;/td&gt;&lt;td&gt;COUPDAYBS, COUPDAYS, COUPDAYSNC, COUPNCD, COUPNUM, COUPPCD&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;discount and received&lt;/td&gt;&lt;td&gt;DISC, INTRATE, RECEIVED&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;treasury bills&lt;/td&gt;&lt;td&gt;TBILLEQ, TBILLPRICE, TBILLYIELD&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;fractional prices&lt;/td&gt;&lt;td&gt;DOLLARDE, DOLLARFR&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Bond and security functions&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;They follow Excel's definitions, with settlement and maturity dates and a day-count basis.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Annual rate with monthly periods.&lt;/strong&gt; Divide the rate by 12 and use months for nper.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Signs.&lt;/strong&gt; Paid out is negative; PMT on a positive loan returns a negative payment.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;XIRR without a sign change.&lt;/strong&gt; All positive or all negative flows have no rate; pass the alternate result.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The wrong grain.&lt;/strong&gt; &lt;code&gt;XNPV&lt;/code&gt; and &lt;code&gt;XIRR&lt;/code&gt; evaluate the values and dates expressions for each row of the table; iterate one row per cash flow date (for example &lt;code&gt;VALUES ( 'Date'[Month Start] )&lt;/code&gt; with a measure as the value).&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/financial-functions-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Financial functions (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/xirr-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: XIRR function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/pmt-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: PMT function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Put your projects' cash flows in one table with a project column and show &lt;code&gt;XNPV&lt;/code&gt; and &lt;code&gt;XIRR&lt;/code&gt; per project. &lt;a href=&quot;/blog/other-functions-dax/&quot;&gt;Other functions&lt;/a&gt; covers BLANK, ERROR and the debugging helpers.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>DP-600 in 2026: what the exam covers and how to study</title>
    <link href="https://data.benibix.com/blog/dp-600-study-guide/"/>
    <id>https://data.benibix.com/blog/dp-600-study-guide/</id>
    <published>2026-10-20T12:00:00Z</published>
    <updated>2026-10-20T12:00:00Z</updated>
    <summary>What the DP-600 Fabric Analytics Engineer exam measures since October 2026, why preparing data is half of it, and a study plan built on a lakehouse and a semantic model.</summary>
    <category term="Exams"/>
    <category term="Data and BI"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; DP-600 earns the &lt;strong&gt;Fabric Analytics Engineer Associate&lt;/strong&gt; certification. Preparing data is almost half of it (45 to 50%); maintaining the solution and building semantic models are 25 to 30% each. You need 700 to pass, and you should be able to read and write SQL, KQL and DAX. Study by building one path through Fabric: data into a lakehouse or warehouse, a star schema, and a semantic model on top.&lt;/p&gt;
&lt;p&gt;I earned this certification in December 2024. The skills list has been updated since, most recently on 19 October 2026, and this guide follows the current one.&lt;/p&gt;
&lt;h2 id=&quot;what-does-dp-600-cover&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-dp-600-cover&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does DP-600 cover?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Prepare data&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;45-50%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Maintain a data analytics solution&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:60.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;25-30%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Implement and manage semantic models&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:60.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;25-30%&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;DP-600 skills, by weight in the exam&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In plain words:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Prepare data&lt;/strong&gt; (the big one): getting data in and choosing where it lives (lakehouse, warehouse, Eventhouse), transforming it with views, functions and stored procedures, building a star schema, fixing duplicates and nulls, and querying with the visual query editor, SQL, KQL and DAX.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Maintain the solution&lt;/strong&gt;: access at workspace, item, row, column, object and file level, sensitivity labels and endorsement, Git version control, Power BI Desktop projects (.pbip), deployment pipelines, impact analysis and the XMLA endpoint.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Semantic models&lt;/strong&gt;: storage modes, star schemas, bridge tables and many-to-many relationships, DAX with variables, iterators and window functions, calculation groups, dynamic format strings, field parameters, composite models, Direct Lake (including its fallback and refresh) and incremental refresh.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;why-is-preparing-data-half-the-exam&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-is-preparing-data-half-the-exam&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why is preparing data half the exam?&lt;/h2&gt;
&lt;p&gt;Because in Fabric the analytics engineer shapes the data before any report sees it. A Direct Lake model reads tables as they are, so the cleaning and the star schema happen in the lakehouse or warehouse, in SQL, notebooks or dataflows. Expect to choose between those tools and between the data stores, not only to write queries.&lt;/p&gt;
&lt;h2 id=&quot;how-would-i-study-for-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-would-i-study-for-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How would I study for it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li data-tone=&quot;bronze&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Land data&lt;/b&gt;&lt;span&gt;a lakehouse with bronze and silver&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Shape it&lt;/b&gt;&lt;span&gt;a gold star schema, in SQL or a notebook&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Model it&lt;/b&gt;&lt;span&gt;Direct Lake, measures, a calculation group&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Run it&lt;/b&gt;&lt;span&gt;Git, a deployment pipeline, access rules&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Practise&lt;/b&gt;&lt;span&gt;Microsoft's free practice assessment&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One build that covers the three areas&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Area&lt;/th&gt;&lt;th&gt;Practise it with&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Prepare data&lt;/td&gt;&lt;td&gt;A lakehouse in three layers (open course)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Prepare data&lt;/td&gt;&lt;td&gt;Bronze, silver and gold in a Fabric lakehouse&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Prepare data&lt;/td&gt;&lt;td&gt;Quarantine bad rows before they reach silver&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Semantic models&lt;/td&gt;&lt;td&gt;Direct Lake: Power BI reports straight from the lake&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Semantic models&lt;/td&gt;&lt;td&gt;Every KPI once, with measures and calculation groups&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Maintain the solution&lt;/td&gt;&lt;td&gt;Row-level security that holds (open course)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Where each area is practised on this site&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Two things to practise on purpose, because a build does not force them: &lt;strong&gt;KQL&lt;/strong&gt; (write a few queries against an Eventhouse; the syntax is unlike SQL) and &lt;strong&gt;deployment pipelines&lt;/strong&gt; (move one item from development to test and see what changes).&lt;/p&gt;
&lt;h2 id=&quot;what-helps-on-the-day&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-helps-on-the-day&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What helps on the day?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Try the exam sandbox first&lt;/strong&gt;, so the question types are familiar.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Look for the requirement words&lt;/strong&gt;: least effort, lowest cost, no code, near real time. Several answers usually work; one matches every requirement.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Know which engine does what.&lt;/strong&gt; Many questions turn on whether a task belongs in a notebook, a dataflow, a warehouse or the semantic model.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-keep-the-certification&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-keep-the-certification&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you keep the certification?&lt;/h2&gt;
&lt;p&gt;It expires after a year. Renew it with Microsoft's free online assessment, which opens in the six months before it expires; the assessment follows the current skills list, so this guide stays useful for that too.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/dp-600&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam DP-600&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/fabric-analytics-engineer-associate/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Microsoft Certified: Fabric Analytics Engineer Associate&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/exam-scoring-reports&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Exam scoring and score reports&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/renew-your-microsoft-certification&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Renew your Microsoft Certification&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/courses/lakehouse-in-three-layers/&quot;&gt;A lakehouse in three layers&lt;/a&gt; builds the path from a file to a Direct Lake semantic model in your own workspace, which is most of this exam in one sitting. Then add &lt;a href=&quot;/courses/incremental-lakehouse-loads/&quot;&gt;Incremental loads in a lakehouse&lt;/a&gt;. My credential is on &lt;a href=&quot;/about/&quot;&gt;the About page&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Filled maps and shape maps in Power BI</title>
    <link href="https://data.benibix.com/blog/filled-map-shape-map-power-bi/"/>
    <id>https://data.benibix.com/blog/filled-map-shape-map-power-bi/</id>
    <published>2026-10-20T12:00:00Z</published>
    <updated>2026-10-20T12:00:00Z</updated>
    <summary>How filled (choropleth) maps and shape maps in Power BI colour regions by a measure, when to use each, custom TopoJSON and GeoJSON maps for territories and floor plans, map keys, the DAX for fair comparisons, and the Bing deprecation.</summary>
    <category term="Visuals"/>
    <category term="Maps"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;filled map&lt;/strong&gt; (choropleth) and a &lt;strong&gt;shape map&lt;/strong&gt; both colour regions by a measure: darker is more. The &lt;strong&gt;filled map&lt;/strong&gt; uses Bing Maps to find the shapes of countries, states, counties or postcodes from their names, on a real background map. The &lt;strong&gt;shape map&lt;/strong&gt; (in preview) draws only the regions, from built-in maps or &lt;strong&gt;your own TopoJSON or GeoJSON file&lt;/strong&gt;, so it can show sales territories, a store's floor plan or a seating chart. Bing-based maps are scheduled for deprecation; the &lt;a href=&quot;/blog/azure-maps-visual-power-bi/&quot;&gt;Azure Maps visual&lt;/a&gt; has a filled layer as the long-term home.&lt;/p&gt;
&lt;p&gt;&amp;quot;Which region is strongest?&amp;quot; is a map question when the reader knows the regions by their place. A shaded map of 16 German states is read faster than a list of 16 names, as long as the measure is fair to big and small regions.&lt;/p&gt;
&lt;h2 id=&quot;filled-map-or-shape-map&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#filled-map-or-shape-map&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Filled map or shape map?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Feature&lt;/th&gt;&lt;th&gt;Filled map&lt;/th&gt;&lt;th&gt;Shape map&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Shapes come from&lt;/td&gt;&lt;td&gt;Bing, by the region's name&lt;/td&gt;&lt;td&gt;built-in maps or your TopoJSON or GeoJSON file&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Background&lt;/td&gt;&lt;td&gt;a real map with roads and labels&lt;/td&gt;&lt;td&gt;only the regions&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Custom regions&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;yes: territories, districts, floor plans, seating charts&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Geocoding&lt;/td&gt;&lt;td&gt;names sent to Bing&lt;/td&gt;&lt;td&gt;none for custom maps: names matched to the file's keys&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Status&lt;/td&gt;&lt;td&gt;Bing-based, scheduled for deprecation&lt;/td&gt;&lt;td&gt;preview&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Two ways to colour regions&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-build-a-filled-map&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-a-filled-map&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build a filled map?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;Set the column's &lt;strong&gt;Data category&lt;/strong&gt; in the model (Country/Region, State or Province, County, Postal code).&lt;/li&gt;&lt;li&gt;In &lt;strong&gt;Visualizations&lt;/strong&gt; pick &lt;strong&gt;Filled map&lt;/strong&gt;, drag the region to &lt;strong&gt;Location&lt;/strong&gt; and a measure to &lt;strong&gt;Tooltips&lt;/strong&gt; or use it for the colour.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Format visual, Fill colors, fx&lt;/strong&gt;: a &lt;strong&gt;Gradient&lt;/strong&gt; on the measure (light for low, dark for high), or &lt;strong&gt;Rules&lt;/strong&gt; for bands.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Power BI sends the Location values to Bing to find the shapes. Microsoft lists the URLs your firewall may need to allow, and recommends starting new reports on Azure Maps because of the planned deprecation.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-build-a-shape-map-with-your-own-regions&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-a-shape-map-with-your-own-regions&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build a shape map with your own regions?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;If the &lt;strong&gt;Shape map&lt;/strong&gt; visual is not in the pane, turn it on in Power BI Desktop under &lt;strong&gt;Options, Preview features&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Pick &lt;strong&gt;Shape map&lt;/strong&gt;, drag the region field to &lt;strong&gt;Location&lt;/strong&gt; and the measure to &lt;strong&gt;Color saturation&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;In &lt;strong&gt;Format visual, Map settings&lt;/strong&gt;, choose a built-in map or &lt;strong&gt;Custom map&lt;/strong&gt; and upload a &lt;code&gt;.topojson&lt;/code&gt; or &lt;code&gt;.geojson&lt;/code&gt; file, or paste a URL (a measure can provide the URL through &lt;strong&gt;fx&lt;/strong&gt;).&lt;/li&gt;&lt;li&gt;Select &lt;strong&gt;View map type key&lt;/strong&gt; to see the names or IDs the map uses. Your Location values must match them exactly.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Microsoft's example is US judicial districts: states split into districts no standard map has, so a custom TopoJSON file provides them. TopoJSON files are usually smaller, because shared borders are stored once; both formats work.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-make-the-colours-fair&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-make-the-colours-fair&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you make the colours fair?&lt;/h2&gt;
&lt;p&gt;A map coloured by total revenue mostly shows population. Colour by a rate:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )

Revenue per &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;,&lt;i class=&quot;n&quot;&gt;000&lt;/i&gt; Inhabitants =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Region&lt;i class=&quot;m&quot;&gt;[Population]&lt;/i&gt; ) / &lt;i class=&quot;n&quot;&gt;1000&lt;/i&gt; )

Customer Penetration % =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Customer ID]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Region&lt;i class=&quot;m&quot;&gt;[Households]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;State&lt;/th&gt;&lt;th&gt;Revenue&lt;/th&gt;&lt;th&gt;Population&lt;/th&gt;&lt;th&gt;Revenue per 1,000&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Bavaria&lt;/td&gt;&lt;td&gt;4.2 M&lt;/td&gt;&lt;td&gt;13.4 M&lt;/td&gt;&lt;td&gt;313&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Saxony&lt;/td&gt;&lt;td&gt;0.9 M&lt;/td&gt;&lt;td&gt;4.1 M&lt;/td&gt;&lt;td&gt;220&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Hamburg&lt;/td&gt;&lt;td&gt;0.8 M&lt;/td&gt;&lt;td&gt;1.9 M&lt;/td&gt;&lt;td&gt;421&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;By total, Bavaria is darkest. By revenue per 1,000 inhabitants, Hamburg is.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Names that do not match.&lt;/strong&gt; &amp;quot;Bayern&amp;quot; in the data and &amp;quot;Bavaria&amp;quot; in the map, or a postcode stored as a number that lost its leading zero. Check the map keys; store codes as text.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Ambiguous names on a filled map.&lt;/strong&gt; Add the country, or a hierarchy (country, then state), so Bing looks in the right place.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Totals instead of rates.&lt;/strong&gt; Big regions win every map of totals.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too many shades.&lt;/strong&gt; A gradient with a diverging centre (below and above a target) reads better than nine shades of one colour.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Small regions disappear.&lt;/strong&gt; City states and small counties are hard to see; add a table or bar chart next to the map.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-filled-maps-choropleths&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create and use filled maps (choropleth maps) in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-shape-map&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create shape map visualizations in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-map-visualizations-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Map visualizations in Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Use a shape map when your regions are your own (territories, districts, floors), a filled layer in Azure Maps for standard regions on a real map, and colour by a rate, not a total. The &lt;a href=&quot;/blog/azure-maps-visual-power-bi/&quot;&gt;Azure Maps visual&lt;/a&gt; covers points, bubbles and routes.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Headcount and FTE in Power BI: snapshots and DAX</title>
    <link href="https://data.benibix.com/blog/headcount-and-fte-kpi/"/>
    <id>https://data.benibix.com/blog/headcount-and-fte-kpi/</id>
    <published>2026-10-20T12:00:00Z</published>
    <updated>2026-10-20T12:00:00Z</updated>
    <summary>How to report headcount and full-time equivalents correctly, heads against FTE, headcount on a date as a balance, average headcount for a period, movements from opening to closing (hires, leavers, transfers), FTE from contracted hours, the DAX from hire and leave dates or monthly snapshots, and a headcount bridge chart.</summary>
    <category term="KPIs"/>
    <category term="People"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;headcount&lt;/strong&gt; counts people employed on a given date; &lt;strong&gt;FTE (full-time equivalent)&lt;/strong&gt; adds up contracted hours divided by full-time hours, so two half-time employees are 2 heads and 1.0 FTE. Both are &lt;strong&gt;balances&lt;/strong&gt;: report them at a date (usually month end) and use the &lt;strong&gt;average&lt;/strong&gt; over a period as the base for rates, never the sum of months. A &lt;strong&gt;headcount bridge&lt;/strong&gt; (opening headcount + hires - leavers ± transfers = closing headcount) explains every change.&lt;/p&gt;
&lt;p&gt;Headcount looks like the simplest HR number until two reports disagree: one counts contractors, one counts people on leave, one sums months. Defining it once avoids that.&lt;/p&gt;
&lt;h2 id=&quot;how-do-heads-and-fte-differ&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-heads-and-fte-differ&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do heads and FTE differ?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Employee&lt;/th&gt;&lt;th&gt;Contract hours per week&lt;/th&gt;&lt;th&gt;Full-time hours&lt;/th&gt;&lt;th&gt;FTE&lt;/th&gt;&lt;th&gt;Counted in headcount&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Ana&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;1.00&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ben&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;0.50&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Chen&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;0.75&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Dana (parental leave)&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;1.00&lt;/td&gt;&lt;td&gt;yes, as on leave&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;Eli (contractor)&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;no, external&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;3.25&lt;/td&gt;&lt;td&gt;4 heads&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Five employees on 30 September&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Decide and write down: are people on long leave counted (usually in headcount, sometimes not in active FTE)? Are apprentices and interns counted? Contractors are usually reported separately.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-show-the-change-over-a-period&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-show-the-change-over-a-period&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you show the change over a period?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;waterfall&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;waterfall chart: Opening 1 Jul 186; Hires 22; Leavers -11; Transfers in 3; Transfers out -3; Closing 30 Sep total&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;628&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;50&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;628&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;628&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;150&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;628&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;200&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;628&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;250&lt;/text&gt;&lt;rect x=&quot;69.3&quot; y=&quot;78.5&quot; width=&quot;61.4&quot; height=&quot;187.5&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;100&quot; y=&quot;72.5&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;186&lt;/text&gt;&lt;line x1=&quot;130.7&quot; y1=&quot;78.5&quot; x2=&quot;165.3&quot; y2=&quot;78.5&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;100&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Opening 1 Jul&lt;/text&gt;&lt;rect x=&quot;165.3&quot; y=&quot;56.3&quot; width=&quot;61.4&quot; height=&quot;22.2&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;196&quot; y=&quot;50.3&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;+22&lt;/text&gt;&lt;line x1=&quot;226.7&quot; y1=&quot;56.3&quot; x2=&quot;261.3&quot; y2=&quot;56.3&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;196&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Hires&lt;/text&gt;&lt;rect x=&quot;261.3&quot; y=&quot;56.3&quot; width=&quot;61.4&quot; height=&quot;11.1&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;292&quot; y=&quot;50.3&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;-11&lt;/text&gt;&lt;line x1=&quot;322.7&quot; y1=&quot;67.4&quot; x2=&quot;357.3&quot; y2=&quot;67.4&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;292&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Leavers&lt;/text&gt;&lt;rect x=&quot;357.3&quot; y=&quot;64.4&quot; width=&quot;61.4&quot; height=&quot;3&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;388&quot; y=&quot;58.4&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;+3&lt;/text&gt;&lt;line x1=&quot;418.7&quot; y1=&quot;64.4&quot; x2=&quot;453.3&quot; y2=&quot;64.4&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;388&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Transfers in&lt;/text&gt;&lt;rect x=&quot;453.3&quot; y=&quot;64.4&quot; width=&quot;61.4&quot; height=&quot;3&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;484&quot; y=&quot;58.4&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;-3&lt;/text&gt;&lt;line x1=&quot;514.7&quot; y1=&quot;67.4&quot; x2=&quot;549.3&quot; y2=&quot;67.4&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;484&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Transfers out&lt;/text&gt;&lt;rect x=&quot;549.3&quot; y=&quot;67.4&quot; width=&quot;61.4&quot; height=&quot;198.6&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;580&quot; y=&quot;61.4&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;197&lt;/text&gt;&lt;text x=&quot;580&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Closing 30 Sep&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Headcount bridge, Q3&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Transfers matter at department level and cancel out for the company.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;From an Employees table with Hire Date, Leave Date and contract hours (or a monthly snapshot table, which also captures changes in hours):&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Headcount =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; D = &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; (
            Employees,
            Employees&lt;i class=&quot;m&quot;&gt;[Hire Date]&lt;/i&gt; &amp;lt;= D
                &amp;amp;&amp;amp; ( &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( Employees&lt;i class=&quot;m&quot;&gt;[Leave Date]&lt;/i&gt; ) || Employees&lt;i class=&quot;m&quot;&gt;[Leave Date]&lt;/i&gt; &amp;gt; D )
                &amp;amp;&amp;amp; Employees&lt;i class=&quot;m&quot;&gt;[Worker Type]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Employee&amp;quot;&lt;/i&gt;
        )
    )

FTE =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; D = &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; (
            Employees,
            Employees&lt;i class=&quot;m&quot;&gt;[Hire Date]&lt;/i&gt; &amp;lt;= D
                &amp;amp;&amp;amp; ( &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( Employees&lt;i class=&quot;m&quot;&gt;[Leave Date]&lt;/i&gt; ) || Employees&lt;i class=&quot;m&quot;&gt;[Leave Date]&lt;/i&gt; &amp;gt; D )
                &amp;amp;&amp;amp; Employees&lt;i class=&quot;m&quot;&gt;[Worker Type]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Employee&amp;quot;&lt;/i&gt;
        ),
        &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( Employees&lt;i class=&quot;m&quot;&gt;[Contract Hours]&lt;/i&gt;, Employees&lt;i class=&quot;m&quot;&gt;[Full Time Hours]&lt;/i&gt; )
    )

Average Headcount =
&lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Headcount]&lt;/i&gt; ) )

Opening Headcount =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Headcount]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DATEADD&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;FIRSTDATE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), -&lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, DAY ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;Headcount&lt;/code&gt; at a quarter or year level returns the value at the period's last date, which is what a balance should do. With monthly snapshots (one row per employee per month with FTE), the measures become &lt;code&gt;CALCULATE ( SUM ( Snapshot[FTE] ), LASTDATE ( 'Date'[Date] ) )&lt;/code&gt;; see &lt;a href=&quot;/blog/opening-closing-balance-dax/&quot;&gt;opening and closing balances&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Summing monthly headcount.&lt;/strong&gt; 200 people for 12 months is not 2,400; use the closing value or the average.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Heads as the base for cost or output.&lt;/strong&gt; Use FTE for productivity and cost per employee.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Hours changes lost.&lt;/strong&gt; A table with only current hours rewrites history when someone goes part-time; keep monthly snapshots.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Different definitions in finance and HR.&lt;/strong&gt; Agree on who counts and use one source.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/filter-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: FILTER function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/lastdate-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: LASTDATE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-waterfall-charts&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Waterfall charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Write down who counts in headcount, then build Headcount, FTE and the quarterly bridge. &lt;a href=&quot;/blog/employee-turnover-kpi/&quot;&gt;Employee turnover&lt;/a&gt; uses the average headcount as its base.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>KEEPFILTERS in DAX: add a filter instead of replacing it</title>
    <link href="https://data.benibix.com/blog/keepfilters-dax/"/>
    <id>https://data.benibix.com/blog/keepfilters-dax/</id>
    <published>2026-10-20T12:00:00Z</published>
    <updated>2026-10-20T12:00:00Z</updated>
    <summary>How KEEPFILTERS changes CALCULATE from replacing filters to intersecting them, examples with a matrix by colour, KEEPFILTERS in iterators like SUMX over VALUES, when the default replacement is what you want, and how it relates to FILTER over a table.</summary>
    <category term="DAX"/>
    <category term="Filter functions"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; by default, a filter argument in &lt;code&gt;CALCULATE&lt;/code&gt; &lt;strong&gt;replaces&lt;/strong&gt; the existing filter on the same columns. &lt;code&gt;KEEPFILTERS ( filter )&lt;/code&gt; makes it &lt;strong&gt;intersect&lt;/strong&gt; with the existing filter instead: the result is what both allow. &lt;code&gt;CALCULATE ( [Revenue], KEEPFILTERS ( 'Product'[Color] IN { &amp;quot;Red&amp;quot;, &amp;quot;Blue&amp;quot; } ) )&lt;/code&gt; shows red revenue on the red row, blue on the blue row, and blank on the green row, instead of red-plus-blue on every row.&lt;/p&gt;
&lt;p&gt;A measure &amp;quot;Revenue of red and blue products&amp;quot; placed in a matrix by colour shows the same number on every row: the row's colour filter was replaced. Most of the time that is a mistake, and &lt;code&gt;KEEPFILTERS&lt;/code&gt; is the fix.&lt;/p&gt;
&lt;h2 id=&quot;what-does-the-difference-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-the-difference-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does the difference look like?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Red and Blue =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Color]&lt;/i&gt; IN { &lt;i class=&quot;s&quot;&gt;&amp;quot;Red&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Blue&amp;quot;&lt;/i&gt; } )

Red and Blue Kept =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;KEEPFILTERS&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Color]&lt;/i&gt; IN { &lt;i class=&quot;s&quot;&gt;&amp;quot;Red&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Blue&amp;quot;&lt;/i&gt; } ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Color&lt;/th&gt;&lt;th&gt;Revenue&lt;/th&gt;&lt;th&gt;Red and Blue&lt;/th&gt;&lt;th&gt;Red and Blue Kept&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Red&lt;/td&gt;&lt;td&gt;400&lt;/td&gt;&lt;td&gt;1,000&lt;/td&gt;&lt;td&gt;400&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Blue&lt;/td&gt;&lt;td&gt;600&lt;/td&gt;&lt;td&gt;1,000&lt;/td&gt;&lt;td&gt;600&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Green&lt;/td&gt;&lt;td&gt;250&lt;/td&gt;&lt;td&gt;1,000&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Black&lt;/td&gt;&lt;td&gt;900&lt;/td&gt;&lt;td&gt;1,000&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total&lt;/td&gt;&lt;td&gt;2,150&lt;/td&gt;&lt;td&gt;1,000&lt;/td&gt;&lt;td&gt;1,000&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;A table by colour&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;code&gt;Red and Blue&lt;/code&gt; replaces the row's colour with Red or Blue, so every row shows 1,000. &lt;code&gt;Red and Blue Kept&lt;/code&gt; intersects: Red row and {Red, Blue} gives Red; Green row and {Red, Blue} gives nothing.&lt;/p&gt;
&lt;h2 id=&quot;when-do-you-want-replacement&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-do-you-want-replacement&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When do you want replacement?&lt;/h2&gt;
&lt;p&gt;When the measure should be the same whatever the row says: a benchmark, a fixed segment, a total for comparison.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- compare each colour with the black products, on every row&lt;/i&gt;
Black Benchmark = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Color]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Black&amp;quot;&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-does-keepfilters-help-in-iterators&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-keepfilters-help-in-iterators&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does KEEPFILTERS help in iterators?&lt;/h2&gt;
&lt;p&gt;An iterator that calls a measure applies each row as a filter (context transition), and that filter also replaces the existing one on the same column. Wrapping the iterated table in &lt;code&gt;KEEPFILTERS&lt;/code&gt; makes the row filter intersect instead:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Sum over Colours = &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Color]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )

Sum over Colours Kept = &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;KEEPFILTERS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Color]&lt;/i&gt; ) ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;In the table by colour, &lt;code&gt;Sum over Colours&lt;/code&gt; shows 2,150 on every row: each colour of &lt;code&gt;ALL&lt;/code&gt; replaces the row's colour. &lt;code&gt;Sum over Colours Kept&lt;/code&gt; shows each row's own revenue, because only the colour that matches the row survives the intersection.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-different-from-filter-over-a-table&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-different-from-filter-over-a-table&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it different from FILTER over a table?&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;CALCULATE ( [Revenue], FILTER ( 'Product', 'Product'[Color] IN { &amp;quot;Red&amp;quot;, &amp;quot;Blue&amp;quot; } ) )&lt;/code&gt; also respects the existing colour filter, because &lt;code&gt;FILTER&lt;/code&gt; only sees the products already filtered. But it iterates the whole Product table and puts all its columns into the filter. &lt;code&gt;KEEPFILTERS&lt;/code&gt; with a Boolean filter gives the intersection with a filter on one column, which is cheaper and clearer.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Same number on every row.&lt;/strong&gt; A filter on the visual's own column is replaced; add &lt;code&gt;KEEPFILTERS&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;KEEPFILTERS in the wrong place.&lt;/strong&gt; It works on filter arguments of &lt;code&gt;CALCULATE&lt;/code&gt; and &lt;code&gt;CALCULATETABLE&lt;/code&gt; and on tables iterated with context transition; elsewhere it changes nothing.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;DirectQuery.&lt;/strong&gt; Not supported in calculated columns or row-level security rules in DirectQuery mode.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/keepfilters-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: KEEPFILTERS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/calculate-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: CALCULATE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Find measures with a filter on a column that is also on the visual's rows, and decide for each: fixed benchmark (keep replacement) or the part of the row (add &lt;code&gt;KEEPFILTERS&lt;/code&gt;). &lt;a href=&quot;/blog/calculate-function-dax/&quot;&gt;CALCULATE&lt;/a&gt; explains the default.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>OFFSET in DAX: compare with the previous row</title>
    <link href="https://data.benibix.com/blog/offset-dax/"/>
    <id>https://data.benibix.com/blog/offset-dax/</id>
    <published>2026-10-20T12:00:00Z</published>
    <updated>2026-10-20T12:00:00Z</updated>
    <summary>How the OFFSET window function returns the row before or after the current one in DAX, previous month and previous product comparisons, the relation, ORDERBY and PARTITIONBY arguments, blanks, and how OFFSET compares with DATEADD and PREVIOUS.</summary>
    <category term="DAX"/>
    <category term="Window functions"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;code&gt;OFFSET ( delta, relation, ORDERBY ( ... ) [, blanks] [, PARTITIONBY ( ... )] )&lt;/code&gt; returns the row &lt;code&gt;delta&lt;/code&gt; positions away from the current row in a sorted table: -1 is the previous row, 1 the next. Used as a filter in &lt;code&gt;CALCULATE&lt;/code&gt;, it gives &amp;quot;the value of the previous month&amp;quot; or &amp;quot;the next product in the ranking&amp;quot; without date functions: &lt;code&gt;CALCULATE ( [Revenue], OFFSET ( -1, ALLSELECTED ( 'Date'[Year Month] ), ORDERBY ( 'Date'[Year Month] ) ) )&lt;/code&gt;. With &lt;code&gt;PARTITIONBY&lt;/code&gt; the offset restarts in each group.&lt;/p&gt;
&lt;p&gt;Date functions shift by calendar periods; &lt;code&gt;OFFSET&lt;/code&gt; shifts by rows. That makes it work for orders that are not dates (the previous version, the previous step of a process) and for date axes with gaps.&lt;/p&gt;
&lt;h2 id=&quot;what-does-offset-return&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-offset-return&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does OFFSET return?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Year Month&lt;/th&gt;&lt;th&gt;Revenue&lt;/th&gt;&lt;th&gt;Previous row&lt;/th&gt;&lt;th&gt;Change&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;2026-01&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2026-02&lt;/td&gt;&lt;td&gt;135&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;td&gt;+15&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2026-03&lt;/td&gt;&lt;td&gt;150&lt;/td&gt;&lt;td&gt;135&lt;/td&gt;&lt;td&gt;+15&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2026-04&lt;/td&gt;&lt;td&gt;142&lt;/td&gt;&lt;td&gt;150&lt;/td&gt;&lt;td&gt;-8&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2026-05&lt;/td&gt;&lt;td&gt;155&lt;/td&gt;&lt;td&gt;142&lt;/td&gt;&lt;td&gt;+13&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Revenue by month with OFFSET -1&lt;/figcaption&gt;&lt;/figure&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue Previous Month =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;OFFSET&lt;/i&gt; ( -&lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;ORDERBY&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; ) )
)

Change vs Previous = &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Revenue Previous Month]&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-do-the-arguments-do&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-do-the-arguments-do&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What do the arguments do?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Argument&lt;/th&gt;&lt;th&gt;Meaning&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;delta&lt;/td&gt;&lt;td&gt;rows before (negative) or after (positive) the current row&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;relation&lt;/td&gt;&lt;td&gt;the table to move in; if omitted, ALLSELECTED of the ORDERBY and PARTITIONBY columns&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ORDERBY&lt;/td&gt;&lt;td&gt;how rows are sorted; any scalar expression, ASC by default&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;blanks&lt;/td&gt;&lt;td&gt;where blanks sort: BLANKS DEFAULT, FIRST or LAST (set inside ORDERBY in newer syntax)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PARTITIONBY&lt;/td&gt;&lt;td&gt;columns that define groups; the offset does not cross groups&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;MATCHBY&lt;/td&gt;&lt;td&gt;columns that identify the current row, when ORDERBY and PARTITIONBY do not&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;OFFSET arguments&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The current row is found by matching the visual's current values of the relation's columns. If the visual has Year and Month as separate columns, put both in the relation and the &lt;code&gt;ORDERBY&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-restart-per-group&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-restart-per-group&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you restart per group?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- previous month within the same year: January has no previous&lt;/i&gt;
Revenue Prev Month in Year =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;OFFSET&lt;/i&gt; (
        -&lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;,
        &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month Number]&lt;/i&gt; ),
        &lt;i class=&quot;f&quot;&gt;ORDERBY&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Month Number]&lt;/i&gt; ),
        &lt;i class=&quot;f&quot;&gt;PARTITIONBY&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt; )
    )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;offset-dateadd-or-previous&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#offset-dateadd-or-previous&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;OFFSET, DATEADD or PREVIOUS?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Use&lt;/th&gt;&lt;th&gt;When&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;DATEADD ( 'Date'[Date], -1, MONTH )&lt;/code&gt;&lt;/td&gt;&lt;td&gt;calendar periods: the previous month even if it is not on the visual&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;OFFSET ( -1, ... )&lt;/code&gt;&lt;/td&gt;&lt;td&gt;the previous &lt;strong&gt;row&lt;/strong&gt;: skipping months that the filter hides, or non-date orders&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PREVIOUS ( [Revenue] )&lt;/code&gt;&lt;/td&gt;&lt;td&gt;a &lt;a href=&quot;/blog/visual-calculations-power-bi/&quot;&gt;visual calculation&lt;/a&gt; on one visual, no model logic&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;If a slicer hides March, &lt;code&gt;OFFSET&lt;/code&gt; compares April with February (the previous visible row), while &lt;code&gt;DATEADD&lt;/code&gt; still compares with March.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Ties in ORDERBY.&lt;/strong&gt; Two rows with the same sort value make &amp;quot;previous&amp;quot; ambiguous; order by a unique column.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Relation missing a visual column.&lt;/strong&gt; If the visual groups by a column not in the relation, rows repeat or the result is blank; include it or use &lt;code&gt;MATCHBY&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Sorting by a text month.&lt;/strong&gt; &amp;quot;Apr&amp;quot; before &amp;quot;Feb&amp;quot;; order by a number or a Year Month key.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Totals.&lt;/strong&gt; At the total row there is no current row to offset from; the result is usually blank.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/offset-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: OFFSET function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/orderby-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: ORDERBY function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/partitionby-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: PARTITIONBY function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Write &lt;code&gt;Revenue Previous Month&lt;/code&gt; with &lt;code&gt;OFFSET&lt;/code&gt; and compare it with a &lt;code&gt;DATEADD&lt;/code&gt; version on a chart with a month slicer. &lt;a href=&quot;/blog/window-dax/&quot;&gt;WINDOW&lt;/a&gt; returns several rows instead of one.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Combo charts in Power BI: line and column, two axes</title>
    <link href="https://data.benibix.com/blog/combo-chart-power-bi/"/>
    <id>https://data.benibix.com/blog/combo-chart-power-bi/</id>
    <published>2026-10-19T12:00:00Z</published>
    <updated>2026-10-19T12:00:00Z</updated>
    <summary>What a line and column (combo) chart in Power BI is for, how to put two measures with different scales on two Y-axes, when to sync the axes, the DAX for a target line, and the traps of dual axes.</summary>
    <category term="Visuals"/>
    <category term="Comparison"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;combo chart&lt;/strong&gt; puts a column chart and a line chart in one visual with the same X-axis. Power BI has two: &lt;strong&gt;Line and stacked column&lt;/strong&gt; and &lt;strong&gt;Line and clustered column&lt;/strong&gt;. Measures in &lt;strong&gt;Column y-axis&lt;/strong&gt; become columns, measures in &lt;strong&gt;Line y-axis&lt;/strong&gt; become lines, and when their ranges differ the line gets its own &lt;strong&gt;secondary y-axis&lt;/strong&gt; on the right. Use it for an amount and a rate (revenue and margin %), or an actual and its target.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The chart, part by part:&lt;/strong&gt; &lt;a href=&quot;/visuals/combo-chart/&quot;&gt;What is a combo chart?&lt;/a&gt; draws its parts and shows how to read one, its kinds and the mistakes to avoid.&lt;/p&gt;
&lt;p&gt;Revenue in thousands and margin in percent cannot share an axis: the margin line would lie flat at the bottom. Two charts next to each other work, but the reader has to line up the months by eye. A combo chart does it for them.&lt;/p&gt;
&lt;h2 id=&quot;when-is-a-combo-chart-the-right-choice&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-a-combo-chart-the-right-choice&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is a combo chart the right choice?&lt;/h2&gt;
&lt;p&gt;Microsoft names five cases: a line and a column chart with the same X-axis, several measures with different value ranges, the correlation between two measures, checking a measure against a target held by another measure, and saving space. In practice the two common ones are:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;combo&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;Revenue&lt;/li&gt;&lt;li class=&quot;ln-key k1&quot;&gt;Margin %&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;combo chart: Jan 120, 31; Feb 135, 29; Mar 128, 33; Apr 150, 27; May 162, 26; Jun 158, 30&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;588&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;203&quot; x2=&quot;588&quot; y2=&quot;203&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;207&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;50&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;140&quot; x2=&quot;588&quot; y2=&quot;140&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;144&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;77&quot; x2=&quot;588&quot; y2=&quot;77&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;81&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;150&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;588&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;200&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;0&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;207&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;10&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;144&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;20&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;81&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;30&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;40&lt;/text&gt;&lt;rect x=&quot;69&quot; y=&quot;114.8&quot; width=&quot;55.4&quot; height=&quot;151.2&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;96.7&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jan&lt;/text&gt;&lt;rect x=&quot;158.3&quot; y=&quot;95.9&quot; width=&quot;55.4&quot; height=&quot;170.1&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;186&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Feb&lt;/text&gt;&lt;rect x=&quot;247.6&quot; y=&quot;104.7&quot; width=&quot;55.4&quot; height=&quot;161.3&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;275.3&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Mar&lt;/text&gt;&lt;rect x=&quot;337&quot; y=&quot;77&quot; width=&quot;55.4&quot; height=&quot;189&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;364.7&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Apr&lt;/text&gt;&lt;rect x=&quot;426.3&quot; y=&quot;61.9&quot; width=&quot;55.4&quot; height=&quot;204.1&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;454&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;May&lt;/text&gt;&lt;rect x=&quot;515.6&quot; y=&quot;66.9&quot; width=&quot;55.4&quot; height=&quot;199.1&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;543.3&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jun&lt;/text&gt;&lt;polyline points=&quot;96.7,70.7 186,83.3 275.3,58.1 364.7,95.9 454,102.2 543.3,77&quot; class=&quot;ln k1&quot;/&gt;&lt;circle cx=&quot;96.7&quot; cy=&quot;70.7&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;186&quot; cy=&quot;83.3&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;275.3&quot; cy=&quot;58.1&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;364.7&quot; cy=&quot;95.9&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;454&quot; cy=&quot;102.2&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;543.3&quot; cy=&quot;77&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;588&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Revenue as columns (left axis), margin % as a line (right axis)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;April and May sold the most and earned the lowest margin: the discounts that bought the volume show up in the same picture.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;combo&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;Actual&lt;/li&gt;&lt;li class=&quot;ln-key k1&quot;&gt;Target&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;combo chart: Q1 410, 400; Q2 380, 420; Q3 455, 440; Q4 520, 500&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;588&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;182&quot; x2=&quot;588&quot; y2=&quot;182&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;186&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;200&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;98&quot; x2=&quot;588&quot; y2=&quot;98&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;102&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;400&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;588&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;600&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;0&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;100&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;200&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;300&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;400&lt;/text&gt;&lt;text x=&quot;596&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;start&quot;&gt;500&lt;/text&gt;&lt;rect x=&quot;77.5&quot; y=&quot;93.8&quot; width=&quot;83.1&quot; height=&quot;172.2&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;119&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q1&lt;/text&gt;&lt;rect x=&quot;211.5&quot; y=&quot;106.4&quot; width=&quot;83.1&quot; height=&quot;159.6&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;253&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q2&lt;/text&gt;&lt;rect x=&quot;345.5&quot; y=&quot;74.9&quot; width=&quot;83.1&quot; height=&quot;191.1&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;387&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q3&lt;/text&gt;&lt;rect x=&quot;479.5&quot; y=&quot;47.6&quot; width=&quot;83.1&quot; height=&quot;218.4&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;521&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q4&lt;/text&gt;&lt;polyline points=&quot;119,64.4 253,54.3 387,44.2 521,14&quot; class=&quot;ln k1&quot;/&gt;&lt;circle cx=&quot;119&quot; cy=&quot;64.4&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;253&quot; cy=&quot;54.3&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;387&quot; cy=&quot;44.2&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;521&quot; cy=&quot;14&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;588&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Actual sales as columns, target as a line, one shared scale&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-build-one-with-two-axes&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-one-with-two-axes&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build one with two axes?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;In &lt;strong&gt;Visualizations&lt;/strong&gt; pick &lt;strong&gt;Line and clustered column chart&lt;/strong&gt; (or &lt;strong&gt;Line and stacked column chart&lt;/strong&gt; when the columns have a Legend that should stack).&lt;/li&gt;&lt;li&gt;Drag the time field to &lt;strong&gt;X-axis&lt;/strong&gt;, the amount to &lt;strong&gt;Column y-axis&lt;/strong&gt; and the rate to &lt;strong&gt;Line y-axis&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;In &lt;strong&gt;Format visual&lt;/strong&gt;, turn on &lt;strong&gt;Secondary y-axis&lt;/strong&gt; and give both axes a &lt;strong&gt;Title&lt;/strong&gt;, so nobody reads 30 as 30 thousand.&lt;/li&gt;&lt;li&gt;For an actual against a target in the same unit, put both on one scale: under &lt;strong&gt;Secondary y-axis&lt;/strong&gt;, &lt;strong&gt;Range&lt;/strong&gt;, turn &lt;strong&gt;Values&lt;/strong&gt; off. The line then uses the columns' scale.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Power BI shows or hides the secondary axis by itself, depending on how much the two ranges overlap; the top switch of &lt;strong&gt;Secondary y-axis&lt;/strong&gt; forces it on or off.&lt;/p&gt;
&lt;h2 id=&quot;what-dax-does-a-combo-chart-need&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-dax-does-a-combo-chart-need&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What DAX does a combo chart need?&lt;/h2&gt;
&lt;p&gt;The amount and the rate as measures:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )

Margin % =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; - &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Cost]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;A target line from a monthly target table related to the date table:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Target = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Targets&lt;i class=&quot;m&quot;&gt;[Target Amount]&lt;/i&gt; )

Target Hit =
&lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; &amp;gt;= &lt;i class=&quot;m&quot;&gt;[Target]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;On target&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Below target&amp;quot;&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;Margin %&lt;/code&gt; is a ratio of sums, so its total is right at every level; an average of row-level margins would not be. Use &lt;code&gt;Target Hit&lt;/code&gt; in a tooltip, or as a colour rule on the columns: &lt;strong&gt;Columns, Color, fx, Rules&lt;/strong&gt; on a measure that returns 1 or 0.&lt;/p&gt;
&lt;h2 id=&quot;line-and-stacked-or-line-and-clustered&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#line-and-stacked-or-line-and-clustered&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Line and stacked or line and clustered?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Variant&lt;/th&gt;&lt;th&gt;Columns&lt;/th&gt;&lt;th&gt;Use for&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Line and stacked column&lt;/td&gt;&lt;td&gt;one column per period, split by a Legend&lt;/td&gt;&lt;td&gt;revenue by channel stacked, total margin % as the line&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Line and clustered column&lt;/td&gt;&lt;td&gt;series side by side&lt;/td&gt;&lt;td&gt;this year and last year as columns, growth % as the line&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Two unlabelled axes.&lt;/strong&gt; Without titles, readers compare the line's height with the columns' as if one scale held both. Title both axes, or colour each axis like its series.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Two axes for the same unit.&lt;/strong&gt; An actual and a target in euros on two independent axes can make a miss look like a hit. Sync them (one scale) whenever the units match.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A rate as columns.&lt;/strong&gt; Percentages stacked as columns add up to nonsense; rates go on the line.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too many lines.&lt;/strong&gt; One or two lines read well; four lines over stacked columns do not.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Correlation read as cause.&lt;/strong&gt; Margin falling while revenue rises shows they moved together, not why.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-combo-chart&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create and use combo charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/divide-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DIVIDE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Apply conditional formatting in tables and matrixes&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Use a combo chart for one amount and one rate on the same timeline, title both axes, and sync them whenever the units match. &lt;a href=&quot;/blog/kpi-actual-target-variance-dax/&quot;&gt;Actual, target and variance in DAX&lt;/a&gt; builds the target measures, and the &lt;a href=&quot;/blog/kpi-visual-power-bi/&quot;&gt;KPI visual&lt;/a&gt; shows the same comparison as one number.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>DAX variables: VAR and RETURN with examples</title>
    <link href="https://data.benibix.com/blog/dax-variables-var-return/"/>
    <id>https://data.benibix.com/blog/dax-variables-var-return/</id>
    <published>2026-10-19T12:00:00Z</published>
    <updated>2026-10-19T12:00:00Z</updated>
    <summary>How VAR and RETURN work in DAX, why variables make measures faster, easier to read and easier to debug, that a variable is evaluated once where it is defined, table variables, the CALCULATE trap, and examples for growth, ranking and filters.</summary>
    <category term="DAX"/>
    <category term="Concepts"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;code&gt;VAR&lt;/code&gt; names a value or a table inside a formula, and &lt;code&gt;RETURN&lt;/code&gt; gives the result. A variable is calculated &lt;strong&gt;once, where it is defined, in that context&lt;/strong&gt;, and then used as a constant. That makes formulas faster (no repeated calculation), easier to read (each step has a name) and easier to debug (return a variable to see its value). The trap: &lt;code&gt;CALCULATE ( MyVar, ... )&lt;/code&gt; does not recalculate a variable; it is already a fixed value.&lt;/p&gt;
&lt;p&gt;A growth measure without variables repeats the last-year calculation three times. With variables it is calculated once, named, and the formula reads like the sentence you would say.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-measure-with-variables-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-measure-with-variables-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a measure with variables look like?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue Growth % =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Current = &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; LastYear = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Growth = Current - LastYear
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( NOT &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( LastYear ), &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( Growth, LastYear ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Without variables the same formula is:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue Growth % Old =
&lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; (
    NOT &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) ) ),
    &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; (
        &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; - &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) ),
        &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
    )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Three copies of the same expression. The engine may cache some of it, but the variable version guarantees one evaluation, and a change is made in one place.&lt;/p&gt;
&lt;h2 id=&quot;what-are-the-rules&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-rules&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the rules?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:4&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Evaluated once&lt;/b&gt;&lt;span&gt;where VAR stands, in that row and filter context&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Constant after that&lt;/b&gt;&lt;span&gt;later CALCULATE or filters do not change it&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Any type&lt;/b&gt;&lt;span&gt;a number, a text, a date, or a whole table&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Scope&lt;/b&gt;&lt;span&gt;only inside the formula, after its definition&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;RETURN&lt;/b&gt;&lt;span&gt;one expression, which may use all variables&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;How variables behave&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Variables can be defined anywhere an expression is allowed, also inside a function argument, and their names cannot be table names or contain spaces.&lt;/p&gt;
&lt;h2 id=&quot;how-do-table-variables-help&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-table-variables-help&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do table variables help?&lt;/h2&gt;
&lt;p&gt;A variable can hold a table, then be used by several functions:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Top Customers Revenue =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; TopCustomers =
    &lt;i class=&quot;f&quot;&gt;TOPN&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;10&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, TopCustomers )

Share of Top &lt;i class=&quot;n&quot;&gt;10&lt;/i&gt; =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; TopCustomers = &lt;i class=&quot;f&quot;&gt;TOPN&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;10&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; TopRevenue = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, TopCustomers )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( TopRevenue, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;TopCustomers&lt;/code&gt; is a filter table computed once, then applied with &lt;code&gt;CALCULATE&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;why-does-calculate-not-change-a-variable&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-does-calculate-not-change-a-variable&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why does CALCULATE not change a variable?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Wrong Last Year =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Rev = &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( Rev, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;This returns this year's revenue. &lt;code&gt;Rev&lt;/code&gt; was evaluated when it was defined, in the current filter context. &lt;code&gt;CALCULATE&lt;/code&gt; changes the filter context for its expression, but the expression is a constant. Put the measure itself inside &lt;code&gt;CALCULATE&lt;/code&gt;: &lt;code&gt;CALCULATE ( [Revenue], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The same applies inside iterators: a variable defined outside &lt;code&gt;SUMX&lt;/code&gt; has the same value on every row. That is what you want for a threshold, and wrong for a per-row value.&lt;/p&gt;
&lt;h2 id=&quot;how-do-variables-help-debugging&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-variables-help-debugging&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do variables help debugging?&lt;/h2&gt;
&lt;p&gt;Return an intermediate variable to see it in a card or table, then switch back:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue Growth % =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Current = &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; LastYear = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    LastYear &lt;i class=&quot;c&quot;&gt;-- temporarily, to check last year's value&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;In &lt;a href=&quot;/blog/dax-query-view-evaluate/&quot;&gt;DAX query view&lt;/a&gt; you can &lt;code&gt;EVALUATE&lt;/code&gt; a table variable with &lt;code&gt;DEFINE&lt;/code&gt; and see its rows.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Variables as lazy formulas.&lt;/strong&gt; They are values, not formulas; context changes after the definition do not affect them.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Defining a row value outside an iterator.&lt;/strong&gt; It is the same for every row; define it inside the iterator's expression.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too many tiny variables.&lt;/strong&gt; Name steps that mean something; a variable per operator hurts reading.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Name clashes.&lt;/strong&gt; A variable name cannot be the same as a table name.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/best-practices/dax-variables&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Use variables to improve your DAX formulas&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/var-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: VAR keyword (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/topn-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: TOPN function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Rewrite your longest measure with one variable per step, and return each variable once to check it. &lt;a href=&quot;/blog/dax-blank-handling/&quot;&gt;BLANK handling&lt;/a&gt; covers the &lt;code&gt;IF ( NOT ISBLANK ( ... ) )&lt;/code&gt; part of the growth measure.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Days sales outstanding (DSO): formula and DAX</title>
    <link href="https://data.benibix.com/blog/days-sales-outstanding-kpi/"/>
    <id>https://data.benibix.com/blog/days-sales-outstanding-kpi/</id>
    <published>2026-10-19T12:00:00Z</published>
    <updated>2026-10-19T12:00:00Z</updated>
    <summary>How to calculate days sales outstanding, receivables at period end divided by credit sales times the days in the period, a worked example, the countback method, overdue receivables and ageing buckets, the DAX with a closing balance for receivables, and what changes DSO.</summary>
    <category term="KPIs"/>
    <category term="Finance"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;days sales outstanding (DSO)&lt;/strong&gt; estimates how many days customers take to pay: &lt;strong&gt;DSO = accounts receivable at period end / credit sales in the period × days in the period&lt;/strong&gt;. With 1.2M receivable and 3.6M of credit sales in a 90-day quarter, DSO = 1.2 / 3.6 × 90 = &lt;strong&gt;30 days&lt;/strong&gt;. Receivables are a &lt;strong&gt;balance&lt;/strong&gt;, so take the value at the end of the period, not a sum. Show DSO with an &lt;strong&gt;ageing&lt;/strong&gt; table (current, 1 to 30, 31 to 60, 61 to 90, over 90 days overdue), which says which customers to call.&lt;/p&gt;
&lt;p&gt;DSO turns a balance-sheet number into days that sales and finance both understand, and compares it with your payment terms: DSO of 45 on 30-day terms means customers pay late on average.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Quarter&lt;/th&gt;&lt;th&gt;Credit sales (k)&lt;/th&gt;&lt;th&gt;Receivables at end (k)&lt;/th&gt;&lt;th&gt;Days&lt;/th&gt;&lt;th&gt;DSO&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Q1&lt;/td&gt;&lt;td&gt;3,300&lt;/td&gt;&lt;td&gt;1,210&lt;/td&gt;&lt;td&gt;90&lt;/td&gt;&lt;td&gt;33.0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Q2&lt;/td&gt;&lt;td&gt;3,500&lt;/td&gt;&lt;td&gt;1,225&lt;/td&gt;&lt;td&gt;91&lt;/td&gt;&lt;td&gt;31.9&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Q3&lt;/td&gt;&lt;td&gt;3,600&lt;/td&gt;&lt;td&gt;1,200&lt;/td&gt;&lt;td&gt;92&lt;/td&gt;&lt;td&gt;30.7&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;DSO by quarter&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;line&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;DSO&lt;/li&gt;&lt;li class=&quot;k1&quot;&gt;Terms&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;line chart: Q1 33, 30; Q2 31.9, 30; Q3 30.7, 30&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;203&quot; x2=&quot;626&quot; y2=&quot;203&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;207&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;10&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;140&quot; x2=&quot;626&quot; y2=&quot;140&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;144&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;20&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;77&quot; x2=&quot;626&quot; y2=&quot;77&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;81&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;30&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;626&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;40&lt;/text&gt;&lt;polyline points=&quot;52,77 339,77 626,77&quot; class=&quot;ln k1&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;77&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;339&quot; cy=&quot;77&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;77&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;polyline points=&quot;52,58.1 339,65 626,72.6&quot; class=&quot;ln k0&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;58.1&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;339&quot; cy=&quot;65&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;72.6&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;text x=&quot;52&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q1&lt;/text&gt;&lt;text x=&quot;339&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q2&lt;/text&gt;&lt;text x=&quot;626&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q3&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;DSO in days, against 30-day terms&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;Receivables come as monthly or daily balances (or are rebuilt from invoices and payments). A balance is semi-additive: sum across customers, but take the last date across time.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Credit Sales = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Invoices&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ), Invoices&lt;i class=&quot;m&quot;&gt;[Payment Type]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Credit&amp;quot;&lt;/i&gt; )

AR Balance =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( ARBalances&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;LASTNONBLANK&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( ARBalances&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ) ) )
)

Days in Period = &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt; )

DSO = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[AR Balance]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Credit Sales]&lt;/i&gt; ) * &lt;i class=&quot;m&quot;&gt;[Days in Period]&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;At month level, &lt;code&gt;Days in Period&lt;/code&gt; is the days of the month; at quarter level, of the quarter. Many teams use a rolling period instead (receivables against the last 90 days of sales) to smooth months with odd sales:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;DSO 90d =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Sales90 = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Credit Sales]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DATESINPERIOD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), -&lt;i class=&quot;n&quot;&gt;90&lt;/i&gt;, DAY ) )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[AR Balance]&lt;/i&gt;, Sales90 ) * &lt;i class=&quot;n&quot;&gt;90&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;In depth: &lt;a href=&quot;/blog/opening-closing-balance-dax/&quot;&gt;opening and closing balances&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-countback-method&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-countback-method&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the countback method?&lt;/h2&gt;
&lt;p&gt;Seasonal sales distort the simple formula: a big December inflates receivables and sales together. The &lt;strong&gt;countback&lt;/strong&gt; method walks back month by month, subtracting each month's sales from receivables until they are used up, and counts the days consumed. With receivables of 1,200 and monthly sales of 1,300 (Sep), 1,150 (Aug): September's 1,300 alone covers the 1,200, so DSO = 1,200 / 1,300 × 30 = 27.7 days. It is more accurate when sales swing, and harder to write in DAX (an iterator over months in descending order with a running total, or Power Query).&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-build-the-ageing-table&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-the-ageing-table&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build the ageing table?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Customer&lt;/th&gt;&lt;th&gt;Current&lt;/th&gt;&lt;th&gt;1-30&lt;/th&gt;&lt;th&gt;31-60&lt;/th&gt;&lt;th&gt;61-90&lt;/th&gt;&lt;th&gt;Over 90&lt;/th&gt;&lt;th&gt;Total&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Contoso&lt;/td&gt;&lt;td&gt;180&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;220&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Fabrikam&lt;/td&gt;&lt;td&gt;95&lt;/td&gt;&lt;td&gt;60&lt;/td&gt;&lt;td&gt;35&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;210&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Northwind&lt;/td&gt;&lt;td&gt;60&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;15&lt;/td&gt;&lt;td&gt;45&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;All customers&lt;/td&gt;&lt;td&gt;720&lt;/td&gt;&lt;td&gt;230&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;td&gt;60&lt;/td&gt;&lt;td&gt;70&lt;/td&gt;&lt;td&gt;1,200&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Receivables ageing at 30 Sep (k)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Bucket each open invoice by days past due (as of date minus due date) with a calculated column or a bucket table, and show it as a matrix. The over-90 column is where bad debt comes from.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Summing receivables over months.&lt;/strong&gt; A balance; use the closing value.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Total sales instead of credit sales.&lt;/strong&gt; Cash sales never sit in receivables and lower DSO falsely.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Including tax inconsistently.&lt;/strong&gt; Receivables include VAT, sales often not; use both gross or both net.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Average DSO hiding a few bad payers.&lt;/strong&gt; Show the ageing table with it.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/lastnonblank-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: LASTNONBLANK function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/datesinperiod-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DATESINPERIOD function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/closingbalancemonth-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: CLOSINGBALANCEMONTH function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Build AR Balance as a closing balance, then DSO by month next to your payment terms. &lt;a href=&quot;/blog/cash-conversion-cycle-kpi/&quot;&gt;The cash conversion cycle&lt;/a&gt; adds inventory and payables days.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>DP-700 in 2026: what the exam covers and how to study</title>
    <link href="https://data.benibix.com/blog/dp-700-study-guide/"/>
    <id>https://data.benibix.com/blog/dp-700-study-guide/</id>
    <published>2026-10-19T12:00:00Z</published>
    <updated>2026-10-19T12:00:00Z</updated>
    <summary>What the DP-700 Fabric Data Engineer exam measures since October 2026, its three equal areas, and a study plan that covers batch, streaming and running it all.</summary>
    <category term="Exams"/>
    <category term="Data and BI"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; DP-700 earns the &lt;strong&gt;Fabric Data Engineer Associate&lt;/strong&gt; certification. Its three areas weigh the same, 30 to 35% each: setting up and managing a Fabric solution, ingesting and transforming data, and monitoring and optimising it. You need 700 to pass, and you should be at home in SQL, PySpark and KQL. Study by building one batch load and one streaming flow, then breaking them on purpose.&lt;/p&gt;
&lt;p&gt;I passed DP-700 in April 2026. This guide follows the skills measured as of 19 October 2026.&lt;/p&gt;
&lt;h2 id=&quot;what-does-dp-700-cover&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-dp-700-cover&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does DP-700 cover?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Implement and manage an analytics solution&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;30-35%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Ingest and transform data&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;30-35%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Monitor and optimize an analytics solution&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;30-35%&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;DP-700 skills, by weight in the exam&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In plain words:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Implement and manage&lt;/strong&gt;: workspace settings for Spark, domains, OneLake and Apache Airflow; version control, database projects and deployment pipelines; access at every level, dynamic data masking, sensitivity labels, audit logs and OneLake security; and orchestration: when to use a dataflow, a pipeline or a notebook, schedules, event triggers and parameters.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Ingest and transform&lt;/strong&gt;: full and incremental loads, loading a dimensional model, streaming patterns; choosing the store and the tool; shortcuts and mirroring; PySpark, SQL and KQL; duplicates, missing and late data; and streaming with Eventstream, Spark structured streaming and KQL, including windowing.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Monitor and optimize&lt;/strong&gt;: watching ingestion, transformation and refreshes, alerts, finding and fixing errors in every item type (pipelines, dataflows, notebooks, Eventhouse, Eventstream, T-SQL, shortcuts), and making lakehouse tables, pipelines, warehouses, Spark and queries faster.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-makes-dp-700-different-from-dp-600&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-makes-dp-700-different-from-dp-600&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What makes DP-700 different from DP-600?&lt;/h2&gt;
&lt;p&gt;DP-600 ends in a semantic model; DP-700 ends in reliable data. It asks less about DAX and reports and much more about streaming, orchestration, failures and performance. A third of the exam is about what happens after the build: monitoring, errors and tuning.&lt;/p&gt;
&lt;h2 id=&quot;how-would-i-study-for-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-would-i-study-for-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How would I study for it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Batch&lt;/b&gt;&lt;span&gt;an incremental load into a lakehouse&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Orchestrate&lt;/b&gt;&lt;span&gt;a pipeline with parameters and a schedule&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Stream&lt;/b&gt;&lt;span&gt;Eventstream into an Eventhouse, queried in KQL&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;red&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Break it&lt;/b&gt;&lt;span&gt;a bad file, a failed run, a slow table&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Fix it&lt;/b&gt;&lt;span&gt;the monitoring hub, the error, OPTIMIZE&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Build it, stream it, break it&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Area&lt;/th&gt;&lt;th&gt;Practise it with&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Ingest and transform&lt;/td&gt;&lt;td&gt;Incremental loads in a lakehouse (open course)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ingest and transform&lt;/td&gt;&lt;td&gt;Load only the rows that changed, with a watermark&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ingest and transform&lt;/td&gt;&lt;td&gt;OneLake shortcuts: use data without copying it&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Implement and manage&lt;/td&gt;&lt;td&gt;Copy every table with one Data Factory pipeline&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Monitor and optimize&lt;/td&gt;&lt;td&gt;Quarantine bad rows before they reach silver&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Where each area is practised on this site&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The &amp;quot;break it&amp;quot; step is the one people skip, and a third of the exam rewards it. Load a file with a wrong column, let a notebook throw, point a shortcut at a folder that moved, and find each failure in the monitoring hub. Then load a table in a thousand small appends and see what &lt;code&gt;OPTIMIZE&lt;/code&gt; changes.&lt;/p&gt;
&lt;h2 id=&quot;what-helps-on-the-day&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-helps-on-the-day&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What helps on the day?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Try the exam sandbox first&lt;/strong&gt;, so the question types are familiar.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Match the tool to the words.&lt;/strong&gt; Low code points to a dataflow, complex transformation or large volumes to a notebook, a fixed sequence of steps to a pipeline, near real time to Eventstream and KQL.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Keep the three languages apart.&lt;/strong&gt; Questions show code in SQL, PySpark and KQL; reading a short query quickly in each saves minutes.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-keep-the-certification&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-keep-the-certification&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you keep the certification?&lt;/h2&gt;
&lt;p&gt;It expires after a year. Renew it with Microsoft's free online assessment, which opens in the six months before it expires.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/dp-700&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam DP-700&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/fabric-data-engineer-associate/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Microsoft Certified: Fabric Data Engineer Associate&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/exam-scoring-reports&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Exam scoring and score reports&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/renew-your-microsoft-certification&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Renew your Microsoft Certification&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/courses/incremental-lakehouse-loads/&quot;&gt;Incremental loads in a lakehouse&lt;/a&gt; builds the batch half in your own workspace: a watermark table, a merge and a scheduled run. Add the streaming half with &lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/real-time-intelligence/tutorial-introduction&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft's Real-Time Intelligence tutorial&lt;/a&gt;. My credential is on &lt;a href=&quot;/about/&quot;&gt;the About page&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>EARLIER and EARLIEST in DAX, and variables instead</title>
    <link href="https://data.benibix.com/blog/earlier-earliest-dax/"/>
    <id>https://data.benibix.com/blog/earlier-earliest-dax/</id>
    <published>2026-10-19T12:00:00Z</published>
    <updated>2026-10-19T12:00:00Z</updated>
    <summary>What EARLIER and EARLIEST do in DAX, reaching the value of an outer row context inside a nested iteration, a running total and a rank as calculated columns, why variables replace them today, and how to rewrite old formulas.</summary>
    <category term="DAX"/>
    <category term="Filter functions"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;code&gt;EARLIER ( column )&lt;/code&gt; returns the value of &lt;code&gt;column&lt;/code&gt; in the &lt;strong&gt;outer&lt;/strong&gt; row context when you are inside a nested one, typically a &lt;code&gt;FILTER&lt;/code&gt; inside a calculated column. &lt;code&gt;EARLIER ( column, 2 )&lt;/code&gt; goes two levels out, and &lt;code&gt;EARLIEST&lt;/code&gt; goes to the outermost. They come from the time before DAX had variables. Today, store the outer value in a &lt;code&gt;VAR&lt;/code&gt; before the inner iteration: the formula reads better and does the same.&lt;/p&gt;
&lt;p&gt;Old models and forum answers are full of &lt;code&gt;EARLIER&lt;/code&gt;. It is worth reading them, and worth rewriting them when you touch them.&lt;/p&gt;
&lt;h2 id=&quot;what-problem-does-earlier-solve&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-problem-does-earlier-solve&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What problem does EARLIER solve?&lt;/h2&gt;
&lt;p&gt;In a calculated column on Sales, a &lt;code&gt;FILTER ( Sales, ... )&lt;/code&gt; starts a new row context over Sales. Inside it, &lt;code&gt;Sales[Order Date]&lt;/code&gt; means the &lt;strong&gt;inner&lt;/strong&gt; row. To compare with the row the column is being calculated for, you need the &lt;strong&gt;outer&lt;/strong&gt; row:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- calculated column on Sales: running total of amount by date&lt;/i&gt;
Running Amount =
&lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( Sales, Sales&lt;i class=&quot;m&quot;&gt;[Order Date]&lt;/i&gt; &amp;lt;= &lt;i class=&quot;f&quot;&gt;EARLIER&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Order Date]&lt;/i&gt; ) ),
    Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt;
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;EARLIER ( Sales[Order Date] )&lt;/code&gt; is the date of the row being calculated; &lt;code&gt;Sales[Order Date]&lt;/code&gt; alone is the row &lt;code&gt;FILTER&lt;/code&gt; is looking at.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-write-the-same-with-a-variable&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-write-the-same-with-a-variable&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you write the same with a variable?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Running Amount =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; ThisDate = Sales&lt;i class=&quot;m&quot;&gt;[Order Date]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( Sales, Sales&lt;i class=&quot;m&quot;&gt;[Order Date]&lt;/i&gt; &amp;lt;= ThisDate ), Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The variable is evaluated in the outer row context, before &lt;code&gt;FILTER&lt;/code&gt; starts, and stays constant inside it. Same result, no level counting.&lt;/p&gt;
&lt;h2 id=&quot;what-about-ranks&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-about-ranks&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What about ranks?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- calculated column on Product: rank by list price (1 = most expensive)&lt;/i&gt;
Price Rank Old =
&lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[List Price]&lt;/i&gt; &amp;gt; &lt;i class=&quot;f&quot;&gt;EARLIER&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[List Price]&lt;/i&gt; ) ) ) + &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;

Price Rank =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; ThisPrice = &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[List Price]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[List Price]&lt;/i&gt; &amp;gt; ThisPrice ) ) + &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;

&lt;i class=&quot;c&quot;&gt;-- or, simplest&lt;/i&gt;
Price Rank RANKX = &lt;i class=&quot;f&quot;&gt;RANKX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[List Price]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-do-the-levels-mean&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-do-the-levels-mean&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What do the levels mean?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:3&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Outermost&lt;/b&gt;&lt;span&gt;the row of the calculated column (EARLIEST)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Level 1 out&lt;/b&gt;&lt;span&gt;the first FILTER or iterator (EARLIER ( col, 1 ), the default)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Current&lt;/b&gt;&lt;span&gt;the innermost iterator's row: the plain column reference&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Nested row contexts in a calculated column&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Microsoft notes that &lt;code&gt;EARLIER&lt;/code&gt; succeeds only if there is a row context before the beginning of the table scan; otherwise it returns an error. In a measure there is no outer row context unless an iterator creates one.&lt;/p&gt;
&lt;h2 id=&quot;should-these-be-columns-at-all&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#should-these-be-columns-at-all&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Should these be columns at all?&lt;/h2&gt;
&lt;p&gt;Running totals and ranks as calculated columns are fixed at refresh and ignore slicers. In most reports they belong in measures:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Running Revenue =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; &amp;lt;= &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) ) )

Product Rank = &lt;i class=&quot;f&quot;&gt;RANKX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Or, on a single visual, a &lt;a href=&quot;/blog/visual-calculations-power-bi/&quot;&gt;visual calculation&lt;/a&gt;: &lt;code&gt;RUNNINGSUM ( [Revenue] )&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;EARLIER in a measure without an iterator.&lt;/strong&gt; There is no outer row; error.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Counting levels wrong.&lt;/strong&gt; With three nested iterators, &lt;code&gt;EARLIER ( col, 2 )&lt;/code&gt; is easy to get wrong; variables avoid it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Slow columns.&lt;/strong&gt; &lt;code&gt;FILTER ( Sales, ... )&lt;/code&gt; per row of Sales is quadratic; on millions of rows a refresh can take hours. Use measures or Power Query.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/earlier-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: EARLIER function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/earliest-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: EARLIEST function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/best-practices/dax-variables&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Use variables to improve your DAX formulas&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Search your model for &lt;code&gt;EARLIER&lt;/code&gt; and rewrite each with a &lt;code&gt;VAR&lt;/code&gt;; then ask whether the column should be a measure. &lt;a href=&quot;/blog/dax-row-context-explained/&quot;&gt;Row context explained&lt;/a&gt; covers nested row contexts.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Eventhouse and KQL in Microsoft Fabric, explained</title>
    <link href="https://data.benibix.com/blog/eventhouse-and-kql-fabric/"/>
    <id>https://data.benibix.com/blog/eventhouse-and-kql-fabric/</id>
    <published>2026-10-19T12:00:00Z</published>
    <updated>2026-10-19T12:00:00Z</updated>
    <summary>What an Eventhouse and a KQL database are in Fabric, why they suit streaming and time-series data, and the KQL you need for your first queries.</summary>
    <category term="Fabric"/>
    <category term="Ingest and real time"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; an &lt;strong&gt;Eventhouse&lt;/strong&gt; is Fabric's store for streaming and time-series data: logs, sensor readings, clicks. It holds one or more &lt;strong&gt;KQL databases&lt;/strong&gt;, which take in data within seconds and answer questions over billions of rows quickly. You query them with &lt;strong&gt;KQL&lt;/strong&gt; (Kusto Query Language), where each line passes a table to the next with a pipe.&lt;/p&gt;
&lt;p&gt;A lakehouse is built for data that arrives in batches and is read as tables. An Eventhouse is built for data that never stops arriving and is mostly read by time: the last hour, the last five minutes, this device since Tuesday.&lt;/p&gt;
&lt;h2 id=&quot;where-does-it-sit-in-fabric&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-does-it-sit-in-fabric&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where does it sit in Fabric?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Sources&lt;/b&gt;&lt;span&gt;devices, apps, Event Hubs, Kafka&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Eventstream&lt;/b&gt;&lt;span&gt;takes events in and routes them&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Eventhouse&lt;/b&gt;&lt;span&gt;a KQL database stores them, indexed by time&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;KQL query&lt;/b&gt;&lt;span&gt;answers in seconds&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Real-time dashboard&lt;/b&gt;&lt;span&gt;or Power BI, refreshing as data lands&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From events to a live dashboard&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Turn on &lt;strong&gt;OneLake availability&lt;/strong&gt; for a KQL database and its tables also appear in OneLake as Delta, so Spark and Power BI can read the same data without a copy.&lt;/p&gt;
&lt;h2 id=&quot;what-does-kql-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-kql-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does KQL look like?&lt;/h2&gt;
&lt;p&gt;Errors per device in five-minute bins over the last hour:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;text&quot;&gt;&lt;code&gt;Telemetry
| where Timestamp &amp;gt; ago(1h)
| where Level == &amp;quot;Error&amp;quot;
| summarize Errors = count() by bin(Timestamp, 5m), DeviceId
| order by Timestamp asc
| render timechart&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;SQL&lt;/th&gt;&lt;th&gt;KQL&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;SELECT a, b&lt;/td&gt;&lt;td&gt;project a, b&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;WHERE x &amp;gt; 5&lt;/td&gt;&lt;td&gt;where x &amp;gt; 5&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;GROUP BY with COUNT(*)&lt;/td&gt;&lt;td&gt;summarize count() by ...&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ORDER BY t&lt;/td&gt;&lt;td&gt;order by t&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;TOP 10&lt;/td&gt;&lt;td&gt;take 10, or top 10 by x&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;JOIN&lt;/td&gt;&lt;td&gt;join kind=inner (...) on Key&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;KQL beside the SQL you know&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Read a query top to bottom, as a pipeline: the table goes in at the top, and each line keeps, groups or reshapes what the line above passed down.&lt;/p&gt;
&lt;h2 id=&quot;when-is-an-eventhouse-the-right-choice&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-an-eventhouse-the-right-choice&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is an Eventhouse the right choice?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;Data arrives continuously and questions are about &lt;strong&gt;recent time windows&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;You search &lt;strong&gt;text in logs&lt;/strong&gt; or filter on many different fields.&lt;/li&gt;&lt;li&gt;Answers must come in seconds, while the data is still arriving.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;For nightly sales tables a lakehouse or warehouse is simpler; an Eventhouse shines on what happened in the last minutes.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Writing SQL out of habit.&lt;/strong&gt; KQL is case-sensitive: &lt;code&gt;where Level == &amp;quot;error&amp;quot;&lt;/code&gt; misses &lt;code&gt;Error&lt;/code&gt;. Use &lt;code&gt;=~&lt;/code&gt; to compare without case.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;No time filter.&lt;/strong&gt; Start every query with a &lt;code&gt;where&lt;/code&gt; on the time column; it is how the data is laid out.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Keeping everything for ever.&lt;/strong&gt; Set retention and caching policies per table, so hot data stays fast and old data costs less.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/real-time-intelligence/eventhouse&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Eventhouse overview&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/kusto/query/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Kusto Query Language overview&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/kusto/query/sql-cheat-sheet&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SQL to Kusto query translation&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/real-time-intelligence/tutorial-introduction&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft's Real-Time Intelligence tutorial&lt;/a&gt; builds an Eventstream into an Eventhouse in your own workspace. Streaming and KQL are a third of what &lt;a href=&quot;/blog/dp-700-study-guide/&quot;&gt;DP-700&lt;/a&gt; asks about.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>OneLake shortcuts: use data without copying it</title>
    <link href="https://data.benibix.com/blog/onelake-shortcuts-explained/"/>
    <id>https://data.benibix.com/blog/onelake-shortcuts-explained/</id>
    <published>2026-10-19T12:00:00Z</published>
    <updated>2026-10-19T12:00:00Z</updated>
    <summary>A OneLake shortcut shows data from Data Lake Storage, another workspace or another cloud inside a Fabric lakehouse without copying it, so there is one copy to keep and secure.</summary>
    <category term="Fabric"/>
    <category term="Platform"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;shortcut&lt;/strong&gt; is a pointer in OneLake to data that lives somewhere else: another lakehouse or warehouse, Azure Data Lake Storage, Amazon S3, Google Cloud Storage and more. It shows up in your lakehouse like a folder or a table, Spark, SQL and Direct Lake read it like any other, and no data is copied. Copy only what has to change shape on the way.&lt;/p&gt;
&lt;p&gt;Every copy of a table is a copy to keep in sync, to pay for and to secure. When the finance team's gold tables already sit in their workspace, or the raw files already sit in a storage account, copying them into your lakehouse makes a second truth that drifts by the next morning.&lt;/p&gt;
&lt;h2 id=&quot;where-can-a-shortcut-point&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-a-shortcut-point&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can a shortcut point?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Your lakehouse&lt;/b&gt;&lt;span&gt;Tables and Files, as everyone reads them&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Another workspace&lt;/b&gt;&lt;span&gt;gold tables owned by another team (internal shortcut)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Data Lake Storage Gen2&lt;/b&gt;&lt;span&gt;raw files already in Azure (external shortcut)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Amazon S3 or Google Cloud Storage&lt;/b&gt;&lt;span&gt;data in another cloud (external shortcut)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;One lakehouse, three places the data really lives&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The shortcut lives in your lakehouse; the data stays where it is. Delete the shortcut and the target is untouched. Rename or delete the target, though, and the shortcut breaks.&lt;/p&gt;
&lt;h2 id=&quot;tables-or-files&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#tables-or-files&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Tables or Files?&lt;/h2&gt;
&lt;p&gt;A lakehouse has two top folders, and shortcuts behave differently in each:&lt;/p&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;In Tables&lt;/th&gt;&lt;th&gt;In Files&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Where&lt;/td&gt;&lt;td&gt;only at the top level&lt;/td&gt;&lt;td&gt;at any level&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;What it points at&lt;/td&gt;&lt;td&gt;a Delta table, or a schema folder of them&lt;/td&gt;&lt;td&gt;any folder, any format&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;What you get&lt;/td&gt;&lt;td&gt;a table: Spark SQL, the SQL analytics endpoint, Direct Lake&lt;/td&gt;&lt;td&gt;a folder of files to read in Spark&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;So point a &lt;strong&gt;Tables&lt;/strong&gt; shortcut at Delta data you want to query and model, and a &lt;strong&gt;Files&lt;/strong&gt; shortcut at raw CSV, JSON or Parquet that a notebook will clean into your own tables.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;python&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;# a Tables shortcut reads like any table in the lakehouse&lt;/i&gt;
orders = spark.&lt;i class=&quot;f&quot;&gt;sql&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;SELECT * FROM finance_orders WHERE order_date &amp;gt;= '2026-10-01'&amp;quot;&lt;/i&gt;)

&lt;i class=&quot;c&quot;&gt;# a Files shortcut reads like a folder&lt;/i&gt;
raw = spark.read.&lt;i class=&quot;f&quot;&gt;json&lt;/i&gt;(&lt;i class=&quot;s&quot;&gt;&amp;quot;Files/landing_s3/events/2026/10/&amp;quot;&lt;/i&gt;)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;who-can-read-the-data-behind-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#who-can-read-the-data-behind-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Who can read the data behind it?&lt;/h2&gt;
&lt;p&gt;It depends on where it points:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Internal shortcuts&lt;/strong&gt; (to another OneLake location) check the identity of the person reading: they need read access at the target too. Grant access once, where the data lives, and every shortcut to it follows.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;External shortcuts&lt;/strong&gt; (Data Lake Storage, S3 and the others) read with the credentials of a &lt;strong&gt;cloud connection&lt;/strong&gt; set when the shortcut was made. Everyone who can read your lakehouse reads through that connection, so secure the lakehouse itself, and keep the connection's access to the folders it needs.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;One trap: a semantic model in &lt;strong&gt;Direct Lake over SQL&lt;/strong&gt;, or T-SQL in delegated identity mode, passes the item owner's identity to an internal shortcut instead of the reader's. Direct Lake over OneLake passes the reader's.&lt;/p&gt;
&lt;h2 id=&quot;when-should-you-copy-instead&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-should-you-copy-instead&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When should you copy instead?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;When the shape changes.&lt;/strong&gt; Cleaning, joining and reshaping belong in your silver and gold layers; read the source through a shortcut, write the result as your own table.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;When the source is slow or far away.&lt;/strong&gt; A shortcut reads the source every time. For another cloud, turn on the workspace's shortcut cache (it keeps files from 1 to 28 days and skips files over 1 GB), or copy once and read locally.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;When you need a fixed point in time.&lt;/strong&gt; A shortcut always shows the source as it is now. For a month-end snapshot, copy.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/onelake/onelake-shortcuts&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: OneLake shortcuts&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/onelake/onelake-shortcut-security&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: OneLake shortcut security&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/onelake/create-adls-shortcut&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create an Azure Data Lake Storage Gen2 shortcut&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add one shortcut with &lt;strong&gt;New shortcut&lt;/strong&gt; in your lakehouse, to a folder you already copy every night, and compare. The lakehouse it fits into is built in &lt;a href=&quot;/courses/lakehouse-in-three-layers/&quot;&gt;A lakehouse in three layers&lt;/a&gt;, and this pattern sits on &lt;a href=&quot;/work/#use-data-where-it-is&quot;&gt;the map of my work&lt;/a&gt; with the others.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>DAX filter context and context transition, explained</title>
    <link href="https://data.benibix.com/blog/dax-filter-context-and-context-transition/"/>
    <id>https://data.benibix.com/blog/dax-filter-context-and-context-transition/</id>
    <published>2026-10-18T12:00:00Z</published>
    <updated>2026-10-18T12:00:00Z</updated>
    <summary>What filter context and row context are in DAX, what CALCULATE changes, and how context transition turns a row into a filter, with measures that show it.</summary>
    <category term="DAX"/>
    <category term="Concepts"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;filter context&lt;/strong&gt; is the set of filters in force when a measure is calculated: the slicers, the row and column of the visual, and any filter CALCULATE adds. &lt;strong&gt;Row context&lt;/strong&gt; is &amp;quot;the current row&amp;quot; while DAX walks a table, in a calculated column or an iterator like SUMX. &lt;strong&gt;Context transition&lt;/strong&gt; is what CALCULATE does with a row context: it turns the current row into filters, so a measure inside an iterator is calculated for that row.&lt;/p&gt;
&lt;p&gt;Almost every &amp;quot;why is my total wrong&amp;quot; in DAX comes down to which context a piece of the formula runs in.&lt;/p&gt;
&lt;h2 id=&quot;where-does-filter-context-come-from&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-does-filter-context-come-from&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where does filter context come from?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Slicer&lt;/b&gt;&lt;span&gt;Year = 2026&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Matrix row&lt;/b&gt;&lt;span&gt;Customer[Region] = &amp;quot;West&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Matrix column&lt;/b&gt;&lt;span&gt;Product[Category] = &amp;quot;Bikes&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;CALCULATE&lt;/b&gt;&lt;span&gt;can add, replace or remove filters&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Measure&lt;/b&gt;&lt;span&gt;SUM(Sales[Amount]) over the rows left&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;The filters behind one cell in a matrix&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The same measure gives a different number in every cell because each cell has a different filter context, not because the formula changed.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )
Revenue all regions = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;REMOVEFILTERS&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Region]&lt;/i&gt; ) )
Share of region = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue all regions]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-is-context-transition&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-context-transition&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is context transition?&lt;/h2&gt;
&lt;p&gt;An iterator walks a table row by row. Inside it, a column reference reads the current row, but a &lt;strong&gt;measure&lt;/strong&gt; is always evaluated in a filter context. So DAX wraps the measure in an invisible CALCULATE, which turns the current row into filters: that is context transition.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- Average revenue per customer: [Revenue] runs once per customer&lt;/i&gt;
Avg revenue per customer =
&lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[CustomerID]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- Without the measure there is no transition: this sums every sale for every customer&lt;/i&gt;
Wrong average =
&lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[CustomerID]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Inside AVERAGEX&lt;/th&gt;&lt;th&gt;Filters per customer row&lt;/th&gt;&lt;th&gt;Result&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;[Revenue] (a measure)&lt;/td&gt;&lt;td&gt;yes, CustomerID = the current one&lt;/td&gt;&lt;td&gt;revenue of that customer&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SUM(Sales[Amount])&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;all revenue, for every customer&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CALCULATE(SUM(Sales[Amount]))&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;revenue of that customer&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The same iterator, with and without context transition&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A measure inside a calculated column.&lt;/strong&gt; Context transition fires for every row and filters by every column of that row. On a table with duplicate rows the result surprises; it is also slow on big tables.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Iterating a large table with a measure inside.&lt;/strong&gt; Each row is a new filter context. Iterate the smallest table that answers the question, like &lt;code&gt;VALUES(Customer[CustomerID])&lt;/code&gt;, not &lt;code&gt;Sales&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;FILTER on a whole table&lt;/strong&gt; where a column filter in CALCULATE would do. &lt;code&gt;CALCULATE([Revenue], Customer[Region] = &amp;quot;West&amp;quot;)&lt;/code&gt; is clearer and faster.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/calculate-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: CALCULATE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/dax-overview#context&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DAX overview: context&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://www.sqlbi.com/articles/understanding-context-transition-in-dax/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;SQLBI: Understanding context transition in DAX&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;The open course &lt;a href=&quot;/courses/dax-measures-that-add-up/&quot;&gt;DAX measures that add up&lt;/a&gt; has a lesson on exactly this: CALCULATE changes the filter, and a measure inside a row. Then &lt;a href=&quot;/blog/calculation-groups-power-bi-time-intelligence/&quot;&gt;Every KPI once&lt;/a&gt; puts it to work in a calculation group.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>DAX logical functions: every one with an example</title>
    <link href="https://data.benibix.com/blog/logical-functions-dax-reference/"/>
    <id>https://data.benibix.com/blog/logical-functions-dax-reference/</id>
    <published>2026-10-18T12:00:00Z</published>
    <updated>2026-10-18T12:00:00Z</updated>
    <summary>A reference of all DAX logical functions, IF, IF.EAGER, SWITCH, AND, OR, NOT, TRUE, FALSE, IFERROR, COALESCE and the bit functions BITAND, BITOR, BITXOR, BITLSHIFT and BITRSHIFT, with the operators &amp;&amp;, || and IN, examples, and the mistakes to avoid.</summary>
    <category term="DAX"/>
    <category term="Reference"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; DAX logical functions build &lt;strong&gt;conditions&lt;/strong&gt; and choose between results: &lt;code&gt;IF&lt;/code&gt; and &lt;code&gt;SWITCH&lt;/code&gt; choose, &lt;code&gt;AND&lt;/code&gt;, &lt;code&gt;OR&lt;/code&gt; and &lt;code&gt;NOT&lt;/code&gt; combine tests (or the operators &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt;, &lt;code&gt;||&lt;/code&gt; and &lt;code&gt;IN&lt;/code&gt;), &lt;code&gt;TRUE&lt;/code&gt; and &lt;code&gt;FALSE&lt;/code&gt; are the constants, &lt;code&gt;IFERROR&lt;/code&gt; catches errors, &lt;code&gt;COALESCE&lt;/code&gt; returns the first non-blank value, and the &lt;code&gt;BIT&lt;/code&gt; functions work on the bits of whole numbers. This page lists all of them with an example each.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-choose-a-result&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-choose-a-result&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions choose a result?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Does&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;IF ( test, then [, else] )&lt;/td&gt;&lt;td&gt;one of two results; BLANK without else&lt;/td&gt;&lt;td&gt;IF ( [Margin %] &amp;lt; 0, &amp;quot;Loss&amp;quot;, &amp;quot;Profit&amp;quot; )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;IF.EAGER ( test, then, else )&lt;/td&gt;&lt;td&gt;like IF, but evaluates both branches first&lt;/td&gt;&lt;td&gt;IF.EAGER ( [Revenue] &amp;gt; 0, [Revenue] / 1000, 0 )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SWITCH ( expr, v1, r1, ..., else )&lt;/td&gt;&lt;td&gt;compares one expression with many values&lt;/td&gt;&lt;td&gt;SWITCH ( [Month No], 1, &amp;quot;Jan&amp;quot;, 2, &amp;quot;Feb&amp;quot;, &amp;quot;Other&amp;quot; )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SWITCH ( TRUE (), c1, r1, ..., else )&lt;/td&gt;&lt;td&gt;the first condition that is TRUE wins&lt;/td&gt;&lt;td&gt;SWITCH ( TRUE (), [A] &amp;gt;= 1, &amp;quot;On plan&amp;quot;, &amp;quot;Behind&amp;quot; )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;IFERROR ( value, if_error )&lt;/td&gt;&lt;td&gt;a fallback when the value is an error&lt;/td&gt;&lt;td&gt;IFERROR ( VALUE ( T[Text] ), BLANK () )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;COALESCE ( e1, e2, ... )&lt;/td&gt;&lt;td&gt;the first expression that is not BLANK&lt;/td&gt;&lt;td&gt;COALESCE ( [Forecast], [Budget], 0 )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Choosing&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In depth: &lt;a href=&quot;/blog/if-switch-dax/&quot;&gt;IF and SWITCH&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-combine-tests&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-combine-tests&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions combine tests?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function or operator&lt;/th&gt;&lt;th&gt;TRUE when&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;AND ( a, b ) or a &amp;amp;&amp;amp; b&lt;/td&gt;&lt;td&gt;both are TRUE&lt;/td&gt;&lt;td&gt;[Revenue] &amp;gt; 0 &amp;amp;&amp;amp; [Margin] &amp;gt; 0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;OR ( a, b ) or a || b&lt;/td&gt;&lt;td&gt;at least one is TRUE&lt;/td&gt;&lt;td&gt;Customer[Country] = &amp;quot;DE&amp;quot; || Customer[Country] = &amp;quot;AT&amp;quot;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;NOT ( a )&lt;/td&gt;&lt;td&gt;a is FALSE&lt;/td&gt;&lt;td&gt;NOT ( ISBLANK ( [Revenue LY] ) )&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;x IN { ... }&lt;/td&gt;&lt;td&gt;x equals one of the values&lt;/td&gt;&lt;td&gt;Customer[Country] IN { &amp;quot;DE&amp;quot;, &amp;quot;AT&amp;quot;, &amp;quot;CH&amp;quot; }&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;TRUE ( ), FALSE ( )&lt;/td&gt;&lt;td&gt;the logical constants&lt;/td&gt;&lt;td&gt;SWITCH ( TRUE ( ), ... )&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Combining&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;code&gt;AND&lt;/code&gt; and &lt;code&gt;OR&lt;/code&gt; take exactly two arguments: three tests need &lt;code&gt;AND ( a, AND ( b, c ) )&lt;/code&gt; or &lt;code&gt;a &amp;amp;&amp;amp; b &amp;amp;&amp;amp; c&lt;/code&gt;, which reads better.&lt;/p&gt;
&lt;h2 id=&quot;which-functions-work-on-bits&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-functions-work-on-bits&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which functions work on bits?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Returns&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;th&gt;Result&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;BITAND ( a, b )&lt;/td&gt;&lt;td&gt;bits set in both&lt;/td&gt;&lt;td&gt;BITAND ( 13, 11 )&lt;/td&gt;&lt;td&gt;9&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;BITOR ( a, b )&lt;/td&gt;&lt;td&gt;bits set in either&lt;/td&gt;&lt;td&gt;BITOR ( 9, 10 )&lt;/td&gt;&lt;td&gt;11&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;BITXOR ( a, b )&lt;/td&gt;&lt;td&gt;bits set in exactly one&lt;/td&gt;&lt;td&gt;BITXOR ( 9, 10 )&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;BITLSHIFT ( n, k )&lt;/td&gt;&lt;td&gt;n shifted k bits left&lt;/td&gt;&lt;td&gt;BITLSHIFT ( 2, 3 )&lt;/td&gt;&lt;td&gt;16&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;BITRSHIFT ( n, k )&lt;/td&gt;&lt;td&gt;n shifted k bits right&lt;/td&gt;&lt;td&gt;BITRSHIFT ( 16, 2 )&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Bit functions&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The common use is flag columns, where one number stores several yes or no options:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- Features: 1 = email, 2 = SMS, 4 = push&lt;/i&gt;
Has SMS = &lt;i class=&quot;f&quot;&gt;BITAND&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Features]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;2&lt;/i&gt; ) &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Three arguments to AND.&lt;/strong&gt; An error; use &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;BLANK in tests.&lt;/strong&gt; BLANK compares like 0 or an empty string: &lt;code&gt;[x] = 0&lt;/code&gt; is TRUE for BLANK; use &lt;code&gt;ISBLANK&lt;/code&gt; or &lt;code&gt;==&lt;/code&gt; (strict equal) when the difference matters.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;IFERROR as a habit.&lt;/strong&gt; It hides real errors and slows queries; prevent the error (&lt;code&gt;DIVIDE&lt;/code&gt;, &lt;code&gt;ISBLANK&lt;/code&gt; checks).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;COALESCE with mixed types.&lt;/strong&gt; &lt;code&gt;COALESCE ( [Revenue], &amp;quot;none&amp;quot; )&lt;/code&gt; makes a variant; keep one type.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;SWITCH order.&lt;/strong&gt; The first TRUE wins; put the strictest condition first.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/logical-functions-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Logical functions (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/coalesce-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: COALESCE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/dax-operator-reference&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DAX operators&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Rewrite one nested &lt;code&gt;IF&lt;/code&gt; as &lt;code&gt;SWITCH ( TRUE () )&lt;/code&gt; and replace &lt;code&gt;IF ( ISBLANK ( x ), y, x )&lt;/code&gt; with &lt;code&gt;COALESCE ( x, y )&lt;/code&gt;. &lt;a href=&quot;/blog/information-functions-dax-reference/&quot;&gt;Information functions&lt;/a&gt; are the tests you combine.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Feature adoption rate: breadth, depth and DAX</title>
    <link href="https://data.benibix.com/blog/feature-adoption-kpi/"/>
    <id>https://data.benibix.com/blog/feature-adoption-kpi/</id>
    <published>2026-10-18T12:00:00Z</published>
    <updated>2026-10-18T12:00:00Z</updated>
    <summary>How to measure feature adoption, the share of active users who used a feature in a period, breadth against depth (how often adopters use it), adoption after a release by cohort, feature retention, a matrix of features by adoption and frequency, and the DAX on an events table.</summary>
    <category term="KPIs"/>
    <category term="SaaS and product"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;feature adoption rate&lt;/strong&gt; = users who used a feature in a period / &lt;strong&gt;active users&lt;/strong&gt; in that period (not all sign-ups). 2,250 of 15,000 monthly active users using Reports is &lt;strong&gt;15%&lt;/strong&gt;. Add &lt;strong&gt;depth&lt;/strong&gt;: how often adopters use it (average days used per month), and &lt;strong&gt;feature retention&lt;/strong&gt;: of users who tried it in month one, how many still use it in month two. A feature with low breadth and high depth serves a niche well; high breadth and low depth means people try it and leave it.&lt;/p&gt;
&lt;p&gt;Product teams ship features and rarely check whether anyone uses them. Adoption by feature shows what to improve, promote or remove.&lt;/p&gt;
&lt;h2 id=&quot;how-does-a-feature-matrix-look&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-a-feature-matrix-look&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does a feature matrix look?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Feature&lt;/th&gt;&lt;th&gt;Users&lt;/th&gt;&lt;th&gt;Adoption&lt;/th&gt;&lt;th&gt;Avg days used by adopters&lt;/th&gt;&lt;th&gt;Month-2 retention&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Editor&lt;/td&gt;&lt;td&gt;14,100&lt;/td&gt;&lt;td&gt;94.0%&lt;/td&gt;&lt;td&gt;12.4&lt;/td&gt;&lt;td&gt;96%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Comments&lt;/td&gt;&lt;td&gt;6,000&lt;/td&gt;&lt;td&gt;40.0%&lt;/td&gt;&lt;td&gt;5.1&lt;/td&gt;&lt;td&gt;78%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Reports&lt;/td&gt;&lt;td&gt;2,250&lt;/td&gt;&lt;td&gt;15.0%&lt;/td&gt;&lt;td&gt;6.8&lt;/td&gt;&lt;td&gt;70%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Templates&lt;/td&gt;&lt;td&gt;4,500&lt;/td&gt;&lt;td&gt;30.0%&lt;/td&gt;&lt;td&gt;1.3&lt;/td&gt;&lt;td&gt;22%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Integrations&lt;/td&gt;&lt;td&gt;900&lt;/td&gt;&lt;td&gt;6.0%&lt;/td&gt;&lt;td&gt;14.0&lt;/td&gt;&lt;td&gt;91%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;September, 15,000 monthly active users&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;scatter&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;scatter chart: Editor 94, 12.4; Comments 40, 5.1; Reports 15, 6.8; Templates 30, 1.3; Integrations 6, 14&quot;&gt;&lt;line x1=&quot;56&quot; y1=&quot;254&quot; x2=&quot;570&quot; y2=&quot;254&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;48&quot; y=&quot;258&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;56&quot; y1=&quot;194&quot; x2=&quot;570&quot; y2=&quot;194&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;48&quot; y=&quot;198&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;5&lt;/text&gt;&lt;line x1=&quot;56&quot; y1=&quot;134&quot; x2=&quot;570&quot; y2=&quot;134&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;48&quot; y=&quot;138&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;10&lt;/text&gt;&lt;line x1=&quot;56&quot; y1=&quot;74&quot; x2=&quot;570&quot; y2=&quot;74&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;48&quot; y=&quot;78&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;15&lt;/text&gt;&lt;line x1=&quot;56&quot; y1=&quot;14&quot; x2=&quot;570&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;48&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;20&lt;/text&gt;&lt;text x=&quot;56&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0&lt;/text&gt;&lt;text x=&quot;158.8&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;25&lt;/text&gt;&lt;text x=&quot;261.6&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;50&lt;/text&gt;&lt;text x=&quot;364.4&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;75&lt;/text&gt;&lt;text x=&quot;467.2&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;100&lt;/text&gt;&lt;text x=&quot;570&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;125&lt;/text&gt;&lt;circle cx=&quot;442.5&quot; cy=&quot;105.2&quot; r=&quot;6&quot; class=&quot;m bub k0&quot;/&gt;&lt;circle cx=&quot;220.5&quot; cy=&quot;192.8&quot; r=&quot;6&quot; class=&quot;m bub k1&quot;/&gt;&lt;circle cx=&quot;117.7&quot; cy=&quot;172.4&quot; r=&quot;6&quot; class=&quot;m bub k2&quot;/&gt;&lt;circle cx=&quot;179.4&quot; cy=&quot;238.4&quot; r=&quot;6&quot; class=&quot;m bub k3&quot;/&gt;&lt;circle cx=&quot;80.7&quot; cy=&quot;86&quot; r=&quot;6&quot; class=&quot;m bub k4&quot;/&gt;&lt;text x=&quot;452.5&quot; y=&quot;109.2&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;Editor&lt;/text&gt;&lt;text x=&quot;230.5&quot; y=&quot;196.8&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;Comments&lt;/text&gt;&lt;text x=&quot;127.7&quot; y=&quot;176.4&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;Reports&lt;/text&gt;&lt;text x=&quot;189.4&quot; y=&quot;242.4&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;Templates&lt;/text&gt;&lt;text x=&quot;90.7&quot; y=&quot;90&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;Integrations&lt;/text&gt;&lt;text x=&quot;313&quot; y=&quot;294&quot; class=&quot;tax&quot; text-anchor=&quot;middle&quot;&gt;Adoption %&lt;/text&gt;&lt;text x=&quot;14&quot; y=&quot;134&quot; class=&quot;tax&quot; text-anchor=&quot;middle&quot; transform=&quot;rotate(-90 14 134)&quot;&gt;Avg days used&lt;/text&gt;&lt;line x1=&quot;56&quot; y1=&quot;254&quot; x2=&quot;570&quot; y2=&quot;254&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Features by adoption and depth&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Templates are tried by many and kept by few: a quality or fit problem. Integrations are used by few but daily: a feature to promote to more users.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;An Events table with User ID, Date, Feature (mapped from event names in Power Query), related to the Date table and a Feature dimension:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Active Users = &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Events&lt;i class=&quot;m&quot;&gt;[User ID]&lt;/i&gt; )

Feature Users = &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Events&lt;i class=&quot;m&quot;&gt;[User ID]&lt;/i&gt; )

Adoption Rate =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Feature Users]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Active Users]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;ALL&lt;/i&gt; ( Feature ) ) )

Avg Days Used =
&lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Events&lt;i class=&quot;m&quot;&gt;[User ID]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Events&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
)

Feature Retention M2 =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; M1Users = &lt;i class=&quot;f&quot;&gt;CALCULATETABLE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Events&lt;i class=&quot;m&quot;&gt;[User ID]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;DATEADD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, -&lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, MONTH ) )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; M2Users = &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Events&lt;i class=&quot;m&quot;&gt;[User ID]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;INTERSECT&lt;/i&gt; ( M1Users, M2Users ) ), &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( M1Users ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;With a feature on the rows, &lt;code&gt;Feature Users&lt;/code&gt; counts that feature's users and &lt;code&gt;ALL ( Feature )&lt;/code&gt; gives all active users as the base. &lt;code&gt;Feature Retention M2&lt;/code&gt; counts users of the feature last month who used it again this month, with &lt;a href=&quot;/blog/union-except-intersect-crossjoin-dax/&quot;&gt;INTERSECT&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-measure-a-new-release&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-measure-a-new-release&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you measure a new release?&lt;/h2&gt;
&lt;p&gt;Count adoption from the release date in weeks since release, not in calendar months, and only among users active since release. Compare with the adoption curve of earlier launches: a feature at 5% after four weeks when similar ones reached 20% needs better discovery (in-app hints, emails) or a rethink.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;All sign-ups as the base.&lt;/strong&gt; Inactive users dilute adoption; use active users.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Counting views as use.&lt;/strong&gt; Opening a menu is not using a feature; pick the action that completes it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Features available only on some plans.&lt;/strong&gt; Divide by users who have access.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Adoption without depth.&lt;/strong&gt; One click in a month counts as adoption; show days used.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/intersect-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: INTERSECT function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/distinctcount-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DISTINCTCOUNT function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-scatter&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Scatter, bubble, and dot plot charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Map events to features, then build the feature matrix with adoption, depth and month-2 retention. &lt;a href=&quot;/blog/what-makes-a-good-kpi/&quot;&gt;What makes a good KPI&lt;/a&gt; helps choose which feature numbers to put on the product dashboard.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>GENERATESERIES, DATATABLE and ROW: build tables in DAX</title>
    <link href="https://data.benibix.com/blog/generateseries-datatable-row-dax/"/>
    <id>https://data.benibix.com/blog/generateseries-datatable-row-dax/</id>
    <published>2026-10-18T12:00:00Z</published>
    <updated>2026-10-18T12:00:00Z</updated>
    <summary>How to build small tables in DAX, GENERATESERIES for number ranges and what-if parameters, DATATABLE for typed inline tables, ROW and the table constructor for quick rows, SELECTCOLUMNS to rename, and examples for bins, scenarios and helper tables.</summary>
    <category term="DAX"/>
    <category term="Table functions"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; DAX can build small tables without a data source. &lt;strong&gt;&lt;code&gt;GENERATESERIES ( start, end, step )&lt;/code&gt;&lt;/strong&gt; returns a one-column table named &lt;strong&gt;Value&lt;/strong&gt; with an arithmetic series (0 to 0.3 in steps of 0.05), the basis of what-if parameters and bins. &lt;strong&gt;&lt;code&gt;DATATABLE&lt;/code&gt;&lt;/strong&gt; declares a typed table with constant values. The &lt;strong&gt;table constructor&lt;/strong&gt; &lt;code&gt;{ ( &amp;quot;A&amp;quot;, 1 ), ( &amp;quot;B&amp;quot;, 2 ) }&lt;/code&gt; builds rows from any expressions, and &lt;strong&gt;&lt;code&gt;ROW ( &amp;quot;Name&amp;quot;, expr, ... )&lt;/code&gt;&lt;/strong&gt; builds one row with named columns. Use them for calculated tables, slicer tables and inside measures.&lt;/p&gt;
&lt;p&gt;Every disconnected slicer (scenario, discount, top N, bin size) needs a small table. Typing it in DAX keeps it in the model's code, versioned and documented.&lt;/p&gt;
&lt;h2 id=&quot;what-does-each-one-build&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-each-one-build&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does each one build?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Builds&lt;/th&gt;&lt;th&gt;Column names&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;GENERATESERIES ( 0, 0.3, 0.05 )&lt;/td&gt;&lt;td&gt;0, 0.05, ... 0.3&lt;/td&gt;&lt;td&gt;Value&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;{ 1, 2, 3 }&lt;/td&gt;&lt;td&gt;one column&lt;/td&gt;&lt;td&gt;Value&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;{ ( &amp;quot;Low&amp;quot;, 0 ), ( &amp;quot;High&amp;quot;, 1 ) }&lt;/td&gt;&lt;td&gt;several columns&lt;/td&gt;&lt;td&gt;Value1, Value2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DATATABLE ( &amp;quot;Name&amp;quot;, STRING, &amp;quot;Order&amp;quot;, INTEGER, { { &amp;quot;Low&amp;quot;, 1 }, { &amp;quot;High&amp;quot;, 2 } } )&lt;/td&gt;&lt;td&gt;typed columns&lt;/td&gt;&lt;td&gt;as declared&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ROW ( &amp;quot;Revenue&amp;quot;, [Revenue], &amp;quot;Margin&amp;quot;, [Margin] )&lt;/td&gt;&lt;td&gt;one row&lt;/td&gt;&lt;td&gt;as declared&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Table builders&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-build-a-what-if-parameter-by-hand&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-a-what-if-parameter-by-hand&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build a what-if parameter by hand?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- calculated table&lt;/i&gt;
Discount = &lt;i class=&quot;f&quot;&gt;GENERATESERIES&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;0.3&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;0.05&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- measures&lt;/i&gt;
Discount Value = &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( Discount&lt;i class=&quot;m&quot;&gt;[Value]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; )
Revenue after Discount = &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; * ( &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Discount Value]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;A slicer on &lt;code&gt;Discount[Value]&lt;/code&gt;, formatted as a percentage, lets readers try 0% to 30%. &lt;strong&gt;Modeling, New parameter, Numeric range&lt;/strong&gt; builds the same table and measure for you. The sequence stops at the last value at or below &lt;code&gt;end&lt;/code&gt;, and the increment must be positive.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-define-a-typed-lookup-table&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-define-a-typed-lookup-table&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you define a typed lookup table?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Scenario =
&lt;i class=&quot;f&quot;&gt;DATATABLE&lt;/i&gt; (
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Scenario&amp;quot;&lt;/i&gt;, STRING,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Growth&amp;quot;&lt;/i&gt;, DOUBLE,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Order&amp;quot;&lt;/i&gt;, INTEGER,
    {
        { &lt;i class=&quot;s&quot;&gt;&amp;quot;Pessimistic&amp;quot;&lt;/i&gt;, -&lt;i class=&quot;n&quot;&gt;0.05&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; },
        { &lt;i class=&quot;s&quot;&gt;&amp;quot;Base&amp;quot;&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;0.03&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;2&lt;/i&gt; },
        { &lt;i class=&quot;s&quot;&gt;&amp;quot;Optimistic&amp;quot;&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;0.08&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;3&lt;/i&gt; }
    }
)

Forecast =
&lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt; * ( &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; + &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( Scenario&lt;i class=&quot;m&quot;&gt;[Growth]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;0.03&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Sort &lt;code&gt;Scenario[Scenario]&lt;/code&gt; by &lt;code&gt;Scenario[Order]&lt;/code&gt;. &lt;code&gt;DATATABLE&lt;/code&gt; accepts only constants; types are INTEGER, DOUBLE, STRING, BOOLEAN, CURRENCY and DATETIME.&lt;/p&gt;
&lt;h2 id=&quot;when-do-you-use-the-table-constructor-and-row&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-do-you-use-the-table-constructor-and-row&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When do you use the table constructor and ROW?&lt;/h2&gt;
&lt;p&gt;The table constructor accepts any scalar expressions, which &lt;code&gt;DATATABLE&lt;/code&gt; does not:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- bins for a histogram, with labels&lt;/i&gt;
Bins =
&lt;i class=&quot;f&quot;&gt;SELECTCOLUMNS&lt;/i&gt; (
    { ( &lt;i class=&quot;s&quot;&gt;&amp;quot;0 to 99&amp;quot;&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;100&lt;/i&gt; ), ( &lt;i class=&quot;s&quot;&gt;&amp;quot;100 to 499&amp;quot;&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;100&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;500&lt;/i&gt; ), ( &lt;i class=&quot;s&quot;&gt;&amp;quot;500+&amp;quot;&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;500&lt;/i&gt;, 1E9 ) },
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Bin&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Value1]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;From&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Value2]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;To&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Value3]&lt;/i&gt;
)

&lt;i class=&quot;c&quot;&gt;-- a one-row table of KPIs in a DAX query&lt;/i&gt;
EVALUATE
&lt;i class=&quot;f&quot;&gt;ROW&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;&amp;quot;Revenue&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Margin %&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Margin %]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Customers&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Customers]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;SELECTCOLUMNS&lt;/code&gt; renames the generic Value1, Value2 columns. Use the bins table with a measure that counts customers whose revenue falls between From and To (see the &lt;a href=&quot;/blog/histogram-power-bi/&quot;&gt;histogram&lt;/a&gt; post).&lt;/p&gt;
&lt;h2 id=&quot;how-else-are-generated-tables-useful-in-measures&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-else-are-generated-tables-useful-in-measures&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How else are generated tables useful in measures?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- months 1 to 12 as a series, to fill gaps&lt;/i&gt;
Months = &lt;i class=&quot;f&quot;&gt;GENERATESERIES&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;12&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- check whether the selection is in a fixed list&lt;/i&gt;
Is Core Market = &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Country]&lt;/i&gt; ) IN { &lt;i class=&quot;s&quot;&gt;&amp;quot;DE&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;AT&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;CH&amp;quot;&lt;/i&gt; }&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Value column name.&lt;/strong&gt; &lt;code&gt;GENERATESERIES&lt;/code&gt; and the one-column constructor name the column Value; rename with &lt;code&gt;SELECTCOLUMNS&lt;/code&gt; if two such tables meet.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Floating-point steps.&lt;/strong&gt; &lt;code&gt;GENERATESERIES ( 0, 1, 0.1 )&lt;/code&gt; can produce 0.30000000000000004; round with &lt;code&gt;ROUND ( [Value], 2 )&lt;/code&gt; in an added column.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;DATATABLE with expressions.&lt;/strong&gt; Only constants are allowed; use the constructor.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Slicer tables connected by mistake.&lt;/strong&gt; Keep what-if tables disconnected unless the relationship is meant.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/generateseries-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: GENERATESERIES function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/datatable-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DATATABLE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/table-constructor&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Table constructor (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add one scenario table with &lt;code&gt;DATATABLE&lt;/code&gt; and a forecast measure that reads it. &lt;a href=&quot;/blog/table-functions-dax-reference/&quot;&gt;Table functions&lt;/a&gt; lists every function that returns a table.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Report themes in Power BI: the JSON file explained</title>
    <link href="https://data.benibix.com/blog/report-theme-json-power-bi/"/>
    <id>https://data.benibix.com/blog/report-theme-json-power-bi/</id>
    <published>2026-10-18T12:00:00Z</published>
    <updated>2026-11-02T12:00:00Z</updated>
    <summary>How Power BI report themes work, built-in and organizational themes, customizing the current theme, the theme JSON file with dataColors, good, neutral, bad, text classes and visual styles, series colour order, the base theme, and theme colours in DAX.</summary>
    <category term="Visuals"/>
    <category term="Report features"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;report theme&lt;/strong&gt; sets the colours, fonts and default formatting of every visual in a report at once. Pick a built-in theme on the &lt;strong&gt;View&lt;/strong&gt; (Desktop) ribbon, an &lt;strong&gt;organizational theme&lt;/strong&gt; your admin published, or import a &lt;strong&gt;JSON theme file&lt;/strong&gt;. The JSON holds the series colours (&lt;code&gt;dataColors&lt;/code&gt;), the sentiment colours (&lt;code&gt;good&lt;/code&gt;, &lt;code&gt;neutral&lt;/code&gt;, &lt;code&gt;bad&lt;/code&gt;), the gradient colours (&lt;code&gt;minimum&lt;/code&gt;, &lt;code&gt;center&lt;/code&gt;, &lt;code&gt;maximum&lt;/code&gt;), the text classes (title, label, callout) and &lt;code&gt;visualStyles&lt;/code&gt; with default settings per visual type. Export the current theme, edit it, and import it into every report.&lt;/p&gt;
&lt;p&gt;Formatting twelve visuals by hand gives twelve slightly different greys and three font sizes. A theme sets it once, and a change of brand colour becomes one file instead of a week.&lt;/p&gt;
&lt;p&gt;The video below shows a whole report look designed on a live preview, checked for contrast, and exported as a theme JSON, in about a minute.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-theme-file-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-theme-file-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a theme file look like?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;json&quot;&gt;&lt;code&gt;{
  &lt;i class=&quot;s&quot;&gt;&amp;quot;name&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;Northwind&amp;quot;&lt;/i&gt;,
  &lt;i class=&quot;s&quot;&gt;&amp;quot;dataColors&amp;quot;&lt;/i&gt;: [&lt;i class=&quot;s&quot;&gt;&amp;quot;#2F7CF6&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#FFC72C&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#20C997&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#E39A6C&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#A577FF&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#F2696B&amp;quot;&lt;/i&gt;],
  &lt;i class=&quot;s&quot;&gt;&amp;quot;background&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;#FFFFFF&amp;quot;&lt;/i&gt;,
  &lt;i class=&quot;s&quot;&gt;&amp;quot;foreground&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;#1B1F2A&amp;quot;&lt;/i&gt;,
  &lt;i class=&quot;s&quot;&gt;&amp;quot;tableAccent&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;#2F7CF6&amp;quot;&lt;/i&gt;,
  &lt;i class=&quot;s&quot;&gt;&amp;quot;good&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;#1A9E75&amp;quot;&lt;/i&gt;,
  &lt;i class=&quot;s&quot;&gt;&amp;quot;neutral&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;#E0A400&amp;quot;&lt;/i&gt;,
  &lt;i class=&quot;s&quot;&gt;&amp;quot;bad&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;#D64550&amp;quot;&lt;/i&gt;,
  &lt;i class=&quot;s&quot;&gt;&amp;quot;maximum&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;#2F7CF6&amp;quot;&lt;/i&gt;,
  &lt;i class=&quot;s&quot;&gt;&amp;quot;center&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;#E8EEF9&amp;quot;&lt;/i&gt;,
  &lt;i class=&quot;s&quot;&gt;&amp;quot;minimum&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;#FFFFFF&amp;quot;&lt;/i&gt;,
  &lt;i class=&quot;s&quot;&gt;&amp;quot;textClasses&amp;quot;&lt;/i&gt;: {
    &lt;i class=&quot;s&quot;&gt;&amp;quot;title&amp;quot;&lt;/i&gt;: { &lt;i class=&quot;s&quot;&gt;&amp;quot;fontFace&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;Segoe UI Semibold&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;fontSize&amp;quot;&lt;/i&gt;: &lt;i class=&quot;n&quot;&gt;14&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;color&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;#1B1F2A&amp;quot;&lt;/i&gt; },
    &lt;i class=&quot;s&quot;&gt;&amp;quot;label&amp;quot;&lt;/i&gt;: { &lt;i class=&quot;s&quot;&gt;&amp;quot;fontFace&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;Segoe UI&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;fontSize&amp;quot;&lt;/i&gt;: &lt;i class=&quot;n&quot;&gt;10&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;color&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;#5F6370&amp;quot;&lt;/i&gt; },
    &lt;i class=&quot;s&quot;&gt;&amp;quot;callout&amp;quot;&lt;/i&gt;: { &lt;i class=&quot;s&quot;&gt;&amp;quot;fontFace&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;Segoe UI Semibold&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;fontSize&amp;quot;&lt;/i&gt;: &lt;i class=&quot;n&quot;&gt;28&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;color&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;#1B1F2A&amp;quot;&lt;/i&gt; }
  },
  &lt;i class=&quot;s&quot;&gt;&amp;quot;visualStyles&amp;quot;&lt;/i&gt;: {
    &lt;i class=&quot;s&quot;&gt;&amp;quot;*&amp;quot;&lt;/i&gt;: { &lt;i class=&quot;s&quot;&gt;&amp;quot;*&amp;quot;&lt;/i&gt;: { &lt;i class=&quot;s&quot;&gt;&amp;quot;border&amp;quot;&lt;/i&gt;: [{ &lt;i class=&quot;s&quot;&gt;&amp;quot;show&amp;quot;&lt;/i&gt;: &lt;i class=&quot;k&quot;&gt;false&lt;/i&gt; }], &lt;i class=&quot;s&quot;&gt;&amp;quot;dropShadow&amp;quot;&lt;/i&gt;: [{ &lt;i class=&quot;s&quot;&gt;&amp;quot;show&amp;quot;&lt;/i&gt;: &lt;i class=&quot;k&quot;&gt;false&lt;/i&gt; }] } },
    &lt;i class=&quot;s&quot;&gt;&amp;quot;columnChart&amp;quot;&lt;/i&gt;: { &lt;i class=&quot;s&quot;&gt;&amp;quot;*&amp;quot;&lt;/i&gt;: { &lt;i class=&quot;s&quot;&gt;&amp;quot;dataLabels&amp;quot;&lt;/i&gt;: [{ &lt;i class=&quot;s&quot;&gt;&amp;quot;show&amp;quot;&lt;/i&gt;: &lt;i class=&quot;k&quot;&gt;true&lt;/i&gt; }] } }
  }
}&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Key&lt;/th&gt;&lt;th&gt;Sets&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;dataColors&lt;/td&gt;&lt;td&gt;the colours of series, in order: the first series gets the first colour&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;background, foreground, tableAccent&lt;/td&gt;&lt;td&gt;page and text colours, the accent of tables and matrices&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;good, neutral, bad&lt;/td&gt;&lt;td&gt;sentiment colours, used by KPIs, waterfalls and theme names in DAX&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;maximum, center, minimum&lt;/td&gt;&lt;td&gt;default gradient colours for conditional formatting&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;textClasses&lt;/td&gt;&lt;td&gt;fonts for titles, labels, callouts and other text roles&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;visualStyles&lt;/td&gt;&lt;td&gt;default format settings per visual type (&amp;quot;*&amp;quot; for all)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;What the main keys set&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-apply-and-edit-a-theme&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-apply-and-edit-a-theme&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you apply and edit a theme?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;&lt;strong&gt;View&lt;/strong&gt;, &lt;strong&gt;Themes&lt;/strong&gt; gallery: a built-in theme, or one of your organization's themes if an admin added them.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Customize current theme&lt;/strong&gt;: change colours, text, visuals, page and filter pane in a dialog; it saves as a custom theme in the report.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Save current theme&lt;/strong&gt;: exports the theme as JSON. Edit it in VS Code, then &lt;strong&gt;Browse for themes&lt;/strong&gt; to import it into this and other reports.&lt;/li&gt;&lt;li&gt;Organizational themes: an admin publishes a theme for the whole tenant, so every report author can apply the company look from the gallery.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Applying a theme replaces the previous custom theme. Visuals using theme colours update; colours picked from &lt;strong&gt;More colors&lt;/strong&gt; stay fixed. &lt;strong&gt;Reset to default&lt;/strong&gt; in a visual's format pane returns it to the theme.&lt;/p&gt;
&lt;h2 id=&quot;how-are-series-colours-assigned&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-are-series-colours-assigned&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How are series colours assigned?&lt;/h2&gt;
&lt;p&gt;When a visual has a series (a legend, or more than one measure), Power BI assigns &lt;code&gt;dataColors&lt;/code&gt; in order. Microsoft notes that the assignment differs between static series (several measures) and dynamic series (a legend field), which can make the same category get different colours in different visuals. Fix important colours per category in the visual, or keep the category order the same everywhere.&lt;/p&gt;
&lt;h2 id=&quot;can-dax-use-theme-colours&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#can-dax-use-theme-colours&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Can DAX use theme colours?&lt;/h2&gt;
&lt;p&gt;Yes. In &lt;strong&gt;Field value&lt;/strong&gt; conditional formatting, a measure can return a theme colour name instead of a hex code:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Margin Status =
&lt;i class=&quot;f&quot;&gt;SWITCH&lt;/i&gt; ( &lt;i class=&quot;k&quot;&gt;TRUE&lt;/i&gt; (), &lt;i class=&quot;m&quot;&gt;[Margin %]&lt;/i&gt; &amp;gt;= &lt;i class=&quot;n&quot;&gt;0.3&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;good&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Margin %]&lt;/i&gt; &amp;gt;= &lt;i class=&quot;n&quot;&gt;0.2&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;neutral&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;bad&amp;quot;&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The visual then uses the current theme's good, neutral or bad colour. Change the theme, and every status colour follows.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-base-theme&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-base-theme&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the base theme?&lt;/h2&gt;
&lt;p&gt;Under any custom theme sits the &lt;strong&gt;base theme&lt;/strong&gt;: Power BI's default styling. Power BI may update it in new releases, but existing reports keep their original base theme until you update it (see visual defaults). A new base theme can change spacing and defaults in reports that do not set them.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Hard-coded colours.&lt;/strong&gt; Visuals formatted with &amp;quot;More colors&amp;quot; ignore the theme; reset them to default.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too few dataColors.&lt;/strong&gt; With 8 colours and 12 series, colours repeat; group categories or add colours.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Fonts readers do not have.&lt;/strong&gt; Use fonts available in browsers and the Power BI service (Segoe UI and the fonts in the font list).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Inconsistent category colours.&lt;/strong&gt; Static and dynamic series pick colours differently; fix colours for important categories.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;One theme per report by hand.&lt;/strong&gt; Publish an organizational theme, or keep one JSON file in source control.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-report-themes&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Use report themes in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/report-themes-create-custom&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create custom report themes in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-organizational-themes&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Organizational themes&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Export your current theme, set &lt;code&gt;dataColors&lt;/code&gt; and &lt;code&gt;good&lt;/code&gt;, &lt;code&gt;neutral&lt;/code&gt;, &lt;code&gt;bad&lt;/code&gt; to your brand, add two &lt;code&gt;visualStyles&lt;/code&gt; defaults you always change by hand, and import it into every report. &lt;a href=&quot;/blog/conditional-formatting-power-bi/&quot;&gt;Conditional formatting&lt;/a&gt; uses the sentiment colours.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Taking a Microsoft exam online at home: the checklist</title>
    <link href="https://data.benibix.com/blog/online-exam-at-home-checklist/"/>
    <id>https://data.benibix.com/blog/online-exam-at-home-checklist/</id>
    <published>2026-10-18T12:00:00Z</published>
    <updated>2026-10-18T12:00:00Z</updated>
    <summary>Everything an online proctored Microsoft exam with Pearson VUE OnVUE needs in 2026, the computer and network, the room, ID and photos, the check-in window, what the proctor watches for, and the mistakes that end an exam early.</summary>
    <category term="Exams"/>
    <category term="Exam tips"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; use a &lt;strong&gt;personal computer&lt;/strong&gt; with admin rights and a wired connection, run Pearson VUE's &lt;strong&gt;system test&lt;/strong&gt; on it the day before and again on the day, sit alone in a &lt;strong&gt;closed room&lt;/strong&gt; with a &lt;strong&gt;clear desk&lt;/strong&gt;, keep your phone out of arm's reach, and have a &lt;strong&gt;government ID&lt;/strong&gt; whose name matches your profile. Check in between &lt;strong&gt;30 minutes before and 15 minutes after&lt;/strong&gt; your start time; it takes about 15 minutes.&lt;/p&gt;
&lt;h2 id=&quot;what-does-the-computer-need&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-the-computer-need&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does the computer need?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Check&lt;/th&gt;&lt;th&gt;Why&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Personal computer, not a work one&lt;/td&gt;&lt;td&gt;work security software often stops the exam browser&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Local admin rights&lt;/td&gt;&lt;td&gt;to close background apps the check finds&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;System test, twice&lt;/td&gt;&lt;td&gt;the day before and on exam day, same computer and place&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Wired network if possible&lt;/td&gt;&lt;td&gt;proxies, packet inspection and strict firewalls break the session&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;One monitor&lt;/td&gt;&lt;td&gt;unplug and turn away any others&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Antivirus&lt;/td&gt;&lt;td&gt;may need an exception for the OnVUE browser, or scanning paused&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Computer and network&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-must-the-room-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-must-the-room-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What must the room look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:1&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Allowed&lt;/b&gt;&lt;span&gt;a closed room, a clear desk, a drink in a clear spill-proof container, your phone out of reach&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;red&quot;&gt;&lt;b&gt;Not allowed&lt;/b&gt;&lt;span&gt;anyone else entering, notes, pens, whiteboards, books, watches, bags, headphones, food, gum&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;The room&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;You photograph the room with your phone during check-in, and the greeter may ask you to show your pockets, sleeves and ears. Anyone else in the room, other than a child under 13, ends the exam.&lt;/p&gt;
&lt;h2 id=&quot;what-happens-at-check-in&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-happens-at-check-in&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What happens at check-in?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Window&lt;/b&gt;&lt;span&gt;from 30 minutes before to 15 after the start time&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Learn profile&lt;/b&gt;&lt;span&gt;Certifications, your appointment, &amp;quot;Go to the exam&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Pearson VUE&lt;/b&gt;&lt;span&gt;&amp;quot;Begin exam&amp;quot;, self check-in&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Photos&lt;/b&gt;&lt;span&gt;your face, your ID, and photos of the exam area by phone&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Greeter&lt;/b&gt;&lt;span&gt;checks ID and room, then a proctor launches the exam&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Check-in, about 15 minutes&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Put your mobile number with the country code in your profile: if the connection drops, the proctor calls you.&lt;/p&gt;
&lt;h2 id=&quot;what-ends-an-exam-early&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-ends-an-exam-early&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What ends an exam early?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;Leaving the camera's view without starting a break in the exam first.&lt;/li&gt;&lt;li&gt;Someone else in the room, or another device or screen in use.&lt;/li&gt;&lt;li&gt;Using any AI tool or help from anyone.&lt;/li&gt;&lt;li&gt;Copying or recording questions.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;The session is recorded, and the proctor may use AI-assisted monitoring; humans make the final decision. If you do not want to be recorded or face-matched, book a test centre instead.&lt;/p&gt;
&lt;h2 id=&quot;what-if-something-breaks&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-if-something-breaks&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What if something breaks?&lt;/h2&gt;
&lt;p&gt;If no proctor has contacted you within 30 minutes of check-in, use Pearson VUE's live chat. If a connection or equipment failure ends the exam and Pearson VUE opens a case, you can ask Microsoft to waive the retake waiting period with that case number.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/online-exams&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: About online exams with Pearson VUE&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/support/retake-policy&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Exam retake policy&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/register-schedule-exam&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Register and schedule an exam&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Run the system test today on the computer you will use. &lt;a href=&quot;/blog/exam-time-and-breaks/&quot;&gt;Exam time and breaks&lt;/a&gt; explains how breaks work once the exam has started.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>The SQL analytics endpoint in Fabric, explained</title>
    <link href="https://data.benibix.com/blog/fabric-sql-analytics-endpoint-explained/"/>
    <id>https://data.benibix.com/blog/fabric-sql-analytics-endpoint-explained/</id>
    <published>2026-10-18T12:00:00Z</published>
    <updated>2026-10-18T12:00:00Z</updated>
    <summary>What the SQL analytics endpoint of a Fabric lakehouse is, what you can and cannot do with T-SQL there, and why a new table sometimes shows up late.</summary>
    <category term="Fabric"/>
    <category term="Lakehouse"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; every Fabric lakehouse (and mirrored database) comes with a &lt;strong&gt;SQL analytics endpoint&lt;/strong&gt;: a read-only T-SQL view of its Delta tables. You can query the tables, and create views, functions, procedures and permissions on them, but you cannot insert, update or delete rows there. Tools that speak SQL, from SSMS to Excel, connect to it like a database.&lt;/p&gt;
&lt;p&gt;It lets a SQL user read a lakehouse that Spark writes, without a copy. The one surprise is that it is read-only, and that it follows the lake with a short delay.&lt;/p&gt;
&lt;h2 id=&quot;what-can-you-do-there&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-can-you-do-there&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What can you do there?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Statement&lt;/th&gt;&lt;th&gt;Allowed&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;SELECT from the lakehouse's tables&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CREATE VIEW, FUNCTION, PROCEDURE&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;GRANT, DENY, row-level and column-level security&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Queries across items in the workspace&lt;/td&gt;&lt;td&gt;yes, with three-part names&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;INSERT, UPDATE, DELETE, MERGE on tables&lt;/td&gt;&lt;td&gt;no, write with Spark&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CREATE TABLE&lt;/td&gt;&lt;td&gt;no, tables come from the lakehouse&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;T-SQL on a lakehouse's SQL analytics endpoint&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;A view for the report team, joining two tables the notebook wrote:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;CREATE&lt;/i&gt; VIEW reporting.monthly_sales &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;SELECT&lt;/i&gt; d.&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt;, d.&lt;i class=&quot;m&quot;&gt;[Month]&lt;/i&gt;, c.Region, &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt;(f.Amount) &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; Revenue
&lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; dbo.fact_sales &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; f
&lt;i class=&quot;k&quot;&gt;JOIN&lt;/i&gt; dbo.dim_date &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; d &lt;i class=&quot;k&quot;&gt;ON&lt;/i&gt; d.DateKey = f.DateKey
&lt;i class=&quot;k&quot;&gt;JOIN&lt;/i&gt; dbo.dim_customer &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; c &lt;i class=&quot;k&quot;&gt;ON&lt;/i&gt; c.CustomerKey = f.CustomerKey
&lt;i class=&quot;k&quot;&gt;GROUP&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;BY&lt;/i&gt; d.&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt;, d.&lt;i class=&quot;m&quot;&gt;[Month]&lt;/i&gt;, c.Region;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;why-is-a-new-table-not-there-yet&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-is-a-new-table-not-there-yet&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why is a new table not there yet?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:3&quot;&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Spark writes&lt;/b&gt;&lt;span&gt;a Delta table in the lakehouse's Tables&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Sync&lt;/b&gt;&lt;span&gt;the endpoint reads the Delta log and updates its metadata&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;T-SQL&lt;/b&gt;&lt;span&gt;the table and its new rows can be queried&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;How a table reaches the endpoint&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The endpoint keeps its own metadata in step with the lake, and that sync runs in the background. Right after a notebook creates a table, a query can miss it for a short while. The endpoint's &lt;strong&gt;Refresh&lt;/strong&gt; button, or the metadata sync API, runs the sync at once; a pipeline that queries straight after loading should call it first.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Only Delta tables appear.&lt;/strong&gt; Files in the Files area, or tables in another format, are not visible to SQL.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Column names with spaces or odd types.&lt;/strong&gt; Spark allows names and types that T-SQL handles badly. Name columns plainly in the notebook.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Security set in two places.&lt;/strong&gt; Permissions on the endpoint do not stop someone with workspace access from reading the files through Spark. Control who has workspace roles first.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-sql-analytics-endpoint&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: What is the SQL analytics endpoint for a lakehouse?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/data-warehouse/sql-analytics-endpoint-performance&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SQL analytics endpoint performance considerations&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/blog/fabric-lakehouse-or-warehouse/&quot;&gt;Fabric lakehouse or warehouse&lt;/a&gt; says when read-only SQL is enough and when you need a warehouse. The open course &lt;a href=&quot;/courses/lakehouse-in-three-layers/&quot;&gt;A lakehouse in three layers&lt;/a&gt; ends with tables you can query here.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>BLANK, ERROR, EVALUATEANDLOG, TOCSV and TOJSON in DAX</title>
    <link href="https://data.benibix.com/blog/other-functions-dax/"/>
    <id>https://data.benibix.com/blog/other-functions-dax/</id>
    <published>2026-10-17T12:00:00Z</published>
    <updated>2026-10-17T12:00:00Z</updated>
    <summary>The DAX functions in Microsoft's Other category, BLANK, ERROR for your own error messages, EVALUATEANDLOG for debugging measures in Power BI Desktop, TOCSV and TOJSON for seeing a table inside a measure, and EXTERNALMEASURE for composite models, with examples.</summary>
    <category term="DAX"/>
    <category term="Reference"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; Microsoft's &lt;strong&gt;Other&lt;/strong&gt; group has six functions. &lt;strong&gt;&lt;code&gt;BLANK ( )&lt;/code&gt;&lt;/strong&gt; returns a blank, the &amp;quot;no value&amp;quot; that visuals hide. &lt;strong&gt;&lt;code&gt;ERROR ( &amp;quot;text&amp;quot; )&lt;/code&gt;&lt;/strong&gt; stops a calculation with your own message, for inputs that must not happen. &lt;strong&gt;&lt;code&gt;EVALUATEANDLOG ( value [, label] [, maxrows] )&lt;/code&gt;&lt;/strong&gt; returns its value unchanged and writes it to a trace event in Power BI Desktop, so you can see what a part of a measure returns. &lt;strong&gt;&lt;code&gt;TOCSV&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;TOJSON&lt;/code&gt;&lt;/strong&gt; turn a table into text, handy to look at a table variable on a card. &lt;strong&gt;&lt;code&gt;EXTERNALMEASURE&lt;/code&gt;&lt;/strong&gt; calls a measure of a remote model in a composite model.&lt;/p&gt;
&lt;p&gt;Debugging a measure usually means guessing what a &lt;code&gt;VAR&lt;/code&gt; holds. &lt;code&gt;TOCSV&lt;/code&gt; and &lt;code&gt;EVALUATEANDLOG&lt;/code&gt; let you look.&lt;/p&gt;
&lt;h2 id=&quot;how-do-blank-and-error-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-blank-and-error-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do BLANK and ERROR work?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- return nothing instead of 0, so empty rows disappear&lt;/i&gt;
Revenue New Products =
&lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;BLANK&lt;/i&gt; ( ) )

&lt;i class=&quot;c&quot;&gt;-- refuse an impossible setting with a clear message&lt;/i&gt;
Target Rate =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; R = &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( Settings&lt;i class=&quot;m&quot;&gt;[Rate]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( R &amp;lt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; || R &amp;gt; &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;ERROR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;&amp;quot;Settings[Rate] must be between 0 and 1&amp;quot;&lt;/i&gt; ), R )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;A visual that hits &lt;code&gt;ERROR&lt;/code&gt; fails to load and shows your text in its error details, which is easier to fix than a silent wrong number. In depth: &lt;a href=&quot;/blog/dax-blank-handling/&quot;&gt;BLANK handling&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-see-a-table-variable&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-see-a-table-variable&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you see a table variable?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- on a card while building: what does the filter keep?&lt;/i&gt;
Debug Top Customers =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; T = &lt;i class=&quot;f&quot;&gt;TOPN&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;5&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;TOCSV&lt;/i&gt; ( T )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Returns&lt;/th&gt;&lt;th&gt;Defaults&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;TOCSV ( table [, maxrows] [, delimiter] [, headers] )&lt;/td&gt;&lt;td&gt;the rows as CSV text&lt;/td&gt;&lt;td&gt;10 rows, comma, with headers&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;TOJSON ( table [, maxrows] )&lt;/td&gt;&lt;td&gt;the rows as JSON text&lt;/td&gt;&lt;td&gt;10 rows&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;TOCSV and TOJSON&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Turn on word wrap on the card or use a table visual. Remove the debug measure when done.&lt;/p&gt;
&lt;h2 id=&quot;how-does-evaluateandlog-help&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-evaluateandlog-help&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does EVALUATEANDLOG help?&lt;/h2&gt;
&lt;p&gt;Wrap any part of an expression; the result is unchanged, and the value is written to a &lt;strong&gt;DAX Evaluation Log&lt;/strong&gt; event that SQL Server Profiler or the open-source DAX Debug Output tool shows:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Margin % =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Rev = &lt;i class=&quot;f&quot;&gt;EVALUATEANDLOG&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;rev&amp;quot;&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Cost = &lt;i class=&quot;f&quot;&gt;EVALUATEANDLOG&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Cost]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;cost&amp;quot;&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( Rev - Cost, Rev )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Microsoft notes it is fully functional only in Power BI Desktop and acts as a simple passthrough elsewhere, so a forgotten one does no harm in the service, and that sometimes it is not executed because of optimisations. For a table argument, only the first maxrows rows are logged.&lt;/p&gt;
&lt;h2 id=&quot;what-is-externalmeasure&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-externalmeasure&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is EXTERNALMEASURE?&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;EXTERNALMEASURE ( measure_name, datatype, connection )&lt;/code&gt; invokes a measure from a remote model and returns its result as the given type. It works only in composite models with a connection to a remote model, where Power BI writes it for you; you rarely type it.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;0 instead of BLANK.&lt;/strong&gt; Returns rows full of zeros in tables; return &lt;code&gt;BLANK ( )&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;ERROR for normal cases.&lt;/strong&gt; One missing value breaks a whole visual; use it only for inputs that are truly wrong.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Debug measures left in the model.&lt;/strong&gt; &lt;code&gt;TOCSV&lt;/code&gt; measures confuse report users; put them in a &amp;quot;Debug&amp;quot; folder and delete them.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Expecting EVALUATEANDLOG in the service.&lt;/strong&gt; It logs only in Desktop.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/other-functions-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Other functions (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/evaluateandlog-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: EVALUATEANDLOG function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/tocsv-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: TOCSV function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Next time a measure gives a strange number, put its table variable in &lt;code&gt;TOCSV&lt;/code&gt; on a card and look. &lt;a href=&quot;/blog/dax-query-view-evaluate/&quot;&gt;DAX query view&lt;/a&gt; is the other way to see tables while you write.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Customer acquisition cost (CAC): formula and DAX</title>
    <link href="https://data.benibix.com/blog/customer-acquisition-cost-kpi/"/>
    <id>https://data.benibix.com/blog/customer-acquisition-cost-kpi/</id>
    <published>2026-10-17T12:00:00Z</published>
    <updated>2026-10-17T12:00:00Z</updated>
    <summary>How to calculate customer acquisition cost, sales and marketing spend divided by new customers, blended against paid CAC, CAC by channel, the payback period in months, which costs to include, the DAX joining a spend table with new customers, and a chart of CAC by channel.</summary>
    <category term="KPIs"/>
    <category term="Marketing"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;customer acquisition cost (CAC)&lt;/strong&gt; = sales and marketing spend in a period / new customers won in that period. &lt;strong&gt;Blended CAC&lt;/strong&gt; divides all spend by all new customers (including organic ones); &lt;strong&gt;paid CAC&lt;/strong&gt; divides paid media spend by customers from paid channels only, and is the honest number for deciding ad budgets. &lt;strong&gt;CAC payback&lt;/strong&gt; = CAC / (monthly gross margin per customer): with CAC 240 and 30 a month of margin, a new customer pays back in &lt;strong&gt;8 months&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;CAC is the price of growth. Rising CAC with flat &lt;a href=&quot;/blog/customer-lifetime-value-kpi/&quot;&gt;lifetime value&lt;/a&gt; means each new customer is worth less than it was.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Channel&lt;/th&gt;&lt;th&gt;Spend&lt;/th&gt;&lt;th&gt;New customers&lt;/th&gt;&lt;th&gt;CAC&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Paid search&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;td&gt;600&lt;/td&gt;&lt;td&gt;200&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Paid social&lt;/td&gt;&lt;td&gt;90&lt;/td&gt;&lt;td&gt;300&lt;/td&gt;&lt;td&gt;300&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Affiliates&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;td&gt;200&lt;/td&gt;&lt;td&gt;150&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Organic, referral, direct&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;900&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Team and tools (not by channel)&lt;/td&gt;&lt;td&gt;60&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Blended&lt;/td&gt;&lt;td&gt;300&lt;/td&gt;&lt;td&gt;2,000&lt;/td&gt;&lt;td&gt;150&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Paid only&lt;/td&gt;&lt;td&gt;240&lt;/td&gt;&lt;td&gt;1,100&lt;/td&gt;&lt;td&gt;218&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Q3 (spend in k)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;bar&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;bar chart: Paid social 300; Paid search 200; Affiliates 150&quot;&gt;&lt;line x1=&quot;98.8&quot; y1=&quot;8&quot; x2=&quot;98.8&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;98.8&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;264.5&quot; y1=&quot;8&quot; x2=&quot;264.5&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;264.5&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;430.3&quot; y1=&quot;8&quot; x2=&quot;430.3&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;430.3&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;200&lt;/text&gt;&lt;line x1=&quot;596&quot; y1=&quot;8&quot; x2=&quot;596&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;596&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;300&lt;/text&gt;&lt;rect x=&quot;98.8&quot; y=&quot;22.8&quot; width=&quot;497.2&quot; height=&quot;55.6&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;602&quot; y=&quot;55.7&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;300&lt;/text&gt;&lt;text x=&quot;88.8&quot; y=&quot;55.7&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Paid social&lt;/text&gt;&lt;rect x=&quot;98.8&quot; y=&quot;110.2&quot; width=&quot;331.5&quot; height=&quot;55.6&quot; rx=&quot;3&quot; class=&quot;m t-gold&quot;/&gt;&lt;text x=&quot;436.3&quot; y=&quot;143&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;200&lt;/text&gt;&lt;text x=&quot;88.8&quot; y=&quot;143&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Paid search&lt;/text&gt;&lt;rect x=&quot;98.8&quot; y=&quot;197.5&quot; width=&quot;248.6&quot; height=&quot;55.6&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;353.4&quot; y=&quot;230.3&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;150&lt;/text&gt;&lt;text x=&quot;88.8&quot; y=&quot;230.3&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Affiliates&lt;/text&gt;&lt;line x1=&quot;98.8&quot; y1=&quot;8&quot; x2=&quot;98.8&quot; y2=&quot;270&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;CAC by paid channel&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Blended CAC (150) looks good because 900 customers came at no media cost; paid CAC (218) is what each extra euro of ads buys.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;A Spend table (Date, Channel, Amount) and the customer table with First Purchase Date and Acquisition Channel. Relate both to the Date and Channel dimensions:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Spend = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Spend&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )

New Customers =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Customer ),
    &lt;i class=&quot;f&quot;&gt;USERELATIONSHIP&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[First Purchase Date]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
)

CAC = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Spend]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[New Customers]&lt;/i&gt; )

Paid CAC =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[CAC]&lt;/i&gt;, Channel&lt;i class=&quot;m&quot;&gt;[Is Paid]&lt;/i&gt; = &lt;i class=&quot;k&quot;&gt;TRUE&lt;/i&gt; () )

Active Customers = &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Customer ID]&lt;/i&gt; )

Margin per Customer per Month =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Gross Profit]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Active Customers]&lt;/i&gt; ) / &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; )

CAC Payback Months = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[CAC]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Margin per Customer per Month]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;USERELATIONSHIP&lt;/code&gt; activates the relationship from first purchase date to the Date table only for this measure (see &lt;a href=&quot;/blog/dax-relationship-functions/&quot;&gt;relationship functions&lt;/a&gt;). Spend without a channel (team, tools, agency fees) belongs in blended CAC; put it on an &amp;quot;Overhead&amp;quot; channel so it shows in the total and not in any one channel.&lt;/p&gt;
&lt;h2 id=&quot;which-costs-belong-in-cac&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-costs-belong-in-cac&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which costs belong in CAC?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Always&lt;/b&gt;&lt;span&gt;media spend, agency and affiliate fees, sales commissions on new deals&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Usually, in blended CAC&lt;/b&gt;&lt;span&gt;marketing and sales salaries, tools, events&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Never&lt;/b&gt;&lt;span&gt;costs of serving existing customers: support, account management, retention offers&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;What to include&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Write the choice into the KPI definition: CAC numbers from different companies are rarely comparable because they include different costs.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Timing.&lt;/strong&gt; Spend this month often wins customers next month; for long sales cycles, compare spend with customers one period later, or use a cohort view.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Attribution.&lt;/strong&gt; &amp;quot;Paid social&amp;quot; customers may have found you organically first; CAC per channel is only as good as the &lt;a href=&quot;/blog/roas-kpi/&quot;&gt;attribution&lt;/a&gt; behind it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Blended only.&lt;/strong&gt; It hides how expensive paid growth is.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Leaving out sales cost.&lt;/strong&gt; In B2B, sales salaries are often most of CAC.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/userelationship-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: USERELATIONSHIP function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-relationships-understand&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Model relationships in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/divide-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DIVIDE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Load spend by channel and month, tag each customer's acquisition channel, and show blended and paid CAC side by side. &lt;a href=&quot;/blog/roas-kpi/&quot;&gt;ROAS&lt;/a&gt; measures the same spend against revenue.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Field parameters in Power BI: let readers pick fields</title>
    <link href="https://data.benibix.com/blog/field-parameters-power-bi/"/>
    <id>https://data.benibix.com/blog/field-parameters-power-bi/</id>
    <published>2026-10-17T12:00:00Z</published>
    <updated>2026-10-17T12:00:00Z</updated>
    <summary>How field parameters in Power BI let report readers switch the measure or the dimension of a visual with a slicer, creating them, the NAMEOF table behind them, adding fields, hierarchies, a dynamic title, and their limitations.</summary>
    <category term="Visuals"/>
    <category term="Report features"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;field parameter&lt;/strong&gt; is a small table of fields (measures or columns) that a slicer can choose from. Put the parameter on a visual's axis or values, and a slicer next to it switches what the visual shows: revenue, margin or orders; by region, product or channel. Create one in &lt;strong&gt;Modeling, New parameter, Fields&lt;/strong&gt;. Behind it is a DAX table with a name, a &lt;code&gt;NAMEOF&lt;/code&gt; reference and an order per field, which you can edit to add fields.&lt;/p&gt;
&lt;p&gt;Four copies of the same chart, one per measure, take up a page. One chart with a field parameter slicer above it does the same job in a quarter of the space, and readers pick what they need.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-field-parameter-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-field-parameter-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a field parameter look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:3&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Measure slicer&lt;/b&gt;&lt;span&gt;Revenue, Margin %, Orders&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Dimension slicer&lt;/b&gt;&lt;span&gt;Region, Category, Channel&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;The chart&lt;/b&gt;&lt;span&gt;shows the picked measure by the picked dimension&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One chart, two field parameters&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-create-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-create-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you create one?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Modeling&lt;/strong&gt;, &lt;strong&gt;New parameter&lt;/strong&gt;, &lt;strong&gt;Fields&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Name it, for example &lt;code&gt;Metric&lt;/code&gt;, and add fields: &lt;code&gt;[Revenue]&lt;/code&gt;, &lt;code&gt;[Margin %]&lt;/code&gt;, &lt;code&gt;[Orders]&lt;/code&gt;. Drag to reorder; double-click a field to rename it as it will show in the slicer.&lt;/li&gt;&lt;li&gt;Leave &lt;strong&gt;Add slicer to this page&lt;/strong&gt; on. Power BI creates the parameter table and a slicer.&lt;/li&gt;&lt;li&gt;Put the parameter field on the visual (Y-axis for measures, X-axis or rows for dimensions).&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;The DAX Power BI writes for it:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Metric =
{
    ( &lt;i class=&quot;s&quot;&gt;&amp;quot;Revenue&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;NAMEOF&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; ), &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; ),
    ( &lt;i class=&quot;s&quot;&gt;&amp;quot;Margin %&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;NAMEOF&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Margin %]&lt;/i&gt; ), &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; ),
    ( &lt;i class=&quot;s&quot;&gt;&amp;quot;Orders&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;NAMEOF&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Orders]&lt;/i&gt; ), &lt;i class=&quot;n&quot;&gt;2&lt;/i&gt; )
}&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Each row has three values: the name shown in the slicer, the field reference, and the order. To add a field later, edit the formula and add a row, separated by a comma. Keep exactly three columns with unique values: Microsoft notes that extra columns in this DAX are not supported and can lead to unexpected results.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-show-which-field-was-picked&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-show-which-field-was-picked&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you show which field was picked?&lt;/h2&gt;
&lt;p&gt;A title that says what the chart shows:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Chart Title =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Picked = &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( Metric&lt;i class=&quot;m&quot;&gt;[Metric]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Several metrics&amp;quot;&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; Picked &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot; by &amp;quot;&lt;/i&gt; &amp;amp; &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( Dimension&lt;i class=&quot;m&quot;&gt;[Dimension]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;several fields&amp;quot;&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Use it in &lt;strong&gt;Title, fx, Field value&lt;/strong&gt;: &amp;quot;Margin % by Region&amp;quot;. If the slicer allows several picks, the chart shows them all (several measures, or a hierarchy of dimensions).&lt;/p&gt;
&lt;h2 id=&quot;what-tricks-do-field-parameters-allow&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-tricks-do-field-parameters-allow&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What tricks do field parameters allow?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Slicer on the parameter's values&lt;/strong&gt;: right-click the parameter in the Build pane, &lt;strong&gt;Show values of the selected field&lt;/strong&gt;, and a slicer filters the values of whichever field is picked.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Hierarchies&lt;/strong&gt;: a dimension parameter with Year, Month and Day of week, and multi-select, makes a chart readers can arrange.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Persist hierarchy level&lt;/strong&gt;: a report setting keeps the drill level when the field changes.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Table columns&lt;/strong&gt;: a field parameter in a table's columns lets readers choose the columns they see.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-are-the-limitations&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-limitations&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the limitations?&lt;/h2&gt;
&lt;p&gt;From Microsoft's list:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;AI visuals and Q&amp;amp;A do not support field parameters.&lt;/li&gt;&lt;li&gt;Readers cannot pick &amp;quot;no field&amp;quot;: selecting nothing is the same as selecting all.&lt;/li&gt;&lt;li&gt;Implicit measures (a column dragged and summed) cannot be used: write explicit measures.&lt;/li&gt;&lt;li&gt;A date column with auto date/time loses its date hierarchy inside a field parameter.&lt;/li&gt;&lt;li&gt;Live connections need a local model (DirectQuery for Power BI semantic models) to add parameters.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Formats that change with the measure.&lt;/strong&gt; One axis for revenue and a percentage switches formats; each measure keeps its own format string, but axis titles do not change by themselves: turn them off and use the dynamic title.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Several picks by accident.&lt;/strong&gt; A multi-select slicer adds series; set the slicer to single select for measures.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Colours per field.&lt;/strong&gt; A visual colours series by order; colours can jump when the selection changes.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Implicit measures.&lt;/strong&gt; Drag-and-sum columns are not allowed; create measures.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Use field parameters to let report readers change visuals&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/nameof-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: NAMEOF function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/selectedvalue-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SELECTEDVALUE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Replace three near-identical charts with one chart and a single-select measure parameter, and give it a dynamic title. &lt;a href=&quot;/blog/calculation-groups-power-bi-time-intelligence/&quot;&gt;Calculation groups&lt;/a&gt; switch the calculation (this year, last year, YTD) the same way field parameters switch the field.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Gauge charts in Power BI: value, target, min and max</title>
    <link href="https://data.benibix.com/blog/gauge-chart-power-bi/"/>
    <id>https://data.benibix.com/blog/gauge-chart-power-bi/</id>
    <published>2026-10-17T12:00:00Z</published>
    <updated>2026-10-17T12:00:00Z</updated>
    <summary>How the radial gauge in Power BI shows one value against a target on an arc, the Value, Minimum, Maximum and Target wells, why the default maximum is twice the value, the DAX to set them, and when a KPI or bullet chart is better.</summary>
    <category term="Visuals"/>
    <category term="Cards and KPIs"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;radial gauge&lt;/strong&gt; shows one value as a filled arc between a &lt;strong&gt;minimum&lt;/strong&gt; and a &lt;strong&gt;maximum&lt;/strong&gt;, with a needle line for the &lt;strong&gt;target&lt;/strong&gt;. Use it for one number where &amp;quot;how close to the goal?&amp;quot; is the question: percent of budget spent, capacity used, a satisfaction score. It has four wells: &lt;strong&gt;Value&lt;/strong&gt;, &lt;strong&gt;Minimum value&lt;/strong&gt;, &lt;strong&gt;Maximum value&lt;/strong&gt; and &lt;strong&gt;Target value&lt;/strong&gt;. Always set the maximum yourself: without it, Power BI puts the current value at the halfway point, so the arc is always half full.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The chart, part by part:&lt;/strong&gt; &lt;a href=&quot;/visuals/gauge-chart/&quot;&gt;What is a gauge chart?&lt;/a&gt; draws its parts and shows how to read one, its kinds and the mistakes to avoid.&lt;/p&gt;
&lt;p&gt;Gauges are popular in dashboards and often used where a number alone would do. Used well, they show a value in its range at a glance: 72 out of 100, target 80, not there yet.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-gauge-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-gauge-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a gauge look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;gauge&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;gauge chart: Value 72; Target 80; Max 100&quot;&gt;&lt;path d=&quot;M160 260A160 160 0 0 1 480 260L444 260A124 124 0 0 0 196 260Z&quot; class=&quot;m track&quot;/&gt;&lt;path d=&quot;M160 260A160 160 0 0 1 422 136.7L399 164.5A124 124 0 0 0 196 260Z&quot; class=&quot;m ka&quot;/&gt;&lt;line x1=&quot;455.9&quot; y1=&quot;161.3&quot; x2=&quot;413.8&quot; y2=&quot;191.8&quot; class=&quot;tgt&quot;/&gt;&lt;text x=&quot;470.5&quot; y=&quot;150.7&quot; class=&quot;tg&quot; text-anchor=&quot;middle&quot;&gt;Target 80&lt;/text&gt;&lt;text x=&quot;320&quot; y=&quot;242&quot; class=&quot;tbig&quot; text-anchor=&quot;middle&quot;&gt;72&lt;/text&gt;&lt;text x=&quot;178&quot; y=&quot;280&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0&lt;/text&gt;&lt;text x=&quot;462&quot; y=&quot;280&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;100&lt;/text&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Customer satisfaction score: 72 out of 100, target 80&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;when-is-it-the-right-visual&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-it-the-right-visual&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is it the right visual?&lt;/h2&gt;
&lt;p&gt;Microsoft lists: progress toward a goal; a percentile measure like a KPI; the health of a single measure; information that is easy to scan. The gauge needs a natural range. A score from 0 to 100, a capacity of 500 seats, a budget: the minimum and maximum mean something. Revenue has no natural maximum, and a gauge of revenue with a made-up maximum misleads.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;The question&lt;/th&gt;&lt;th&gt;Visual&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;How full is it, against a known limit?&lt;/td&gt;&lt;td&gt;gauge&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Are we ahead of target, and how did we get here?&lt;/td&gt;&lt;td&gt;KPI visual (value, target and trend)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;What is the number?&lt;/td&gt;&lt;td&gt;card&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Many values against their targets in a list&lt;/td&gt;&lt;td&gt;bullet chart (custom visual) or a table with conditional formatting&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Gauge, KPI or card&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-build-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build one?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;In &lt;strong&gt;Visualizations&lt;/strong&gt; pick &lt;strong&gt;Gauge&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Drag the measure to &lt;strong&gt;Value&lt;/strong&gt;. Mind the aggregation: Microsoft's example switches gross sales from Sum to &lt;strong&gt;Average&lt;/strong&gt; in the field's drop-down.&lt;/li&gt;&lt;li&gt;Drag the target measure to &lt;strong&gt;Target value&lt;/strong&gt;: a needle line appears on the arc.&lt;/li&gt;&lt;li&gt;Drag measures to &lt;strong&gt;Minimum value&lt;/strong&gt; and &lt;strong&gt;Maximum value&lt;/strong&gt;, or set fixed numbers in &lt;strong&gt;Format visual, Gauge axis&lt;/strong&gt; (Min, Max, Target).&lt;/li&gt;&lt;li&gt;Format the &lt;strong&gt;Data labels&lt;/strong&gt; and &lt;strong&gt;Target label&lt;/strong&gt;, and pick the fill colour under &lt;strong&gt;Colors&lt;/strong&gt;; a conditional colour (fx) can turn the arc red below a threshold.&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;why-does-the-gauge-look-half-full&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-does-the-gauge-look-half-full&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why does the gauge look half full?&lt;/h2&gt;
&lt;p&gt;Without a maximum, Power BI sets it to twice the value, so the value always sits at the halfway point and the arc says nothing. Give it a maximum from the data:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Seats Sold = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Bookings&lt;i class=&quot;m&quot;&gt;[Seats]&lt;/i&gt; )

Seat Capacity = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Events&lt;i class=&quot;m&quot;&gt;[Capacity]&lt;/i&gt; )

Seats Target = &lt;i class=&quot;m&quot;&gt;[Seat Capacity]&lt;/i&gt; * &lt;i class=&quot;n&quot;&gt;0.85&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Put &lt;code&gt;Seats Sold&lt;/code&gt; in Value, &lt;code&gt;Seat Capacity&lt;/code&gt; in Maximum value and &lt;code&gt;Seats Target&lt;/code&gt; in Target value. With a slicer on one event, the gauge shows that event's seats against its own capacity.&lt;/p&gt;
&lt;p&gt;For a percentage gauge, keep the maximum at 1 (100%):&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Budget Used % =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Spend&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Budget&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Department&lt;/th&gt;&lt;th&gt;Spend&lt;/th&gt;&lt;th&gt;Budget&lt;/th&gt;&lt;th&gt;Budget Used %&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Marketing&lt;/td&gt;&lt;td&gt;410 K&lt;/td&gt;&lt;td&gt;500 K&lt;/td&gt;&lt;td&gt;82%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;IT&lt;/td&gt;&lt;td&gt;615 K&lt;/td&gt;&lt;td&gt;600 K&lt;/td&gt;&lt;td&gt;103%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;HR&lt;/td&gt;&lt;td&gt;95 K&lt;/td&gt;&lt;td&gt;150 K&lt;/td&gt;&lt;td&gt;63%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;A value over the maximum (IT at 103%) fills the whole arc. Set the maximum to 1.2 if overruns are normal and should be seen.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;No maximum.&lt;/strong&gt; The value lands in the middle every time; set Maximum value.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A gauge for a number with no limit.&lt;/strong&gt; Revenue, visitors, orders have no natural maximum; use a card or KPI visual.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A wall of gauges.&lt;/strong&gt; Ten gauges take the space of a table that would show ten values against ten targets more clearly.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Wrong aggregation.&lt;/strong&gt; A dragged column is summed by default; a satisfaction score summed across answers is meaningless. Use a measure with the right aggregation.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-radial-gauge-charts&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Radial gauge charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/divide-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DIVIDE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Use a gauge only when the number has a real range, and set minimum, maximum and target from measures. For &amp;quot;ahead or behind, and the trend&amp;quot;, the &lt;a href=&quot;/blog/kpi-visual-power-bi/&quot;&gt;KPI visual&lt;/a&gt; does more in the same space; for a plain number, the &lt;a href=&quot;/blog/card-visual-power-bi/&quot;&gt;card&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Incremental refresh in Power BI, explained</title>
    <link href="https://data.benibix.com/blog/incremental-refresh-power-bi-explained/"/>
    <id>https://data.benibix.com/blog/incremental-refresh-power-bi-explained/</id>
    <published>2026-10-17T12:00:00Z</published>
    <updated>2026-10-17T12:00:00Z</updated>
    <summary>How incremental refresh works in Power BI, the RangeStart and RangeEnd parameters, the policy that splits a table into partitions, and what needs Premium.</summary>
    <category term="Power BI"/>
    <category term="Power Query"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;incremental refresh&lt;/strong&gt; splits a large table into partitions by date, and each refresh reloads only the recent ones. You add two date/time parameters named exactly &lt;code&gt;RangeStart&lt;/code&gt; and &lt;code&gt;RangeEnd&lt;/code&gt;, filter the table with them, and set a policy: keep, say, five years, refresh the last three days. It works on Pro, Premium, Premium per user and Embedded; a real-time DirectQuery partition on top needs Premium, PPU or Embedded.&lt;/p&gt;
&lt;p&gt;Without it, every refresh reloads every row since the beginning. With it, a five-year sales table refreshes in the time it takes to load three days.&lt;/p&gt;
&lt;h2 id=&quot;how-does-the-policy-split-the-table&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-the-policy-split-the-table&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does the policy split the table?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;layers&quot;&gt;&lt;ol class=&quot;dfig-stack&quot;&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;Historical&lt;/b&gt;&lt;span&gt;yearly, then quarterly and monthly partitions; loaded once, not refreshed&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Refresh period&lt;/b&gt;&lt;span&gt;the last 3 days, reloaded on every refresh&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Real time (optional)&lt;/b&gt;&lt;span&gt;rows after the last refresh, read with DirectQuery&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;A sales table under the policy &amp;quot;keep 5 years, refresh 3 days&amp;quot;&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The window moves forward on its own: when a day leaves the refresh period it becomes history, and when history falls outside five years it is dropped from the model.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-set-it-up&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-set-it-up&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you set it up?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;In Power Query, create two parameters of type &lt;strong&gt;Date/Time&lt;/strong&gt; named &lt;code&gt;RangeStart&lt;/code&gt; and &lt;code&gt;RangeEnd&lt;/code&gt; (the names are case-sensitive).&lt;/li&gt;&lt;li&gt;Filter the table's date column with them, one side inclusive and the other not (the step below).&lt;/li&gt;&lt;li&gt;In the model, right-click the table, choose &lt;strong&gt;Incremental refresh&lt;/strong&gt;, and set how much to archive and how much to refresh.&lt;/li&gt;&lt;li&gt;Publish and run the first refresh in the service; it loads all history once.&lt;/li&gt;&lt;/ol&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;text&quot;&gt;&lt;code&gt;Table.SelectRows(Orders, each [OrderDate] &amp;gt;= RangeStart and [OrderDate] &amp;lt; RangeEnd)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;&amp;gt;=&lt;/code&gt; on one side and &lt;code&gt;&amp;lt;&lt;/code&gt; on the other matters: a row exactly on a boundary must belong to one partition, not two.&lt;/p&gt;
&lt;h2 id=&quot;what-do-the-options-mean&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-do-the-options-mean&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What do the options mean?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Setting&lt;/th&gt;&lt;th&gt;What it does&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Archive data starting&lt;/td&gt;&lt;td&gt;how much history the model keeps&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Incrementally refresh data starting&lt;/td&gt;&lt;td&gt;how much recent data each refresh reloads&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Get the latest data in real time&lt;/td&gt;&lt;td&gt;a DirectQuery partition after the refresh period, Premium only&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Only refresh complete days&lt;/td&gt;&lt;td&gt;skips today until it is over&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Detect data changes&lt;/td&gt;&lt;td&gt;reloads a recent day only if a last-modified column changed&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The policy settings&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;The filter does not fold.&lt;/strong&gt; Then every partition pulls the whole table. Check that the source supports &lt;a href=&quot;/blog/query-folding-power-query-explained/&quot;&gt;query folding&lt;/a&gt; up to the filter step.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Republishing from Desktop.&lt;/strong&gt; Publishing the model again replaces it and its partitions; the first refresh starts over. On Premium, deploy metadata only with tools that use the XMLA endpoint.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Changes older than the refresh period.&lt;/strong&gt; A correction to last month's data is not picked up if only three days refresh. Widen the period, or use Detect data changes.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/connect-data/incremental-refresh-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Incremental refresh and real-time data for semantic models&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/connect-data/incremental-refresh-configure&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Configure incremental refresh and real-time data&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/blog/incremental-load-watermark-azure-data-factory/&quot;&gt;Load only the rows that changed, with a watermark&lt;/a&gt; is the same idea one step earlier, in the pipeline. In Fabric, a &lt;a href=&quot;/blog/direct-lake-power-bi-explained/&quot;&gt;Direct Lake&lt;/a&gt; model needs no refresh partitions at all.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Opening and closing balances in DAX: stock and accounts</title>
    <link href="https://data.benibix.com/blog/opening-closing-balance-dax/"/>
    <id>https://data.benibix.com/blog/opening-closing-balance-dax/</id>
    <published>2026-10-17T12:00:00Z</published>
    <updated>2026-10-17T12:00:00Z</updated>
    <summary>How to calculate opening and closing balances and other semi-additive measures in DAX, stock levels, account balances and headcount that must not be summed over time, CLOSINGBALANCEMONTH, OPENINGBALANCEMONTH, LASTDATE, LASTNONBLANK, and the last date with data.</summary>
    <category term="DAX"/>
    <category term="Time intelligence"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; stock levels, account balances and headcount are &lt;strong&gt;semi-additive&lt;/strong&gt;: you can add them across products or accounts, but not across time (100 units on Monday and 100 on Tuesday is not 200). Show the value on the &lt;strong&gt;last date&lt;/strong&gt; of the period: &lt;code&gt;CLOSINGBALANCEMONTH ( SUM ( Stock[Units] ), 'Date'[Date] )&lt;/code&gt;, or &lt;code&gt;CALCULATE ( SUM ( Stock[Units] ), LASTDATE ( 'Date'[Date] ) )&lt;/code&gt; for any period. The opening balance is the previous period's closing: &lt;code&gt;OPENINGBALANCEMONTH&lt;/code&gt;. If snapshots are missing on the last calendar day, use the &lt;strong&gt;last date with data&lt;/strong&gt; (&lt;code&gt;LASTNONBLANK&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;A stock table with one row per product per day, summed over October, shows 31 times the real stock. It is one of the most common wrong numbers in inventory and finance reports.&lt;/p&gt;
&lt;h2 id=&quot;why-can-t-you-sum-over-time&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-can-t-you-sum-over-time&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why can't you sum over time?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Date&lt;/th&gt;&lt;th&gt;Units in stock&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1 Oct&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2 Oct&lt;/td&gt;&lt;td&gt;110&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;...&lt;/td&gt;&lt;td&gt;...&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;31 Oct&lt;/td&gt;&lt;td&gt;95&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;SUM for October&lt;/td&gt;&lt;td&gt;3,410&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Closing stock, 31 Oct&lt;/td&gt;&lt;td&gt;95&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Opening stock (30 Sep)&lt;/td&gt;&lt;td&gt;125&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Daily stock snapshots of one product&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Across products the units add up (product A 95 plus product B 40 is 135 units in stock). Across days they do not.&lt;/p&gt;
&lt;h2 id=&quot;which-measures-do-you-need&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-measures-do-you-need&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which measures do you need?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Units = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Stock&lt;i class=&quot;m&quot;&gt;[Units]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- closing: the last date of the period in context&lt;/i&gt;
Closing Units = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Units]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;LASTDATE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )

&lt;i class=&quot;c&quot;&gt;-- the same for month, quarter and year&lt;/i&gt;
Closing Units Month = &lt;i class=&quot;f&quot;&gt;CLOSINGBALANCEMONTH&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Units]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
Closing Units Quarter = &lt;i class=&quot;f&quot;&gt;CLOSINGBALANCEQUARTER&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Units]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
Closing Units Year = &lt;i class=&quot;f&quot;&gt;CLOSINGBALANCEYEAR&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Units]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- opening: the end of the previous period&lt;/i&gt;
Opening Units Month = &lt;i class=&quot;f&quot;&gt;OPENINGBALANCEMONTH&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Units]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )

Change in Month = &lt;i class=&quot;m&quot;&gt;[Closing Units Month]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Opening Units Month]&lt;/i&gt;

&lt;i class=&quot;c&quot;&gt;-- average stock over the period (sum of days divided by days)&lt;/i&gt;
Avg Units = &lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Units]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;LASTDATE&lt;/code&gt; works at any level: a day shows that day, a month its last day, a year 31 December. &lt;code&gt;CLOSINGBALANCEMONTH&lt;/code&gt; always evaluates at the last date of the month in context.&lt;/p&gt;
&lt;h2 id=&quot;what-if-the-last-day-has-no-snapshot&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-if-the-last-day-has-no-snapshot&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What if the last day has no snapshot?&lt;/h2&gt;
&lt;p&gt;Snapshots are often taken on working days only, or the current month is not over. On 31 October (a Saturday) there is no row, and &lt;code&gt;LASTDATE&lt;/code&gt; returns blank. Use the last date that has data:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Closing Units =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;m&quot;&gt;[Units]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;LASTNONBLANK&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Units]&lt;/i&gt; )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;LASTNONBLANK ( column, expression )&lt;/code&gt; returns the last value of the column for which the expression is not blank. For a whole portfolio where each product has its own last date, decide what is right: the last date of any product (above) or each product's own last balance:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Closing Units per Product Last =
&lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Units]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;LASTNONBLANK&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Units]&lt;/i&gt; ) )
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;where-else-is-this-needed&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-else-is-this-needed&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where else is this needed?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Account balances&lt;/strong&gt; in a trial balance table: closing balance per account and month.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Headcount&lt;/strong&gt;: employees on the last day; average headcount over the year for turnover.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Open orders or tickets&lt;/strong&gt;: the backlog at the end of each day.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Prices and exchange rates&lt;/strong&gt;: the rate at the end of the period, not the sum of rates.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;If you only have transactions (receipts and issues), compute the balance as a running sum of movements up to the date, then treat it the same way.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Default summarization.&lt;/strong&gt; A stock column dragged into a visual is summed over days; set it to Don't summarize and use measures.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Closing balance blank for the current month.&lt;/strong&gt; The month's last day is in the future; use &lt;code&gt;LASTNONBLANK&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Totals across time.&lt;/strong&gt; The year total of &lt;code&gt;Closing Units&lt;/code&gt; is the 31 December value, which is correct; readers sometimes expect a sum. Label it &amp;quot;closing&amp;quot;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Averages of balances.&lt;/strong&gt; The average stock is the average over days, not the average of month-end balances; pick one and name it.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/closingbalancemonth-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: CLOSINGBALANCEMONTH function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/openingbalancemonth-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: OPENINGBALANCEMONTH function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/lastnonblank-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: LASTNONBLANK function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Find every measure on a snapshot table and replace sums over time with &lt;code&gt;Closing Units&lt;/code&gt; using &lt;code&gt;LASTNONBLANK&lt;/code&gt;. &lt;a href=&quot;/blog/time-intelligence-dax-reference/&quot;&gt;Time intelligence functions&lt;/a&gt; lists the quarter and year versions.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Pie charts in Power BI: when a pie is the right call</title>
    <link href="https://data.benibix.com/blog/pie-chart-power-bi/"/>
    <id>https://data.benibix.com/blog/pie-chart-power-bi/</id>
    <published>2026-10-17T12:00:00Z</published>
    <updated>2026-11-02T12:00:00Z</updated>
    <summary>When a pie chart in Power BI works, how many slices it can take, the Legend, Values and Details fields, detail labels with percentages, DAX to group small slices into Other, and when a bar chart is clearer.</summary>
    <category term="Visuals"/>
    <category term="Part of a whole"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;pie chart&lt;/strong&gt; shows how a whole splits into parts: each slice is a category's share of the total. It works when there are &lt;strong&gt;two to five slices&lt;/strong&gt;, the parts really add up to a whole, and the question is &amp;quot;roughly what share?&amp;quot;. Put the category in &lt;strong&gt;Legend&lt;/strong&gt; and one measure in &lt;strong&gt;Values&lt;/strong&gt;; turn on detail labels with the percentage. For exact comparisons or more than five categories, a sorted &lt;a href=&quot;/blog/bar-chart-power-bi/&quot;&gt;bar chart&lt;/a&gt; is easier to read.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The chart, part by part:&lt;/strong&gt; &lt;a href=&quot;/visuals/pie-chart/&quot;&gt;What is a pie chart?&lt;/a&gt; draws its parts and shows how to read one, its kinds and the mistakes to avoid.&lt;/p&gt;
&lt;p&gt;Pie charts have a bad name among chart experts because angles are hard to compare. That is true for twelve slices of similar size. For &amp;quot;how much of our revenue comes from bikes?&amp;quot; with four categories, a pie answers in a second.&lt;/p&gt;
&lt;p&gt;The short video below shows the four rules for a pie chart people can read at a glance, and the one check that tells you whether a pie is the right chart at all.&lt;/p&gt;
&lt;h2 id=&quot;when-does-a-pie-chart-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-does-a-pie-chart-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When does a pie chart work?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;pie&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;pie chart: Bikes 62; Accessories 18; Clothing 12; Components 8&quot;&gt;&lt;path d=&quot;M160 30A120 120 0 1 1 77.9 237.5L160 150Z&quot; class=&quot;m sl k0&quot;/&gt;&lt;text x=&quot;231.4&quot; y=&quot;182.3&quot; class=&quot;tp&quot; text-anchor=&quot;middle&quot;&gt;62%&lt;/text&gt;&lt;rect x=&quot;330&quot; y=&quot;98&quot; width=&quot;12&quot; height=&quot;12&quot; rx=&quot;3&quot; class=&quot;m k0&quot;/&gt;&lt;text x=&quot;352&quot; y=&quot;109&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Bikes&lt;/text&gt;&lt;text x=&quot;628&quot; y=&quot;109&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;62 · 62%&lt;/text&gt;&lt;path d=&quot;M77.9 237.5A120 120 0 0 1 45.9 112.9L160 150Z&quot; class=&quot;m sl k1&quot;/&gt;&lt;text x=&quot;85.6&quot; y=&quot;173.1&quot; class=&quot;tp&quot; text-anchor=&quot;middle&quot;&gt;18%&lt;/text&gt;&lt;rect x=&quot;330&quot; y=&quot;124&quot; width=&quot;12&quot; height=&quot;12&quot; rx=&quot;3&quot; class=&quot;m k1&quot;/&gt;&lt;text x=&quot;352&quot; y=&quot;135&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Accessories&lt;/text&gt;&lt;text x=&quot;628&quot; y=&quot;135&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;18 · 18%&lt;/text&gt;&lt;path d=&quot;M45.9 112.9A120 120 0 0 1 102.2 44.8L160 150Z&quot; class=&quot;m sl k2&quot;/&gt;&lt;text x=&quot;100.8&quot; y=&quot;105&quot; class=&quot;tp&quot; text-anchor=&quot;middle&quot;&gt;12%&lt;/text&gt;&lt;rect x=&quot;330&quot; y=&quot;150&quot; width=&quot;12&quot; height=&quot;12&quot; rx=&quot;3&quot; class=&quot;m k2&quot;/&gt;&lt;text x=&quot;352&quot; y=&quot;161&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Clothing&lt;/text&gt;&lt;text x=&quot;628&quot; y=&quot;161&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;12 · 12%&lt;/text&gt;&lt;path d=&quot;M102.2 44.8A120 120 0 0 1 160 30L160 150Z&quot; class=&quot;m sl k3&quot;/&gt;&lt;text x=&quot;140.9&quot; y=&quot;79.6&quot; class=&quot;tp&quot; text-anchor=&quot;middle&quot;&gt;8%&lt;/text&gt;&lt;rect x=&quot;330&quot; y=&quot;176&quot; width=&quot;12&quot; height=&quot;12&quot; rx=&quot;3&quot; class=&quot;m k3&quot;/&gt;&lt;text x=&quot;352&quot; y=&quot;187&quot; class=&quot;tl&quot; text-anchor=&quot;start&quot;&gt;Components&lt;/text&gt;&lt;text x=&quot;628&quot; y=&quot;187&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;8 · 8%&lt;/text&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Revenue by product category: one category clearly dominates&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Anyone sees that bikes are about two thirds. Now the same chart with eight regions of nearly equal size would only say &amp;quot;about equal&amp;quot;, and nobody could tell which is third.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;The data&lt;/th&gt;&lt;th&gt;Chart&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;2 to 5 parts of one whole, one or two big&lt;/td&gt;&lt;td&gt;pie or donut&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;More than 5 parts&lt;/td&gt;&lt;td&gt;bar chart, sorted&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Parts that are close in size&lt;/td&gt;&lt;td&gt;bar chart (lengths are easier to compare than angles)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Shares changing over time&lt;/td&gt;&lt;td&gt;100% stacked column or area&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Values that do not add up to a whole (averages, rates)&lt;/td&gt;&lt;td&gt;not a pie at all&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Parts within parts&lt;/td&gt;&lt;td&gt;treemap&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Pie chart or something else&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-build-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build one?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;In &lt;strong&gt;Visualizations&lt;/strong&gt; pick &lt;strong&gt;Pie chart&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Drag the measure to &lt;strong&gt;Values&lt;/strong&gt; and the category to &lt;strong&gt;Legend&lt;/strong&gt;. An optional &lt;strong&gt;Details&lt;/strong&gt; field splits each slice further, and the chart drills from the legend level into the details.&lt;/li&gt;&lt;li&gt;In &lt;strong&gt;Format visual&lt;/strong&gt;, open &lt;strong&gt;Detail labels&lt;/strong&gt;: set &lt;strong&gt;Label contents&lt;/strong&gt; to category, data value, percent of total or a mix, and the position inside or outside.&lt;/li&gt;&lt;li&gt;Sort the slices by value (&lt;strong&gt;More options (...)&lt;/strong&gt;, &lt;strong&gt;Sort axis&lt;/strong&gt;, by the measure, descending), so the biggest starts at the top and the rest follow clockwise.&lt;/li&gt;&lt;li&gt;Pick distinct colours per slice under &lt;strong&gt;Slices&lt;/strong&gt;; keep one strong colour for the slice the page is about and calmer ones for the rest.&lt;/li&gt;&lt;/ol&gt;
&lt;h2 id=&quot;how-do-you-group-small-slices-into-other&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-group-small-slices-into-other&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you group small slices into &amp;quot;Other&amp;quot;?&lt;/h2&gt;
&lt;p&gt;A pie with three big slices and nine tiny ones is unreadable. Group the small ones with a calculated column on the &lt;code&gt;Product&lt;/code&gt; table:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Category Group =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; CategorySales = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;ALLEXCEPT&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; TotalSales = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;REMOVEFILTERS&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( CategorySales, TotalSales ) &amp;gt;= &lt;i class=&quot;n&quot;&gt;0.05&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Other&amp;quot;&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;CALCULATE&lt;/code&gt; turns the product row into a filter (context transition), and &lt;code&gt;ALLEXCEPT&lt;/code&gt; widens it to the row's whole category, so every product gets its category's revenue. Categories under 5% of the total become &amp;quot;Other&amp;quot;; use &lt;code&gt;Category Group&lt;/code&gt; in the Legend. This is fixed at refresh time: a column does not react to slicers. For a version that reacts, rank the categories in a measure and use a disconnected table with an &amp;quot;Other&amp;quot; row, as in &lt;a href=&quot;/blog/topn-dax/&quot;&gt;TOPN in DAX&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The share itself, for a tooltip or a table next to the pie:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Share of Total =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;REMOVEFILTERS&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; ) ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Category&lt;/th&gt;&lt;th&gt;Revenue&lt;/th&gt;&lt;th&gt;Share of Total&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Bikes&lt;/td&gt;&lt;td&gt;620 K&lt;/td&gt;&lt;td&gt;62%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Accessories&lt;/td&gt;&lt;td&gt;180 K&lt;/td&gt;&lt;td&gt;18%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Clothing&lt;/td&gt;&lt;td&gt;120 K&lt;/td&gt;&lt;td&gt;12%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Components&lt;/td&gt;&lt;td&gt;80 K&lt;/td&gt;&lt;td&gt;8%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Total&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;1,000 K&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;100%&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;pie-or-donut&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#pie-or-donut&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Pie or donut?&lt;/h2&gt;
&lt;p&gt;The same chart with a hole. A &lt;a href=&quot;/blog/donut-chart-power-bi/&quot;&gt;donut chart&lt;/a&gt; can show the total or another number in the centre (Power BI's &lt;strong&gt;Center value&lt;/strong&gt;, for donuts only); a pie cannot. With a label in the middle, the donut usually wins; without one, they are equal.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Too many slices.&lt;/strong&gt; Past five, readers compare colours with the legend instead of reading the chart. Group into &amp;quot;Other&amp;quot; or use bars.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Parts that are not a whole.&lt;/strong&gt; Averages, rates or numbers that overlap (customers who bought several categories counted in each) do not add up to 100%, so a pie lies.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Negative values.&lt;/strong&gt; A slice cannot be negative; a category with returns larger than sales disappears silently.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Two pies to compare.&lt;/strong&gt; Two pies next to each other (&amp;quot;2025&amp;quot; and &amp;quot;2026&amp;quot;) are almost impossible to compare slice by slice. Use a 100% stacked bar with one bar per year.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;3D and exploded slices.&lt;/strong&gt; Power BI does not offer them, and custom visuals that do distort the angles.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-pie-donut-chart&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create and use pie and donut charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-types-for-reports-and-q-and-a&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Visualization types in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/removefilters-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: REMOVEFILTERS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Use a pie for two to five parts of a real whole, sorted, with percentages on the slices. When the answer needs precision, switch to a &lt;a href=&quot;/blog/bar-chart-power-bi/&quot;&gt;bar chart&lt;/a&gt;; when it needs a total in the middle, the &lt;a href=&quot;/blog/donut-chart-power-bi/&quot;&gt;donut chart&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>A study plan for any Microsoft exam, in six weeks</title>
    <link href="https://data.benibix.com/blog/study-plan-for-any-microsoft-exam/"/>
    <id>https://data.benibix.com/blog/study-plan-for-any-microsoft-exam/</id>
    <published>2026-10-16T12:00:00Z</published>
    <updated>2026-10-16T12:00:00Z</updated>
    <summary>A six-week study plan that works for any Microsoft associate exam in 2026, from the skills list to one hands-on build, the free Learn paths, two practice assessments, the exam sandbox and booking, with how to weight your hours by the exam's skill areas.</summary>
    <category term="Exams"/>
    <category term="Exam tips"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; start from the &lt;strong&gt;study guide's skills list&lt;/strong&gt;, not a course. Take the &lt;strong&gt;practice assessment&lt;/strong&gt; cold to find gaps, then spend most of your time on &lt;strong&gt;one hands-on build&lt;/strong&gt; that touches every skill area, using the free &lt;strong&gt;Learn paths&lt;/strong&gt; only for what the build does not teach. Weight your hours by the areas' percentages, take the practice assessment again in week five, and book when the score is steady. Six weeks of about six hours a week fits most associate exams for someone already working with the product.&lt;/p&gt;
&lt;h2 id=&quot;what-does-the-six-weeks-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-the-six-weeks-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does the six weeks look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Week&lt;/th&gt;&lt;th&gt;Do&lt;/th&gt;&lt;th&gt;Output&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;read the skills list, take the practice assessment cold&lt;/td&gt;&lt;td&gt;a list of weak skills&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;start the build: the first skill area&lt;/td&gt;&lt;td&gt;working first step&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;build: the largest skill area&lt;/td&gt;&lt;td&gt;most of the solution&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;build: the remaining areas, Learn paths for the gaps&lt;/td&gt;&lt;td&gt;the whole solution&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;practice assessment again, the exam sandbox&lt;/td&gt;&lt;td&gt;a readiness score&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;fix the last gaps, rest the day before&lt;/td&gt;&lt;td&gt;exam&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Six weeks, about six hours a week&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-weight-your-hours&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-weight-your-hours&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you weight your hours?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Area at 45-50%&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;17 h&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Area at 25-30%&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:58.8%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;10 h&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Area at 25-30%&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:52.9%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;9 h&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;Hours by weight, example exam with three areas&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Use the middle of each range. For an exam like &lt;a href=&quot;/blog/dp-600-study-guide/&quot;&gt;DP-600&lt;/a&gt;, where preparing data is 45 to 50%, almost half the build should be data preparation.&lt;/p&gt;
&lt;h2 id=&quot;why-build-instead-of-read&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-build-instead-of-read&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why build instead of read?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:1&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Reading&lt;/b&gt;&lt;span&gt;you recognise the words; you cannot choose between two options that both sound right&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Building&lt;/b&gt;&lt;span&gt;you know what each option does because you used it; the choice questions get easy&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Reading against building&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Most associate questions are scenarios: a requirement, several workable answers, one that fits best. Experience decides those, which is why Microsoft says practice assessments do not replace using the product.&lt;/p&gt;
&lt;h2 id=&quot;what-else-helps&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-else-helps&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What else helps?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Mark the study guide date.&lt;/strong&gt; Skills lists are updated regularly; check that yours is current.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Use the free trial or tier&lt;/strong&gt; of the product, and delete resources after each session.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The day before:&lt;/strong&gt; no new topics. Check your ID, your booking, and for online exams the system test.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/prepare-exam&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Prepare for an exam&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/practice-assessments-for-microsoft-certifications&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Practice assessments&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Find your exam's guide, for example &lt;a href=&quot;/blog/pl-300-study-guide/&quot;&gt;PL-300&lt;/a&gt;, &lt;a href=&quot;/blog/dp-700-study-guide/&quot;&gt;DP-700&lt;/a&gt; or &lt;a href=&quot;/blog/az-104-study-guide/&quot;&gt;AZ-104&lt;/a&gt;; each has a build mapped to its skill areas. Then &lt;a href=&quot;/blog/how-to-book-a-microsoft-exam/&quot;&gt;book a date&lt;/a&gt; six weeks out.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>INFO functions in DAX: document your model with DAX</title>
    <link href="https://data.benibix.com/blog/info-functions-dax/"/>
    <id>https://data.benibix.com/blog/info-functions-dax/</id>
    <published>2026-10-16T12:00:00Z</published>
    <updated>2026-10-16T12:00:00Z</updated>
    <summary>How the DAX INFO functions read a semantic model's metadata, INFO.VIEW.TABLES, COLUMNS, MEASURES and RELATIONSHIPS, the full INFO family based on Analysis Services DMVs, permissions, queries that document measures, find unused or undocumented ones, and size columns.</summary>
    <category term="DAX"/>
    <category term="Logic and information"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; the &lt;strong&gt;INFO functions&lt;/strong&gt; return a model's metadata as DAX tables: &lt;code&gt;INFO.VIEW.MEASURES ( )&lt;/code&gt; lists every measure with its formula, description and format string; &lt;code&gt;INFO.VIEW.TABLES&lt;/code&gt;, &lt;code&gt;INFO.VIEW.COLUMNS&lt;/code&gt; and &lt;code&gt;INFO.VIEW.RELATIONSHIPS&lt;/code&gt; do the same for tables, columns and relationships, with friendly names. Behind them are about 70 &lt;code&gt;INFO.*&lt;/code&gt; functions based on Analysis Services' dynamic management views (DMVs), from &lt;code&gt;INFO.CALCULATIONGROUPS&lt;/code&gt; to storage details. Run them in &lt;a href=&quot;/blog/dax-query-view-evaluate/&quot;&gt;DAX query view&lt;/a&gt;; they need semantic model admin permissions (some also workspace admin). The four INFO.VIEW functions can also be used in calculated tables.&lt;/p&gt;
&lt;p&gt;Documentation that lives outside the model goes stale. A query that reads the model itself is always current: paste it into DAX query view and copy the result into your wiki.&lt;/p&gt;
&lt;h2 id=&quot;which-info-functions-matter-most&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-info-functions-matter-most&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which INFO functions matter most?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Returns&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;INFO.VIEW.TABLES ( )&lt;/td&gt;&lt;td&gt;tables with name, description, storage mode, hidden&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;INFO.VIEW.COLUMNS ( )&lt;/td&gt;&lt;td&gt;columns with table, data type, hidden, format&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;INFO.VIEW.MEASURES ( )&lt;/td&gt;&lt;td&gt;measures with table, formula, description, format string, hidden, state&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;INFO.VIEW.RELATIONSHIPS ( )&lt;/td&gt;&lt;td&gt;relationships with from and to columns, cardinality, direction, active&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;INFO.CALCULATIONGROUPS ( ), INFO.CALCULATIONITEMS ( )&lt;/td&gt;&lt;td&gt;calculation groups and their items&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;INFO.ROLES ( ), INFO.TABLEPERMISSIONS ( )&lt;/td&gt;&lt;td&gt;security roles and their filters&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;INFO.USERDEFINEDFUNCTIONS ( )&lt;/td&gt;&lt;td&gt;user-defined functions&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;INFO.CALENDARS ( )&lt;/td&gt;&lt;td&gt;calendars for calendar-based time intelligence&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;INFO.STORAGETABLECOLUMNSEGMENTS ( )&lt;/td&gt;&lt;td&gt;storage segments of in-memory columns&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;INFO.CALCDEPENDENCY ( )&lt;/td&gt;&lt;td&gt;which objects depend on which&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The INFO.VIEW functions and some INFO functions&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;which-queries-are-useful&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-queries-are-useful&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which queries are useful?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- 1 a documentation table of all measures&lt;/i&gt;
EVALUATE
&lt;i class=&quot;f&quot;&gt;SELECTCOLUMNS&lt;/i&gt; (
    INFO.VIEW.&lt;i class=&quot;f&quot;&gt;MEASURES&lt;/i&gt; ( ),
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Table&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Table]&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Measure&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Name]&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Formula&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Expression]&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Description&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Description]&lt;/i&gt;
)
ORDER BY &lt;i class=&quot;m&quot;&gt;[Table]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Measure]&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- 2 measures without a description&lt;/i&gt;
EVALUATE
&lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( INFO.VIEW.&lt;i class=&quot;f&quot;&gt;MEASURES&lt;/i&gt; ( ), &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Description]&lt;/i&gt; ) || &lt;i class=&quot;m&quot;&gt;[Description]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;&amp;quot;&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- 3 bidirectional or inactive relationships to review&lt;/i&gt;
EVALUATE
&lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; (
    INFO.VIEW.&lt;i class=&quot;f&quot;&gt;RELATIONSHIPS&lt;/i&gt; ( ),
    &lt;i class=&quot;m&quot;&gt;[CrossFilteringBehavior]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;BothDirections&amp;quot;&lt;/i&gt; || NOT &lt;i class=&quot;m&quot;&gt;[IsActive]&lt;/i&gt;
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- 4 objects that depend on a measure&lt;/i&gt;
EVALUATE
&lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; (
    INFO.&lt;i class=&quot;f&quot;&gt;CALCDEPENDENCY&lt;/i&gt; ( ),
    &lt;i class=&quot;m&quot;&gt;[REFERENCED_OBJECT]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Revenue&amp;quot;&lt;/i&gt;
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Column names differ between functions (&lt;code&gt;INFO.VIEW&lt;/code&gt; uses friendly names, the raw &lt;code&gt;INFO&lt;/code&gt; functions use the DMV schema), so check the result columns once with &lt;code&gt;EVALUATE INFO.VIEW.RELATIONSHIPS ( )&lt;/code&gt; and adapt the filters; the names above may need adjusting to your version.&lt;/p&gt;
&lt;h2 id=&quot;can-you-use-them-in-the-model&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#can-you-use-them-in-the-model&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Can you use them in the model?&lt;/h2&gt;
&lt;p&gt;Microsoft lists the four &lt;code&gt;INFO.VIEW&lt;/code&gt; functions as usable in calculations, including calculated tables. A calculated table &lt;code&gt;Measures Doc = INFO.VIEW.MEASURES ( )&lt;/code&gt; makes the documentation part of the model, refreshed with it, and a report page can show it. The other &lt;code&gt;INFO&lt;/code&gt; functions are for queries.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Permissions.&lt;/strong&gt; Viewers cannot run them; they need semantic model admin rights (some workspace admin).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Unsupported features.&lt;/strong&gt; An &lt;code&gt;INFO&lt;/code&gt; function for a feature the model does not support may error.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Column names.&lt;/strong&gt; Raw &lt;code&gt;INFO&lt;/code&gt; functions use IDs (TableID) instead of names; use &lt;code&gt;INFO.VIEW&lt;/code&gt; or join them.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Live connections.&lt;/strong&gt; You read the remote model's metadata only with the needed rights.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/info-functions-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: INFO functions (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/info-view-measures-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: INFO.VIEW.MEASURES function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/dax-query-view&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Work with DAX query view&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Run query 1 in DAX query view, copy the result into your team's documentation, and run query 2 to find measures that need a description. &lt;a href=&quot;/blog/information-functions-dax-reference/&quot;&gt;Information functions&lt;/a&gt; are the other, value-level &amp;quot;IS&amp;quot; functions.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>MRR and ARR: monthly recurring revenue in DAX</title>
    <link href="https://data.benibix.com/blog/mrr-arr-kpi/"/>
    <id>https://data.benibix.com/blog/mrr-arr-kpi/</id>
    <published>2026-10-16T12:00:00Z</published>
    <updated>2026-10-16T12:00:00Z</updated>
    <summary>How to calculate monthly recurring revenue and annual recurring revenue from subscriptions, normalising annual and quarterly plans to a month, the MRR movements new, expansion, contraction, churn and reactivation, an MRR bridge as a waterfall, and the DAX on a subscriptions table.</summary>
    <category term="KPIs"/>
    <category term="SaaS and product"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;MRR (monthly recurring revenue)&lt;/strong&gt; = the sum of all active subscriptions' &lt;strong&gt;monthly&lt;/strong&gt; value on a date: an annual plan of 1,200 counts as 100 a month, not 1,200 in the month it was paid. &lt;strong&gt;ARR&lt;/strong&gt; = MRR × 12. One-off fees (setup, services) are not recurring and stay out. The change in MRR from one month to the next splits into &lt;strong&gt;new&lt;/strong&gt;, &lt;strong&gt;expansion&lt;/strong&gt; (upgrades), &lt;strong&gt;contraction&lt;/strong&gt; (downgrades), &lt;strong&gt;churn&lt;/strong&gt; (cancellations) and &lt;strong&gt;reactivation&lt;/strong&gt;: shown as a waterfall, this &lt;strong&gt;MRR bridge&lt;/strong&gt; says how the business grew.&lt;/p&gt;
&lt;p&gt;Invoiced revenue jumps when annual plans renew; MRR moves only when customers really join, change or leave. That makes it the main growth number for subscription businesses.&lt;/p&gt;
&lt;h2 id=&quot;how-do-the-movements-add-up&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-the-movements-add-up&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do the movements add up?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Movement&lt;/th&gt;&lt;th&gt;MRR&lt;/th&gt;&lt;th&gt;Customers&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Opening MRR, 1 Sep&lt;/td&gt;&lt;td&gt;200.0&lt;/td&gt;&lt;td&gt;2,000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;New&lt;/td&gt;&lt;td&gt;+12.0&lt;/td&gt;&lt;td&gt;105&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Expansion&lt;/td&gt;&lt;td&gt;+6.5&lt;/td&gt;&lt;td&gt;60&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Reactivation&lt;/td&gt;&lt;td&gt;+1.0&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Contraction&lt;/td&gt;&lt;td&gt;-2.5&lt;/td&gt;&lt;td&gt;25&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Churn&lt;/td&gt;&lt;td&gt;-5.0&lt;/td&gt;&lt;td&gt;50&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Closing MRR, 30 Sep&lt;/td&gt;&lt;td&gt;212.0&lt;/td&gt;&lt;td&gt;2,063&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;MRR movements in September (k)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;waterfall&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;waterfall chart: Opening MRR 200; New 12; Expansion 6.5; Reactivation 1; Contraction -2.5; Churn -5; Closing MRR total&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;628&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;50&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;628&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;628&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;150&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;628&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;200&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;628&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;250&lt;/text&gt;&lt;rect x=&quot;66.8&quot; y=&quot;64.4&quot; width=&quot;52.7&quot; height=&quot;201.6&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;93.1&quot; y=&quot;58.4&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;200&lt;/text&gt;&lt;line x1=&quot;119.5&quot; y1=&quot;64.4&quot; x2=&quot;149.1&quot; y2=&quot;64.4&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;93.1&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Opening MRR&lt;/text&gt;&lt;rect x=&quot;149.1&quot; y=&quot;52.3&quot; width=&quot;52.7&quot; height=&quot;12.1&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;175.4&quot; y=&quot;46.3&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;+12&lt;/text&gt;&lt;line x1=&quot;201.8&quot; y1=&quot;52.3&quot; x2=&quot;231.4&quot; y2=&quot;52.3&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;175.4&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;New&lt;/text&gt;&lt;rect x=&quot;231.4&quot; y=&quot;45.8&quot; width=&quot;52.7&quot; height=&quot;6.6&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;257.7&quot; y=&quot;39.8&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;+6.5&lt;/text&gt;&lt;line x1=&quot;284&quot; y1=&quot;45.8&quot; x2=&quot;313.7&quot; y2=&quot;45.8&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;257.7&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Expansion&lt;/text&gt;&lt;rect x=&quot;313.7&quot; y=&quot;44.7&quot; width=&quot;52.7&quot; height=&quot;1&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;340&quot; y=&quot;38.7&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;+1&lt;/text&gt;&lt;line x1=&quot;366.3&quot; y1=&quot;44.7&quot; x2=&quot;396&quot; y2=&quot;44.7&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;340&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Reactivation&lt;/text&gt;&lt;rect x=&quot;396&quot; y=&quot;44.7&quot; width=&quot;52.7&quot; height=&quot;2.5&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;422.3&quot; y=&quot;38.7&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;-2.5&lt;/text&gt;&lt;line x1=&quot;448.6&quot; y1=&quot;47.3&quot; x2=&quot;478.2&quot; y2=&quot;47.3&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;422.3&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Contraction&lt;/text&gt;&lt;rect x=&quot;478.2&quot; y=&quot;47.3&quot; width=&quot;52.7&quot; height=&quot;5&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;504.6&quot; y=&quot;41.3&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;-5&lt;/text&gt;&lt;line x1=&quot;530.9&quot; y1=&quot;52.3&quot; x2=&quot;560.5&quot; y2=&quot;52.3&quot; class=&quot;cn&quot;/&gt;&lt;text x=&quot;504.6&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Churn&lt;/text&gt;&lt;rect x=&quot;560.5&quot; y=&quot;52.3&quot; width=&quot;52.7&quot; height=&quot;213.7&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;586.9&quot; y=&quot;46.3&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;212&lt;/text&gt;&lt;text x=&quot;586.9&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Closing MRR&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;MRR bridge, September (k)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Net new MRR = 12 + 6.5 + 1 - 2.5 - 5 = &lt;strong&gt;+12k&lt;/strong&gt;, a growth of 6% in the month; ARR = 212 × 12 = &lt;strong&gt;2.54M&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;A Subscriptions table with one row per subscription period: Customer ID, Start Date, End Date (blank while active), Plan Price, Billing Months (1, 3 or 12):&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- calculated column: the monthly value of each subscription row&lt;/i&gt;
Monthly Value = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( Subscriptions&lt;i class=&quot;m&quot;&gt;[Plan Price]&lt;/i&gt;, Subscriptions&lt;i class=&quot;m&quot;&gt;[Billing Months]&lt;/i&gt; )

MRR =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; D = &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; (
            Subscriptions,
            Subscriptions&lt;i class=&quot;m&quot;&gt;[Start Date]&lt;/i&gt; &amp;lt;= D
                &amp;amp;&amp;amp; ( &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( Subscriptions&lt;i class=&quot;m&quot;&gt;[End Date]&lt;/i&gt; ) || Subscriptions&lt;i class=&quot;m&quot;&gt;[End Date]&lt;/i&gt; &amp;gt; D )
        ),
        Subscriptions&lt;i class=&quot;m&quot;&gt;[Monthly Value]&lt;/i&gt;
    )

ARR = &lt;i class=&quot;m&quot;&gt;[MRR]&lt;/i&gt; * &lt;i class=&quot;n&quot;&gt;12&lt;/i&gt;

MRR Opening = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[MRR]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DATEADD&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;FIRSTDATE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), -&lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, DAY ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;For the movements, compare each customer's MRR at the start and end of the month:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;MRR &lt;i class=&quot;f&quot;&gt;Movements&lt;/i&gt; (by type) =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; PStart = &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) - &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; PEnd = &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; T =
    &lt;i class=&quot;f&quot;&gt;ADDCOLUMNS&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Subscriptions&lt;i class=&quot;m&quot;&gt;[Customer ID]&lt;/i&gt; ),
        &lt;i class=&quot;s&quot;&gt;&amp;quot;@Start&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[MRR]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; = PStart ),
        &lt;i class=&quot;s&quot;&gt;&amp;quot;@End&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[MRR]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; = PEnd )
    )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; (
        T,
        &lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; S = [@Start]
        &lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; E = [@End]
        &lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
            &lt;i class=&quot;f&quot;&gt;SWITCH&lt;/i&gt; (
                &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'MRR Step'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Step]&lt;/i&gt; ),
                &lt;i class=&quot;s&quot;&gt;&amp;quot;New&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( S ) &amp;amp;&amp;amp; NOT &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( E ), E ),
                &lt;i class=&quot;s&quot;&gt;&amp;quot;Expansion&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( S &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; &amp;amp;&amp;amp; E &amp;gt; S, E - S ),
                &lt;i class=&quot;s&quot;&gt;&amp;quot;Contraction&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( S &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; &amp;amp;&amp;amp; E &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; &amp;amp;&amp;amp; E &amp;lt; S, E - S ),
                &lt;i class=&quot;s&quot;&gt;&amp;quot;Churn&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( S &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; &amp;amp;&amp;amp; &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( E ), - S )
            )
    )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;'MRR Step'&lt;/code&gt; is a small disconnected table (Step, Order) for the waterfall's categories. &amp;quot;New&amp;quot; here includes reactivated customers; to separate them, test whether the customer had any subscription before &lt;code&gt;PStart&lt;/code&gt;. Each &lt;code&gt;CALCULATE&lt;/code&gt; with &lt;code&gt;'Date'[Date] = ...&lt;/code&gt; replaces the period filter with a single day, where &lt;code&gt;MRR&lt;/code&gt; takes its &lt;code&gt;MAX&lt;/code&gt; date.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Booking annual plans in one month.&lt;/strong&gt; Normalise to a monthly value.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;One-off fees in MRR.&lt;/strong&gt; Setup and services inflate it; keep them in a separate revenue line.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Discounts.&lt;/strong&gt; Use the price actually charged; a 100% discount is not MRR.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Free trials.&lt;/strong&gt; Not MRR until they pay.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Currencies.&lt;/strong&gt; Convert at a fixed rate for MRR trends, or exchange-rate moves look like expansion.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/sumx-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SUMX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/addcolumns-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: ADDCOLUMNS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-waterfall-charts&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Waterfall charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add a monthly value column to your subscriptions, build MRR at month end, then the bridge. &lt;a href=&quot;/blog/net-revenue-retention-kpi/&quot;&gt;Net revenue retention&lt;/a&gt; uses the same movements for existing customers.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Narrative visual in Power BI: text that updates itself</title>
    <link href="https://data.benibix.com/blog/narrative-visual-power-bi/"/>
    <id>https://data.benibix.com/blog/narrative-visual-power-bi/</id>
    <published>2026-10-16T12:00:00Z</published>
    <updated>2026-10-16T12:00:00Z</updated>
    <summary>How the narrative (smart narrative) visual in Power BI writes text that updates with filters, Custom mode with dynamic values and Copilot mode with prompts, summaries of a page or one visual, the DAX for your own sentences, and its limits.</summary>
    <category term="Visuals"/>
    <category term="AI visuals"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; the &lt;strong&gt;narrative&lt;/strong&gt; visual (also called &lt;strong&gt;smart narrative&lt;/strong&gt;) puts text on a report page that changes with the data and the filters. It has two modes. &lt;strong&gt;Custom mode&lt;/strong&gt; writes a summary of the visuals on the page (or of one visual, from right-click, &lt;strong&gt;Summarize&lt;/strong&gt;) and lets you edit it and add &lt;strong&gt;dynamic values&lt;/strong&gt; bound to fields and measures. &lt;strong&gt;Copilot mode&lt;/strong&gt; writes the summary with AI from a prompt and needs a Copilot license. Both update when people slice and cross-filter.&lt;/p&gt;
&lt;p&gt;Charts show; people still ask &amp;quot;so what happened?&amp;quot;. A sentence like &amp;quot;Revenue grew 8.1% to 1.24 M, driven by Online, while Stores fell 2.3%&amp;quot; answers that, and when the reader picks a region, the sentence changes with it.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-narrative-say&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-narrative-say&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a narrative say?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:1&quot;&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Summary&lt;/b&gt;&lt;ul&gt;&lt;li&gt;Revenue for &lt;b&gt;2026&lt;/b&gt; is &lt;b&gt;1.24 M&lt;/b&gt;, &lt;b&gt;+8.1%&lt;/b&gt; against last year.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Online&lt;/b&gt; grew most (&lt;b&gt;+21.4%&lt;/b&gt;)&lt;/li&gt;&lt;li&gt;&lt;b&gt;Stores&lt;/b&gt; fell (&lt;b&gt;-2.3%&lt;/b&gt;).&lt;/li&gt;&lt;li&gt;The best month was &lt;b&gt;November&lt;/b&gt; with &lt;b&gt;152 K&lt;/b&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;A narrative as it appears on a sales page, with its dynamic values in bold&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Every bold part is a dynamic value: select &amp;quot;Austria&amp;quot; in a slicer and every number and name in the text changes.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-add-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-add-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you add one?&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;For the page&lt;/strong&gt;: in &lt;strong&gt;Visualizations&lt;/strong&gt; pick &lt;strong&gt;Narrative&lt;/strong&gt;. If Copilot mode opens, switch the drop-down to &lt;strong&gt;Custom&lt;/strong&gt;: Power BI writes an editable summary of the visuals on the page.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;For one visual&lt;/strong&gt;: right-click the visual, &lt;strong&gt;Summarize&lt;/strong&gt;. The summary appears and can be pinned to the page. Custom mode writes up to four summaries per visual, picking the most interesting things.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;With Copilot&lt;/strong&gt;: choose &lt;strong&gt;Copilot&lt;/strong&gt; in the visual, pick a suggested prompt or write your own (up to 10,000 characters), and choose which pages or visuals it summarises.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-edit-the-text-and-add-values&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-edit-the-text-and-add-values&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you edit the text and add values?&lt;/h2&gt;
&lt;p&gt;The text is an ordinary text box: type, delete, format. To add a number that stays live:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Select &lt;strong&gt;+ Value&lt;/strong&gt; in the text box.&lt;/li&gt;&lt;li&gt;Type a name or choose a field or measure under &lt;strong&gt;Data&lt;/strong&gt;, set its &lt;strong&gt;Summarization&lt;/strong&gt;, optionally a filter.&lt;/li&gt;&lt;li&gt;Format it: currency, decimals, thousands separator.&lt;/li&gt;&lt;li&gt;The &lt;strong&gt;Review&lt;/strong&gt; tab lists all values, to reuse, edit or delete them.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;When the current filters give no result for a value, a hidden-summary symbol appears instead.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-write-your-own-sentences-with-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-write-your-own-sentences-with-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you write your own sentences with DAX?&lt;/h2&gt;
&lt;p&gt;When the wording must be exact (a board report, a regulated text), a measure can write the sentence and a card or text box can show it:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue Sentence =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Rev = &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Growth = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( Rev - &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue LY]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Direction = &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( Growth &amp;gt;= &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;grew&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;fell&amp;quot;&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; BestChannel =
    &lt;i class=&quot;f&quot;&gt;MAXX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;TOPN&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Channel&lt;i class=&quot;m&quot;&gt;[Channel]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue vs LY %]&lt;/i&gt; ), Channel&lt;i class=&quot;m&quot;&gt;[Channel]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Revenue &amp;quot;&lt;/i&gt; &amp;amp; Direction &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot; &amp;quot;&lt;/i&gt; &amp;amp; &lt;i class=&quot;f&quot;&gt;FORMAT&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;ABS&lt;/i&gt; ( Growth ), &lt;i class=&quot;s&quot;&gt;&amp;quot;0.0%&amp;quot;&lt;/i&gt; )
        &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot; to &amp;quot;&lt;/i&gt; &amp;amp; &lt;i class=&quot;f&quot;&gt;FORMAT&lt;/i&gt; ( Rev, &lt;i class=&quot;s&quot;&gt;&amp;quot;#,0.00,,\ \M&amp;quot;&lt;/i&gt; )
        &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot;. The strongest channel was &amp;quot;&lt;/i&gt; &amp;amp; BestChannel &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot;.&amp;quot;&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;With 2026 selected this returns &amp;quot;Revenue grew 8.1% to 1.24 M. The strongest channel was Online.&amp;quot; The &lt;code&gt;FORMAT&lt;/code&gt; code &lt;code&gt;#,0.00,,&lt;/code&gt; divides by a million (each comma after the number is a thousand). &lt;a href=&quot;/blog/format-function-dax/&quot;&gt;FORMAT in DAX&lt;/a&gt; lists the codes.&lt;/p&gt;
&lt;h2 id=&quot;what-are-the-limits&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-limits&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the limits?&lt;/h2&gt;
&lt;p&gt;Microsoft lists that the narrative cannot be pinned to a dashboard, does not support dynamic values with conditional formatting (such as a data-bound title), and is not supported in Publish to web or Power BI Report Server. Copilot mode needs a Copilot license and capacity; Custom mode does not.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Generated text nobody checked.&lt;/strong&gt; Automatic summaries pick what is statistically interesting, not what matters to the reader. Edit them, keep the useful sentences.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Static numbers typed into the text.&lt;/strong&gt; A number typed by hand is wrong after the next refresh; make it a dynamic value.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Copilot text as the record.&lt;/strong&gt; AI summaries can phrase the same data differently each time; for wording that must not change, write the sentence with a measure.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too much text.&lt;/strong&gt; A paragraph next to every chart is a document, not a report. One summary per page is usually enough.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-smart-narrative&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create smart narrative summaries&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/copilot-create-narrative&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create a narrative visual with Copilot for Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/format-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: FORMAT function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add a Custom narrative to the main page, keep the two sentences that matter, and turn every number in them into a dynamic value. The &lt;a href=&quot;/blog/card-visual-power-bi/&quot;&gt;card visual&lt;/a&gt; shows the same numbers as tiles, with reference labels for context.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Power BI storage modes: Import, DirectQuery, Dual</title>
    <link href="https://data.benibix.com/blog/power-bi-storage-modes-import-directquery-dual/"/>
    <id>https://data.benibix.com/blog/power-bi-storage-modes-import-directquery-dual/</id>
    <published>2026-10-16T12:00:00Z</published>
    <updated>2026-10-16T12:00:00Z</updated>
    <summary>What the storage modes in Power BI do, Import, DirectQuery, Dual and Direct Lake, what each one costs, and how to pick one per table.</summary>
    <category term="Power BI"/>
    <category term="Modelling"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a table's &lt;strong&gt;storage mode&lt;/strong&gt; decides where Power BI gets its rows when a visual asks. &lt;strong&gt;Import&lt;/strong&gt; copies the data into the model and answers from memory: fastest, but only as fresh as the last refresh. &lt;strong&gt;DirectQuery&lt;/strong&gt; sends every query to the source: always current, but only as fast as the source. &lt;strong&gt;Dual&lt;/strong&gt; can do either, and suits dimensions in a model that mixes both. &lt;strong&gt;Direct Lake&lt;/strong&gt; reads Delta tables in OneLake directly.&lt;/p&gt;
&lt;p&gt;The mode is set per table, not per report, so most decisions are about which tables can wait for a refresh and which cannot.&lt;/p&gt;
&lt;h2 id=&quot;how-do-they-compare&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-they-compare&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do they compare?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Mode&lt;/th&gt;&lt;th&gt;Data lives&lt;/th&gt;&lt;th&gt;Fresh as&lt;/th&gt;&lt;th&gt;Speed&lt;/th&gt;&lt;th&gt;Watch out for&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Import&lt;/td&gt;&lt;td&gt;in the model&lt;/td&gt;&lt;td&gt;the last refresh&lt;/td&gt;&lt;td&gt;fastest&lt;/td&gt;&lt;td&gt;model size, refresh time&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DirectQuery&lt;/td&gt;&lt;td&gt;in the source&lt;/td&gt;&lt;td&gt;now&lt;/td&gt;&lt;td&gt;as fast as the source&lt;/td&gt;&lt;td&gt;source load, some DAX limits&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Dual&lt;/td&gt;&lt;td&gt;both&lt;/td&gt;&lt;td&gt;depends on the query&lt;/td&gt;&lt;td&gt;fast for slicers&lt;/td&gt;&lt;td&gt;must match its source&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Direct Lake&lt;/td&gt;&lt;td&gt;in OneLake, read when needed&lt;/td&gt;&lt;td&gt;the latest table version&lt;/td&gt;&lt;td&gt;close to Import&lt;/td&gt;&lt;td&gt;Fabric only, fallback rules&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Storage modes side by side&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-does-a-query-travel-in-each&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-a-query-travel-in-each&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does a query travel in each?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Visual asks for revenue by month&lt;/b&gt;&lt;span&gt;the same DAX either way&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Import&lt;/b&gt;&lt;span&gt;answered from the model's memory, no source call&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;DirectQuery&lt;/b&gt;&lt;span&gt;turned into SQL and sent to the source, every time&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;One visual, two paths&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;You can see the difference in Power BI Desktop with &lt;strong&gt;Performance analyzer&lt;/strong&gt;: an Import visual shows only a DAX query; a DirectQuery visual also shows the SQL it sent.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-choose-per-table&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-choose-per-table&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you choose per table?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Import by default.&lt;/strong&gt; Most models are small enough, and refresh limits are generous: up to 8 scheduled refreshes a day on Pro, 48 on Premium or PPU.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;DirectQuery for what must be live&lt;/strong&gt; or is too large to import, on a source built for it: indexed, columnstore, close to the gateway.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Dual for dimensions&lt;/strong&gt; that relate to both an Import and a DirectQuery fact, so a slicer does not query the source each time.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Direct Lake&lt;/strong&gt; when the data already lives as Delta tables in Fabric.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;DirectQuery on a busy production database.&lt;/strong&gt; Every slicer click becomes a query on the system people work in. Point it at a reporting copy.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Import of columns nobody uses.&lt;/strong&gt; Wide text columns and unique IDs make a model large. Remove what no visual needs.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Mixing modes without Dual.&lt;/strong&gt; A relationship between an Import dimension and a DirectQuery fact is a limited relationship and can be slow; Dual avoids it.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-storage-mode&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Manage storage mode in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-directquery-about&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Use DirectQuery in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/connect-data/refresh-data&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Data refresh in Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/blog/direct-lake-power-bi-explained/&quot;&gt;Direct Lake: Power BI reports straight from the lake&lt;/a&gt; covers the fourth mode in full, and &lt;a href=&quot;/blog/composite-models-power-bi-explained/&quot;&gt;composite models&lt;/a&gt; explains what happens when one model mixes them.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Retired Microsoft data and AI exams: what to take now</title>
    <link href="https://data.benibix.com/blog/retired-microsoft-exams-replacements/"/>
    <id>https://data.benibix.com/blog/retired-microsoft-exams-replacements/</id>
    <published>2026-10-16T12:00:00Z</published>
    <updated>2026-10-16T12:00:00Z</updated>
    <summary>The Microsoft data and AI exams that retired in 2025 and 2026 (DP-203, DP-100, AI-900, AI-102, AZ-204), when each retired, and the current exam that covers the same ground, so old study plans and course recommendations do not send you to an exam you cannot book.</summary>
    <category term="Exams"/>
    <category term="Choosing an exam"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; several popular exams can no longer be booked. &lt;strong&gt;AI-900&lt;/strong&gt; and &lt;strong&gt;AI-102&lt;/strong&gt; retired on 30 June 2026, &lt;strong&gt;DP-100&lt;/strong&gt; on 1 June 2026, &lt;strong&gt;AZ-204&lt;/strong&gt; on 31 July 2026, and &lt;strong&gt;DP-203&lt;/strong&gt; on 31 March 2025. The closest current exams are AI-901, AI-103, AI-300, AI-200, and DP-700 or DP-750. Check the date on any course or video before you follow it: many still teach a retired exam.&lt;/p&gt;
&lt;h2 id=&quot;which-exams-retired-and-what-is-closest-now&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-exams-retired-and-what-is-closest-now&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which exams retired, and what is closest now?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Retired exam&lt;/th&gt;&lt;th&gt;Retired on&lt;/th&gt;&lt;th&gt;Closest current exam&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;DP-203 Data Engineering on Azure&lt;/td&gt;&lt;td&gt;31 Mar 2025&lt;/td&gt;&lt;td&gt;DP-700 (Fabric) or DP-750 (Databricks)&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;DP-100 Data Science on Azure&lt;/td&gt;&lt;td&gt;1 Jun 2026&lt;/td&gt;&lt;td&gt;AI-300 Machine Learning Operations Engineer&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;AI-900 Azure AI Fundamentals&lt;/td&gt;&lt;td&gt;30 Jun 2026&lt;/td&gt;&lt;td&gt;AI-901 (same certification name)&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;AI-102 Azure AI Engineer&lt;/td&gt;&lt;td&gt;30 Jun 2026&lt;/td&gt;&lt;td&gt;AI-103 Azure AI Apps and Agents Developer&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;AZ-204 Azure Developer&lt;/td&gt;&lt;td&gt;31 Jul 2026&lt;/td&gt;&lt;td&gt;AI-200 Azure AI Cloud Developer&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Retired exams and the closest current exam&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The retirement dates come from each exam's study guide on Microsoft Learn. &amp;quot;Closest&amp;quot; is my reading of the skills lists, not an official mapping, except for AI-901, which leads to the same Azure AI Fundamentals certification as AI-900 did.&lt;/p&gt;
&lt;h2 id=&quot;what-changed-between-old-and-new&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-changed-between-old-and-new&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What changed between old and new?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:4&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;From Synapse to Fabric and Databricks&lt;/b&gt;&lt;ul&gt;&lt;li&gt;DP-203 taught Synapse and Data Factory&lt;/li&gt;&lt;li&gt;DP-700 and DP-750 teach the platforms teams use now&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;silver&quot;&gt;&lt;b&gt;From models to agents&lt;/b&gt;&lt;ul&gt;&lt;li&gt;AI-102 covered the AI services one by one&lt;/li&gt;&lt;li&gt;AI-103 is built around agents in Foundry&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;From describing to building&lt;/b&gt;&lt;span&gt;AI-901 spends 55-60% on building in Foundry, where AI-900 described services&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;From training to operating&lt;/b&gt;&lt;ul&gt;&lt;li&gt;DP-100 centred on training models&lt;/li&gt;&lt;li&gt;AI-300 covers running them and generative apps in production&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;What the new exams moved towards&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-happens-to-a-certification-you-already-earned&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-happens-to-a-certification-you-already-earned&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What happens to a certification you already earned?&lt;/h2&gt;
&lt;p&gt;Once a certification retires, no one can earn it any more, and Microsoft retires its renewal assessments too. If a certification is retiring before your expiry date, Learn tells you to renew before the retirement date. When it finally expires, the way forward is the current exam in the table. Fundamentals certifications never expire.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-spot-an-outdated-study-plan&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-spot-an-outdated-study-plan&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you spot an outdated study plan?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;The exam code is in the table above.&lt;/li&gt;&lt;li&gt;It names Synapse Analytics as the main platform for data engineering.&lt;/li&gt;&lt;li&gt;It describes Azure AI services one by one with no agents or Foundry.&lt;/li&gt;&lt;li&gt;The &amp;quot;skills measured&amp;quot; date it quotes is older than the one on the study guide.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/dp-203&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam DP-203 (retired)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/dp-100&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam DP-100 (retired)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/ai-900&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam AI-900 (retired)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/ai-102&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam AI-102 (retired)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/az-204&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam AZ-204 (retired)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/renew-your-microsoft-certification-faq&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Renewal FAQ&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Find the current exam in the table and read its guide: &lt;a href=&quot;/blog/dp-700-study-guide/&quot;&gt;DP-700&lt;/a&gt;, &lt;a href=&quot;/blog/dp-750-study-guide/&quot;&gt;DP-750&lt;/a&gt;, &lt;a href=&quot;/blog/ai-300-study-guide/&quot;&gt;AI-300&lt;/a&gt;, &lt;a href=&quot;/blog/ai-901-study-guide/&quot;&gt;AI-901&lt;/a&gt;, &lt;a href=&quot;/blog/ai-103-study-guide/&quot;&gt;AI-103&lt;/a&gt; or &lt;a href=&quot;/blog/ai-200-study-guide/&quot;&gt;AI-200&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Which Power BI chart for which question?</title>
    <link href="https://data.benibix.com/blog/which-power-bi-chart/"/>
    <id>https://data.benibix.com/blog/which-power-bi-chart/</id>
    <published>2026-10-16T12:00:00Z</published>
    <updated>2026-11-02T12:00:00Z</updated>
    <summary>A guide to picking the right Power BI visual by the question it answers, comparison, change over time, part of a whole, distribution, relationship, single numbers against a target, detail, geography and explanation, with an example of each and the charts to avoid.</summary>
    <category term="Visuals"/>
    <category term="Comparison"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; start from the question, not the chart. &lt;strong&gt;Compare&lt;/strong&gt; categories with a &lt;a href=&quot;/blog/bar-chart-power-bi/&quot;&gt;bar&lt;/a&gt; or &lt;a href=&quot;/blog/column-chart-power-bi/&quot;&gt;column chart&lt;/a&gt;. Show &lt;strong&gt;change over time&lt;/strong&gt; with a &lt;a href=&quot;/blog/line-chart-power-bi/&quot;&gt;line chart&lt;/a&gt;. Show &lt;strong&gt;part of a whole&lt;/strong&gt; with a &lt;a href=&quot;/blog/bar-chart-power-bi/&quot;&gt;stacked bar&lt;/a&gt;, a &lt;a href=&quot;/blog/donut-chart-power-bi/&quot;&gt;donut&lt;/a&gt; for two or three parts, or a &lt;a href=&quot;/blog/treemap-power-bi/&quot;&gt;treemap&lt;/a&gt; for many. Show a &lt;strong&gt;distribution&lt;/strong&gt; with a &lt;a href=&quot;/blog/histogram-power-bi/&quot;&gt;histogram&lt;/a&gt;, a &lt;strong&gt;relationship&lt;/strong&gt; with a &lt;a href=&quot;/blog/scatter-bubble-chart-power-bi/&quot;&gt;scatter chart&lt;/a&gt;, &lt;strong&gt;one number against a target&lt;/strong&gt; with a &lt;a href=&quot;/blog/card-visual-power-bi/&quot;&gt;card&lt;/a&gt; or &lt;a href=&quot;/blog/kpi-visual-power-bi/&quot;&gt;KPI visual&lt;/a&gt;, and &lt;strong&gt;detail&lt;/strong&gt; with a &lt;a href=&quot;/blog/table-visual-power-bi/&quot;&gt;table&lt;/a&gt; or &lt;a href=&quot;/blog/matrix-visual-power-bi/&quot;&gt;matrix&lt;/a&gt;. When in doubt, a sorted bar chart is rarely wrong.&lt;/p&gt;
&lt;p&gt;Power BI offers more than thirty visuals, and most pages that confuse readers use the wrong one for the question: a pie of twelve slices, a line through categories that have no order, a gauge for a number nobody set a target for.&lt;/p&gt;
&lt;p&gt;The video below shows a chart picked from pasted data in about a minute, with the best fit, the good alternatives and the reason for each.&lt;/p&gt;
&lt;h2 id=&quot;which-chart-answers-which-question&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-chart-answers-which-question&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which chart answers which question?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Question&lt;/th&gt;&lt;th&gt;First choice&lt;/th&gt;&lt;th&gt;Also good&lt;/th&gt;&lt;th&gt;Avoid&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Which is biggest?&lt;/td&gt;&lt;td&gt;sorted bar chart&lt;/td&gt;&lt;td&gt;column chart, table with data bars&lt;/td&gt;&lt;td&gt;pie with many slices&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;How did it change over time?&lt;/td&gt;&lt;td&gt;line chart&lt;/td&gt;&lt;td&gt;column chart for few periods, area&lt;/td&gt;&lt;td&gt;bar chart with dates downwards&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;What makes up the total?&lt;/td&gt;&lt;td&gt;stacked bar or column&lt;/td&gt;&lt;td&gt;treemap for many parts, donut for two or three&lt;/td&gt;&lt;td&gt;3D pie, more than six slices&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;How did we get from A to B?&lt;/td&gt;&lt;td&gt;waterfall chart&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;a table of differences&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;How are values spread?&lt;/td&gt;&lt;td&gt;histogram (column chart of bins)&lt;/td&gt;&lt;td&gt;scatter of points&lt;/td&gt;&lt;td&gt;average alone&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Do two measures move together?&lt;/td&gt;&lt;td&gt;scatter chart&lt;/td&gt;&lt;td&gt;bubble chart with a third measure&lt;/td&gt;&lt;td&gt;two line charts side by side&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Are we on target?&lt;/td&gt;&lt;td&gt;KPI visual or card with reference label&lt;/td&gt;&lt;td&gt;gauge, bullet chart&lt;/td&gt;&lt;td&gt;gauge without a target&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Where is it happening?&lt;/td&gt;&lt;td&gt;Azure Maps with bubbles&lt;/td&gt;&lt;td&gt;filled map for regions&lt;/td&gt;&lt;td&gt;map when the region does not matter&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;What drives it?&lt;/td&gt;&lt;td&gt;key influencers, decomposition tree&lt;/td&gt;&lt;td&gt;scatter with a trend line&lt;/td&gt;&lt;td&gt;guessing from a table&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;What exactly are the numbers?&lt;/td&gt;&lt;td&gt;table or matrix&lt;/td&gt;&lt;td&gt;paginated report for long lists&lt;/td&gt;&lt;td&gt;a chart with every label on&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;How do stages convert?&lt;/td&gt;&lt;td&gt;funnel chart&lt;/td&gt;&lt;td&gt;bar chart of stages&lt;/td&gt;&lt;td&gt;pie of stages&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Questions and the visuals that answer them&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-does-the-right-chart-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-the-right-chart-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does the right chart look like?&lt;/h2&gt;
&lt;p&gt;The same data, revenue by product category, answers &amp;quot;which is biggest&amp;quot; best as a sorted bar chart:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;bar&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;bar chart: Bikes 2,100; Accessories 420; Clothing 260; Components 120&quot;&gt;&lt;line x1=&quot;98.8&quot; y1=&quot;8&quot; x2=&quot;98.8&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;98.8&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;198.2&quot; y1=&quot;8&quot; x2=&quot;198.2&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;198.2&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;500&lt;/text&gt;&lt;line x1=&quot;297.7&quot; y1=&quot;8&quot; x2=&quot;297.7&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;297.7&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;1,000&lt;/text&gt;&lt;line x1=&quot;397.1&quot; y1=&quot;8&quot; x2=&quot;397.1&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;397.1&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;1,500&lt;/text&gt;&lt;line x1=&quot;496.6&quot; y1=&quot;8&quot; x2=&quot;496.6&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;496.6&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;2,000&lt;/text&gt;&lt;line x1=&quot;596&quot; y1=&quot;8&quot; x2=&quot;596&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;596&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;2,500&lt;/text&gt;&lt;rect x=&quot;98.8&quot; y=&quot;19.1&quot; width=&quot;417.6&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-blue&quot;/&gt;&lt;text x=&quot;522.4&quot; y=&quot;44.8&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;2,100&lt;/text&gt;&lt;text x=&quot;88.8&quot; y=&quot;44.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Bikes&lt;/text&gt;&lt;rect x=&quot;98.8&quot; y=&quot;84.6&quot; width=&quot;83.5&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;188.3&quot; y=&quot;110.3&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;420&lt;/text&gt;&lt;text x=&quot;88.8&quot; y=&quot;110.3&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Accessories&lt;/text&gt;&lt;rect x=&quot;98.8&quot; y=&quot;150.1&quot; width=&quot;51.7&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;156.5&quot; y=&quot;175.8&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;260&lt;/text&gt;&lt;text x=&quot;88.8&quot; y=&quot;175.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Clothing&lt;/text&gt;&lt;rect x=&quot;98.8&quot; y=&quot;215.6&quot; width=&quot;23.9&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;128.7&quot; y=&quot;241.3&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;120&lt;/text&gt;&lt;text x=&quot;88.8&quot; y=&quot;241.3&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Components&lt;/text&gt;&lt;line x1=&quot;98.8&quot; y1=&quot;8&quot; x2=&quot;98.8&quot; y2=&quot;270&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Revenue by category, sorted (thousands)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The same four categories as a pie make the reader compare angles: Accessories against Clothing is hard to call. As bars, the order and the gaps are plain.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-pick-for-time&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-pick-for-time&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you pick for time?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Periods&lt;/th&gt;&lt;th&gt;Chart&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;2 to 6 periods (quarters of one year)&lt;/td&gt;&lt;td&gt;column chart&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;7 or more, or a trend matters&lt;/td&gt;&lt;td&gt;line chart&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;a trend and a total per period&lt;/td&gt;&lt;td&gt;combo chart: columns for the total, a line for the rate&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;the trend of each part of the total&lt;/td&gt;&lt;td&gt;stacked area or &lt;a href=&quot;/blog/ribbon-chart-power-bi/&quot;&gt;ribbon chart&lt;/a&gt; for rank&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;a trend in a table or card&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;/blog/sparklines-power-bi/&quot;&gt;sparklines&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h2 id=&quot;which-dax-does-a-good-chart-usually-need&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-dax-does-a-good-chart-usually-need&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which DAX does a good chart usually need?&lt;/h2&gt;
&lt;p&gt;Most charts get clearer with one comparison measure: against last year, against target or as a share.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )

Revenue vs LY % =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; LY = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; - LY, LY )

Share of Total =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; ) ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Put the comparison in the tooltip or as a second, smaller visual, so the main chart keeps one message.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Unsorted bars.&lt;/strong&gt; Sort by value, unless the categories have an order of their own (months, sizes).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Lines through categories.&lt;/strong&gt; A line implies a sequence; regions have none.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too many series.&lt;/strong&gt; More than five lines or colours: use &lt;a href=&quot;/blog/small-multiples-power-bi/&quot;&gt;small multiples&lt;/a&gt; or highlight one series.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Axes that do not start at zero on bars.&lt;/strong&gt; The bar length is the value; a cut axis exaggerates differences. Lines may start elsewhere.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Decoration over data.&lt;/strong&gt; 3D, shadows and backgrounds slow reading; the &lt;a href=&quot;/blog/power-bi-report-design-pattern/&quot;&gt;report design pattern&lt;/a&gt; keeps a page calm.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;One chart, several questions.&lt;/strong&gt; Split it into two visuals.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-types-for-reports-and-q-and-a&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Visualization types in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/service-dashboards-design-tips&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Tips for designing a great Power BI dashboard&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/sameperiodlastyear-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SAMEPERIODLASTYEAR function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Write the question of each visual on your page as one sentence, then check it against the table above. Every chart in this list has its own post with the settings and DAX: start with the &lt;a href=&quot;/blog/bar-chart-power-bi/&quot;&gt;bar chart&lt;/a&gt; and the &lt;a href=&quot;/blog/line-chart-power-bi/&quot;&gt;line chart&lt;/a&gt;, which answer most questions.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>CALCULATE in DAX: the function explained with examples</title>
    <link href="https://data.benibix.com/blog/calculate-function-dax/"/>
    <id>https://data.benibix.com/blog/calculate-function-dax/</id>
    <published>2026-10-15T12:00:00Z</published>
    <updated>2026-10-15T12:00:00Z</updated>
    <summary>How CALCULATE works in DAX, evaluating an expression in a changed filter context, Boolean, table and modifier filters, how filters replace or add, context transition in rows, the order of evaluation, and ten everyday CALCULATE patterns with examples.</summary>
    <category term="DAX"/>
    <category term="Filter functions"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;code&gt;CALCULATE ( expression, filter1, filter2, ... )&lt;/code&gt; evaluates the expression in a &lt;strong&gt;changed filter context&lt;/strong&gt;. Each filter argument is a &lt;strong&gt;Boolean&lt;/strong&gt; condition on one table's columns (&lt;code&gt;'Product'[Color] = &amp;quot;Red&amp;quot;&lt;/code&gt;), a &lt;strong&gt;table&lt;/strong&gt; (&lt;code&gt;FILTER ( ... )&lt;/code&gt;, &lt;code&gt;DATESYTD ( ... )&lt;/code&gt;), or a &lt;strong&gt;modifier&lt;/strong&gt; (&lt;code&gt;REMOVEFILTERS&lt;/code&gt;, &lt;code&gt;ALL&lt;/code&gt;, &lt;code&gt;KEEPFILTERS&lt;/code&gt;, &lt;code&gt;USERELATIONSHIP&lt;/code&gt;, &lt;code&gt;CROSSFILTER&lt;/code&gt;). By default a filter on a column &lt;strong&gt;replaces&lt;/strong&gt; any existing filter on that column; wrap it in &lt;code&gt;KEEPFILTERS&lt;/code&gt; to &lt;strong&gt;add&lt;/strong&gt; to it. In a row context, &lt;code&gt;CALCULATE&lt;/code&gt; also turns the current row into a filter (context transition).&lt;/p&gt;
&lt;p&gt;Almost every useful measure beyond a plain sum uses &lt;code&gt;CALCULATE&lt;/code&gt;: last year, share of total, red products only, sales by ship date. Understanding what it does to the filters is most of understanding DAX.&lt;/p&gt;
&lt;h2 id=&quot;what-happens-step-by-step&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-happens-step-by-step&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What happens step by step?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Start&lt;/b&gt;&lt;span&gt;the filters of the cell: slicers, rows, columns, page filters&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Context transition&lt;/b&gt;&lt;span&gt;in a row context, the current row becomes a filter&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Modifiers&lt;/b&gt;&lt;span&gt;REMOVEFILTERS, ALL, USERELATIONSHIP, CROSSFILTER are applied&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Filters&lt;/b&gt;&lt;span&gt;each Boolean or table filter replaces the filter on its columns, or adds with KEEPFILTERS&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;bronze&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Evaluate&lt;/b&gt;&lt;span&gt;the expression runs in the result&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;How CALCULATE builds the new filter context&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The filter arguments are evaluated in the &lt;strong&gt;original&lt;/strong&gt; filter context, before any of them is applied.&lt;/p&gt;
&lt;h2 id=&quot;what-kinds-of-filters-are-there&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-kinds-of-filters-are-there&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What kinds of filters are there?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- Boolean filter: columns of one table, no measures, no nested CALCULATE&lt;/i&gt;
Red Revenue = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Color]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Red&amp;quot;&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- several conditions: AND by separate arguments, OR inside one&lt;/i&gt;
Red or Blue Revenue =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Color]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Red&amp;quot;&lt;/i&gt; || &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Color]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Blue&amp;quot;&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- table filter&lt;/i&gt;
YTD Revenue = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DATESYTD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )

&lt;i class=&quot;c&quot;&gt;-- modifier&lt;/i&gt;
All Products Revenue = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;REMOVEFILTERS&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;A Boolean filter is shorthand for a &lt;code&gt;FILTER ( ALL ( column ), condition )&lt;/code&gt;, which is why it replaces the existing filter on that column. Microsoft's rules for Boolean filters: columns from a single table, no measure references, no nested &lt;code&gt;CALCULATE&lt;/code&gt;, and no table-scanning functions except as arguments of aggregations (&lt;code&gt;'Sales'[OrderDateKey] = MAX ( 'Sales'[OrderDateKey] )&lt;/code&gt; is fine).&lt;/p&gt;
&lt;h2 id=&quot;replace-or-add&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#replace-or-add&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Replace or add?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Product color on the row&lt;/th&gt;&lt;th&gt;CALCULATE ( [Revenue], Color = &amp;quot;Red&amp;quot; )&lt;/th&gt;&lt;th&gt;CALCULATE ( [Revenue], KEEPFILTERS ( Color = &amp;quot;Red&amp;quot; ) )&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Blue&lt;/td&gt;&lt;td&gt;Red revenue (the row filter is replaced)&lt;/td&gt;&lt;td&gt;blank (Blue and Red at once)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Red&lt;/td&gt;&lt;td&gt;Red revenue&lt;/td&gt;&lt;td&gt;Red revenue&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;A matrix row filtered to Blue, with three measures&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Use the plain form for a fixed comparison (&amp;quot;Red, whatever the row&amp;quot;), and &lt;code&gt;KEEPFILTERS&lt;/code&gt; for &amp;quot;only the red part of what is already filtered&amp;quot;. See &lt;a href=&quot;/blog/keepfilters-dax/&quot;&gt;KEEPFILTERS&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-is-context-transition&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-context-transition&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is context transition?&lt;/h2&gt;
&lt;p&gt;In a calculated column or an iterator, there is a current row but no filter. &lt;code&gt;CALCULATE&lt;/code&gt; turns the row into an equivalent filter:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- calculated column on Customer&lt;/i&gt;
Customer Revenue = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Every measure reference is wrapped in an implicit &lt;code&gt;CALCULATE&lt;/code&gt;, so &lt;code&gt;[Revenue]&lt;/code&gt; inside &lt;code&gt;SUMX&lt;/code&gt; over customers is evaluated per customer. Details in &lt;a href=&quot;/blog/dax-filter-context-and-context-transition/&quot;&gt;filter context and context transition&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;which-calculate-patterns-come-up-every-day&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-calculate-patterns-come-up-every-day&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which CALCULATE patterns come up every day?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- 1 share of total&lt;/i&gt;
Share of All = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;REMOVEFILTERS&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt; ) ) )

&lt;i class=&quot;c&quot;&gt;-- 2 share of visible total&lt;/i&gt;
Share of Visible = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;ALLSELECTED&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt; ) ) )

&lt;i class=&quot;c&quot;&gt;-- 3 last year&lt;/i&gt;
Revenue LY = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )

&lt;i class=&quot;c&quot;&gt;-- 4 year to date&lt;/i&gt;
Revenue YTD = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DATESYTD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )

&lt;i class=&quot;c&quot;&gt;-- 5 one segment&lt;/i&gt;
Online Revenue = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, Sales&lt;i class=&quot;m&quot;&gt;[Channel]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Online&amp;quot;&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- 6 inactive relationship&lt;/i&gt;
Revenue by Ship Date = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;USERELATIONSHIP&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Ship Date]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )

&lt;i class=&quot;c&quot;&gt;-- 7 condition on a measure: needs FILTER over a column&lt;/i&gt;
Revenue from Big Customers =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;10000&lt;/i&gt; ) )

&lt;i class=&quot;c&quot;&gt;-- 8 count with a condition&lt;/i&gt;
Late Orders = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Orders ), Orders&lt;i class=&quot;m&quot;&gt;[Days Late]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- 9 ignore one filter, keep the others&lt;/i&gt;
Revenue All Regions = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;REMOVEFILTERS&lt;/i&gt; ( Region&lt;i class=&quot;m&quot;&gt;[Region]&lt;/i&gt; ) )

&lt;i class=&quot;c&quot;&gt;-- 10 last date's value (stock)&lt;/i&gt;
Closing Stock = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Stock&lt;i class=&quot;m&quot;&gt;[Units]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;LASTDATE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A measure in a Boolean filter.&lt;/strong&gt; &lt;code&gt;CALCULATE ( [Revenue], [Margin] &amp;gt; 0 )&lt;/code&gt; is not allowed; use &lt;code&gt;FILTER&lt;/code&gt; over the column you want to test (pattern 7).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Expecting AND across the same column.&lt;/strong&gt; &lt;code&gt;Color = &amp;quot;Red&amp;quot;, Color = &amp;quot;Blue&amp;quot;&lt;/code&gt; gives blank: both must be true at once.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Filtering a whole table with FILTER.&lt;/strong&gt; &lt;code&gt;FILTER ( Sales, Sales[Amount] &amp;gt; 100 )&lt;/code&gt; scans and filters every column of Sales; filter the column: &lt;code&gt;Sales[Amount] &amp;gt; 100&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Forgetting replacement.&lt;/strong&gt; A row filter on the same column is overwritten; the measure shows the same value on every row.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/calculate-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: CALCULATE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/best-practices/dax-avoid-avoid-filter-as-filter-argument&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Avoid using FILTER as a filter argument&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/keepfilters-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: KEEPFILTERS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Write patterns 1, 3 and 5 against your own model and put them next to &lt;code&gt;[Revenue]&lt;/code&gt; in a matrix by product and year. Then read &lt;a href=&quot;/blog/filter-function-dax/&quot;&gt;FILTER in DAX&lt;/a&gt; for conditions a Boolean filter cannot express.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Linked services and datasets in Azure Data Factory</title>
    <link href="https://data.benibix.com/blog/linked-service-and-dataset-azure-data-factory/"/>
    <id>https://data.benibix.com/blog/linked-service-and-dataset-azure-data-factory/</id>
    <published>2026-10-15T12:00:00Z</published>
    <updated>2026-10-15T12:00:00Z</updated>
    <summary>What a linked service and a dataset are in Azure Data Factory, how they differ, and how one parameterised dataset serves every table instead of one per table.</summary>
    <category term="Azure"/>
    <category term="Data Factory"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;linked service&lt;/strong&gt; is a connection: where the source is and how to sign in. A &lt;strong&gt;dataset&lt;/strong&gt; is a named piece of data on that connection: one table, one folder, one file. Activities read and write datasets. Give the dataset parameters and one of them serves every table on the connection.&lt;/p&gt;
&lt;p&gt;Most factories that grow messy have the same symptom: a dataset per table, each a copy of the last with one name changed. The fix is to understand which of the two holds what.&lt;/p&gt;
&lt;h2 id=&quot;how-do-they-fit-together&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-they-fit-together&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do they fit together?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Linked service&lt;/b&gt;&lt;span&gt;the server, the database, how to sign in&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Dataset&lt;/b&gt;&lt;span&gt;which table or file, with parameters&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Activity&lt;/b&gt;&lt;span&gt;a Copy reads one dataset and writes another&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Pipeline&lt;/b&gt;&lt;span&gt;runs the activities in order&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From a server to the rows a copy reads&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Question&lt;/th&gt;&lt;th&gt;Linked service&lt;/th&gt;&lt;th&gt;Dataset&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Where is it?&lt;/td&gt;&lt;td&gt;server and database&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;How do I sign in?&lt;/td&gt;&lt;td&gt;managed identity, key or password&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Which table or file?&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;schema and table, or folder and file&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Which columns?&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;an optional schema&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;How many do I need?&lt;/td&gt;&lt;td&gt;one per source&lt;/td&gt;&lt;td&gt;one per kind of data, with parameters&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Which holds what&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-does-a-parameterised-dataset-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-parameterised-dataset-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a parameterised dataset look like?&lt;/h2&gt;
&lt;p&gt;One dataset with two parameters reads any table on the connection:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;json&quot;&gt;&lt;code&gt;{
  &lt;i class=&quot;s&quot;&gt;&amp;quot;name&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;SqlTable&amp;quot;&lt;/i&gt;,
  &lt;i class=&quot;s&quot;&gt;&amp;quot;properties&amp;quot;&lt;/i&gt;: {
    &lt;i class=&quot;s&quot;&gt;&amp;quot;linkedServiceName&amp;quot;&lt;/i&gt;: { &lt;i class=&quot;s&quot;&gt;&amp;quot;referenceName&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;AzureSqlSales&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;type&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;LinkedServiceReference&amp;quot;&lt;/i&gt; },
    &lt;i class=&quot;s&quot;&gt;&amp;quot;parameters&amp;quot;&lt;/i&gt;: { &lt;i class=&quot;s&quot;&gt;&amp;quot;SchemaName&amp;quot;&lt;/i&gt;: { &lt;i class=&quot;s&quot;&gt;&amp;quot;type&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;string&amp;quot;&lt;/i&gt; }, &lt;i class=&quot;s&quot;&gt;&amp;quot;TableName&amp;quot;&lt;/i&gt;: { &lt;i class=&quot;s&quot;&gt;&amp;quot;type&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;string&amp;quot;&lt;/i&gt; } },
    &lt;i class=&quot;s&quot;&gt;&amp;quot;type&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;AzureSqlTable&amp;quot;&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;typeProperties&amp;quot;&lt;/i&gt;: {
      &lt;i class=&quot;s&quot;&gt;&amp;quot;schema&amp;quot;&lt;/i&gt;: { &lt;i class=&quot;s&quot;&gt;&amp;quot;value&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;@dataset().SchemaName&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;type&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;Expression&amp;quot;&lt;/i&gt; },
      &lt;i class=&quot;s&quot;&gt;&amp;quot;table&amp;quot;&lt;/i&gt;: { &lt;i class=&quot;s&quot;&gt;&amp;quot;value&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;@dataset().TableName&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;type&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;Expression&amp;quot;&lt;/i&gt; }
    }
  }
}&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;The Copy activity passes the values, usually from a ForEach over a control table: &lt;code&gt;@item().SchemaName&lt;/code&gt; and &lt;code&gt;@item().TableName&lt;/code&gt;. A new table is then a new row, not a new dataset.&lt;/p&gt;
&lt;h2 id=&quot;can-a-linked-service-take-parameters-too&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#can-a-linked-service-take-parameters-too&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Can a linked service take parameters too?&lt;/h2&gt;
&lt;p&gt;Yes. A linked service with a &lt;code&gt;DatabaseName&lt;/code&gt; parameter reaches several databases on one server, and the dataset passes the value on. Keep secrets out of parameters: point the linked service at &lt;strong&gt;Azure Key Vault&lt;/strong&gt; for passwords and keys, or better, sign in with the factory's managed identity so there is no secret at all.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A schema imported into a parameterised dataset.&lt;/strong&gt; A fixed column list on a dataset that reads many tables breaks the mapping for every table but one. Leave the schema empty and let the Copy activity map by name.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Connection details in the dataset.&lt;/strong&gt; Server names belong in the linked service; a dataset that hard-codes them cannot move between development and production.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;One linked service per environment by hand.&lt;/strong&gt; Use parameters in the ARM template or deployment, so the same factory points at test or production on release.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/data-factory/concepts-linked-services&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Linked services in Azure Data Factory&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/data-factory/concepts-datasets-linked-services&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Datasets in Azure Data Factory&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/data-factory/parameterize-linked-services&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Parameterize linked services&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/blog/metadata-driven-pipeline-azure-data-factory/&quot;&gt;Copy every table with one Data Factory pipeline&lt;/a&gt; puts the parameterised dataset to work with a control table, and the open course &lt;a href=&quot;/courses/metadata-driven-pipeline/&quot;&gt;Your first metadata-driven pipeline&lt;/a&gt; builds it in your own factory.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Measures vs calculated columns in DAX</title>
    <link href="https://data.benibix.com/blog/measures-vs-calculated-columns-dax/"/>
    <id>https://data.benibix.com/blog/measures-vs-calculated-columns-dax/</id>
    <published>2026-10-15T12:00:00Z</published>
    <updated>2026-10-15T12:00:00Z</updated>
    <summary>When to write a DAX measure and when a calculated column, how each is calculated (at query time or at refresh), what they cost in memory and speed, row context against filter context, calculated tables, and examples of each done right.</summary>
    <category term="DAX"/>
    <category term="Concepts"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;calculated column&lt;/strong&gt; is calculated once per row when the model refreshes and stored in the table, like any column; use it to slice, filter or group by the result (a price band, an age group). A &lt;strong&gt;measure&lt;/strong&gt; is calculated when a visual asks for it, for the filters of each cell, and stores nothing; use it for every number you aggregate (revenue, margin %, customer count). If the answer depends on what the reader has filtered, it must be a measure.&lt;/p&gt;
&lt;p&gt;Most slow, wrong or bloated Power BI models have the same root: a calculated column where a measure belonged. A &amp;quot;Margin %&amp;quot; column per sales line sums to nonsense in a total; a measure gets it right at every level.&lt;/p&gt;
&lt;h2 id=&quot;how-do-they-differ&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-they-differ&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do they differ?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Point&lt;/th&gt;&lt;th&gt;Calculated column&lt;/th&gt;&lt;th&gt;Measure&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Calculated&lt;/td&gt;&lt;td&gt;at refresh, once per row&lt;/td&gt;&lt;td&gt;at query time, per cell of a visual&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Stored&lt;/td&gt;&lt;td&gt;yes, in memory, compressed&lt;/td&gt;&lt;td&gt;no, only the formula&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Context&lt;/td&gt;&lt;td&gt;row context: the current row&lt;/td&gt;&lt;td&gt;filter context: the filters on the cell&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Use in slicers, axes, filters&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;no (except via field parameters or visual filters)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Responds to slicers&lt;/td&gt;&lt;td&gt;no, fixed at refresh&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Typical use&lt;/td&gt;&lt;td&gt;categories, bands, keys, flags&lt;/td&gt;&lt;td&gt;sums, ratios, counts, comparisons&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Calculated column against measure&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-does-each-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-each-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does each look like?&lt;/h2&gt;
&lt;p&gt;A calculated column on the Sales table, one value per row:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Line Amount = Sales&lt;i class=&quot;m&quot;&gt;[Quantity]&lt;/i&gt; * Sales&lt;i class=&quot;m&quot;&gt;[Unit Price]&lt;/i&gt;

Price Band =
&lt;i class=&quot;f&quot;&gt;SWITCH&lt;/i&gt; (
    &lt;i class=&quot;k&quot;&gt;TRUE&lt;/i&gt; (),
    Sales&lt;i class=&quot;m&quot;&gt;[Unit Price]&lt;/i&gt; &amp;lt; &lt;i class=&quot;n&quot;&gt;50&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Under 50&amp;quot;&lt;/i&gt;,
    Sales&lt;i class=&quot;m&quot;&gt;[Unit Price]&lt;/i&gt; &amp;lt; &lt;i class=&quot;n&quot;&gt;200&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;50 to 199&amp;quot;&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;200 and above&amp;quot;&lt;/i&gt;
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;Price Band&lt;/code&gt; can go on an axis or in a slicer. Measures, one value per cell of a visual:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue = &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Sales, Sales&lt;i class=&quot;m&quot;&gt;[Quantity]&lt;/i&gt; * Sales&lt;i class=&quot;m&quot;&gt;[Unit Price]&lt;/i&gt; )

Margin % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Cost]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;Revenue&lt;/code&gt; does not need the &lt;code&gt;Line Amount&lt;/code&gt; column: &lt;code&gt;SUMX&lt;/code&gt; multiplies row by row at query time, and the model stays smaller.&lt;/p&gt;
&lt;h2 id=&quot;why-is-a-ratio-column-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-is-a-ratio-column-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why is a ratio column wrong?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Line&lt;/th&gt;&lt;th&gt;Revenue&lt;/th&gt;&lt;th&gt;Cost&lt;/th&gt;&lt;th&gt;Margin % column&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;A&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;td&gt;60&lt;/td&gt;&lt;td&gt;40%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;B&lt;/td&gt;&lt;td&gt;900&lt;/td&gt;&lt;td&gt;810&lt;/td&gt;&lt;td&gt;10%&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;Total (column summed)&lt;/td&gt;&lt;td&gt;1,000&lt;/td&gt;&lt;td&gt;870&lt;/td&gt;&lt;td&gt;50%&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Total (measure)&lt;/td&gt;&lt;td&gt;1,000&lt;/td&gt;&lt;td&gt;870&lt;/td&gt;&lt;td&gt;13%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Margin % as a column summed in a total, against a measure&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The column's 40% and 10% add to 50%, or average to 25%. The true margin is 130 / 1,000 = 13%, which only a measure computes, because it divides the totals in each cell's filter context.&lt;/p&gt;
&lt;h2 id=&quot;what-do-they-cost&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-do-they-cost&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What do they cost?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Columns use memory.&lt;/strong&gt; Every row stores the value; a high-cardinality column (a decimal per row) compresses badly and grows the model. Columns are also recalculated at every refresh.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Measures use CPU at query time.&lt;/strong&gt; A heavy measure can slow a visual; a column can be faster when the logic is row by row and used in many measures.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Push columns upstream.&lt;/strong&gt; A column that does not depend on other tables is often better made in Power Query or in the source, where it is computed once and compresses better.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;when-is-a-calculated-column-the-right-choice&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-a-calculated-column-the-right-choice&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is a calculated column the right choice?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;You need the result &lt;strong&gt;on an axis, in a slicer or a filter&lt;/strong&gt;: bands, groups, flags (&amp;quot;Is Weekend&amp;quot;).&lt;/li&gt;&lt;li&gt;You need a &lt;strong&gt;relationship key&lt;/strong&gt; that does not exist in the source (a composite key).&lt;/li&gt;&lt;li&gt;The value depends on &lt;strong&gt;another table at row level&lt;/strong&gt;, for example the customer's first order date stored on the customer:&lt;/li&gt;&lt;/ul&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;First Order Date =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Order Date]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;On the Customer table, &lt;code&gt;CALCULATE&lt;/code&gt; turns the row into a filter (&lt;a href=&quot;/blog/dax-filter-context-and-context-transition/&quot;&gt;context transition&lt;/a&gt;), so each customer gets their own first date. Then &amp;quot;New customers by first order month&amp;quot; is a simple count.&lt;/p&gt;
&lt;h2 id=&quot;what-about-calculated-tables&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-about-calculated-tables&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What about calculated tables?&lt;/h2&gt;
&lt;p&gt;A &lt;strong&gt;calculated table&lt;/strong&gt; is a whole table from a DAX expression, built at refresh: a date table from &lt;code&gt;CALENDAR&lt;/code&gt;, a &lt;a href=&quot;/blog/field-parameters-power-bi/&quot;&gt;field parameter&lt;/a&gt; table, a disconnected table for a what-if slicer.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Date = &lt;i class=&quot;f&quot;&gt;CALENDAR&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;DATE&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;2022&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;DATE&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;2026&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;12&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;31&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Ratios as columns.&lt;/strong&gt; Percentages, averages and distinct counts per row add up wrongly; use measures.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Columns copying a measure's job.&lt;/strong&gt; &lt;code&gt;Line Amount&lt;/code&gt; as a column only to sum it later costs memory; &lt;code&gt;SUMX&lt;/code&gt; does it at query time.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Expecting a column to react to slicers.&lt;/strong&gt; It is fixed at refresh.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Implicit measures.&lt;/strong&gt; Dragging a numeric column and letting Power BI sum it works, but explicit measures are needed for calculation groups, field parameters and clear naming.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-measures&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create measures for data analysis in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-calculated-columns&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create calculated columns in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-calculated-tables&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create calculated tables in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Look for columns in your model that hold ratios or amounts only used in sums, and turn them into measures. &lt;a href=&quot;/blog/dax-row-context-explained/&quot;&gt;Row context explained&lt;/a&gt; shows why columns and iterators see one row at a time.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Quota attainment KPI: per rep, team and to date</title>
    <link href="https://data.benibix.com/blog/quota-attainment-kpi/"/>
    <id>https://data.benibix.com/blog/quota-attainment-kpi/</id>
    <published>2026-10-15T12:00:00Z</published>
    <updated>2026-10-15T12:00:00Z</updated>
    <summary>How to calculate sales quota attainment, closed won revenue divided by quota, per rep and per team, the share of reps at quota, attainment to date against a pro-rated quota, quotas stored per rep and quarter, the DAX with TREATAS, and a distribution chart of attainment.</summary>
    <category term="KPIs"/>
    <category term="Sales"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;quota attainment&lt;/strong&gt; = closed won revenue / quota, per rep and period. Report it two ways: the &lt;strong&gt;team's attainment&lt;/strong&gt; (total won / total quota) and the &lt;strong&gt;share of reps at or above 100%&lt;/strong&gt;, because one star can carry a team total while most reps miss. During the period, compare against a &lt;strong&gt;pro-rated quota&lt;/strong&gt; (quota × share of the period passed) or, better, against the pace of previous periods.&lt;/p&gt;
&lt;p&gt;A team at 102% of quota sounds healthy until you see that four of ten reps made it. Both numbers belong on the page.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Rep&lt;/th&gt;&lt;th&gt;Quota (k)&lt;/th&gt;&lt;th&gt;Won (k)&lt;/th&gt;&lt;th&gt;Attainment&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Ana&lt;/td&gt;&lt;td&gt;300&lt;/td&gt;&lt;td&gt;420&lt;/td&gt;&lt;td&gt;140%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ben&lt;/td&gt;&lt;td&gt;300&lt;/td&gt;&lt;td&gt;315&lt;/td&gt;&lt;td&gt;105%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Chen&lt;/td&gt;&lt;td&gt;300&lt;/td&gt;&lt;td&gt;300&lt;/td&gt;&lt;td&gt;100%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Dana&lt;/td&gt;&lt;td&gt;300&lt;/td&gt;&lt;td&gt;240&lt;/td&gt;&lt;td&gt;80%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Eli&lt;/td&gt;&lt;td&gt;300&lt;/td&gt;&lt;td&gt;195&lt;/td&gt;&lt;td&gt;65%&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Team&lt;/td&gt;&lt;td&gt;1,500&lt;/td&gt;&lt;td&gt;1,470&lt;/td&gt;&lt;td&gt;98%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Q3 attainment by rep&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Team attainment 98%; reps at quota 3 of 5 = &lt;strong&gt;60%&lt;/strong&gt;.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;bar&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;bar chart: Ana 140; Ben 105; Chen 100; Dana 80; Eli 65&quot;&gt;&lt;line x1=&quot;51.2&quot; y1=&quot;8&quot; x2=&quot;51.2&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;51.2&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;232.8&quot; y1=&quot;8&quot; x2=&quot;232.8&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;232.8&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;50&lt;/text&gt;&lt;line x1=&quot;414.4&quot; y1=&quot;8&quot; x2=&quot;414.4&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;414.4&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;596&quot; y1=&quot;8&quot; x2=&quot;596&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;596&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;150&lt;/text&gt;&lt;rect x=&quot;51.2&quot; y=&quot;16.9&quot; width=&quot;508.5&quot; height=&quot;32.6&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;565.7&quot; y=&quot;38.2&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;140&lt;/text&gt;&lt;text x=&quot;41.2&quot; y=&quot;38.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Ana&lt;/text&gt;&lt;rect x=&quot;51.2&quot; y=&quot;69.3&quot; width=&quot;381.4&quot; height=&quot;32.6&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;438.6&quot; y=&quot;90.6&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;105&lt;/text&gt;&lt;text x=&quot;41.2&quot; y=&quot;90.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Ben&lt;/text&gt;&lt;rect x=&quot;51.2&quot; y=&quot;121.7&quot; width=&quot;363.2&quot; height=&quot;32.6&quot; rx=&quot;3&quot; class=&quot;m t-teal&quot;/&gt;&lt;text x=&quot;420.4&quot; y=&quot;143&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;100&lt;/text&gt;&lt;text x=&quot;41.2&quot; y=&quot;143&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Chen&lt;/text&gt;&lt;rect x=&quot;51.2&quot; y=&quot;174.1&quot; width=&quot;290.6&quot; height=&quot;32.6&quot; rx=&quot;3&quot; class=&quot;m t-gold&quot;/&gt;&lt;text x=&quot;347.8&quot; y=&quot;195.4&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;80&lt;/text&gt;&lt;text x=&quot;41.2&quot; y=&quot;195.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Dana&lt;/text&gt;&lt;rect x=&quot;51.2&quot; y=&quot;226.5&quot; width=&quot;236.1&quot; height=&quot;32.6&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;293.3&quot; y=&quot;247.8&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;65&lt;/text&gt;&lt;text x=&quot;41.2&quot; y=&quot;247.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Eli&lt;/text&gt;&lt;line x1=&quot;51.2&quot; y1=&quot;8&quot; x2=&quot;51.2&quot; y2=&quot;270&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Attainment by rep (%)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;Quota has one row per Rep and Year Quarter. Rep is a dimension related to Opportunities.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Won Value = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Opportunities&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ), Opportunities&lt;i class=&quot;m&quot;&gt;[Status]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Won&amp;quot;&lt;/i&gt; )

Quota =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Quota&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;TREATAS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Quarter]&lt;/i&gt; ), Quota&lt;i class=&quot;m&quot;&gt;[Year Quarter]&lt;/i&gt; ),
    &lt;i class=&quot;f&quot;&gt;TREATAS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Rep&lt;i class=&quot;m&quot;&gt;[Rep]&lt;/i&gt; ), Quota&lt;i class=&quot;m&quot;&gt;[Rep]&lt;/i&gt; )
)

Attainment % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Won Value]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Quota]&lt;/i&gt; )

Reps at Quota % =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Reps = &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Rep&lt;i class=&quot;m&quot;&gt;[Rep]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Quota]&lt;/i&gt; &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; ( Reps, &lt;i class=&quot;m&quot;&gt;[Attainment %]&lt;/i&gt; &amp;gt;= &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; ) ), &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Reps ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;[Quota] &amp;gt; 0&lt;/code&gt; leaves out reps without a quota in the period (new hires, leavers).&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-track-attainment-during-the-quarter&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-track-attainment-during-the-quarter&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you track attainment during the quarter?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Quarter Elapsed % =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; AsOf = &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;TODAY&lt;/i&gt; () )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; QStart = &lt;i class=&quot;f&quot;&gt;STARTOFQUARTER&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; QEnd = &lt;i class=&quot;f&quot;&gt;ENDOFQUARTER&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( AsOf - QStart + &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, QEnd - QStart + &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; )

Pro-rated Quota = &lt;i class=&quot;m&quot;&gt;[Quota]&lt;/i&gt; * &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Quarter Elapsed %]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; )

Attainment to Date % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Won Value]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Pro-rated Quota]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Sales often close late in a quarter, so linear pro-rating flags reps too early. A better reference is the average share of the quarter's won value closed by the same week in the last four quarters.&lt;/p&gt;
&lt;h2 id=&quot;which-views-help&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-views-help&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which views help?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A distribution&lt;/strong&gt;: a histogram of reps by attainment band (under 50%, 50 to 80%, 80 to 100%, over 100%).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Attainment against pipeline coverage&lt;/strong&gt; per rep: low coverage today predicts low attainment next quarter (see &lt;a href=&quot;/blog/pipeline-coverage-kpi/&quot;&gt;pipeline coverage&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Trend&lt;/strong&gt;: attainment per rep over the last four quarters, to tell a bad quarter from a pattern.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Team total only.&lt;/strong&gt; Hides how many reps miss.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Quota changes mid-period.&lt;/strong&gt; Store quota history; recalculating with today's quota rewrites the past.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Split deals.&lt;/strong&gt; Deals credited to two reps count twice in rep totals; keep a credit table with shares.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Linear pro-rating.&lt;/strong&gt; Expect a late-quarter peak.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/treatas-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: TREATAS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/startofquarter-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: STARTOFQUARTER function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-grouping-and-binning&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create histograms in Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Show team attainment and reps at quota % side by side on the sales page. &lt;a href=&quot;/blog/price-volume-mix-analysis/&quot;&gt;Price, volume and mix&lt;/a&gt; explains why revenue moved.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Relative date slicers in Power BI: last 30 days, done right</title>
    <link href="https://data.benibix.com/blog/relative-date-slicer-power-bi/"/>
    <id>https://data.benibix.com/blog/relative-date-slicer-power-bi/</id>
    <published>2026-10-15T12:00:00Z</published>
    <updated>2026-10-15T12:00:00Z</updated>
    <summary>How relative date and time slicers and filters in Power BI keep &quot;last 30 days&quot; or &quot;last 2 full months&quot; current, calendar and rolling units, the date picker's Today, Last date and First date anchors, UTC, and the DAX alternative.</summary>
    <category term="Visuals"/>
    <category term="Filters and navigation"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;relative date&lt;/strong&gt; slicer or filter keeps a period like &amp;quot;last 30 days&amp;quot; or &amp;quot;last 2 calendar months&amp;quot; current every day, without anyone changing it. Set a slicer's &lt;strong&gt;Style&lt;/strong&gt; to &lt;strong&gt;Relative Date&lt;/strong&gt; (or use the &lt;strong&gt;Date picker&lt;/strong&gt; setting) and choose &lt;strong&gt;Last&lt;/strong&gt;, &lt;strong&gt;Next&lt;/strong&gt; or &lt;strong&gt;This&lt;/strong&gt;, a number, and a unit. Rolling units (&lt;strong&gt;Months&lt;/strong&gt;) end today; &lt;strong&gt;calendar&lt;/strong&gt; units (&lt;strong&gt;Months (Calendar)&lt;/strong&gt;) take only complete periods. The filter is calculated in &lt;strong&gt;UTC&lt;/strong&gt;, and the date picker can anchor on &lt;strong&gt;Today&lt;/strong&gt;, the &lt;strong&gt;last date&lt;/strong&gt; in the data, or the &lt;strong&gt;first date&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&amp;quot;Last month&amp;quot; fixed to September is wrong on 1 November. A relative date slicer moves by itself, which is what dashboards opened every morning need.&lt;/p&gt;
&lt;h2 id=&quot;rolling-or-calendar&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#rolling-or-calendar&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Rolling or calendar?&lt;/h2&gt;
&lt;p&gt;Microsoft's example, on 20 July with &amp;quot;Last 2&amp;quot;:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Unit&lt;/th&gt;&lt;th&gt;Shows&lt;/th&gt;&lt;th&gt;Includes&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Months&lt;/td&gt;&lt;td&gt;21 May to 20 July&lt;/td&gt;&lt;td&gt;the current partial month&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Months (Calendar)&lt;/td&gt;&lt;td&gt;1 May to 30 June&lt;/td&gt;&lt;td&gt;only the two complete months&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;&amp;quot;Last 2&amp;quot; months on 20 July&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The calendar units avoid comparing a half month with full ones. The units are Days, Weeks, Weeks (Calendar), Months, Months (Calendar), Years and Years (Calendar). &lt;strong&gt;This&lt;/strong&gt; takes no number: &amp;quot;This month&amp;quot;, &amp;quot;This year&amp;quot;.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-create-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-create-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you create one?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;Add a &lt;strong&gt;Slicer&lt;/strong&gt; with the &lt;strong&gt;date column&lt;/strong&gt; (not the auto date/time hierarchy; switch the field to the column itself).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Format visual, Slicer settings, Options, Style: Relative Date&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Choose &lt;strong&gt;Last&lt;/strong&gt;, &lt;strong&gt;Next&lt;/strong&gt; or &lt;strong&gt;This&lt;/strong&gt;, the number (for Last and Next) and the unit.&lt;/li&gt;&lt;li&gt;As a filter instead: drag the date to the &lt;strong&gt;Filters pane&lt;/strong&gt; (visual, page or all pages) and pick &lt;strong&gt;Relative date&lt;/strong&gt; as the filter type.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;The &lt;strong&gt;Date picker&lt;/strong&gt; setting offers the same relative choices plus a calendar and a slider for exact dates, and three anchors:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Today&lt;/strong&gt;: the range counts from the day the report is viewed (as the Relative Date style).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Last date&lt;/strong&gt;: from the latest date in the column, useful when the data lags behind (yesterday's load, last month's close).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;First date&lt;/strong&gt;: from the earliest date in the column.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-about-times-and-time-zones&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-about-times-and-time-zones&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What about times and time zones?&lt;/h2&gt;
&lt;p&gt;The &lt;strong&gt;relative time&lt;/strong&gt; slicer and filter work on date-time columns for windows like &amp;quot;last 60 minutes&amp;quot;, often with automatic page refresh. On a page or report level, all visuals use one shared &lt;strong&gt;anchor time&lt;/strong&gt; so they show the same window; it is set on page load, manual refresh, automatic refresh and model changes.&lt;/p&gt;
&lt;p&gt;Both relative date and time filters use &lt;strong&gt;UTC&lt;/strong&gt;: a model does not store time zones. A viewer in Vienna (UTC+1 or +2) at 00:30 sees &amp;quot;today&amp;quot; still as yesterday. If that matters, shift the dates into your time zone in Power Query, or use a DAX filter on local time.&lt;/p&gt;
&lt;h2 id=&quot;can-dax-do-the-same&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#can-dax-do-the-same&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Can DAX do the same?&lt;/h2&gt;
&lt;p&gt;When the period must be in a measure (a card that says &amp;quot;last 30 days&amp;quot; regardless of slicers), filter in DAX:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue Last &lt;i class=&quot;n&quot;&gt;30&lt;/i&gt; Days =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; (
    &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;,
    &lt;i class=&quot;f&quot;&gt;DATESINPERIOD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;TODAY&lt;/i&gt; (), -&lt;i class=&quot;n&quot;&gt;30&lt;/i&gt;, DAY )
)

Revenue Last &lt;i class=&quot;n&quot;&gt;2&lt;/i&gt; Full Months =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; EndPrev = &lt;i class=&quot;f&quot;&gt;EOMONTH&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;TODAY&lt;/i&gt; (), -&lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;DATESBETWEEN&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;EOMONTH&lt;/i&gt; ( EndPrev, -&lt;i class=&quot;n&quot;&gt;2&lt;/i&gt; ) + &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;, EndPrev ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;On 20 July, the second returns May and June, as the calendar slicer does. A calculated column on the date table makes a reusable flag:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Is Last &lt;i class=&quot;n&quot;&gt;30&lt;/i&gt; Days =
&lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; &amp;gt; &lt;i class=&quot;f&quot;&gt;TODAY&lt;/i&gt; () - &lt;i class=&quot;n&quot;&gt;30&lt;/i&gt; &amp;amp;&amp;amp; &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; &amp;lt;= &lt;i class=&quot;f&quot;&gt;TODAY&lt;/i&gt; ()&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;TODAY&lt;/code&gt; in a calculated column is evaluated at refresh, so the flag moves only when the model refreshes; in a measure it is evaluated at query time.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Half a month compared with full ones.&lt;/strong&gt; Use the calendar units for month-over-month views.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Data that lags.&lt;/strong&gt; &amp;quot;Last 7 days&amp;quot; from today shows an empty day if yesterday's data is not loaded yet; use the Last date anchor.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;UTC surprises.&lt;/strong&gt; Around midnight, &amp;quot;today&amp;quot; is UTC's today; shift times in the model if needed.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The auto date hierarchy.&lt;/strong&gt; The relative style needs the date column itself.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Publish to web.&lt;/strong&gt; Relative time filters are not supported there.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create a relative date slicer and filter in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/slicer-filter-relative-time&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create a relative time slicer or filter in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/datesinperiod-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DATESINPERIOD function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/eomonth-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: EOMONTH function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Give the main page a relative date slicer with a calendar unit and, if the data lags, the Last date anchor. &lt;a href=&quot;/blog/rolling-12-months-dax/&quot;&gt;Rolling 12 months in DAX&lt;/a&gt; builds the same windows inside measures.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Temporal tables in SQL Server, explained</title>
    <link href="https://data.benibix.com/blog/temporal-tables-sql-server-explained/"/>
    <id>https://data.benibix.com/blog/temporal-tables-sql-server-explained/</id>
    <published>2026-10-15T12:00:00Z</published>
    <updated>2026-10-15T12:00:00Z</updated>
    <summary>What a system-versioned temporal table is, how SQL Server keeps every old version of a row for you, and how to ask what the data looked like at any time.</summary>
    <category term="SQL"/>
    <category term="T-SQL"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;system-versioned temporal table&lt;/strong&gt; keeps the history of every row for you. Each row has two period columns, and when a row is updated or deleted, SQL Server moves the old version into a &lt;strong&gt;history table&lt;/strong&gt; with the time it was valid. You then ask &lt;code&gt;FOR SYSTEM_TIME AS OF '2026-03-01'&lt;/code&gt; and get the table exactly as it was at that moment. It works in SQL Server, Azure SQL Database and Azure SQL Managed Instance.&lt;/p&gt;
&lt;p&gt;&amp;quot;What was this customer's credit limit when we approved the order?&amp;quot; is hard to answer from a table that only holds today. A temporal table answers it with one clause.&lt;/p&gt;
&lt;h2 id=&quot;how-does-sql-server-keep-the-history&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-sql-server-keep-the-history&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does SQL Server keep the history?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Current table&lt;/b&gt;&lt;span&gt;Credit limit 5,000, valid since 1 January&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;UPDATE&lt;/b&gt;&lt;span&gt;the limit becomes 8,000 on 1 March&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;History table&lt;/b&gt;&lt;span&gt;gets the 5,000 row, valid 1 January to 1 March&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Current table&lt;/b&gt;&lt;span&gt;holds 8,000, valid since 1 March&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One update, two tables&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Nobody writes to the history table; the database does it in the same transaction as the change.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-create-one-and-ask-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-create-one-and-ask-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you create one and ask it?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;CREATE&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;TABLE&lt;/i&gt; dbo.&lt;i class=&quot;f&quot;&gt;Customer&lt;/i&gt; (
    CustomerID  int &lt;i class=&quot;k&quot;&gt;PRIMARY&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;KEY&lt;/i&gt;,
    Name        &lt;i class=&quot;f&quot;&gt;nvarchar&lt;/i&gt;(&lt;i class=&quot;n&quot;&gt;100&lt;/i&gt;) &lt;i class=&quot;k&quot;&gt;NOT&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;NULL&lt;/i&gt;,
    CreditLimit &lt;i class=&quot;f&quot;&gt;decimal&lt;/i&gt;(&lt;i class=&quot;n&quot;&gt;18&lt;/i&gt;,&lt;i class=&quot;n&quot;&gt;2&lt;/i&gt;) &lt;i class=&quot;k&quot;&gt;NOT&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;NULL&lt;/i&gt;,
    ValidFrom   datetime2 GENERATED ALWAYS &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; ROW START &lt;i class=&quot;k&quot;&gt;NOT&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;NULL&lt;/i&gt;,
    ValidTo     datetime2 GENERATED ALWAYS &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; ROW &lt;i class=&quot;k&quot;&gt;END&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;NOT&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;NULL&lt;/i&gt;,
    PERIOD FOR &lt;i class=&quot;f&quot;&gt;SYSTEM_TIME&lt;/i&gt; (ValidFrom, ValidTo)
)
&lt;i class=&quot;k&quot;&gt;WITH&lt;/i&gt; (SYSTEM_VERSIONING = &lt;i class=&quot;k&quot;&gt;ON&lt;/i&gt; (HISTORY_TABLE = dbo.CustomerHistory));&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- The table as it was on 15 February&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;SELECT&lt;/i&gt; CustomerID, CreditLimit
&lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; dbo.Customer FOR SYSTEM_TIME &lt;i class=&quot;k&quot;&gt;AS&lt;/i&gt; OF &lt;i class=&quot;s&quot;&gt;'2026-02-15'&lt;/i&gt;;

&lt;i class=&quot;c&quot;&gt;-- Every version of one customer&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;SELECT&lt;/i&gt; CreditLimit, ValidFrom, ValidTo
&lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; dbo.Customer FOR SYSTEM_TIME ALL
&lt;i class=&quot;k&quot;&gt;WHERE&lt;/i&gt; CustomerID = &lt;i class=&quot;n&quot;&gt;1042&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;ORDER&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;BY&lt;/i&gt; ValidFrom;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Clause&lt;/th&gt;&lt;th&gt;Rows&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;AS OF t&lt;/td&gt;&lt;td&gt;the versions valid at time t&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;FROM a TO b&lt;/td&gt;&lt;td&gt;versions valid at any point between a and b, b not included&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;BETWEEN a AND b&lt;/td&gt;&lt;td&gt;like FROM, with b included&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CONTAINED IN (a, b)&lt;/td&gt;&lt;td&gt;versions that started and ended inside the range&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ALL&lt;/td&gt;&lt;td&gt;every version, current and history&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;FOR SYSTEM_TIME and what it returns&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;temporal-table-or-slowly-changing-dimension&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#temporal-table-or-slowly-changing-dimension&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Temporal table or slowly changing dimension?&lt;/h2&gt;
&lt;p&gt;Both keep history, for different readers. A temporal table records &lt;strong&gt;when the database changed&lt;/strong&gt;, with system times, and suits the operational side: audits, &amp;quot;as of&amp;quot; questions, undoing a bad update. A &lt;a href=&quot;/blog/slowly-changing-dimensions-type-1-type-2/&quot;&gt;type 2 slowly changing dimension&lt;/a&gt; records &lt;strong&gt;when the business change took effect&lt;/strong&gt; and gives each version a key a fact table can point at. A warehouse can build its type 2 dimension from a temporal source.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;History that grows for ever.&lt;/strong&gt; Set a retention period (&lt;code&gt;HISTORY_RETENTION_PERIOD&lt;/code&gt;) on the table, or clean the history table on a schedule.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Times in UTC.&lt;/strong&gt; The period columns are in UTC. Convert before comparing with local business dates.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Bulk updates.&lt;/strong&gt; Updating every row writes every old row to history. Plan big corrections with that in mind.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/tables/temporal-tables&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Temporal tables&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/tables/querying-data-in-a-system-versioned-temporal-table&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Query data in a system-versioned temporal table&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/tables/manage-retention-of-historical-data-in-system-versioned-temporal-tables&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Manage retention of historical data in temporal tables&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Temporal tables are one of the specialised tables on &lt;a href=&quot;/blog/dp-800-study-guide/&quot;&gt;DP-800&lt;/a&gt;, and the open course &lt;a href=&quot;/courses/upserts-into-azure-sql/&quot;&gt;Upserts into Azure SQL&lt;/a&gt; builds a target table that could keep its history this way.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>What makes a good KPI? A checklist with examples</title>
    <link href="https://data.benibix.com/blog/what-makes-a-good-kpi/"/>
    <id>https://data.benibix.com/blog/what-makes-a-good-kpi/</id>
    <published>2026-10-15T12:00:00Z</published>
    <updated>2026-11-02T12:00:00Z</updated>
    <summary>What separates a key performance indicator from any other metric, the parts every KPI needs (definition, formula, target, owner, direction, frequency), leading and lagging indicators, KPI trees from goal to driver, how many KPIs a dashboard should have, and examples of weak KPIs made good.</summary>
    <category term="KPIs"/>
    <category term="Basics"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;KPI&lt;/strong&gt; (key performance indicator) is a metric tied to a goal, with a &lt;strong&gt;target&lt;/strong&gt; and an &lt;strong&gt;owner&lt;/strong&gt; who can act on it. Every metric is a number; a KPI also says what good looks like and who moves it. A good KPI has seven parts written down: a &lt;strong&gt;name&lt;/strong&gt;, a &lt;strong&gt;definition&lt;/strong&gt; in one sentence, an exact &lt;strong&gt;formula&lt;/strong&gt; (with what is included and excluded), a &lt;strong&gt;target&lt;/strong&gt;, a &lt;strong&gt;direction&lt;/strong&gt; (higher or lower is better), an &lt;strong&gt;owner&lt;/strong&gt;, and a &lt;strong&gt;frequency&lt;/strong&gt; of review. Pair &lt;strong&gt;lagging&lt;/strong&gt; KPIs (revenue, churn: they report the result) with &lt;strong&gt;leading&lt;/strong&gt; ones (pipeline, activation: they predict it).&lt;/p&gt;
&lt;p&gt;Dashboards often show forty numbers and nobody knows which one matters. A short list of real KPIs, each with a target and an owner, turns a report into a tool for decisions.&lt;/p&gt;
&lt;p&gt;The short video below explains how a KPI differs from an ordinary metric, and the two things every KPI needs.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-difference-between-a-metric-and-a-kpi&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-difference-between-a-metric-and-a-kpi&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the difference between a metric and a KPI?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Number&lt;/th&gt;&lt;th&gt;Metric&lt;/th&gt;&lt;th&gt;KPI&lt;/th&gt;&lt;th&gt;What makes it a KPI&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Website sessions&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;nobody owns a target for it&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Revenue&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td&gt;target 2.4M this year, owner: sales lead&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Orders shipped on time and in full&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td&gt;target 95%, owner: logistics&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Page views per article&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;interesting, no decision depends on it&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Customer churn rate&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td&gt;target under 2% a month, owner: customer success&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Metric or KPI?&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;which-parts-must-every-kpi-have&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-parts-must-every-kpi-have&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which parts must every KPI have?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Part&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Name&lt;/td&gt;&lt;td&gt;On-time in-full (OTIF)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Definition&lt;/td&gt;&lt;td&gt;share of order lines delivered on the promised date with the full quantity&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Formula&lt;/td&gt;&lt;td&gt;order lines on time and in full / all order lines due in the period&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Includes, excludes&lt;/td&gt;&lt;td&gt;excludes orders cancelled by the customer; promised date = first confirmed date&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Target&lt;/td&gt;&lt;td&gt;95% each month&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Direction&lt;/td&gt;&lt;td&gt;higher is better&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Owner&lt;/td&gt;&lt;td&gt;head of logistics&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Frequency&lt;/td&gt;&lt;td&gt;weekly review, monthly target&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Source&lt;/td&gt;&lt;td&gt;ERP deliveries table, refreshed daily&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;A KPI written down: On-time in-full (OTIF)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Writing the formula down settles arguments before they start: does &amp;quot;revenue&amp;quot; include returns, tax, shipping? Two teams with two definitions report two numbers and lose trust in both.&lt;/p&gt;
&lt;h2 id=&quot;what-are-leading-and-lagging-indicators&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-leading-and-lagging-indicators&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are leading and lagging indicators?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;The goal&lt;/b&gt;&lt;span&gt;grow revenue 15% this year&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Lagging&lt;/b&gt;&lt;span&gt;report the result after it happened: revenue, profit margin, churn rate&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Leading&lt;/b&gt;&lt;span&gt;move earlier and predict the result: pipeline coverage, win rate, trial activations&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Leading and lagging KPIs&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;A lagging KPI tells you whether you won; a leading one tells you in time to change something. A sales dashboard with only revenue shows the problem a quarter late; adding &lt;a href=&quot;/blog/pipeline-coverage-kpi/&quot;&gt;pipeline coverage&lt;/a&gt; shows it now.&lt;/p&gt;
&lt;h2 id=&quot;how-does-a-kpi-tree-connect-goals-to-actions&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-a-kpi-tree-connect-goals-to-actions&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does a KPI tree connect goals to actions?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Revenue&lt;/b&gt;&lt;span&gt;the goal KPI&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Customers × orders per customer × average order value&lt;/b&gt;&lt;span&gt;its drivers&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;New customers, repeat rate, basket size&lt;/b&gt;&lt;span&gt;KPIs teams can move&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Campaigns, onboarding, bundles&lt;/b&gt;&lt;span&gt;actions&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;A revenue KPI tree&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Break the top KPI into multiplied or added parts until each part has an owner who can act. Revenue nobody can move directly; &lt;a href=&quot;/blog/average-order-value-kpi/&quot;&gt;average order value&lt;/a&gt; a merchandising team can.&lt;/p&gt;
&lt;h2 id=&quot;how-many-kpis-should-a-dashboard-show&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-many-kpis-should-a-dashboard-show&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How many KPIs should a dashboard show?&lt;/h2&gt;
&lt;p&gt;A common rule of thumb: &lt;strong&gt;three to seven&lt;/strong&gt; per audience. An executive page shows the goal KPIs; each team's page shows its drivers. If everything is a KPI, nothing is.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-turn-a-weak-kpi-into-a-good-one&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-turn-a-weak-kpi-into-a-good-one&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you turn a weak KPI into a good one?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Weak&lt;/th&gt;&lt;th&gt;Problem&lt;/th&gt;&lt;th&gt;Good&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Customer satisfaction&lt;/td&gt;&lt;td&gt;no formula, no target&lt;/td&gt;&lt;td&gt;CSAT: share of 4 and 5 ratings on post-ticket surveys, target 85%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Number of sales calls&lt;/td&gt;&lt;td&gt;activity, not outcome&lt;/td&gt;&lt;td&gt;win rate of qualified opportunities, target 25%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Revenue (all)&lt;/td&gt;&lt;td&gt;no owner can act on all of it&lt;/td&gt;&lt;td&gt;revenue from new customers, owner: acquisition lead&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Average delivery time&lt;/td&gt;&lt;td&gt;hides the late tail&lt;/td&gt;&lt;td&gt;share of orders delivered within 2 days, target 90%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Weak KPIs made good&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-build-a-kpi-in-power-bi&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-a-kpi-in-power-bi&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build a KPI in Power BI?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;OTIF % =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Deliveries ), Deliveries&lt;i class=&quot;m&quot;&gt;[On Time]&lt;/i&gt; = &lt;i class=&quot;k&quot;&gt;TRUE&lt;/i&gt; (), Deliveries&lt;i class=&quot;m&quot;&gt;[In Full]&lt;/i&gt; = &lt;i class=&quot;k&quot;&gt;TRUE&lt;/i&gt; () ),
    &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Deliveries )
)

OTIF Target = &lt;i class=&quot;n&quot;&gt;0.95&lt;/i&gt;

OTIF Status = &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[OTIF %]&lt;/i&gt; &amp;gt;= &lt;i class=&quot;m&quot;&gt;[OTIF Target]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;On target&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Below target&amp;quot;&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Show it with a &lt;a href=&quot;/blog/kpi-visual-power-bi/&quot;&gt;KPI visual&lt;/a&gt; or a card with a target, and track it over time with &lt;a href=&quot;/blog/goals-scorecards-power-bi/&quot;&gt;goals and scorecards&lt;/a&gt;. The pattern for every KPI: &lt;a href=&quot;/blog/kpi-actual-target-variance-dax/&quot;&gt;actual, target and variance&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Vanity metrics.&lt;/strong&gt; Numbers that only go up (total sign-ups ever) and lead to no decision.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;No target.&lt;/strong&gt; Without &amp;quot;good&amp;quot;, the number cannot be red or green.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Ratios without counts.&lt;/strong&gt; 50% conversion from 4 visitors means nothing; show the base next to it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Gaming.&lt;/strong&gt; A KPI people are judged on gets optimised, sometimes against the goal (calls made, not deals won); pair it with a balancing KPI.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Definitions that drift.&lt;/strong&gt; Keep the written definition with the measure (its description) and review it yearly.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-kpi&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create key performance indicator (KPI) visualizations&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/service-goals-introduction&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Get started with goals in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/service-dashboards-design-tips&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Tips for designing a great Power BI dashboard&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Write the card above for your three most important numbers, and put the definition in each measure's description. Then build them with &lt;a href=&quot;/blog/kpi-actual-target-variance-dax/&quot;&gt;actual, target and variance&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Customer lifetime value (CLV): formulas and DAX</title>
    <link href="https://data.benibix.com/blog/customer-lifetime-value-kpi/"/>
    <id>https://data.benibix.com/blog/customer-lifetime-value-kpi/</id>
    <published>2026-10-14T12:00:00Z</published>
    <updated>2026-10-14T12:00:00Z</updated>
    <summary>How to calculate customer lifetime value, historical CLV from what customers have spent, the simple predictive formula for shops (order value, frequency, margin, lifespan), the subscription formula (monthly margin divided by churn), CLV by cohort and channel, the DAX for each, and the mistakes that inflate it.</summary>
    <category term="KPIs"/>
    <category term="Customers"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;customer lifetime value (CLV or LTV)&lt;/strong&gt; is the profit a customer brings over their whole relationship. Three common ways: &lt;strong&gt;historical&lt;/strong&gt; CLV = gross profit per customer so far, by cohort; &lt;strong&gt;shop formula&lt;/strong&gt; = average order value × orders per year × gross margin % × expected years as a customer; &lt;strong&gt;subscription formula&lt;/strong&gt; = monthly revenue per customer × gross margin % / monthly churn rate. With 50 a month, 80% margin and 2.5% churn: 50 × 0.8 / 0.025 = &lt;strong&gt;1,600&lt;/strong&gt;. Use margin, not revenue, or CLV overstates what you can spend to win a customer.&lt;/p&gt;
&lt;p&gt;CLV sets the ceiling on acquisition cost: if a customer is worth 1,600 in profit, spending 2,000 to win one loses money however fast you grow.&lt;/p&gt;
&lt;h2 id=&quot;how-do-the-formulas-compare&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-the-formulas-compare&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do the formulas compare?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Method&lt;/th&gt;&lt;th&gt;Formula&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;th&gt;CLV&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Historical (24 months)&lt;/td&gt;&lt;td&gt;gross profit of the cohort / customers in the cohort&lt;/td&gt;&lt;td&gt;384,000 / 600&lt;/td&gt;&lt;td&gt;640 so far&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Shop&lt;/td&gt;&lt;td&gt;AOV × orders per year × margin % × years&lt;/td&gt;&lt;td&gt;80 × 3 × 40% × 4&lt;/td&gt;&lt;td&gt;384&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Subscription&lt;/td&gt;&lt;td&gt;ARPA per month × margin % / monthly churn&lt;/td&gt;&lt;td&gt;50 × 80% / 2.5%&lt;/td&gt;&lt;td&gt;1,600&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Three ways to estimate CLV&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Historical CLV is a fact but grows as the cohort ages; formula CLV is an estimate for the whole life.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;line&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;2025 H1 cohort&lt;/li&gt;&lt;li class=&quot;k1&quot;&gt;2025 H2 cohort&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;line chart: 3 months 160, 175; 6 months 270, 300; 12 months 420, 470; 18 months 540, 600; 24 months 640, 710&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;203&quot; x2=&quot;626&quot; y2=&quot;203&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;207&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;200&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;140&quot; x2=&quot;626&quot; y2=&quot;140&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;144&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;400&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;77&quot; x2=&quot;626&quot; y2=&quot;77&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;81&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;600&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;626&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;800&lt;/text&gt;&lt;polyline points=&quot;52,210.9 195.5,171.5 339,118 482.5,77 626,42.4&quot; class=&quot;ln k1&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;210.9&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;195.5&quot; cy=&quot;171.5&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;339&quot; cy=&quot;118&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;482.5&quot; cy=&quot;77&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;42.4&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;polyline points=&quot;52,215.6 195.5,181 339,133.7 482.5,95.9 626,64.4&quot; class=&quot;ln k0&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;215.6&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;195.5&quot; cy=&quot;181&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;339&quot; cy=&quot;133.7&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;482.5&quot; cy=&quot;95.9&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;64.4&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;text x=&quot;52&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;3 months&lt;/text&gt;&lt;text x=&quot;195.5&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;6 months&lt;/text&gt;&lt;text x=&quot;339&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;12 months&lt;/text&gt;&lt;text x=&quot;482.5&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;18 months&lt;/text&gt;&lt;text x=&quot;626&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;24 months&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Cumulative gross profit per customer by cohort age (historical CLV)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The later cohort earns more at every age: CLV is improving.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Customers = &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Customer ID]&lt;/i&gt; )
Gross Profit = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ) - &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Cost]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- historical: profit per customer so far&lt;/i&gt;
Historical CLV = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Gross Profit]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Customers]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- shop formula, with expected lifespan as an input (or 1 / annual churn)&lt;/i&gt;
AOV = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Order ID]&lt;/i&gt; ) )
Orders per Customer per Year =
&lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;DISTINCTCOUNT&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Order ID]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[Customers]&lt;/i&gt; ) / &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt; ), &lt;i class=&quot;n&quot;&gt;365&lt;/i&gt; )
Gross Margin % = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Gross Profit]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; ) )
Expected Years = &lt;i class=&quot;n&quot;&gt;4&lt;/i&gt;

Shop CLV = &lt;i class=&quot;m&quot;&gt;[AOV]&lt;/i&gt; * &lt;i class=&quot;m&quot;&gt;[Orders per Customer per Year]&lt;/i&gt; * &lt;i class=&quot;m&quot;&gt;[Gross Margin %]&lt;/i&gt; * &lt;i class=&quot;m&quot;&gt;[Expected Years]&lt;/i&gt;

&lt;i class=&quot;c&quot;&gt;-- subscription formula&lt;/i&gt;
ARPA = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[MRR]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Active Customers]&lt;/i&gt; )
Subscription CLV = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[ARPA]&lt;/i&gt; * &lt;i class=&quot;m&quot;&gt;[Gross Margin %]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Monthly Churn Rate]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;[MRR]&lt;/code&gt;, &lt;code&gt;[Active Customers]&lt;/code&gt; and &lt;code&gt;[Monthly Churn Rate]&lt;/code&gt; come from the &lt;a href=&quot;/blog/mrr-arr-kpi/&quot;&gt;MRR&lt;/a&gt; and &lt;a href=&quot;/blog/customer-churn-rate-kpi/&quot;&gt;churn rate&lt;/a&gt; posts. &lt;code&gt;Expected Years&lt;/code&gt; can come from churn: with 22% annual churn, expected lifetime is about 1 / 0.22 = 4.5 years. For historical CLV by cohort, put the cohort month on rows and months since first purchase on columns, as in &lt;a href=&quot;/blog/customer-retention-cohort-kpi/&quot;&gt;cohort retention&lt;/a&gt;, with a running total of gross profit per customer.&lt;/p&gt;
&lt;h2 id=&quot;which-breakdowns-matter&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-breakdowns-matter&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which breakdowns matter?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;By acquisition channel&lt;/strong&gt;: referral customers often have a higher CLV than paid-social ones; compare with each channel's &lt;a href=&quot;/blog/customer-acquisition-cost-kpi/&quot;&gt;acquisition cost&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;By first product or plan&lt;/strong&gt;: what customers start with predicts what they are worth.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;By cohort&lt;/strong&gt;: is CLV improving?&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;The ratio of the two is &lt;a href=&quot;/blog/ltv-to-cac-kpi/&quot;&gt;LTV to CAC&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Revenue instead of margin.&lt;/strong&gt; A 1,600 revenue CLV at 30% margin is 480 of profit.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Churn from a young base.&lt;/strong&gt; Early churn is often higher; a churn rate from the first months understates lifetime, from loyal years overstates it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;No discounting.&lt;/strong&gt; Profit in five years is worth less than today; for long lifetimes, discount future margin.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Averages over very different customers.&lt;/strong&gt; A few large accounts lift the mean; segment first.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/distinctcount-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DISTINCTCOUNT function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/divide-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DIVIDE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/xnpv-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: XNPV function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Calculate historical CLV for each half-year cohort at 6, 12 and 24 months: it needs no assumptions. &lt;a href=&quot;/blog/net-promoter-score-kpi/&quot;&gt;Net Promoter Score&lt;/a&gt; shows how customers feel about staying.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Direct Lake: Power BI reports straight from the lake</title>
    <link href="https://data.benibix.com/blog/direct-lake-power-bi-explained/"/>
    <id>https://data.benibix.com/blog/direct-lake-power-bi-explained/</id>
    <published>2026-10-14T12:00:00Z</published>
    <updated>2026-10-14T12:00:00Z</updated>
    <summary>A Direct Lake semantic model reads gold Delta tables in OneLake, so a report shows new data without an import refresh. How it works, the two kinds, and what makes it fall back.</summary>
    <category term="Power BI"/>
    <category term="Modelling"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;Direct Lake&lt;/strong&gt; is a storage mode for semantic model tables in Microsoft Fabric. It loads columns from Delta tables in OneLake into memory when a query needs them, and answers with the same engine as Import. Its &amp;quot;refresh&amp;quot; copies no data, only points the model at the newest version of each table, so new rows in gold show up in a report within seconds of being written.&lt;/p&gt;
&lt;p&gt;Import is fast to query but copies every row on every refresh, which takes time and capacity as the data grows. DirectQuery copies nothing but sends every visual's query to the source, which is slower. Direct Lake takes the speed of the first and the freshness of the second, as long as the data is already shaped in the lake.&lt;/p&gt;
&lt;h2 id=&quot;how-does-it-compare-with-import-and-directquery&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-it-compare-with-import-and-directquery&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does it compare with Import and DirectQuery?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Import&lt;/b&gt;&lt;ul&gt;&lt;li&gt;copies every row on refresh&lt;/li&gt;&lt;li&gt;fast queries&lt;/li&gt;&lt;li&gt;refresh takes time&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;DirectQuery&lt;/b&gt;&lt;ul&gt;&lt;li&gt;copies nothing&lt;/li&gt;&lt;li&gt;each visual queries the source&lt;/li&gt;&lt;li&gt;slower&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Direct Lake&lt;/b&gt;&lt;ul&gt;&lt;li&gt;loads columns from Delta in OneLake when needed&lt;/li&gt;&lt;li&gt;fast queries&lt;/li&gt;&lt;li&gt;refresh is seconds&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Three ways a semantic model gets its data&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The refresh is the difference that matters day to day. Microsoft calls it &lt;strong&gt;framing&lt;/strong&gt;: the model reads the Delta log of each table and points at its latest files. With &lt;strong&gt;automatic updates&lt;/strong&gt; on, the model reframes on its own when the tables change.&lt;/p&gt;
&lt;h2 id=&quot;what-does-the-pattern-look-like&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-the-pattern-look-like&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does the pattern look like?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:3&quot;&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Gold Delta tables&lt;/b&gt;&lt;span&gt;a star schema: facts and dimensions&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Direct Lake model&lt;/b&gt;&lt;span&gt;relationships and measures, no copy&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Report&lt;/b&gt;&lt;span&gt;as on any other semantic model&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;From the lake to a report&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The model is thin on purpose: tables, relationships and measures. Every cleaning step lives upstream in the lakehouse, which is also why Direct Lake suits the gold layer of a &lt;a href=&quot;/blog/medallion-architecture-fabric-lakehouse/&quot;&gt;bronze, silver and gold lakehouse&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;direct-lake-on-onelake-or-on-sql&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#direct-lake-on-onelake-or-on-sql&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Direct Lake on OneLake or on SQL?&lt;/h2&gt;
&lt;p&gt;There are two kinds, and they behave differently when something does not fit:&lt;/p&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;Direct Lake on OneLake&lt;/th&gt;&lt;th&gt;Direct Lake on SQL&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Sources&lt;/td&gt;&lt;td&gt;one or more Fabric items with Delta tables&lt;/td&gt;&lt;td&gt;one item, through its SQL analytics endpoint&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SQL views&lt;/td&gt;&lt;td&gt;not supported&lt;/td&gt;&lt;td&gt;supported, but they fall back to DirectQuery&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;SQL endpoint row-level security&lt;/td&gt;&lt;td&gt;not applied&lt;/td&gt;&lt;td&gt;applied, by falling back to DirectQuery&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Over a capacity guardrail&lt;/td&gt;&lt;td&gt;refresh fails until the tables are optimised&lt;/td&gt;&lt;td&gt;falls back to DirectQuery, slower&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Mixed with Import tables&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;no, except through a composite model on top&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Fallback&lt;/strong&gt; means a query quietly runs as DirectQuery against the SQL analytics endpoint. The answer is still right, just slower. On Direct Lake on SQL, the model's &lt;strong&gt;Direct Lake behavior&lt;/strong&gt; property decides: Automatic allows fallback, Direct Lake only turns it off so such queries fail instead.&lt;/p&gt;
&lt;h2 id=&quot;what-are-the-guardrails&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-guardrails&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the guardrails?&lt;/h2&gt;
&lt;p&gt;Each Fabric capacity size limits, per table, how many Parquet files, row groups and rows a Direct Lake table may have. On F2 to F32 it is 1,000 files, 1,000 row groups and 300 million rows; on F64 it is 5,000, 5,000 and 1.5 billion. Small files are the usual way to hit them: a table loaded in thousands of tiny appends needs an &lt;code&gt;OPTIMIZE&lt;/code&gt; now and then, from a notebook or the lakehouse's table maintenance:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;OPTIMIZE gold_sales VORDER;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A view in the model.&lt;/strong&gt; On Direct Lake on SQL it falls back to DirectQuery on every query that touches it. Turn the view into a table in gold.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Duplicate keys on the one side.&lt;/strong&gt; Queries fail when a dimension's key is not unique. Check uniqueness where you build gold, not in the model.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Security in two places.&lt;/strong&gt; Row-level security in the SQL endpoint and in the model work differently in the two kinds. Decide on one place, usually the semantic model.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/fundamentals/direct-lake-overview&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Direct Lake overview&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/fundamentals/direct-lake-how-it-works&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: How Direct Lake works&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-table-maintenance&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Delta table maintenance in Microsoft Fabric&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;The last lesson of &lt;a href=&quot;/courses/lakehouse-in-three-layers/#shape-it-for-reports&quot;&gt;A lakehouse in three layers&lt;/a&gt; builds gold as a star schema and a Direct Lake semantic model on top, in your own Fabric workspace. The pattern sits on &lt;a href=&quot;/work/#reports-from-the-lake&quot;&gt;the map of my work&lt;/a&gt;, at the end of every line.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Exam accommodations: extra time and other help, explained</title>
    <link href="https://data.benibix.com/blog/exam-accommodations-extra-time/"/>
    <id>https://data.benibix.com/blog/exam-accommodations-extra-time/</id>
    <published>2026-10-14T12:00:00Z</published>
    <updated>2026-10-14T12:00:00Z</updated>
    <summary>Which accommodations Microsoft offers on certification exams in 2026, extra time, readers, assistive technology, interpreters, chat-only proctoring, extra time when the exam is not in your language, what proof you need, how long approval takes, and how to appeal.</summary>
    <category term="Exams"/>
    <category term="Exam tips"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; request accommodations through &lt;strong&gt;Pearson VUE before you book&lt;/strong&gt; the exam; review takes up to &lt;strong&gt;10 business days&lt;/strong&gt; and the whole process can take &lt;strong&gt;up to 20 days&lt;/strong&gt;. Microsoft often approves &lt;strong&gt;extra time&lt;/strong&gt; (for learning disabilities, ADHD, PTSD or test anxiety), &lt;strong&gt;assistive technology&lt;/strong&gt;, a &lt;strong&gt;reader, scribe or personal care assistant&lt;/strong&gt;, and help when you cannot rearrange your room. Only extra time and another adult in the room need proof, and a formal diagnosis is &lt;strong&gt;not&lt;/strong&gt; required. If the exam is not in your language, you can ask for &lt;strong&gt;extra time&lt;/strong&gt; too.&lt;/p&gt;
&lt;h2 id=&quot;which-accommodations-exist&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-accommodations-exist&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which accommodations exist?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Accommodation&lt;/th&gt;&lt;th&gt;Proof needed?&lt;/th&gt;&lt;th&gt;Note&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Extra time&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;the exam is reconfigured, so request ahead&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Reader or reader/recorder&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;td&gt;extra time included&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Personal care assistant&lt;/td&gt;&lt;td&gt;online only&lt;/td&gt;&lt;td&gt;the proctor must know another adult is present&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Screen reader (JAWS, NVDA, Narrator, ZoomText)&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;must be configured before the exam&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sign language interpreter&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;separate room at test centres&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Chat-only communication&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;the proctor uses chat instead of audio&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Reading aloud, noise-cancelling headphones&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;td&gt;still request ahead&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Common accommodations&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-counts-as-proof&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-counts-as-proof&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What counts as proof?&lt;/h2&gt;
&lt;p&gt;One of: past accommodations at work, school or in other tests; school records such as an IEP or a 504 plan, or a note from an educator; or accommodations from a government body or at an event. A medical diagnosis is not required.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-request-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-request-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you request it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Check the list&lt;/b&gt;&lt;span&gt;Microsoft's available accommodations page&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Pearson VUE&lt;/b&gt;&lt;span&gt;create an account in the accommodations request system&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Request&lt;/b&gt;&lt;span&gt;fill each step, upload proof if needed&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Decision&lt;/b&gt;&lt;span&gt;by email, up to 10 business days&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Book&lt;/b&gt;&lt;span&gt;follow the email's instructions to schedule with the accommodation&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Request before booking&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;If it is denied, you can appeal in the same system, adding the documents the decision letter says were missing.&lt;/p&gt;
&lt;h2 id=&quot;what-about-language&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-about-language&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What about language?&lt;/h2&gt;
&lt;p&gt;If your exam is not offered in your preferred language, request extra time with the &lt;strong&gt;English as a Second Language&lt;/strong&gt; form, with a letter from an instructor or employer. If the exam is offered in your language and you choose another, you do not get extra time.&lt;/p&gt;
&lt;h2 id=&quot;what-needs-no-request&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-needs-no-request&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What needs no request?&lt;/h2&gt;
&lt;p&gt;Every exam already includes five minutes for an unscheduled break. Moving or fidgeting is fine online if your face stays in view and prohibited items stay out of reach.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/request-accommodations&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Request exam accommodations&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/available-exam-accommodations-document-requirements&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Available exam accommodations and documentation&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/frequently-asked-questions&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Frequently asked questions&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Request the accommodation today, before you choose a date. &lt;a href=&quot;/blog/exam-time-and-breaks/&quot;&gt;Exam time and breaks&lt;/a&gt; shows the standard times the extra time is added to.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Histograms in Power BI with bins and DAX</title>
    <link href="https://data.benibix.com/blog/histogram-power-bi/"/>
    <id>https://data.benibix.com/blog/histogram-power-bi/</id>
    <published>2026-10-14T12:00:00Z</published>
    <updated>2026-10-14T12:00:00Z</updated>
    <summary>How to make a histogram in Power BI, which has no histogram visual: bins with groups, bins of a measure with a DAX table, choosing the bin size, and reading the shape of a distribution.</summary>
    <category term="Visuals"/>
    <category term="Distribution"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; Power BI has no histogram visual, so a histogram is a &lt;a href=&quot;/blog/column-chart-power-bi/&quot;&gt;column chart&lt;/a&gt; of bins. For a column, right-click it in the &lt;strong&gt;Data&lt;/strong&gt; pane, &lt;strong&gt;New group&lt;/strong&gt;, &lt;strong&gt;Group type: Bin&lt;/strong&gt;, set the &lt;strong&gt;bin size&lt;/strong&gt; (or the number of bins), then put the new bin field on the X-axis and a count on the Y-axis. For a measure (order value per customer, days to deliver per order), build the bins with a small DAX table and a count measure.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The chart, part by part:&lt;/strong&gt; &lt;a href=&quot;/visuals/histogram/&quot;&gt;What is a histogram?&lt;/a&gt; draws its parts and shows how to read one, its kinds and the mistakes to avoid.&lt;/p&gt;
&lt;p&gt;An average delivery time of 3.1 days sounds fine. A histogram shows that most orders arrive in two days and one in ten takes over a week: the average hid a long tail that customers feel.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-histogram-show&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-histogram-show&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a histogram show?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;column&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;column chart: 0-1 140; 1-2 520; 2-3 610; 3-4 280; 4-5 120; 5-6 70; 6-7 60; 7+ 160&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;203&quot; x2=&quot;628&quot; y2=&quot;203&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;207&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;200&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;140&quot; x2=&quot;628&quot; y2=&quot;140&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;144&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;400&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;77&quot; x2=&quot;628&quot; y2=&quot;77&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;81&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;600&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;628&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;800&lt;/text&gt;&lt;rect x=&quot;63.5&quot; y=&quot;221.9&quot; width=&quot;47&quot; height=&quot;44.1&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;88&quot; y=&quot;215.9&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;140&lt;/text&gt;&lt;text x=&quot;88&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0-1&lt;/text&gt;&lt;rect x=&quot;135.5&quot; y=&quot;102.2&quot; width=&quot;47&quot; height=&quot;163.8&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;160&quot; y=&quot;96.2&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;520&lt;/text&gt;&lt;text x=&quot;160&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;1-2&lt;/text&gt;&lt;rect x=&quot;207.5&quot; y=&quot;73.9&quot; width=&quot;47&quot; height=&quot;192.1&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;232&quot; y=&quot;67.9&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;610&lt;/text&gt;&lt;text x=&quot;232&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;2-3&lt;/text&gt;&lt;rect x=&quot;279.5&quot; y=&quot;177.8&quot; width=&quot;47&quot; height=&quot;88.2&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;304&quot; y=&quot;171.8&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;280&lt;/text&gt;&lt;text x=&quot;304&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;3-4&lt;/text&gt;&lt;rect x=&quot;351.5&quot; y=&quot;228.2&quot; width=&quot;47&quot; height=&quot;37.8&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;376&quot; y=&quot;222.2&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;120&lt;/text&gt;&lt;text x=&quot;376&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;4-5&lt;/text&gt;&lt;rect x=&quot;423.5&quot; y=&quot;244&quot; width=&quot;47&quot; height=&quot;22&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;448&quot; y=&quot;238&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;70&lt;/text&gt;&lt;text x=&quot;448&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;5-6&lt;/text&gt;&lt;rect x=&quot;495.5&quot; y=&quot;247.1&quot; width=&quot;47&quot; height=&quot;18.9&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;520&quot; y=&quot;241.1&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;60&lt;/text&gt;&lt;text x=&quot;520&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;6-7&lt;/text&gt;&lt;rect x=&quot;567.5&quot; y=&quot;215.6&quot; width=&quot;47&quot; height=&quot;50.4&quot; rx=&quot;3&quot; class=&quot;m ka&quot;/&gt;&lt;text x=&quot;592&quot; y=&quot;209.6&quot; class=&quot;tv&quot; text-anchor=&quot;middle&quot;&gt;160&lt;/text&gt;&lt;text x=&quot;592&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;7+&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;628&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Orders by delivery time, one-day bins&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The shape is the answer: a peak at two to three days, then a tail, and a bump at seven days and more that needs looking into (one carrier, one region, one warehouse).&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-bin-a-column&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-bin-a-column&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you bin a column?&lt;/h2&gt;
&lt;p&gt;For a numeric or date column in the model, for example &lt;code&gt;Orders[Delivery Days]&lt;/code&gt;:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;In the &lt;strong&gt;Data&lt;/strong&gt; pane, right-click the column and pick &lt;strong&gt;New group&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Group type: Bin&lt;/strong&gt;. Choose &lt;strong&gt;Size of bins&lt;/strong&gt; (for example 1) or &lt;strong&gt;Number of bins&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Power BI adds a column &lt;code&gt;Delivery Days (bins)&lt;/code&gt;. Drag it to the &lt;strong&gt;X-axis&lt;/strong&gt; of a column chart and a count, for example &lt;code&gt;Orders[Order ID]&lt;/code&gt; as &lt;strong&gt;Count&lt;/strong&gt;, to the &lt;strong&gt;Y-axis&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Set the X-axis &lt;strong&gt;Type&lt;/strong&gt; to &lt;strong&gt;Categorical&lt;/strong&gt; so every bin gets a column, including empty ones in the middle, and remove the gaps between columns (&lt;strong&gt;Columns, Spacing&lt;/strong&gt;) if you want the classic histogram look.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Bins on a column are fixed at refresh. That suits facts that do not change with the report's filters, such as each order's delivery days.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-bin-a-measure&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-bin-a-measure&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you bin a measure?&lt;/h2&gt;
&lt;p&gt;When the number to bin is a measure (each customer's revenue in the selected period), the bins must react to slicers, so they are a table:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue Bins =
&lt;i class=&quot;f&quot;&gt;GENERATESERIES&lt;/i&gt; ( &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;2000&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;250&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;This makes a one-column table &lt;code&gt;Value&lt;/code&gt; with 0, 250, 500 ... 2000. Rename the column &lt;code&gt;Bin Start&lt;/code&gt;, then count the customers whose revenue falls in each bin:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Customers in Bin =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; BinStart = &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Revenue Bins'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Bin Start]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; BinEnd = BinStart + &lt;i class=&quot;n&quot;&gt;250&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; (
            &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Customer&lt;i class=&quot;m&quot;&gt;[Customer ID]&lt;/i&gt; ),
            &lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; R = &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;
            &lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; NOT &lt;i class=&quot;f&quot;&gt;ISBLANK&lt;/i&gt; ( R ) &amp;amp;&amp;amp; R &amp;gt;= BinStart &amp;amp;&amp;amp; ( R &amp;lt; BinEnd || BinStart = &lt;i class=&quot;n&quot;&gt;2000&lt;/i&gt; )
        )
    )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;Revenue Bins&lt;/code&gt; has no relationship to the model: it is a disconnected table that only gives the X-axis its values. The last bin (2000) takes everything above it, and &lt;code&gt;NOT ISBLANK&lt;/code&gt; keeps customers who bought nothing in the period out of the first bin (a blank compares like 0).&lt;/p&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Bin Start&lt;/th&gt;&lt;th&gt;Customers in Bin&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;812&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;250&lt;/td&gt;&lt;td&gt;534&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;500&lt;/td&gt;&lt;td&gt;301&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;750&lt;/td&gt;&lt;td&gt;166&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1000&lt;/td&gt;&lt;td&gt;94&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;With a &amp;quot;Customer: Region&amp;quot; slicer on the page, the bins recount for that region.&lt;/p&gt;
&lt;h2 id=&quot;how-big-should-the-bins-be&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-big-should-the-bins-be&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How big should the bins be?&lt;/h2&gt;
&lt;p&gt;Too few bins and the shape disappears; too many and it is noise. Start with round sizes people understand (1 day, 50 euros, 5 minutes) and about 10 to 20 bins. Try two sizes: if the shape changes a lot, the data is thin and the histogram should say so.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Shape&lt;/th&gt;&lt;th&gt;Means&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;One peak, symmetric&lt;/td&gt;&lt;td&gt;values spread evenly around a typical value&lt;/td&gt;&lt;td&gt;weights of a packed product&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;One peak, long right tail&lt;/td&gt;&lt;td&gt;most are small, a few are big&lt;/td&gt;&lt;td&gt;order values, delivery times&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Two peaks&lt;/td&gt;&lt;td&gt;two groups mixed in one&lt;/td&gt;&lt;td&gt;two warehouses, two customer types&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;A spike at the edge&lt;/td&gt;&lt;td&gt;a cap or a default value&lt;/td&gt;&lt;td&gt;&amp;quot;7+&amp;quot; bucket, a timeout&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Reading the shape&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Bins as a continuous axis.&lt;/strong&gt; On a continuous axis, empty bins vanish and the columns spread unevenly. Use categorical.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Averages instead of a count.&lt;/strong&gt; A histogram counts items per bin; summing or averaging a measure on the Y-axis makes a different chart.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A fixed bin column for a measure.&lt;/strong&gt; A calculated column is computed once and ignores slicers; use a bin table and a measure.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The tail cut off.&lt;/strong&gt; A last bin &amp;quot;2000+&amp;quot; collects the outliers; without it, they disappear from the picture.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-grouping-and-binning&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Use grouping and binning in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/generateseries-function&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: GENERATESERIES function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/countrows-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: COUNTROWS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Bin a column with &lt;strong&gt;New group&lt;/strong&gt; for a first look, then build a bin table when the number is a measure. The &lt;a href=&quot;/blog/scatter-bubble-chart-power-bi/&quot;&gt;scatter chart&lt;/a&gt; shows two numbers against each other, and the &lt;a href=&quot;/blog/analytics-pane-power-bi/&quot;&gt;Analytics pane&lt;/a&gt; adds percentile lines.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>How to build a KPI dashboard in Power BI</title>
    <link href="https://data.benibix.com/blog/kpi-dashboard-power-bi/"/>
    <id>https://data.benibix.com/blog/kpi-dashboard-power-bi/</id>
    <published>2026-10-14T12:00:00Z</published>
    <updated>2026-11-02T12:00:00Z</updated>
    <summary>How to plan and build a KPI dashboard page in Power BI, choosing three to seven KPIs per audience, the layout from headline to driver to detail, KPI cards with target and trend, a KPI table with status and sparklines, a measures table, a KPI definitions page, and the mistakes that make dashboards ignored.</summary>
    <category term="KPIs"/>
    <category term="Basics"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a KPI dashboard answers &amp;quot;are we on track, and if not, where?&amp;quot; on &lt;strong&gt;one screen&lt;/strong&gt;. Build it in three bands: a &lt;strong&gt;headline row&lt;/strong&gt; of three to seven KPI cards (value, target, variance, small trend), a &lt;strong&gt;driver row&lt;/strong&gt; with the two or three charts that explain the headline (by month, by region or product), and a &lt;strong&gt;detail table&lt;/strong&gt; with status colours and sparklines for the people who act. Every KPI uses the same &lt;a href=&quot;/blog/kpi-actual-target-variance-dax/&quot;&gt;actual, target and variance&lt;/a&gt; measures, and a definitions page says exactly how each one is calculated.&lt;/p&gt;
&lt;p&gt;Most dashboards fail not on technique but on choice: too many numbers, no targets, no story from the top number to the cause.&lt;/p&gt;
&lt;p&gt;The video below shows in about a minute how to find the right KPIs for a dashboard and copy each one's DAX, SQL or Excel formula.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-on-the-page-and-where&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-on-the-page-and-where&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes on the page, and where?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;layers&quot;&gt;&lt;ol class=&quot;dfig-stack&quot;&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;b&gt;Headline&lt;/b&gt;&lt;span&gt;3 to 7 KPI cards: value, target, variance %, trend line&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;b&gt;Drivers&lt;/b&gt;&lt;span&gt;2 or 3 charts that explain the headline: actual vs target by month, variance by region&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;b&gt;Detail&lt;/b&gt;&lt;span&gt;a table of regions or products with status colour, variance and sparkline&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;b&gt;Filters&lt;/b&gt;&lt;span&gt;date and the one or two slicers people really use, on the side or top&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;A KPI dashboard in three bands&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;People read top-left first, so the most important KPI goes there. Keep the same order of KPIs in every band.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-pick-the-kpis&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-pick-the-kpis&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you pick the KPIs?&lt;/h2&gt;
&lt;p&gt;Start from the audience and the decisions it makes:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Audience&lt;/th&gt;&lt;th&gt;KPIs&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Management&lt;/td&gt;&lt;td&gt;revenue vs target, gross margin %, cash runway, customer churn&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sales&lt;/td&gt;&lt;td&gt;revenue, pipeline coverage, win rate, average deal size, quota attainment&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;E-commerce&lt;/td&gt;&lt;td&gt;revenue, conversion rate, average order value, repeat purchase rate, ROAS&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Operations&lt;/td&gt;&lt;td&gt;OTIF, inventory turnover, order cycle time, OEE&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Customer success&lt;/td&gt;&lt;td&gt;churn rate, net revenue retention, NPS, time to first value&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Example KPI sets by audience&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;See &lt;a href=&quot;/blog/what-makes-a-good-kpi/&quot;&gt;what makes a good KPI&lt;/a&gt; for the checks each one should pass.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-build-the-kpi-cards&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-the-kpi-cards&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build the KPI cards?&lt;/h2&gt;
&lt;p&gt;The &lt;strong&gt;card (new)&lt;/strong&gt; visual shows several values with reference labels: put Actual as the value and Target and Variance % as reference labels, with conditional colour on the variance. The &lt;strong&gt;KPI visual&lt;/strong&gt; adds a trend background with a target. Both are covered in &lt;a href=&quot;/blog/card-visual-power-bi/&quot;&gt;card visual&lt;/a&gt; and &lt;a href=&quot;/blog/kpi-visual-power-bi/&quot;&gt;KPI visual&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- one label per card, readable on its own&lt;/i&gt;
Revenue Label =
&lt;i class=&quot;f&quot;&gt;FORMAT&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Variance %]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;+0.0%;-0.0%&amp;quot;&lt;/i&gt; ) &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot; vs target&amp;quot;&lt;/i&gt;

&lt;i class=&quot;c&quot;&gt;-- colour for conditional formatting (field value)&lt;/i&gt;
Variance Colour = &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Variance %]&lt;/i&gt; &amp;gt;= &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#1a7f37&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#cf222e&amp;quot;&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-do-you-build-the-detail-table&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-the-detail-table&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build the detail table?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Region&lt;/th&gt;&lt;th&gt;Revenue&lt;/th&gt;&lt;th&gt;Target&lt;/th&gt;&lt;th&gt;Variance %&lt;/th&gt;&lt;th&gt;Status&lt;/th&gt;&lt;th&gt;Trend&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;North&lt;/td&gt;&lt;td&gt;412&lt;/td&gt;&lt;td&gt;380&lt;/td&gt;&lt;td&gt;+8.4%&lt;/td&gt;&lt;td&gt;On target&lt;/td&gt;&lt;td&gt;rising&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;South&lt;/td&gt;&lt;td&gt;298&lt;/td&gt;&lt;td&gt;320&lt;/td&gt;&lt;td&gt;-6.9%&lt;/td&gt;&lt;td&gt;Below&lt;/td&gt;&lt;td&gt;flat&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;West&lt;/td&gt;&lt;td&gt;355&lt;/td&gt;&lt;td&gt;350&lt;/td&gt;&lt;td&gt;+1.4%&lt;/td&gt;&lt;td&gt;On target&lt;/td&gt;&lt;td&gt;rising&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;East&lt;/td&gt;&lt;td&gt;176&lt;/td&gt;&lt;td&gt;210&lt;/td&gt;&lt;td&gt;-16.2%&lt;/td&gt;&lt;td&gt;Below&lt;/td&gt;&lt;td&gt;falling&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Regions by revenue attainment&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In a table visual: Variance % with a background colour rule, Status as an icon, and a &lt;a href=&quot;/blog/sparklines-power-bi/&quot;&gt;sparkline&lt;/a&gt; of revenue by month in the last column. Sort by Variance % ascending so problems come first.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-organise-the-measures&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-organise-the-measures&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you organise the measures?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;One &lt;strong&gt;measures table&lt;/strong&gt; (an empty table holding all measures), with display folders per KPI: Revenue, Margin, Churn.&lt;/li&gt;&lt;li&gt;Each KPI has the same five measures: Actual, Target, Variance, Variance %, Status.&lt;/li&gt;&lt;li&gt;The &lt;strong&gt;description&lt;/strong&gt; of each measure holds the KPI definition; it appears as a tooltip in the Data pane.&lt;/li&gt;&lt;li&gt;A &lt;strong&gt;definitions page&lt;/strong&gt; in the report lists every KPI with its formula, owner and source. &lt;a href=&quot;/blog/info-functions-dax/&quot;&gt;INFO.VIEW.MEASURES&lt;/a&gt; can generate it from the descriptions.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Twenty cards.&lt;/strong&gt; Nobody reads them; cut to the KPIs with owners.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;No targets.&lt;/strong&gt; Without a target the colours and status mean nothing.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Different periods on one page.&lt;/strong&gt; One card month to date, another year to date; label the period on every card or use one period.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Charts that do not explain.&lt;/strong&gt; A pie of revenue by region does not say why revenue is behind; show variance by region instead.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Slow pages.&lt;/strong&gt; Each card is a query; seven cards and three charts is fine, thirty visuals is slow.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/service-dashboards-design-tips&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Tips for designing a great Power BI dashboard&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-kpi&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create key performance indicator (KPI) visualizations&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-card&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create a card visual in Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Pick the audience, write down their five KPIs with targets, and build the headline row first. &lt;a href=&quot;/blog/revenue-growth-kpi/&quot;&gt;Revenue growth&lt;/a&gt; is the KPI most dashboards start with.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Integration runtime in Azure Data Factory, explained</title>
    <link href="https://data.benibix.com/blog/integration-runtime-azure-data-factory/"/>
    <id>https://data.benibix.com/blog/integration-runtime-azure-data-factory/</id>
    <published>2026-10-14T12:00:00Z</published>
    <updated>2026-10-14T12:00:00Z</updated>
    <summary>What an integration runtime is in Azure Data Factory, the three kinds (Azure, self-hosted and Azure-SSIS), and how to pick one for each source.</summary>
    <category term="Azure"/>
    <category term="Data Factory"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; an &lt;strong&gt;integration runtime&lt;/strong&gt; is the compute that Azure Data Factory uses to move and transform data. There are three kinds: the &lt;strong&gt;Azure&lt;/strong&gt; integration runtime for sources it can reach over the internet or a managed virtual network, the &lt;strong&gt;self-hosted&lt;/strong&gt; one you install on a machine inside your network for sources it cannot reach, and &lt;strong&gt;Azure-SSIS&lt;/strong&gt; for running existing SSIS packages.&lt;/p&gt;
&lt;p&gt;A pipeline describes the work; the integration runtime does it. Every linked service names one, so the choice decides where your data travels and whether Data Factory can see the source at all.&lt;/p&gt;
&lt;h2 id=&quot;which-integration-runtime-does-what&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-integration-runtime-does-what&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which integration runtime does what?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:3&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Azure&lt;/b&gt;&lt;ul&gt;&lt;li&gt;managed by Microsoft&lt;/li&gt;&lt;li&gt;cloud sources and services&lt;/li&gt;&lt;li&gt;optional managed virtual network&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Self-hosted&lt;/b&gt;&lt;ul&gt;&lt;li&gt;you install it on Windows&lt;/li&gt;&lt;li&gt;on-premises and private-network sources&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Azure-SSIS&lt;/b&gt;&lt;span&gt;a managed cluster that runs SSIS packages you already have&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;Three kinds, one per kind of source&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The &lt;strong&gt;Azure&lt;/strong&gt; integration runtime is the default (&lt;code&gt;AutoResolveIntegrationRuntime&lt;/code&gt;) and needs no setup. Turn on its &lt;strong&gt;managed virtual network&lt;/strong&gt; when the sources only accept private endpoints.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;self-hosted&lt;/strong&gt; integration runtime is a Windows service on a machine that can see the source: a server in the data centre, or a VM in the same virtual network as a private database. It only makes outbound connections over HTTPS (port 443), so no firewall port has to open inward.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Azure-SSIS&lt;/strong&gt; exists so a team can lift SSIS packages into the cloud without rewriting them. New work rarely starts there.&lt;/p&gt;
&lt;h2 id=&quot;how-does-a-copy-through-a-self-hosted-runtime-travel&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-a-copy-through-a-self-hosted-runtime-travel&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does a copy through a self-hosted runtime travel?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;SQL Server&lt;/b&gt;&lt;span&gt;on-premises, behind the firewall&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Self-hosted runtime&lt;/b&gt;&lt;span&gt;reads the rows on a machine inside&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;HTTPS out&lt;/b&gt;&lt;span&gt;port 443, no inbound port&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Data Lake&lt;/b&gt;&lt;span&gt;the files land in Azure&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;An on-premises table copied into the lake&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The linked service points at the runtime with &lt;code&gt;connectVia&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;json&quot;&gt;&lt;code&gt;{
  &lt;i class=&quot;s&quot;&gt;&amp;quot;name&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;OnPremSql&amp;quot;&lt;/i&gt;,
  &lt;i class=&quot;s&quot;&gt;&amp;quot;properties&amp;quot;&lt;/i&gt;: {
    &lt;i class=&quot;s&quot;&gt;&amp;quot;type&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;SqlServer&amp;quot;&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;typeProperties&amp;quot;&lt;/i&gt;: { &lt;i class=&quot;s&quot;&gt;&amp;quot;connectionString&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;Server=sql01;Database=Sales;Integrated Security=True&amp;quot;&lt;/i&gt; },
    &lt;i class=&quot;s&quot;&gt;&amp;quot;connectVia&amp;quot;&lt;/i&gt;: { &lt;i class=&quot;s&quot;&gt;&amp;quot;referenceName&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;SelfHostedIR&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;type&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;IntegrationRuntimeReference&amp;quot;&lt;/i&gt; }
  }
}&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;One machine, one point of failure.&lt;/strong&gt; A self-hosted runtime can have up to four nodes. Install it on a second machine and register it with the same key, so a reboot does not stop the nightly load.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The machine is too small.&lt;/strong&gt; Copies run on its CPU and memory. Watch both in the runtime's monitoring page before blaming the source.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A runtime per factory.&lt;/strong&gt; One self-hosted runtime can be shared with other data factories; you do not need a machine per factory.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Microsoft Fabric is different.&lt;/strong&gt; Fabric pipelines reach on-premises sources through the &lt;strong&gt;on-premises data gateway&lt;/strong&gt;, not a self-hosted integration runtime.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/data-factory/concepts-integration-runtime&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Integration runtime in Azure Data Factory&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/data-factory/create-self-hosted-integration-runtime&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Create and configure a self-hosted integration runtime&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/data-factory/managed-virtual-network-private-endpoint&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Azure Data Factory managed virtual network&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;The open course &lt;a href=&quot;/courses/metadata-driven-pipeline/&quot;&gt;Your first metadata-driven pipeline&lt;/a&gt; builds a pipeline on the default Azure integration runtime; point its linked service at a self-hosted one and the same pipeline reads from inside your network. The pattern behind it is &lt;a href=&quot;/blog/metadata-driven-pipeline-azure-data-factory/&quot;&gt;one pipeline for every table&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Line charts in Power BI: trends, series and axes</title>
    <link href="https://data.benibix.com/blog/line-chart-power-bi/"/>
    <id>https://data.benibix.com/blog/line-chart-power-bi/</id>
    <published>2026-10-14T12:00:00Z</published>
    <updated>2026-11-04T12:00:00Z</updated>
    <summary>How to use a line chart in Power BI for trends over time, static and dynamic series, the secondary Y-axis, series labels, continuous or categorical axes, DAX for a moving average and a target, and what goes wrong.</summary>
    <category term="Visuals"/>
    <category term="Trends"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; a &lt;strong&gt;line chart&lt;/strong&gt; joins points in order, so it shows a trend: up, down, flat, seasonal, a break. Put time on the &lt;strong&gt;X-axis&lt;/strong&gt; and a measure on the &lt;strong&gt;Y-axis&lt;/strong&gt;. Several lines come either from several measures (&lt;strong&gt;static series&lt;/strong&gt;) or from a field in &lt;strong&gt;Legend&lt;/strong&gt; (&lt;strong&gt;dynamic series&lt;/strong&gt;, one line per value), not both. Unlike columns, a line may use a Y-axis that does not start at zero, because the reader follows the shape, not the height.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The chart, part by part:&lt;/strong&gt; &lt;a href=&quot;/visuals/line-chart/&quot;&gt;What is a line chart?&lt;/a&gt; draws its parts and shows how to read one, its kinds and the mistakes to avoid.&lt;/p&gt;
&lt;p&gt;Twelve months as columns show twelve separate amounts. As a line they show one movement: the dip in August, the climb before Christmas, the year that ended higher than it started.&lt;/p&gt;
&lt;p&gt;The short video below shows when a line is the right chart, and what to do when too many lines turn it into spaghetti.&lt;/p&gt;
&lt;h2 id=&quot;when-is-a-line-the-right-chart&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#when-is-a-line-the-right-chart&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;When is a line the right chart?&lt;/h2&gt;
&lt;p&gt;When the X-axis has an order and the question is about change: daily visits, monthly revenue, weekly stock. Lines handle many points (365 days, 52 weeks) where columns would turn into slivers. With few categories and no order (regions, products), use &lt;a href=&quot;/blog/column-chart-power-bi/&quot;&gt;columns&lt;/a&gt; or &lt;a href=&quot;/blog/bar-chart-power-bi/&quot;&gt;bars&lt;/a&gt;.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;line&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;line chart: Jan 80; Feb 95; Mar 90; Apr 118; May 130; Jun 125; Jul 112; Aug 98; Sep 121; Oct 134; Nov 152; Dec 171&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;203&quot; x2=&quot;626&quot; y2=&quot;203&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;207&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;50&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;140&quot; x2=&quot;626&quot; y2=&quot;140&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;144&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;77&quot; x2=&quot;626&quot; y2=&quot;77&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;81&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;150&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;626&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;200&lt;/text&gt;&lt;polyline points=&quot;52,165.2 104.2,146.3 156.4,152.6 208.5,117.3 260.7,102.2 312.9,108.5 365.1,124.9 417.3,142.5 469.5,113.5 521.6,97.2 573.8,74.5 626,50.5&quot; class=&quot;ln ka&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;165.2&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;104.2&quot; cy=&quot;146.3&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;156.4&quot; cy=&quot;152.6&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;208.5&quot; cy=&quot;117.3&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;260.7&quot; cy=&quot;102.2&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;312.9&quot; cy=&quot;108.5&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;365.1&quot; cy=&quot;124.9&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;417.3&quot; cy=&quot;142.5&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;469.5&quot; cy=&quot;113.5&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;521.6&quot; cy=&quot;97.2&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;573.8&quot; cy=&quot;74.5&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;50.5&quot; r=&quot;3.5&quot; class=&quot;dt ka&quot;/&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;626&quot; y2=&quot;114.8&quot; class=&quot;goal&quot;/&gt;&lt;text x=&quot;58&quot; y=&quot;108.8&quot; class=&quot;tg&quot; text-anchor=&quot;start&quot;&gt;Goal 120&lt;/text&gt;&lt;text x=&quot;52&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jan&lt;/text&gt;&lt;text x=&quot;104.2&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Feb&lt;/text&gt;&lt;text x=&quot;156.4&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Mar&lt;/text&gt;&lt;text x=&quot;208.5&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Apr&lt;/text&gt;&lt;text x=&quot;260.7&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;May&lt;/text&gt;&lt;text x=&quot;312.9&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jun&lt;/text&gt;&lt;text x=&quot;365.1&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Jul&lt;/text&gt;&lt;text x=&quot;417.3&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Aug&lt;/text&gt;&lt;text x=&quot;469.5&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Sep&lt;/text&gt;&lt;text x=&quot;521.6&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Oct&lt;/text&gt;&lt;text x=&quot;573.8&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Nov&lt;/text&gt;&lt;text x=&quot;626&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Dec&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Monthly revenue against a goal of 120 (in thousands)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;how-do-you-show-several-lines&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-show-several-lines&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you show several lines?&lt;/h2&gt;
&lt;p&gt;Microsoft names the two ways:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Static series:&lt;/strong&gt; add several measures to &lt;strong&gt;Y-axis&lt;/strong&gt;, for example &lt;code&gt;Units sold online&lt;/code&gt; and &lt;code&gt;Units sold in store&lt;/code&gt;. Each is a line with a fixed name and its own format.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Dynamic series:&lt;/strong&gt; add a field to &lt;strong&gt;Legend&lt;/strong&gt;, for example &lt;code&gt;Product&lt;/code&gt;. One line per product, and a new product gets a line by itself.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;A chart with several measures on the Y-axis cannot also have a Legend field. When the measures have very different scales, drag the second one to &lt;strong&gt;Secondary Y-axis&lt;/strong&gt;: it gets its own axis on the right.&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;line&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;Online&lt;/li&gt;&lt;li class=&quot;k1&quot;&gt;Store&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;line chart: Week 1 380, 340; Week 2 402, 351; Week 3 415, 338; Week 4 441, 330; Week 5 468, 326; Week 6 497, 318&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;626&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;626&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;200&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;626&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;300&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;626&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;400&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;626&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;500&lt;/text&gt;&lt;polyline points=&quot;52,94.6 166.8,89.1 281.6,95.6 396.4,99.7 511.2,101.7 626,105.7&quot; class=&quot;ln k1&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;94.6&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;166.8&quot; cy=&quot;89.1&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;281.6&quot; cy=&quot;95.6&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;396.4&quot; cy=&quot;99.7&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;511.2&quot; cy=&quot;101.7&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;105.7&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;polyline points=&quot;52,74.5 166.8,63.4 281.6,56.8 396.4,43.7 511.2,30.1 626,15.5&quot; class=&quot;ln k0&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;74.5&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;166.8&quot; cy=&quot;63.4&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;281.6&quot; cy=&quot;56.8&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;396.4&quot; cy=&quot;43.7&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;511.2&quot; cy=&quot;30.1&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;15.5&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;text x=&quot;52&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Week 1&lt;/text&gt;&lt;text x=&quot;166.8&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Week 2&lt;/text&gt;&lt;text x=&quot;281.6&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Week 3&lt;/text&gt;&lt;text x=&quot;396.4&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Week 4&lt;/text&gt;&lt;text x=&quot;511.2&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Week 5&lt;/text&gt;&lt;text x=&quot;626&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Week 6&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Two static series on one axis&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;With more than four or five lines, readers stop matching colours to the legend. Two fixes in Power BI: &lt;strong&gt;Series labels&lt;/strong&gt; (Format visual) write each line's name at its end, with leader lines and an option to match the series colour; or &lt;strong&gt;Small multiples&lt;/strong&gt; gives each product its own small chart with a shared axis.&lt;/p&gt;
&lt;h2 id=&quot;continuous-or-categorical-axis&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#continuous-or-categorical-axis&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Continuous or categorical axis?&lt;/h2&gt;
&lt;p&gt;In &lt;strong&gt;Format visual, X-axis, Type&lt;/strong&gt;:&lt;/p&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Type&lt;/th&gt;&lt;th&gt;How points are placed&lt;/th&gt;&lt;th&gt;Use for&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Continuous&lt;/td&gt;&lt;td&gt;in proportion to the value or date: a gap in the dates is a gap in the chart&lt;/td&gt;&lt;td&gt;dates, numbers&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Categorical&lt;/td&gt;&lt;td&gt;evenly, one slot per value, in sort order&lt;/td&gt;&lt;td&gt;names, or when every period should get the same width&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;A continuous date axis also allows the &lt;strong&gt;Zoom slider&lt;/strong&gt; and keeps missing days visible. Other X- and Y-axis options: &lt;strong&gt;Range&lt;/strong&gt; (minimum and maximum), &lt;strong&gt;Logarithmic scale&lt;/strong&gt; for data that spans several orders of magnitude, &lt;strong&gt;Invert range&lt;/strong&gt;, and &lt;strong&gt;Title&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;Lines&lt;/strong&gt; card sets colour, width, style (solid, dashed, dotted or a custom dash array) and &lt;strong&gt;Interpolation&lt;/strong&gt;: Straight, Smooth (Monotone or Cardinal curves) or Step. Use Step for values that change at a moment and stay, like a price or a headcount.&lt;/p&gt;
&lt;h2 id=&quot;what-dax-makes-a-line-chart-useful&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-dax-makes-a-line-chart-useful&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What DAX makes a line chart useful?&lt;/h2&gt;
&lt;p&gt;The measure itself, then the lines that give it meaning. A three-month moving average smooths out noise:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue = &lt;i class=&quot;f&quot;&gt;SUM&lt;/i&gt; ( Sales&lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt; )

Revenue 3M Avg =
&lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;DATESINPERIOD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), -&lt;i class=&quot;n&quot;&gt;3&lt;/i&gt;, MONTH ),
    &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;
)&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;That first version averages days. To average three monthly totals, iterate the months:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue 3M Avg =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Months =
    &lt;i class=&quot;f&quot;&gt;CALCULATETABLE&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year Month]&lt;/i&gt; ),
        &lt;i class=&quot;f&quot;&gt;DATESINPERIOD&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ), -&lt;i class=&quot;n&quot;&gt;3&lt;/i&gt;, MONTH )
    )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;AVERAGEX&lt;/i&gt; ( Months, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Month&lt;/th&gt;&lt;th&gt;Revenue&lt;/th&gt;&lt;th&gt;Revenue 3M Avg&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Jan&lt;/td&gt;&lt;td&gt;80&lt;/td&gt;&lt;td&gt;80.0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Feb&lt;/td&gt;&lt;td&gt;95&lt;/td&gt;&lt;td&gt;87.5&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Mar&lt;/td&gt;&lt;td&gt;90&lt;/td&gt;&lt;td&gt;88.3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Apr&lt;/td&gt;&lt;td&gt;118&lt;/td&gt;&lt;td&gt;101.0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;May&lt;/td&gt;&lt;td&gt;130&lt;/td&gt;&lt;td&gt;112.7&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;Last year as a second line:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue LY =
&lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;SAMEPERIODLASTYEAR&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;A line that must not run into the future (dates with no sales yet) needs a stop:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Revenue to Date =
&lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; ) &amp;lt;= &lt;i class=&quot;f&quot;&gt;TODAY&lt;/i&gt; (), &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A line for categories without order.&lt;/strong&gt; A line from &amp;quot;North&amp;quot; to &amp;quot;South&amp;quot; to &amp;quot;East&amp;quot; suggests a movement that does not exist. Use columns.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Zero where there was no data.&lt;/strong&gt; A measure that returns 0 instead of blank drops the line to the floor for future months. Return blank (&lt;code&gt;IF&lt;/code&gt; as above).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A zoomed axis without a clue.&lt;/strong&gt; A line may start above zero, but say so: an axis from 95 to 105 makes a 2% move look like a crash.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Too many lines.&lt;/strong&gt; Five or more crossing lines are a &amp;quot;spaghetti chart&amp;quot;; use series labels, highlight one line in colour and grey the rest, or small multiples.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Legend and several measures.&lt;/strong&gt; Not allowed together: pick one way of making series.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Months as text on a continuous axis.&lt;/strong&gt; Text is always categorical; use the date or a month start date for a real time axis.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-line-chart&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Line charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/datesinperiod-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: DATESINPERIOD function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/sameperiodlastyear-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SAMEPERIODLASTYEAR function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Put a date on a continuous X-axis, one measure on the Y-axis, and add a goal or last-year line only if it answers the question. &lt;a href=&quot;/blog/rolling-12-months-dax/&quot;&gt;Rolling 12 months in DAX&lt;/a&gt; covers moving averages in depth, and &lt;a href=&quot;/blog/area-chart-power-bi/&quot;&gt;area charts&lt;/a&gt; are the line chart's filled cousins.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Copy every table with one Data Factory pipeline</title>
    <link href="https://data.benibix.com/blog/metadata-driven-pipeline-azure-data-factory/"/>
    <id>https://data.benibix.com/blog/metadata-driven-pipeline-azure-data-factory/</id>
    <published>2026-10-13T12:00:00Z</published>
    <updated>2026-10-13T12:00:00Z</updated>
    <summary>A metadata-driven pipeline in Azure Data Factory reads a control table and copies every table in it, so a new table is a new row, not a new pipeline.</summary>
    <category term="Azure"/>
    <category term="Data Factory"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; keep a control table with one row per source table, and build one parameterised pipeline: a &lt;strong&gt;Lookup&lt;/strong&gt; reads the control table, a &lt;strong&gt;ForEach&lt;/strong&gt; runs one &lt;strong&gt;Copy&lt;/strong&gt; per row, and each copy writes its result back. Adding a table to the load is then an &lt;code&gt;INSERT&lt;/code&gt;, not a new pipeline.&lt;/p&gt;
&lt;p&gt;A pipeline per table is fine for three tables. At thirty, every change to how you copy (a new folder layout, a retry setting, a log line) has to be made thirty times, and every new table is a release. The metadata-driven pattern turns that around: the pipeline stays the same, and what it copies lives in a table you can read, query and change.&lt;/p&gt;
&lt;h2 id=&quot;how-does-a-metadata-driven-pipeline-work&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-does-a-metadata-driven-pipeline-work&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How does a metadata-driven pipeline work?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Control table&lt;/b&gt;&lt;span&gt;one row per source table, with its key and its last load&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Lookup&lt;/b&gt;&lt;span&gt;reads the active rows&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;ForEach&lt;/b&gt;&lt;span&gt;one iteration per row, several at a time&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Copy&lt;/b&gt;&lt;span&gt;the table into its own folder in the lake&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Write back&lt;/b&gt;&lt;span&gt;the run's result into the control table&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One pipeline, any number of tables&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The pipeline never names a table. The Lookup returns a list, the ForEach walks it, and inside the loop &lt;code&gt;@item()&lt;/code&gt; is the current row: its schema, its table name and whatever else the row holds.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-in-the-control-table&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-in-the-control-table&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes in the control table?&lt;/h2&gt;
&lt;p&gt;Only what the pipeline needs to decide what to copy and to report what happened:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;SchemaName&lt;/th&gt;&lt;th&gt;TableName&lt;/th&gt;&lt;th&gt;WatermarkColumn&lt;/th&gt;&lt;th&gt;IsActive&lt;/th&gt;&lt;th&gt;LastRunStatus&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;SalesLT&lt;/td&gt;&lt;td&gt;Customer&lt;/td&gt;&lt;td&gt;ModifiedDate&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;Succeeded&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;SalesLT&lt;/td&gt;&lt;td&gt;Product&lt;/td&gt;&lt;td&gt;ModifiedDate&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;Succeeded&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;SalesLT&lt;/td&gt;&lt;td&gt;SalesOrderHeader&lt;/td&gt;&lt;td&gt;ModifiedDate&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;Failed&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;SalesLT&lt;/td&gt;&lt;td&gt;ProductModel&lt;/td&gt;&lt;td&gt;ModifiedDate&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;Skipped&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;The control table the Lookup reads (etl.LoadControl)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;code&gt;IsActive&lt;/code&gt; switches a table off without deleting its row, and the last two columns tell you, and your monitoring, what the last run did. The struck-out row above is switched off, so the Lookup never returns it.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;CREATE&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;TABLE&lt;/i&gt; etl.&lt;i class=&quot;f&quot;&gt;LoadControl&lt;/i&gt; (
    SchemaName      sysname      &lt;i class=&quot;k&quot;&gt;NOT&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;NULL&lt;/i&gt;,
    TableName       sysname      &lt;i class=&quot;k&quot;&gt;NOT&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;NULL&lt;/i&gt;,
    WatermarkColumn sysname      &lt;i class=&quot;k&quot;&gt;NOT&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;NULL&lt;/i&gt;,
    LastWatermark   datetime2    &lt;i class=&quot;k&quot;&gt;NOT&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;NULL&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;DEFAULT&lt;/i&gt; &lt;i class=&quot;s&quot;&gt;'1900-01-01'&lt;/i&gt;,
    IsActive        bit          &lt;i class=&quot;k&quot;&gt;NOT&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;NULL&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;DEFAULT&lt;/i&gt; &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;,
    LastRunAt       datetime2    &lt;i class=&quot;k&quot;&gt;NULL&lt;/i&gt;,
    LastRunStatus   &lt;i class=&quot;f&quot;&gt;nvarchar&lt;/i&gt;(&lt;i class=&quot;n&quot;&gt;20&lt;/i&gt;) &lt;i class=&quot;k&quot;&gt;NULL&lt;/i&gt;,
    &lt;i class=&quot;k&quot;&gt;CONSTRAINT&lt;/i&gt; PK_LoadControl &lt;i class=&quot;k&quot;&gt;PRIMARY&lt;/i&gt; &lt;i class=&quot;k&quot;&gt;KEY&lt;/i&gt; (SchemaName, TableName)
);&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;how-do-you-build-the-pipeline&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-build-the-pipeline&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you build the pipeline?&lt;/h2&gt;
&lt;ol&gt;&lt;li&gt;A &lt;strong&gt;Lookup&lt;/strong&gt; activity with &lt;strong&gt;First row only&lt;/strong&gt; turned off, and the query below as its source.&lt;/li&gt;&lt;li&gt;A &lt;strong&gt;ForEach&lt;/strong&gt; whose items are &lt;code&gt;@activity('Lookup control').output.value&lt;/code&gt;. Leave &lt;strong&gt;Sequential&lt;/strong&gt; off and set a &lt;strong&gt;Batch count&lt;/strong&gt;, so several tables copy at once.&lt;/li&gt;&lt;li&gt;Inside the ForEach, a &lt;strong&gt;Copy&lt;/strong&gt; activity. Its source dataset takes &lt;code&gt;SchemaName&lt;/code&gt; and &lt;code&gt;TableName&lt;/code&gt; as parameters, filled with &lt;code&gt;@item().SchemaName&lt;/code&gt; and &lt;code&gt;@item().TableName&lt;/code&gt;. Its sink dataset writes to a folder built from the same values, for example &lt;code&gt;raw/@{item().SchemaName}/@{item().TableName}/&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;After the Copy, a &lt;strong&gt;Stored procedure&lt;/strong&gt; activity that writes &lt;code&gt;LastRunAt&lt;/code&gt; and &lt;code&gt;LastRunStatus&lt;/code&gt; back for that row. Put one on the success path and one on the failure path, so a failed table is marked failed.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;The Lookup's query:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;SELECT&lt;/i&gt; SchemaName, TableName, WatermarkColumn, LastWatermark
&lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; etl.LoadControl
&lt;i class=&quot;k&quot;&gt;WHERE&lt;/i&gt; IsActive = &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt;;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Two datasets (one source, one sink) serve every table. That is the whole saving: the copy logic exists once.&lt;/p&gt;
&lt;h2 id=&quot;what-are-the-limits&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-limits&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the limits?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;A Lookup returns at most 5,000 rows and 4 MB. A control table rarely gets near that, but if yours does, split it by a group column and run one ForEach per group.&lt;/li&gt;&lt;li&gt;A ForEach runs up to 50 iterations at the same time (the default is 20). The source database decides the real limit: start low and raise it while you watch it.&lt;/li&gt;&lt;li&gt;A ForEach cannot hold another ForEach. If each table needs its own loop, move the inner part into a second pipeline and call it with &lt;strong&gt;Execute Pipeline&lt;/strong&gt;.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;One table fails, and you only find out from the pipeline's red status.&lt;/strong&gt; The write-back step on the failure path is what tells you which table, and why. Without it you open run history and click through the iterations.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A copy runs into a table that changed shape.&lt;/strong&gt; A new column in the source flows into the Parquet files without complaint, but a report downstream may break. Keep schema drift visible: compare the columns the copy wrote with the columns it wrote last time.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Every run copies everything.&lt;/strong&gt; That is the next step: a watermark per table, so each run asks for the newer rows only. See &lt;a href=&quot;/blog/incremental-load-watermark-azure-data-factory/&quot;&gt;Load only the rows that changed&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/data-factory/control-flow-lookup-activity&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Lookup activity in Azure Data Factory&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/data-factory/control-flow-for-each-activity&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: ForEach activity in Azure Data Factory&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/data-factory/copy-data-tool-metadata-driven&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Build a metadata-driven copy task with the Copy Data tool&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;The open course &lt;a href=&quot;/courses/metadata-driven-pipeline/&quot;&gt;Your first metadata-driven pipeline&lt;/a&gt; builds this pattern step by step in your own Azure subscription: the control table, the Lookup, ForEach and Copy, and the watermark that makes it incremental. The pattern sits with the others on &lt;a href=&quot;/work/#one-pipeline-every-table&quot;&gt;the map of my work&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>First pass yield and rolled throughput yield in DAX</title>
    <link href="https://data.benibix.com/blog/first-pass-yield-kpi/"/>
    <id>https://data.benibix.com/blog/first-pass-yield-kpi/</id>
    <published>2026-10-13T12:00:00Z</published>
    <updated>2026-10-13T12:00:00Z</updated>
    <summary>How to calculate first pass yield (units good the first time without rework), the difference from final yield, rolled throughput yield across process steps, defects per million opportunities, scrap rate, the DAX on inspection records, and a Pareto chart of defect causes.</summary>
    <category term="KPIs"/>
    <category term="Operations"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;first pass yield (FPY)&lt;/strong&gt; = units that pass a process step &lt;strong&gt;the first time&lt;/strong&gt;, without rework or repair / units that entered the step. It differs from &lt;strong&gt;final yield&lt;/strong&gt;, which counts reworked units as good: 1,000 units in, 920 good at once, 60 good after rework, 20 scrapped gives FPY &lt;strong&gt;92%&lt;/strong&gt; and final yield 98%. Across several steps, &lt;strong&gt;rolled throughput yield (RTY)&lt;/strong&gt; multiplies the FPYs: 95% × 92% × 97% = &lt;strong&gt;84.8%&lt;/strong&gt;, the share of units that go through the whole process without any rework.&lt;/p&gt;
&lt;p&gt;Final yield makes a process look healthy while a hidden factory of rework eats time and money. FPY and RTY show that hidden work.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Step&lt;/th&gt;&lt;th&gt;Units in&lt;/th&gt;&lt;th&gt;Good first time&lt;/th&gt;&lt;th&gt;Reworked to good&lt;/th&gt;&lt;th&gt;Scrapped&lt;/th&gt;&lt;th&gt;FPY&lt;/th&gt;&lt;th&gt;Final yield&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Machining&lt;/td&gt;&lt;td&gt;1,000&lt;/td&gt;&lt;td&gt;950&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;95.0%&lt;/td&gt;&lt;td&gt;99.0%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Welding&lt;/td&gt;&lt;td&gt;990&lt;/td&gt;&lt;td&gt;911&lt;/td&gt;&lt;td&gt;64&lt;/td&gt;&lt;td&gt;15&lt;/td&gt;&lt;td&gt;92.0%&lt;/td&gt;&lt;td&gt;98.5%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Painting&lt;/td&gt;&lt;td&gt;975&lt;/td&gt;&lt;td&gt;946&lt;/td&gt;&lt;td&gt;24&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;97.0%&lt;/td&gt;&lt;td&gt;99.5%&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Process&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;td&gt;RTY 84.8%&lt;/td&gt;&lt;td&gt;97.0%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Three process steps, 1,000 units started&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;RTY = 0.95 × 0.92 × 0.97 = &lt;strong&gt;84.8%&lt;/strong&gt;: about 15 of every 100 units need rework somewhere.&lt;/li&gt;&lt;li&gt;Final yield = 970 good of 1,000 started = 97%.&lt;/li&gt;&lt;/ul&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;bar&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;bar chart: Porosity 38; Misalignment 22; Undercut 12; Spatter 7&quot;&gt;&lt;line x1=&quot;105.6&quot; y1=&quot;8&quot; x2=&quot;105.6&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;105.6&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;228.2&quot; y1=&quot;8&quot; x2=&quot;228.2&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;228.2&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;10&lt;/text&gt;&lt;line x1=&quot;350.8&quot; y1=&quot;8&quot; x2=&quot;350.8&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;350.8&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;20&lt;/text&gt;&lt;line x1=&quot;473.4&quot; y1=&quot;8&quot; x2=&quot;473.4&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;473.4&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;30&lt;/text&gt;&lt;line x1=&quot;596&quot; y1=&quot;8&quot; x2=&quot;596&quot; y2=&quot;270&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;596&quot; y=&quot;286&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;40&lt;/text&gt;&lt;rect x=&quot;105.6&quot; y=&quot;19.1&quot; width=&quot;465.9&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-red&quot;/&gt;&lt;text x=&quot;577.5&quot; y=&quot;44.8&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;38&lt;/text&gt;&lt;text x=&quot;95.6&quot; y=&quot;44.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Porosity&lt;/text&gt;&lt;rect x=&quot;105.6&quot; y=&quot;84.6&quot; width=&quot;269.7&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-gold&quot;/&gt;&lt;text x=&quot;381.3&quot; y=&quot;110.3&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;22&lt;/text&gt;&lt;text x=&quot;95.6&quot; y=&quot;110.3&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Misalignment&lt;/text&gt;&lt;rect x=&quot;105.6&quot; y=&quot;150.1&quot; width=&quot;147.1&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-gold&quot;/&gt;&lt;text x=&quot;258.7&quot; y=&quot;175.8&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;12&lt;/text&gt;&lt;text x=&quot;95.6&quot; y=&quot;175.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Undercut&lt;/text&gt;&lt;rect x=&quot;105.6&quot; y=&quot;215.6&quot; width=&quot;85.8&quot; height=&quot;41.2&quot; rx=&quot;3&quot; class=&quot;m t-grey&quot;/&gt;&lt;text x=&quot;197.4&quot; y=&quot;241.3&quot; class=&quot;tv&quot; text-anchor=&quot;start&quot;&gt;7&lt;/text&gt;&lt;text x=&quot;95.6&quot; y=&quot;241.3&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;Spatter&lt;/text&gt;&lt;line x1=&quot;105.6&quot; y1=&quot;8&quot; x2=&quot;105.6&quot; y2=&quot;270&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;Rework and scrap at welding by cause (units)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Two causes make up 76% of welding defects: a Pareto view tells the team where to start.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;An Inspections table with one row per unit and step: Unit ID, Step, First Result (Pass or Fail), Final Result (Pass or Scrap), Defect Cause.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Units In = &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( Inspections )
First Pass = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Units In]&lt;/i&gt;, Inspections&lt;i class=&quot;m&quot;&gt;[First Result]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Pass&amp;quot;&lt;/i&gt; )
Final Good = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Units In]&lt;/i&gt;, Inspections&lt;i class=&quot;m&quot;&gt;[Final Result]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Pass&amp;quot;&lt;/i&gt; )
Scrapped = &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Units In]&lt;/i&gt;, Inspections&lt;i class=&quot;m&quot;&gt;[Final Result]&lt;/i&gt; = &lt;i class=&quot;s&quot;&gt;&amp;quot;Scrap&amp;quot;&lt;/i&gt; )

FPY = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[First Pass]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Units In]&lt;/i&gt; )
Final Yield = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Final Good]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Units In]&lt;/i&gt; )
Scrap Rate = &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Scrapped]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Units In]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- rolled throughput yield: product of the steps' FPY&lt;/i&gt;
RTY = &lt;i class=&quot;f&quot;&gt;PRODUCTX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Inspections&lt;i class=&quot;m&quot;&gt;[Step]&lt;/i&gt; ), &lt;i class=&quot;m&quot;&gt;[FPY]&lt;/i&gt; )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;PRODUCTX&lt;/code&gt; multiplies the FPY of each step in the current filter (see &lt;a href=&quot;/blog/aggregation-functions-dax-reference/&quot;&gt;aggregation functions&lt;/a&gt;). With the steps on rows, each row shows its FPY, and the total row shows RTY when you put RTY in the total (or use &lt;code&gt;IF ( ISINSCOPE ( Inspections[Step] ), [FPY], [RTY] )&lt;/code&gt;).&lt;/p&gt;
&lt;h2 id=&quot;what-is-dpmo&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-dpmo&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is DPMO?&lt;/h2&gt;
&lt;p&gt;When a unit can have several defects, &lt;strong&gt;defects per million opportunities&lt;/strong&gt; = defects / (units × opportunities per unit) × 1,000,000. 79 defects on 990 welded units with 4 weld seams each: 79 / 3,960 × 1,000,000 = &lt;strong&gt;19,949 DPMO&lt;/strong&gt;. It compares processes of different complexity.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Reporting final yield only.&lt;/strong&gt; Hides rework cost.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Rework not recorded.&lt;/strong&gt; If operators fix units without logging, FPY looks like final yield; make the first result mandatory.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Averaging FPY across steps.&lt;/strong&gt; Multiply for the process (RTY); average says nothing about a unit's path.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Different units in each step.&lt;/strong&gt; Scrapped units leave; each step's FPY uses its own units in.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/productx-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: PRODUCTX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/isinscope-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: ISINSCOPE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-types-for-reports-and-q-and-a&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Bar and column charts in Power BI&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Record the first inspection result for each unit and step, then show FPY per step with RTY on the total. &lt;a href=&quot;/blog/oee-kpi/&quot;&gt;OEE&lt;/a&gt; puts quality next to availability and speed.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>GH-300 in 2026: the GitHub Copilot exam and how to study</title>
    <link href="https://data.benibix.com/blog/gh-300-study-guide/"/>
    <id>https://data.benibix.com/blog/gh-300-study-guide/</id>
    <published>2026-10-13T12:00:00Z</published>
    <updated>2026-10-13T12:00:00Z</updated>
    <summary>What the GH-300 GitHub Copilot exam measures since August 2026, how its six areas are weighted, what changed with agent mode and the Copilot CLI, and a study plan built on one small project you finish with Copilot.</summary>
    <category term="Exams"/>
    <category term="GitHub"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; GH-300 earns the &lt;strong&gt;GitHub Copilot&lt;/strong&gt; certification (intermediate level). Copilot features are the largest area (25 to 30%), responsible use is 15 to 20%, and data and architecture, prompt engineering, developer productivity, and privacy and safeguards are 10 to 15% each. The exam gives you 100 minutes, and GitHub certifications are valid for two years while GitHub moves to Microsoft's renewal process.&lt;/p&gt;
&lt;p&gt;The August 2026 version is about Copilot as an agent, not only autocomplete: agent mode, Copilot Edits, MCP, sessions and sub-agents, and the Copilot CLI, plus the admin side of policies and content exclusions.&lt;/p&gt;
&lt;h2 id=&quot;what-does-gh-300-cover&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-gh-300-cover&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does GH-300 cover?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;bars&quot;&gt;&lt;ul class=&quot;dfig-bars&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;b&gt;Use GitHub Copilot responsibly&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:66.7%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;15-20%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;b&gt;Use GitHub Copilot features&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:100.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;25-30%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;Data and architecture&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:50.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;10-15%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;Prompt engineering and context&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:50.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;10-15%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;Developer productivity&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:50.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;10-15%&lt;/span&gt;&lt;/li&gt;&lt;li data-tone=&quot;silver&quot;&gt;&lt;b&gt;Privacy, exclusions and safeguards&lt;/b&gt;&lt;span class=&quot;dfig-bar&quot;&gt;&lt;i style=&quot;width:50.0%&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span&gt;10-15%&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;figcaption&gt;GH-300 skills, by weight in the exam&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Responsible use&lt;/strong&gt;: the risks and limits of generative AI, and why every output needs checking.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Features&lt;/strong&gt;: Copilot in the IDE, the Copilot CLI, agent mode, Copilot Edits and MCP, agent sessions and sub-agents, and organisation-wide policies.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Data and architecture&lt;/strong&gt;: how prompts and code flow and are stored, and the lifecycle of a suggestion.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Prompts&lt;/strong&gt;: structure and context, and principles for better results.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Productivity&lt;/strong&gt;: generating, refactoring and documenting code, and writing unit and integration tests.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Safeguards&lt;/strong&gt;: content exclusions, editor settings, and the filter for suggestions matching public code.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-would-you-study-for-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-would-you-study-for-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How would you study for it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:5&quot;&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Ask&lt;/b&gt;&lt;span&gt;explain an unfamiliar file in chat&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Build&lt;/b&gt;&lt;span&gt;a feature in agent mode, reviewed change by change&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Test&lt;/b&gt;&lt;span&gt;generate tests, then fix what they find&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;CLI&lt;/b&gt;&lt;span&gt;run a task from the terminal with the Copilot CLI&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;5&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Govern&lt;/b&gt;&lt;span&gt;set a content exclusion and the public-code filter on an organisation&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;One small project, finished with Copilot&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Using the admin settings once matters: several areas are about organisation policies, which individual users rarely see.&lt;/p&gt;
&lt;h2 id=&quot;what-helps-on-the-day&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-helps-on-the-day&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What helps on the day?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Know which plan has what.&lt;/strong&gt; The audience profile names Copilot features across the different plans.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Validation is always part of the answer.&lt;/strong&gt; Copilot output is checked by tests and review.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;No Microsoft Learn during GitHub exams.&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;how-do-you-keep-the-certification&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-you-keep-the-certification&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do you keep the certification?&lt;/h2&gt;
&lt;p&gt;It is valid for two years. GitHub is moving its certifications to Microsoft's renewal process, and certifications that expire before that is ready are extended by six months.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/gh-300&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Study guide for Exam GH-300&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/certifications/github-copilot/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: GitHub Copilot certification&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/support/exam-duration-exam-experience&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Exam duration and exam experience&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Take one small project and finish it with Copilot, then set the organisation policies. &lt;a href=&quot;/blog/gh-900-study-guide/&quot;&gt;GH-900&lt;/a&gt; covers the GitHub basics this exam assumes.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>How I design a Power BI report page, step by step</title>
    <link href="https://data.benibix.com/blog/power-bi-report-design-pattern/"/>
    <id>https://data.benibix.com/blog/power-bi-report-design-pattern/</id>
    <published>2026-10-13T12:00:00Z</published>
    <updated>2026-11-02T12:00:00Z</updated>
    <summary>A theme file for the whole report, a grid that puts the answer where the eye lands first, one chart per question, and a contrast check before anyone opens it.</summary>
    <category term="Visuals"/>
    <category term="Report design"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; set colours, fonts and visual styles once, in a &lt;strong&gt;theme file&lt;/strong&gt;, and never format visuals one by one. Lay every page on the same &lt;strong&gt;grid&lt;/strong&gt;, with the key number top left and the detail below it. Pick &lt;strong&gt;one chart per question&lt;/strong&gt;, from the question. And check every colour for &lt;strong&gt;contrast&lt;/strong&gt; and colour blindness before the first person opens the report.&lt;/p&gt;
&lt;p&gt;A report built visual by visual ends up with five shades of blue, three font sizes and a pie chart nobody can read. Each fix is small; together they make readers search the page for the answer. Four steps, done in this order, avoid most of it.&lt;/p&gt;
&lt;p&gt;The short video below shows the layout people actually read: the key numbers on top, the trend under them, the breakdowns below and the detail at the bottom.&lt;/p&gt;
&lt;h2 id=&quot;what-are-the-four-steps&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-the-four-steps&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are the four steps?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;flow&quot;&gt;&lt;ol class=&quot;dfig-row&quot; style=&quot;--n:4&quot;&gt;&lt;li data-tone=&quot;gold&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Theme&lt;/b&gt;&lt;span&gt;one JSON file: colours, fonts, visual styles&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;teal&quot;&gt;&lt;i&gt;2&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Grid&lt;/b&gt;&lt;span&gt;the answer top left, the detail below&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;blue&quot;&gt;&lt;i&gt;3&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Chart per question&lt;/b&gt;&lt;span&gt;picked from what it should say&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li data-tone=&quot;grey&quot;&gt;&lt;i&gt;4&lt;/i&gt;&lt;div class=&quot;dfig-node&quot;&gt;&lt;b&gt;Checks&lt;/b&gt;&lt;span&gt;contrast and colour blindness, before release&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;figcaption&gt;Four steps, in this order&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-goes-in-the-theme&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-in-the-theme&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes in the theme?&lt;/h2&gt;
&lt;p&gt;A report theme is a JSON file you load in Power BI Desktop under &lt;strong&gt;View&lt;/strong&gt;, then &lt;strong&gt;Themes&lt;/strong&gt;, then &lt;strong&gt;Browse for themes&lt;/strong&gt;. It holds the data colours in order, the text classes (title, label, callout) and defaults for each visual type, so a new visual already looks right.&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;json&quot;&gt;&lt;code&gt;{
  &lt;i class=&quot;s&quot;&gt;&amp;quot;name&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;Sales at a glance&amp;quot;&lt;/i&gt;,
  &lt;i class=&quot;s&quot;&gt;&amp;quot;dataColors&amp;quot;&lt;/i&gt;: [&lt;i class=&quot;s&quot;&gt;&amp;quot;#2f7cf6&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#107356&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#a87400&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;#6b7080&amp;quot;&lt;/i&gt;],
  &lt;i class=&quot;s&quot;&gt;&amp;quot;foreground&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;#1b1d24&amp;quot;&lt;/i&gt;,
  &lt;i class=&quot;s&quot;&gt;&amp;quot;background&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;#ffffff&amp;quot;&lt;/i&gt;,
  &lt;i class=&quot;s&quot;&gt;&amp;quot;textClasses&amp;quot;&lt;/i&gt;: {
    &lt;i class=&quot;s&quot;&gt;&amp;quot;title&amp;quot;&lt;/i&gt;: { &lt;i class=&quot;s&quot;&gt;&amp;quot;fontFace&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;Segoe UI Semibold&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;fontSize&amp;quot;&lt;/i&gt;: &lt;i class=&quot;n&quot;&gt;14&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;color&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;#1b1d24&amp;quot;&lt;/i&gt; },
    &lt;i class=&quot;s&quot;&gt;&amp;quot;label&amp;quot;&lt;/i&gt;: { &lt;i class=&quot;s&quot;&gt;&amp;quot;fontFace&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;Segoe UI&amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;fontSize&amp;quot;&lt;/i&gt;: &lt;i class=&quot;n&quot;&gt;10&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;color&amp;quot;&lt;/i&gt;: &lt;i class=&quot;s&quot;&gt;&amp;quot;#6b7080&amp;quot;&lt;/i&gt; }
  }
}&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;Keep it in source control with the report, and use it for every report of the team: readers learn where things are once.&lt;/p&gt;
&lt;h2 id=&quot;where-does-the-eye-land-first&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-does-the-eye-land-first&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where does the eye land first?&lt;/h2&gt;
&lt;p&gt;Top left, in a left-to-right language, then along the top, then down. So that is where the answer goes:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;cards&quot;&gt;&lt;div class=&quot;dfig-cards&quot; style=&quot;--n:4&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Top left&lt;/b&gt;&lt;span&gt;the one number the page answers, with its change&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;blue&quot;&gt;&lt;b&gt;Top row&lt;/b&gt;&lt;span&gt;two or three supporting numbers, same size cards&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;gold&quot;&gt;&lt;b&gt;Middle&lt;/b&gt;&lt;span&gt;the trend: how the number got here&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Bottom&lt;/b&gt;&lt;span&gt;the detail: by region, product or customer&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;One page grid, used on every page&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Filters go in one place on every page, either along the top or in the filter pane, never scattered between visuals.&lt;/p&gt;
&lt;h2 id=&quot;which-chart-for-which-question&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-chart-for-which-question&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which chart for which question?&lt;/h2&gt;
&lt;p&gt;Start from what the chart should say, not from the visual list. A change over time is a line or columns; a comparison between categories is bars, sorted; a part of a whole with two or three parts can be a stacked bar. One chart answers one question. If a visual needs a paragraph to explain, it is two charts. &lt;a href=&quot;https://tools.benibix.com/data/chart-compass/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Chart Compass&lt;/a&gt; picks a chart from the question when you are not sure.&lt;/p&gt;
&lt;h2 id=&quot;do-your-colours-pass&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#do-your-colours-pass&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Do your colours pass?&lt;/h2&gt;
&lt;p&gt;Text needs a contrast ratio of at least 4.5 to 1 with its background, and lines, bars and other graphics at least 3 to 1. Bright brand colours often fail on white:&lt;/p&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Colour&lt;/th&gt;&lt;th&gt;Use&lt;/th&gt;&lt;th&gt;Ratio&lt;/th&gt;&lt;th&gt;Text (4.5)&lt;/th&gt;&lt;th&gt;Graphics (3)&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;#1b1d24&lt;/td&gt;&lt;td&gt;text&lt;/td&gt;&lt;td&gt;16.8 : 1&lt;/td&gt;&lt;td&gt;passes&lt;/td&gt;&lt;td&gt;passes&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;#107356&lt;/td&gt;&lt;td&gt;deep teal&lt;/td&gt;&lt;td&gt;5.8 : 1&lt;/td&gt;&lt;td&gt;passes&lt;/td&gt;&lt;td&gt;passes&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;#2f7cf6&lt;/td&gt;&lt;td&gt;blue&lt;/td&gt;&lt;td&gt;3.9 : 1&lt;/td&gt;&lt;td&gt;fails&lt;/td&gt;&lt;td&gt;passes&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;#20c997&lt;/td&gt;&lt;td&gt;bright teal&lt;/td&gt;&lt;td&gt;2.1 : 1&lt;/td&gt;&lt;td&gt;fails&lt;/td&gt;&lt;td&gt;fails&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;off&quot;&gt;&lt;td&gt;#ffc72c&lt;/td&gt;&lt;td&gt;yellow&lt;/td&gt;&lt;td&gt;1.6 : 1&lt;/td&gt;&lt;td&gt;fails&lt;/td&gt;&lt;td&gt;fails&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Colours on a white page, by contrast ratio&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Colour must never be the only way to tell two series apart: about 8% of men see some colours differently. Label the lines directly, or add markers. &lt;a href=&quot;https://tools.benibix.com/blog/colour-blind-friendly-dashboard-palettes/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Colour-blind-friendly palettes&lt;/a&gt; has sets that work.&lt;/p&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-report-themes&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Use report themes in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-accessibility-creating-reports&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Design Power BI reports for accessibility&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://www.w3.org/WAI/WCAG22/Understanding/contrast-minimum.html&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;W3C: Understanding WCAG 2.2, contrast (minimum)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://www.w3.org/WAI/WCAG22/Understanding/non-text-contrast.html&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;W3C: Understanding WCAG 2.2, non-text contrast&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://www.nei.nih.gov/learn-about-eye-health/eye-conditions-and-diseases/color-blindness&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;National Eye Institute: Color blindness&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://tools.benibix.com/data/report-design-studio/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Report Design Studio&lt;/a&gt; builds the theme (palette, fonts, every visual), lays out the page with navigation, a title bar and tiles, checks every colour pair for contrast, and exports a theme JSON that Power BI opens as it is. The longer walk through layout is &lt;a href=&quot;https://tools.benibix.com/blog/dashboard-layout-that-reads/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;A dashboard layout people can read in five seconds&lt;/a&gt;, and the pattern sits on &lt;a href=&quot;/work/#read-at-a-glance&quot;&gt;the map of my work&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Net revenue retention (NRR) and GRR in DAX</title>
    <link href="https://data.benibix.com/blog/net-revenue-retention-kpi/"/>
    <id>https://data.benibix.com/blog/net-revenue-retention-kpi/</id>
    <published>2026-10-13T12:00:00Z</published>
    <updated>2026-10-13T12:00:00Z</updated>
    <summary>How to calculate net revenue retention and gross revenue retention for subscription businesses, the recurring revenue of a customer group twelve months later including expansion, contraction and churn, a worked example, the cohort method, monthly against annual NRR, and the DAX on an MRR model.</summary>
    <category term="KPIs"/>
    <category term="SaaS and product"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;net revenue retention (NRR)&lt;/strong&gt; = recurring revenue today from the customers you had 12 months ago / their recurring revenue 12 months ago. It &lt;strong&gt;includes&lt;/strong&gt; their expansion and subtracts contraction and churn, and &lt;strong&gt;excludes&lt;/strong&gt; new customers. &lt;strong&gt;Gross revenue retention (GRR)&lt;/strong&gt; is the same without expansion, so it cannot exceed 100%. With 1,000k MRR a year ago, +180 expansion, -40 contraction and -90 churn from those customers: NRR = (1,000 + 180 - 40 - 90) / 1,000 = &lt;strong&gt;105%&lt;/strong&gt;, GRR = (1,000 - 40 - 90) / 1,000 = &lt;strong&gt;87%&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;NRR above 100% means the existing base grows on its own, even with no new sales. GRR shows how much of the base is kept; together they separate &amp;quot;we keep customers&amp;quot; from &amp;quot;the customers we keep buy more&amp;quot;.&lt;/p&gt;
&lt;h2 id=&quot;how-is-it-calculated&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-is-it-calculated&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How is it calculated?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Item&lt;/th&gt;&lt;th&gt;MRR&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Starting MRR (1 Oct 2025)&lt;/td&gt;&lt;td&gt;1,000&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Expansion by those customers&lt;/td&gt;&lt;td&gt;+180&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Contraction by those customers&lt;/td&gt;&lt;td&gt;-40&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Churn of those customers&lt;/td&gt;&lt;td&gt;-90&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;on&quot;&gt;&lt;td&gt;Their MRR on 30 Sep 2026&lt;/td&gt;&lt;td&gt;1,050&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;New customers since (not counted)&lt;/td&gt;&lt;td&gt;260&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Customers active on 1 Oct 2025, MRR (k)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ul&gt;&lt;li&gt;NRR = 1,050 / 1,000 = &lt;strong&gt;105%&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;GRR = (1,000 - 40 - 90) / 1,000 = &lt;strong&gt;87%&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;chart&quot; data-chart=&quot;line&quot;&gt;&lt;div class=&quot;dfig-chart&quot;&gt;&lt;ul class=&quot;dfig-legend&quot;&gt;&lt;li class=&quot;k0&quot;&gt;NRR&lt;/li&gt;&lt;li class=&quot;k1&quot;&gt;GRR&lt;/li&gt;&lt;/ul&gt;&lt;svg viewBox=&quot;0 0 640 300&quot; role=&quot;img&quot; aria-label=&quot;line chart: Q4 25 101, 86; Q1 26 102, 86; Q2 26 104, 87; Q3 26 105, 87&quot;&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;270&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;215.6&quot; x2=&quot;626&quot; y2=&quot;215.6&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;219.6&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;25&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;165.2&quot; x2=&quot;626&quot; y2=&quot;165.2&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;169.2&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;50&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;114.8&quot; x2=&quot;626&quot; y2=&quot;114.8&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;118.8&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;75&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;64.4&quot; x2=&quot;626&quot; y2=&quot;64.4&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;68.4&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;100&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;14&quot; x2=&quot;626&quot; y2=&quot;14&quot; class=&quot;gl&quot;/&gt;&lt;text x=&quot;44&quot; y=&quot;18&quot; class=&quot;tx&quot; text-anchor=&quot;end&quot;&gt;125&lt;/text&gt;&lt;polyline points=&quot;52,92.6 243.3,92.6 434.7,90.6 626,90.6&quot; class=&quot;ln k1&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;92.6&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;243.3&quot; cy=&quot;92.6&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;434.7&quot; cy=&quot;90.6&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;90.6&quot; r=&quot;3.5&quot; class=&quot;dt k1&quot;/&gt;&lt;polyline points=&quot;52,62.4 243.3,60.4 434.7,56.3 626,54.3&quot; class=&quot;ln k0&quot;/&gt;&lt;circle cx=&quot;52&quot; cy=&quot;62.4&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;243.3&quot; cy=&quot;60.4&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;434.7&quot; cy=&quot;56.3&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;circle cx=&quot;626&quot; cy=&quot;54.3&quot; r=&quot;3.5&quot; class=&quot;dt k0&quot;/&gt;&lt;text x=&quot;52&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q4 25&lt;/text&gt;&lt;text x=&quot;243.3&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q1 26&lt;/text&gt;&lt;text x=&quot;434.7&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q2 26&lt;/text&gt;&lt;text x=&quot;626&quot; y=&quot;284&quot; class=&quot;tx&quot; text-anchor=&quot;middle&quot;&gt;Q3 26&lt;/text&gt;&lt;line x1=&quot;52&quot; y1=&quot;266&quot; x2=&quot;626&quot; y2=&quot;266&quot; class=&quot;ax&quot;/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;figcaption&gt;NRR and GRR, trailing 12 months (%)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-is-the-dax&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-is-the-dax&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What is the DAX?&lt;/h2&gt;
&lt;p&gt;Using the &lt;a href=&quot;/blog/mrr-arr-kpi/&quot;&gt;MRR&lt;/a&gt; measure (MRR at the last date of the selection) per customer:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;NRR 12M =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; D = &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; D0 = &lt;i class=&quot;f&quot;&gt;EDATE&lt;/i&gt; ( D, -&lt;i class=&quot;n&quot;&gt;12&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Base =
    &lt;i class=&quot;f&quot;&gt;ADDCOLUMNS&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; (
            &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Subscriptions&lt;i class=&quot;m&quot;&gt;[Customer ID]&lt;/i&gt; ),
            &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[MRR]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; = D0 ) &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;
        ),
        &lt;i class=&quot;s&quot;&gt;&amp;quot;@Start&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[MRR]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; = D0 ),
        &lt;i class=&quot;s&quot;&gt;&amp;quot;@End&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[MRR]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; = D )
    )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Base, [@End] ), &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Base, [@Start] ) )

GRR 12M =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; D = &lt;i class=&quot;f&quot;&gt;MAX&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; D0 = &lt;i class=&quot;f&quot;&gt;EDATE&lt;/i&gt; ( D, -&lt;i class=&quot;n&quot;&gt;12&lt;/i&gt; )
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; Base =
    &lt;i class=&quot;f&quot;&gt;ADDCOLUMNS&lt;/i&gt; (
        &lt;i class=&quot;f&quot;&gt;FILTER&lt;/i&gt; (
            &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( Subscriptions&lt;i class=&quot;m&quot;&gt;[Customer ID]&lt;/i&gt; ),
            &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[MRR]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; = D0 ) &amp;gt; &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt;
        ),
        &lt;i class=&quot;s&quot;&gt;&amp;quot;@Start&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[MRR]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; = D0 ),
        &lt;i class=&quot;s&quot;&gt;&amp;quot;@End&amp;quot;&lt;/i&gt;, &lt;i class=&quot;f&quot;&gt;CALCULATE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[MRR]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Date]&lt;/i&gt; = D )
    )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt; &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Base, &lt;i class=&quot;f&quot;&gt;MIN&lt;/i&gt; ( [@End], [@Start] ) ), &lt;i class=&quot;f&quot;&gt;SUMX&lt;/i&gt; ( Base, [@Start] ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;MIN ( [@End], [@Start] )&lt;/code&gt; caps each customer at their starting MRR, which removes expansion and keeps contraction and churn: that is GRR. A blank end (churned) counts as zero.&lt;/p&gt;
&lt;h2 id=&quot;why-measure-over-12-months&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-measure-over-12-months&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why measure over 12 months?&lt;/h2&gt;
&lt;p&gt;Monthly NRR (for example 100.4%) is hard to read and swings with renewals. The trailing 12-month version compares the same customers a year apart and matches how investors and boards read it. Show it quarterly as a trend, as in the chart.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Counting new customers.&lt;/strong&gt; NRR is only about the starting group; new customers belong in &lt;a href=&quot;/blog/mrr-arr-kpi/&quot;&gt;MRR growth&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;GRR above 100%.&lt;/strong&gt; Expansion slipped in; cap each customer at the start.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Price increases.&lt;/strong&gt; They raise NRR without customers buying more; note them.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Small bases.&lt;/strong&gt; One large account's upgrade can move NRR by points; show the top movers.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/edate-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: EDATE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/addcolumns-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: ADDCOLUMNS function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/sumx-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SUMX function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Build MRR per customer at month end, then NRR and GRR over 12 months by quarter. &lt;a href=&quot;/blog/ltv-to-cac-kpi/&quot;&gt;LTV to CAC&lt;/a&gt; brings acquisition cost into the picture.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Query folding in Power Query, explained</title>
    <link href="https://data.benibix.com/blog/query-folding-power-query-explained/"/>
    <id>https://data.benibix.com/blog/query-folding-power-query-explained/</id>
    <published>2026-10-13T12:00:00Z</published>
    <updated>2026-10-13T12:00:00Z</updated>
    <summary>What query folding is in Power Query, how to see whether a step folds, which steps break it, and why incremental refresh depends on it.</summary>
    <category term="Power BI"/>
    <category term="Power Query"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;strong&gt;query folding&lt;/strong&gt; means Power Query turns your steps into one query in the source's own language, usually SQL, so the source does the filtering and grouping and sends back only the result. When a step cannot be translated, folding stops there: every step after it runs in Power Query, on all the rows the source sent. Keep the steps that fold first, and check with &lt;strong&gt;View Native Query&lt;/strong&gt; or the step folding indicators.&lt;/p&gt;
&lt;p&gt;A filter to last month on a ten-million-row table is instant when it folds and pulls all ten million rows when it does not. The steps look the same in the editor; only the query sent differs.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-folded-query-send&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-does-a-folded-query-send&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What does a folded query send?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;split&quot;&gt;&lt;div class=&quot;dfig-split&quot; style=&quot;--n:2&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;grey&quot;&gt;&lt;b&gt;Steps&lt;/b&gt;&lt;span&gt;filter to 2026, keep four columns, group by month&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-to&quot;&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;teal&quot;&gt;&lt;b&gt;Folds&lt;/b&gt;&lt;span&gt;one SQL query; the source returns 12 rows&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;dfig-node&quot; data-tone=&quot;red&quot;&gt;&lt;b&gt;Does not fold&lt;/b&gt;&lt;span&gt;the whole table comes back; Power Query filters it&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;figcaption&gt;The same steps, two outcomes&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;These steps fold against SQL Server:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;text&quot;&gt;&lt;code&gt;let
    Source   = Sql.Database(&amp;quot;sql01&amp;quot;, &amp;quot;Sales&amp;quot;),
    Orders   = Source{[Schema = &amp;quot;dbo&amp;quot;, Item = &amp;quot;Orders&amp;quot;]}[Data],
    Recent   = Table.SelectRows(Orders, each [OrderDate] &amp;gt;= #date(2026, 1, 1)),
    Columns  = Table.SelectColumns(Recent, {&amp;quot;OrderDate&amp;quot;, &amp;quot;CustomerID&amp;quot;, &amp;quot;Amount&amp;quot;})
in
    Columns&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;and the source receives one query:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;sql&quot;&gt;&lt;code&gt;&lt;i class=&quot;k&quot;&gt;SELECT&lt;/i&gt; &lt;i class=&quot;m&quot;&gt;[OrderDate]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[CustomerID]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Amount]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;FROM&lt;/i&gt; &lt;i class=&quot;m&quot;&gt;[dbo]&lt;/i&gt;.&lt;i class=&quot;m&quot;&gt;[Orders]&lt;/i&gt;
&lt;i class=&quot;k&quot;&gt;WHERE&lt;/i&gt; &lt;i class=&quot;m&quot;&gt;[OrderDate]&lt;/i&gt; &amp;gt;= &lt;i class=&quot;s&quot;&gt;'2026-01-01'&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;h2 id=&quot;which-steps-keep-folding-and-which-stop-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#which-steps-keep-folding-and-which-stop-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Which steps keep folding, and which stop it?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Step&lt;/th&gt;&lt;th&gt;Usually folds&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Filter rows, remove columns, rename&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Group by, sort, merge with another table on the same source&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Change type to a type the source has&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Add index column&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Table.Buffer, or a custom function per row&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Merge with a table from another source, like Excel&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;Typical steps against a SQL source&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Right-click a step: if &lt;strong&gt;View Native Query&lt;/strong&gt; is available, everything up to that step folds. In Power Query Online and Dataflow Gen2, the &lt;strong&gt;step folding indicators&lt;/strong&gt; mark each step as folding, not folding or unknown.&lt;/p&gt;
&lt;h2 id=&quot;why-does-incremental-refresh-need-it&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#why-does-incremental-refresh-need-it&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Why does incremental refresh need it?&lt;/h2&gt;
&lt;p&gt;Incremental refresh filters each partition by &lt;code&gt;RangeStart&lt;/code&gt; and &lt;code&gt;RangeEnd&lt;/code&gt;. If that filter folds, each refresh asks the source for a few days of rows. If it does not, Power BI fetches the whole table for every partition and throws most of it away, which is slower than no incremental refresh at all.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;A non-folding step early.&lt;/strong&gt; One index column at step two means everything after runs locally. Move such steps to the end.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Native SQL typed by hand.&lt;/strong&gt; A custom SQL statement can stop later steps from folding. Use it with &lt;code&gt;EnableFolding = true&lt;/code&gt; or put the logic in a view.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Assuming files fold.&lt;/strong&gt; CSV and Excel sources have nothing to fold into; filter them as early as possible anyway, but expect full reads.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-query/query-folding-basics&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Overview of query evaluation and query folding in Power Query&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-query/step-folding-indicators&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Step folding indicators&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/power-bi/guidance/power-query-folding&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Query folding guidance in Power BI Desktop&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/blog/incremental-refresh-power-bi-explained/&quot;&gt;Incremental refresh in Power BI&lt;/a&gt; is where folding matters most, and &lt;a href=&quot;/blog/dataflow-gen2-fabric-explained/&quot;&gt;Dataflow Gen2&lt;/a&gt; shows the step folding indicators at work in Fabric.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>SELECTEDVALUE and HASONEVALUE in DAX</title>
    <link href="https://data.benibix.com/blog/selectedvalue-hasonevalue-dax/"/>
    <id>https://data.benibix.com/blog/selectedvalue-hasonevalue-dax/</id>
    <published>2026-10-13T12:00:00Z</published>
    <updated>2026-10-13T12:00:00Z</updated>
    <summary>How SELECTEDVALUE and HASONEVALUE read what the reader selected in DAX, dynamic titles, what-if parameters and measure switches, the alternate result, ISFILTERED and ISCROSSFILTERED, CONCATENATEX for several selections, and the total row trap.</summary>
    <category term="DAX"/>
    <category term="Filter functions"/>
    <content type="html">&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; &lt;code&gt;SELECTEDVALUE ( column, alternate )&lt;/code&gt; returns the column's value when the current filter context has &lt;strong&gt;exactly one&lt;/strong&gt; distinct value, and the alternate result (BLANK by default) when it has none or several. &lt;code&gt;HASONEVALUE ( column )&lt;/code&gt; returns TRUE in the same case. Use them for dynamic titles (&amp;quot;Revenue for Bikes&amp;quot;), reading a what-if slicer, switching measures, and hiding numbers at total level. Microsoft lists &lt;code&gt;SELECTEDVALUE ( col, alt )&lt;/code&gt; as equivalent to &lt;code&gt;IF ( HASONEVALUE ( col ), VALUES ( col ), alt )&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;A report title that says &amp;quot;Revenue&amp;quot; whatever is selected makes readers check the slicers. A title that says &amp;quot;Revenue for Bikes, 2026&amp;quot; answers that before they ask.&lt;/p&gt;
&lt;h2 id=&quot;what-do-they-return&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-do-they-return&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What do they return?&lt;/h2&gt;
&lt;figure class=&quot;dfig&quot; data-kind=&quot;table&quot;&gt;&lt;div class=&quot;dfig-scroll&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Context&lt;/th&gt;&lt;th&gt;HASONEVALUE&lt;/th&gt;&lt;th&gt;SELECTEDVALUE&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Slicer on Bikes&lt;/td&gt;&lt;td&gt;TRUE&lt;/td&gt;&lt;td&gt;Bikes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Slicer on Bikes and Clothing&lt;/td&gt;&lt;td&gt;FALSE&lt;/td&gt;&lt;td&gt;All categories&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;No selection (all four)&lt;/td&gt;&lt;td&gt;FALSE&lt;/td&gt;&lt;td&gt;All categories&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Row &amp;quot;Bikes&amp;quot; in a table&lt;/td&gt;&lt;td&gt;TRUE&lt;/td&gt;&lt;td&gt;Bikes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Total row&lt;/td&gt;&lt;td&gt;FALSE&lt;/td&gt;&lt;td&gt;All categories&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;figcaption&gt;SELECTEDVALUE ( 'Product'[Category], &amp;quot;All categories&amp;quot; ) in different contexts&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-are-everyday-uses&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-are-everyday-uses&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What are everyday uses?&lt;/h2&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;&lt;i class=&quot;c&quot;&gt;-- dynamic title&lt;/i&gt;
Title =
&lt;i class=&quot;s&quot;&gt;&amp;quot;Revenue for &amp;quot;&lt;/i&gt; &amp;amp; &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;all categories&amp;quot;&lt;/i&gt; )
    &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot;, &amp;quot;&lt;/i&gt; &amp;amp; &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Date'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Year]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;all years&amp;quot;&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- what-if parameter: a disconnected table of discounts 0% to 30%&lt;/i&gt;
Discount Selected = &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( Discount&lt;i class=&quot;m&quot;&gt;[Discount]&lt;/i&gt;, &lt;i class=&quot;n&quot;&gt;0&lt;/i&gt; )
Revenue after Discount = &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt; * ( &lt;i class=&quot;n&quot;&gt;1&lt;/i&gt; - &lt;i class=&quot;m&quot;&gt;[Discount Selected]&lt;/i&gt; )

&lt;i class=&quot;c&quot;&gt;-- switch measures from a slicer on a small table of names&lt;/i&gt;
Selected Metric =
&lt;i class=&quot;f&quot;&gt;SWITCH&lt;/i&gt; (
    &lt;i class=&quot;f&quot;&gt;SELECTEDVALUE&lt;/i&gt; ( Metric&lt;i class=&quot;m&quot;&gt;[Name]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;Revenue&amp;quot;&lt;/i&gt; ),
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Revenue&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Margin&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Margin]&lt;/i&gt;,
    &lt;i class=&quot;s&quot;&gt;&amp;quot;Orders&amp;quot;&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Orders]&lt;/i&gt;
)

&lt;i class=&quot;c&quot;&gt;-- hide a value at total level&lt;/i&gt;
Price per Unit =
&lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;HASONEVALUE&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Product]&lt;/i&gt; ), &lt;i class=&quot;f&quot;&gt;DIVIDE&lt;/i&gt; ( &lt;i class=&quot;m&quot;&gt;[Revenue]&lt;/i&gt;, &lt;i class=&quot;m&quot;&gt;[Units]&lt;/i&gt; ) )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;For the measure switch, &lt;a href=&quot;/blog/field-parameters-power-bi/&quot;&gt;field parameters&lt;/a&gt; are often the better tool today, as they also switch formats and work on axes.&lt;/p&gt;
&lt;h2 id=&quot;what-if-several-values-are-selected&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-if-several-values-are-selected&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What if several values are selected?&lt;/h2&gt;
&lt;p&gt;List them with &lt;code&gt;CONCATENATEX&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&quot;md-pre&quot;&gt;&lt;pre class=&quot;md-code&quot; data-lang=&quot;dax&quot;&gt;&lt;code&gt;Selected Categories =
&lt;i class=&quot;k&quot;&gt;VAR&lt;/i&gt; N = &lt;i class=&quot;f&quot;&gt;COUNTROWS&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; ) )
&lt;i class=&quot;k&quot;&gt;RETURN&lt;/i&gt;
    &lt;i class=&quot;f&quot;&gt;IF&lt;/i&gt; (
        N &amp;lt;= &lt;i class=&quot;n&quot;&gt;3&lt;/i&gt;,
        &lt;i class=&quot;f&quot;&gt;CONCATENATEX&lt;/i&gt; ( &lt;i class=&quot;f&quot;&gt;VALUES&lt;/i&gt; ( &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; ), &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;&amp;quot;, &amp;quot;&lt;/i&gt;, &lt;i class=&quot;s&quot;&gt;'Product'&lt;/i&gt;&lt;i class=&quot;m&quot;&gt;[Category]&lt;/i&gt; ),
        N &amp;amp; &lt;i class=&quot;s&quot;&gt;&amp;quot; categories&amp;quot;&lt;/i&gt;
    )&lt;/code&gt;&lt;/pre&gt;&lt;button type=&quot;button&quot; class=&quot;md-copy&quot; aria-label=&quot;Copy the code&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;
&lt;p&gt;It reads &amp;quot;Bikes, Clothing&amp;quot; or &amp;quot;4 categories&amp;quot;.&lt;/p&gt;
&lt;h2 id=&quot;how-do-isfiltered-and-iscrossfiltered-differ&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#how-do-isfiltered-and-iscrossfiltered-differ&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;How do ISFILTERED and ISCROSSFILTERED differ?&lt;/h2&gt;
&lt;div class=&quot;md-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;TRUE when&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;HASONEVALUE ( col )&lt;/code&gt;&lt;/td&gt;&lt;td&gt;exactly one value of &lt;code&gt;col&lt;/code&gt; is visible, by any route&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;ISFILTERED ( col )&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;col&lt;/code&gt; itself has a direct filter (a slicer on it, a row of the visual)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;ISCROSSFILTERED ( col )&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;col&lt;/code&gt; is filtered directly or through another column or table&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;ISINSCOPE ( col )&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;col&lt;/code&gt; is the level being grouped in the visual (see &lt;a href=&quot;/blog/isinscope-dax/&quot;&gt;ISINSCOPE&lt;/a&gt;)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;A product filtered to one category through a Product slicer makes &lt;code&gt;HASONEVALUE ( 'Product'[Category] )&lt;/code&gt; TRUE but &lt;code&gt;ISFILTERED ( 'Product'[Category] )&lt;/code&gt; FALSE.&lt;/p&gt;
&lt;h2 id=&quot;what-goes-wrong&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#what-goes-wrong&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;What goes wrong?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;VALUES&lt;/code&gt; instead of &lt;code&gt;SELECTEDVALUE&lt;/code&gt;.&lt;/strong&gt; &lt;code&gt;VALUES ( col )&lt;/code&gt; returns a table; used as a scalar with several values it errors (&amp;quot;A table of multiple values was supplied&amp;quot;). Microsoft's guidance: use &lt;code&gt;SELECTEDVALUE&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;No alternate result.&lt;/strong&gt; BLANK in a title reads &amp;quot;Revenue for &amp;quot;; give an alternate.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Totals disappear.&lt;/strong&gt; &lt;code&gt;IF ( HASONEVALUE ( ... ) )&lt;/code&gt; blanks totals on purpose; make sure that is wanted.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;What-if default.&lt;/strong&gt; Without an alternate, a cleared what-if slicer returns BLANK and the formula breaks; give a default.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-can-you-check-this&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-can-you-check-this&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where can you check this?&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/selectedvalue-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: SELECTEDVALUE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/hasonevalue-function-dax&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: HASONEVALUE function (DAX)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dax/best-practices/dax-selectedvalue&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Microsoft Learn: Use SELECTEDVALUE instead of VALUES&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;where-do-you-start&quot;&gt;&lt;a class=&quot;md-anchor&quot; href=&quot;#where-do-you-start&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot;&gt;#&lt;/a&gt;Where do you start?&lt;/h2&gt;
&lt;p&gt;Add a dynamic title measure to your main page and bind it to the visual title with &lt;strong&gt;fx&lt;/strong&gt;. &lt;a href=&quot;/blog/isinscope-dax/&quot;&gt;ISINSCOPE&lt;/a&gt; handles different logic at total and detail level.&lt;/p&gt;</content>
  </entry>
</feed>
