<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Leos</title>
    <description>The latest articles on DEV Community by Leos (@plachky).</description>
    <link>https://dev.to/plachky</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4041913%2F906accfc-5e17-424a-a10a-792fdd0d56ac.jpeg</url>
      <title>DEV Community: Leos</title>
      <link>https://dev.to/plachky</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/plachky"/>
    <language>en</language>
    <item>
      <title>Three Numbers for One Revenue: Why Your BI (and AI) Needs a Semantic Layer</title>
      <dc:creator>Leos</dc:creator>
      <pubDate>Mon, 27 Jul 2026 07:58:24 +0000</pubDate>
      <link>https://dev.to/plachky/three-numbers-for-one-revenue-why-your-bi-and-ai-needs-a-semantic-layer-3pd6</link>
      <guid>https://dev.to/plachky/three-numbers-for-one-revenue-why-your-bi-and-ai-needs-a-semantic-layer-3pd6</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Originally published on &lt;a href="https://daata.cz/en/blog/semantic-layer-why-your-bi-needs-it" rel="noopener noreferrer"&gt;daata.cz&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Three Numbers for One Revenue: Why Your BI (and AI) Needs a Semantic Layer
&lt;/h2&gt;

&lt;p&gt;Monday management meeting. Sales reports October revenue of 4.2 million. Finance has 3.9 in its report. The marketing dashboard shows 4.6.&lt;/p&gt;

&lt;p&gt;All three pull from the same data warehouse. And all three are "right": sales counts orders minus cancellations, finance counts invoices net of VAT, marketing counts everything including credit notes.&lt;/p&gt;

&lt;p&gt;What follows is a half-hour argument about whose number is correct — and the decision the meeting was called for gets postponed.&lt;/p&gt;

&lt;p&gt;This has a name: &lt;strong&gt;metric sprawl&lt;/strong&gt;. And it's exactly what a semantic layer fixes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a semantic layer actually is
&lt;/h2&gt;

&lt;p&gt;A semantic layer sits between your data warehouse and everything that reads from it — BI dashboards, Excel, notebooks, AI chatbots. It holds a &lt;strong&gt;single, central definition of your business metrics and dimensions&lt;/strong&gt;: what "revenue" means, how "margin" is calculated, who counts as an "active customer."&lt;/p&gt;

&lt;p&gt;It's a translator. The business asks for "revenue by region for Q3," and the semantic layer turns that into the right SQL over the right tables — the same way every time, no matter which tool is asking.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs47ry11x73yl8401tl8c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs47ry11x73yl8401tl8c.png" alt="Where the semantic layer sits" width="800" height="467"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How metric sprawl creeps in
&lt;/h2&gt;

&lt;p&gt;Nobody sets out to create chaos. It accumulates quietly:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;An analyst builds a dashboard with their own SQL definition of revenue.&lt;/li&gt;
&lt;li&gt;A colleague copies it and "slightly" tweaks the definition.&lt;/li&gt;
&lt;li&gt;A manager exports to Excel and calculates their own way.&lt;/li&gt;
&lt;li&gt;The company adopts a second BI tool — and every definition is recreated, differently.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The result: same question, different answers. Trust in the numbers erodes, and analysts burn hours reconciling instead of analyzing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs86o3oxfdkw09oybe5kt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs86o3oxfdkw09oybe5kt.png" alt="Metric sprawl vs. a semantic layer" width="800" height="467"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Metrics as code
&lt;/h2&gt;

&lt;p&gt;Modern semantic layers define metrics as &lt;strong&gt;version-controlled text files&lt;/strong&gt;, not click-through settings locked in a BI tool. A definition change becomes a pull request and a code review; you get full history and CI testing before anything reaches users. Here's the shape of it in dbt's Semantic Layer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;metrics&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;revenue&lt;/span&gt;
    &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Revenue"&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;simple&lt;/span&gt;
    &lt;span class="na"&gt;type_params&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;measure&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;revenue&lt;/span&gt;   &lt;span class="c1"&gt;# sum of amount, net of VAT and cancellations&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Define it once, and every tool — dashboard, Excel, AI agent — consumes the identical calculation.&lt;/p&gt;

&lt;h2&gt;
  
  
  The tools, briefly
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&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;&lt;strong&gt;dbt Semantic Layer (MetricFlow)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;You already use dbt and want metrics next to your transformations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cube&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Customer-facing analytics in an app, or AI agents querying over MCP&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;LookML (Looker)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;You're standardized on Looker / Google's ecosystem&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Snowflake Semantic Views&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Your data is in Snowflake and you want AI self-service fast&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Power BI semantic model&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A smaller shop reporting exclusively in Power BI&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Why AI makes this urgent
&lt;/h2&gt;

&lt;p&gt;An AI agent's problem isn't writing SQL — it's writing the &lt;em&gt;right&lt;/em&gt; SQL, the same way every time, without surfacing numbers a user shouldn't see. Without a semantic layer, the agent invents its own "revenue" — and you're back to three numbers in one meeting, just faster. Through MCP, the agent asks for named metrics instead of composing raw SQL, so the calculation is consistent and access rules apply to AI too.&lt;/p&gt;

&lt;h2&gt;
  
  
  When you &lt;em&gt;don't&lt;/em&gt; need one (yet)
&lt;/h2&gt;

&lt;p&gt;If you have one BI tool, a handful of reports, and one person defining metrics, the built-in layer of Power BI or Metabase is enough. Don't adopt a semantic layer for a problem you don't have yet. It starts to pay off when the same numbers are consumed by multiple tools or departments — or the moment you put an AI chatbot on your data.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;The full version&lt;/strong&gt; — with all four tools compared in depth, three real-world scenarios, best practices, and an FAQ — is on the Daata blog: &lt;a href="https://daata.cz/en/blog/semantic-layer-why-your-bi-needs-it" rel="noopener noreferrer"&gt;The Semantic Layer: Why Your BI (and AI) Needs One&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Daata helps mid-sized companies get more out of their data — data platforms, reporting, and automation that make everyday processes simpler. &lt;a href="https://daata.cz/en/contact" rel="noopener noreferrer"&gt;Get in touch&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>dataengineering</category>
      <category>businessintelligence</category>
      <category>dbt</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
