<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Solving Multi-Dimension Analytics in Databricks Dashboards with Views and Metric Views in Community Articles</title>
    <link>https://community.databricks.com/t5/community-articles/solving-multi-dimension-analytics-in-databricks-dashboards-with/m-p/152361#M1116</link>
    <description>&lt;P&gt;Thanks for sharing great example with detailed explanation.&lt;/P&gt;</description>
    <pubDate>Sat, 28 Mar 2026 08:08:53 GMT</pubDate>
    <dc:creator>Nidhig</dc:creator>
    <dc:date>2026-03-28T08:08:53Z</dc:date>
    <item>
      <title>Solving Multi-Dimension Analytics in Databricks Dashboards with Views and Metric Views</title>
      <link>https://community.databricks.com/t5/community-articles/solving-multi-dimension-analytics-in-databricks-dashboards-with/m-p/152340#M1115</link>
      <description>&lt;DIV style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: #1b3139; line-height: 1.75; font-size: 17px;"&gt;
&lt;P&gt;If you've ever built a dashboard where you needed to track the same data across two different date dimensions, you know the frustration. You get the first chart working. You add the second. Then you realise cross-filtering just stopped working.&lt;/P&gt;
&lt;P&gt;I recently came across a &lt;A style="color: #ff3621;" href="https://community.databricks.com/t5/warehousing-analytics/databricks-dashboards-is-there-an-equivalent-to-power-bi-s/td-p/152299" target="_blank"&gt;question on the Databricks community forum&lt;/A&gt; that captures this perfectly. A user wanted to build a cumulative support ticket chart with two lines. One for tickets opened over time and another for tickets resolved. Simple enough in concept. But the moment they split the data into two datasets to get the two date columns on the X-axis, dashboard cross-filtering broke. They asked whether it was possible to build a star schema inside a Databricks dashboard or dynamically switch the X-axis.&lt;/P&gt;
&lt;P&gt;It's a good question, and the answer involves a technique I use. The trick is not to fight the dashboard. Instead, reshape the data so the dashboard doesn't need to juggle multiple datasets. Views give you that reshape. And if you want to go further, Metric Views let you define reusable, governed metrics that work across dashboards, Genie, and SQL.&lt;/P&gt;
&lt;P&gt;I would like to walk through both approaches using a support ticket scenario.&lt;/P&gt;
&lt;H2 style="font-size: 26px; font-weight: bold; color: #1b3139; margin-top: 40px; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 3px solid #FF3621; display: inline-block;"&gt;The setup&lt;/H2&gt;
&lt;P&gt;We have a &lt;CODE style="font-family: 'Courier New', Consolas, monospace; background: #F0F4F6; padding: 2px 6px; border-radius: 4px; font-size: 15px; color: #c03020;"&gt;support_tickets&lt;/CODE&gt; table. Each row is a ticket with a creation date, a resolution date (NULL if still open), a priority, a category, and an assignee.&lt;/P&gt;
&lt;PRE style="background: #1B3139; border-left: 4px solid #FF3621; border-radius: 6px; padding: 20px 24px; margin: 24px 0; font-family: 'Courier New', Consolas, monospace; font-size: 14px; line-height: 1.6; color: #e8ecf0; overflow-x: auto; white-space: pre;"&gt;&lt;STRONG&gt;CREATE OR REPLACE TABLE&lt;/STRONG&gt; support_tickets (
  ticket_id       STRING,
  created_date    DATE,
  resolved_date   DATE,
  priority        STRING,
  category        STRING,
  assignee        STRING,
  status          STRING
);&lt;/PRE&gt;
&lt;P&gt;Fifty tickets, spread across July to November 2025. Forty have been resolved. Ten are still open.&lt;/P&gt;
&lt;P style="text-align: center; margin: 28px 0;"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="sample-data.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/25398iFE9E6E011E5F553E/image-size/large?v=v2&amp;amp;px=999" role="button" title="sample-data.png" alt="sample-data.png" /&gt;&lt;/span&gt;&lt;EM&gt;&lt;FONT size="2" color="#808080"&gt;&lt;SPAN&gt;The first 10 rows of our support_tickets table. Note the NULL resolved_date for open tickets.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2 style="font-size: 26px; font-weight: bold; color: #1b3139; margin-top: 40px; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 3px solid #FF3621; display: inline-block;"&gt;The problem: two dates, one chart&lt;/H2&gt;
&lt;P&gt;The goal is to plot two cumulative lines on the same chart: tickets opened over time and tickets resolved over time. The gap between the two lines at any point tells you the open backlog.&lt;/P&gt;
&lt;P&gt;The first instinct is to create two datasets:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Dataset 1: Cumulative tickets opened&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE style="background: #1B3139; border-left: 4px solid #FF3621; border-radius: 6px; padding: 20px 24px; margin: 24px 0; font-family: 'Courier New', Consolas, monospace; font-size: 14px; line-height: 1.6; color: #e8ecf0; overflow-x: auto; white-space: pre;"&gt;&lt;STRONG&gt;SELECT&lt;/STRONG&gt;
  created_date,
  COUNT(*) &lt;STRONG&gt;AS&lt;/STRONG&gt; tickets_opened,
  SUM(COUNT(*)) &lt;STRONG&gt;OVER&lt;/STRONG&gt; (&lt;STRONG&gt;ORDER BY&lt;/STRONG&gt; created_date) &lt;STRONG&gt;AS&lt;/STRONG&gt; cumulative_opened
&lt;STRONG&gt;FROM&lt;/STRONG&gt; support_tickets
&lt;STRONG&gt;GROUP BY&lt;/STRONG&gt; created_date
&lt;STRONG&gt;ORDER BY&lt;/STRONG&gt; created_date;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;Dataset 2: Cumulative tickets resolved&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE style="background: #1B3139; border-left: 4px solid #FF3621; border-radius: 6px; padding: 20px 24px; margin: 24px 0; font-family: 'Courier New', Consolas, monospace; font-size: 14px; line-height: 1.6; color: #e8ecf0; overflow-x: auto; white-space: pre;"&gt;&lt;STRONG&gt;SELECT&lt;/STRONG&gt;
  resolved_date,
  COUNT(*) &lt;STRONG&gt;AS&lt;/STRONG&gt; tickets_resolved,
  SUM(COUNT(*)) &lt;STRONG&gt;OVER&lt;/STRONG&gt; (&lt;STRONG&gt;ORDER BY&lt;/STRONG&gt; resolved_date) &lt;STRONG&gt;AS&lt;/STRONG&gt; cumulative_resolved
&lt;STRONG&gt;FROM&lt;/STRONG&gt; support_tickets
&lt;STRONG&gt;WHERE&lt;/STRONG&gt; resolved_date &lt;STRONG&gt;IS NOT NULL&lt;/STRONG&gt;
&lt;STRONG&gt;GROUP BY&lt;/STRONG&gt; resolved_date
&lt;STRONG&gt;ORDER BY&lt;/STRONG&gt; resolved_date;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-align-center"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="naive_combined.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/25402iEEB89AC7131B0E1F/image-size/large?v=v2&amp;amp;px=999" role="button" title="naive_combined.png" alt="naive_combined.png" /&gt;&lt;/span&gt;&lt;FONT size="2" color="#808080"&gt;&lt;EM&gt;&lt;SPAN&gt;Two separate datasets: cumulative opened (left) and cumulative resolved (right).&lt;/SPAN&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Both queries work individually. But put them on the same dashboard and add a filter for priority or category, and cross-filtering breaks. The dashboard treats them as independent datasets with no relationship. Filter one and the other doesn't respond.&lt;/P&gt;
&lt;P&gt;This is the exact problem the community user ran into.&lt;/P&gt;
&lt;H2 style="font-size: 26px; font-weight: bold; color: #1b3139; margin-top: 40px; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 3px solid #FF3621; display: inline-block;"&gt;Solution 1: Reshape with a SQL view&lt;/H2&gt;
&lt;P&gt;The core insight is simple: if both date dimensions lived in the same column, we wouldn't need two datasets. We can get there by unpivoting the data. Instead of one row per ticket, we create two rows: one for the "opened" event and one for the "resolved" event.&lt;/P&gt;
&lt;PRE style="background: #1B3139; border-left: 4px solid #FF3621; border-radius: 6px; padding: 20px 24px; margin: 24px 0; font-family: 'Courier New', Consolas, monospace; font-size: 14px; line-height: 1.6; color: #e8ecf0; overflow-x: auto; white-space: pre;"&gt;&lt;STRONG&gt;CREATE OR REPLACE VIEW&lt;/STRONG&gt; ticket_events &lt;STRONG&gt;AS&lt;/STRONG&gt;
&lt;STRONG&gt;SELECT&lt;/STRONG&gt;
  ticket_id,
  created_date  &lt;STRONG&gt;AS&lt;/STRONG&gt; event_date,
  'Opened'      &lt;STRONG&gt;AS&lt;/STRONG&gt; event_type,
  priority,
  category,
  assignee,
  status
&lt;STRONG&gt;FROM&lt;/STRONG&gt; support_tickets

&lt;STRONG&gt;UNION ALL&lt;/STRONG&gt;

&lt;STRONG&gt;SELECT&lt;/STRONG&gt;
  ticket_id,
  resolved_date &lt;STRONG&gt;AS&lt;/STRONG&gt; event_date,
  'Resolved'    &lt;STRONG&gt;AS&lt;/STRONG&gt; event_type,
  priority,
  category,
  assignee,
  status
&lt;STRONG&gt;FROM&lt;/STRONG&gt; support_tickets
&lt;STRONG&gt;WHERE&lt;/STRONG&gt; resolved_date &lt;STRONG&gt;IS NOT NULL&lt;/STRONG&gt;;&lt;/PRE&gt;
&lt;P style="text-align: center; margin: 28px 0;"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="view-creation.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/25403i131ABC5925A535C7/image-size/large?v=v2&amp;amp;px=999" role="button" title="view-creation.png" alt="view-creation.png" /&gt;&lt;/span&gt;&lt;EM&gt;&lt;FONT size="2" color="#999999"&gt;The view unpivots created_date and resolved_date into a single event_date column.&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now we have a single dataset where &lt;CODE style="font-family: 'Courier New', Consolas, monospace; background: #F0F4F6; padding: 2px 6px; border-radius: 4px; font-size: 15px; color: #c03020;"&gt;event_date&lt;/CODE&gt; is the X-axis and &lt;CODE style="font-family: 'Courier New', Consolas, monospace; background: #F0F4F6; padding: 2px 6px; border-radius: 4px; font-size: 15px; color: #c03020;"&gt;event_type&lt;/CODE&gt; tells us which line we're on. The cumulative chart becomes one query:&lt;/P&gt;
&lt;PRE style="background: #1B3139; border-left: 4px solid #FF3621; border-radius: 6px; padding: 20px 24px; margin: 24px 0; font-family: 'Courier New', Consolas, monospace; font-size: 14px; line-height: 1.6; color: #e8ecf0; overflow-x: auto; white-space: pre;"&gt;&lt;STRONG&gt;SELECT&lt;/STRONG&gt;
  event_date,
  event_type,
  COUNT(*) &lt;STRONG&gt;AS&lt;/STRONG&gt; daily_count,
  SUM(COUNT(*)) &lt;STRONG&gt;OVER&lt;/STRONG&gt; (
    &lt;STRONG&gt;PARTITION BY&lt;/STRONG&gt; event_type
    &lt;STRONG&gt;ORDER BY&lt;/STRONG&gt; event_date
  ) &lt;STRONG&gt;AS&lt;/STRONG&gt; cumulative_count
&lt;STRONG&gt;FROM&lt;/STRONG&gt; ticket_events
&lt;STRONG&gt;GROUP BY&lt;/STRONG&gt; event_date, event_type
&lt;STRONG&gt;ORDER BY&lt;/STRONG&gt; event_date, event_type;&lt;/PRE&gt;
&lt;P style="text-align: center; margin: 28px 0;"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="view-cumulative.png" style="width: 995px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/25404i239755994169635D/image-size/large?v=v2&amp;amp;px=999" role="button" title="view-cumulative.png" alt="view-cumulative.png" /&gt;&lt;/span&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&lt;FONT color="#999999"&gt;Both cumulative lines in a single dataset. 90 rows: 50 opened events + 40 resolved events.&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the dashboard, you set &lt;CODE style="font-family: 'Courier New', Consolas, monospace; background: #F0F4F6; padding: 2px 6px; border-radius: 4px; font-size: 15px; color: #c03020;"&gt;event_date&lt;/CODE&gt; as the X-axis, &lt;CODE style="font-family: 'Courier New', Consolas, monospace; background: #F0F4F6; padding: 2px 6px; border-radius: 4px; font-size: 15px; color: #c03020;"&gt;cumulative_count&lt;/CODE&gt; as the Y-axis, and color by &lt;CODE style="font-family: 'Courier New', Consolas, monospace; background: #F0F4F6; padding: 2px 6px; border-radius: 4px; font-size: 15px; color: #c03020;"&gt;event_type&lt;/CODE&gt;. Two lines, one dataset.&lt;/P&gt;
&lt;P&gt;And because every row still carries &lt;CODE style="font-family: 'Courier New', Consolas, monospace; background: #F0F4F6; padding: 2px 6px; border-radius: 4px; font-size: 15px; color: #c03020;"&gt;priority&lt;/CODE&gt;, &lt;CODE style="font-family: 'Courier New', Consolas, monospace; background: #F0F4F6; padding: 2px 6px; border-radius: 4px; font-size: 15px; color: #c03020;"&gt;category&lt;/CODE&gt;, and &lt;CODE style="font-family: 'Courier New', Consolas, monospace; background: #F0F4F6; padding: 2px 6px; border-radius: 4px; font-size: 15px; color: #c03020;"&gt;assignee&lt;/CODE&gt;, cross-filtering works. Add a filter for &lt;CODE style="font-family: 'Courier New', Consolas, monospace; background: #F0F4F6; padding: 2px 6px; border-radius: 4px; font-size: 15px; color: #c03020;"&gt;priority = 'High'&lt;/CODE&gt; and both lines update together:&lt;/P&gt;
&lt;PRE style="background: #1B3139; border-left: 4px solid #FF3621; border-radius: 6px; padding: 20px 24px; margin: 24px 0; font-family: 'Courier New', Consolas, monospace; font-size: 14px; line-height: 1.6; color: #e8ecf0; overflow-x: auto; white-space: pre;"&gt;&lt;STRONG&gt;SELECT&lt;/STRONG&gt;
  event_date,
  event_type,
  COUNT(*) &lt;STRONG&gt;AS&lt;/STRONG&gt; daily_count,
  SUM(COUNT(*)) &lt;STRONG&gt;OVER&lt;/STRONG&gt; (
    &lt;STRONG&gt;PARTITION BY&lt;/STRONG&gt; event_type
    &lt;STRONG&gt;ORDER BY&lt;/STRONG&gt; event_date
  ) &lt;STRONG&gt;AS&lt;/STRONG&gt; cumulative_count
&lt;STRONG&gt;FROM&lt;/STRONG&gt; ticket_events
&lt;STRONG&gt;WHERE&lt;/STRONG&gt; priority = 'High'
&lt;STRONG&gt;GROUP BY&lt;/STRONG&gt; event_date, event_type
&lt;STRONG&gt;ORDER BY&lt;/STRONG&gt; event_date, event_type;&lt;/PRE&gt;
&lt;P style="text-align: center; margin: 28px 0;"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="view-filtered-high.png" style="width: 995px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/25405i6E5726B1E65CFE6C/image-size/large?v=v2&amp;amp;px=999" role="button" title="view-filtered-high.png" alt="view-filtered-high.png" /&gt;&lt;/span&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&lt;FONT color="#999999"&gt;Filtered to High priority only. Both lines respond to the same filter because they share a dataset.&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No broken cross-filters. No need for a star schema inside the dashboard. The view did the work.&lt;/P&gt;
&lt;H2 style="font-size: 26px; font-weight: bold; color: #1b3139; margin-top: 40px; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 3px solid #FF3621; display: inline-block;"&gt;Solution 2: Metric views for reusable, governed metrics&lt;/H2&gt;
&lt;P&gt;The view solves the immediate dashboard problem. But what happens when someone else needs the same "tickets opened" and "tickets resolved" metrics in a different dashboard? Or when a colleague asks Genie "how many high-priority tickets were opened last month?"&lt;/P&gt;
&lt;P&gt;If the logic only lives in a SQL view and a dashboard query, it gets copied. And copied logic drifts. This is where Metric Views come in.&lt;/P&gt;
&lt;P&gt;A Metric View is a Unity Catalog object that defines dimensions and measures separately from any specific query. You define the metric once, and it can be consumed in dashboards, Genie, alerts, and direct SQL. It's the Databricks equivalent of Power BI's semantic model with DAX measures, except it lives in the catalog, not inside a BI tool.&lt;/P&gt;
&lt;P&gt;Here's the metric view for our ticket events:&lt;/P&gt;
&lt;PRE style="background: #1B3139; border-left: 4px solid #FF3621; border-radius: 6px; padding: 20px 24px; margin: 24px 0; font-family: 'Courier New', Consolas, monospace; font-size: 14px; line-height: 1.6; color: #e8ecf0; overflow-x: auto; white-space: pre;"&gt;&lt;STRONG&gt;CREATE OR REPLACE VIEW&lt;/STRONG&gt; ticket_metrics
&lt;STRONG&gt;WITH METRICS&lt;/STRONG&gt;
&lt;STRONG&gt;LANGUAGE&lt;/STRONG&gt; YAML
&lt;STRONG&gt;AS&lt;/STRONG&gt; $$
  version: 1.1
  comment: "Support ticket metrics"
  source: ticket_events
  dimensions:
    - name: Event Date
      expr: event_date
    - name: Event Type
      expr: event_type
    - name: Priority
      expr: priority
    - name: Category
      expr: category
    - name: Assignee
      expr: assignee
  measures:
    - name: Ticket Count
      expr: COUNT(*)
$$&lt;/PRE&gt;
&lt;P style="text-align: center; margin: 28px 0;"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="metric-view-creation.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/25406i42A43D508625D2BE/image-size/large?v=v2&amp;amp;px=999" role="button" title="metric-view-creation.png" alt="metric-view-creation.png" /&gt;&lt;/span&gt;&lt;FONT size="2" color="#999999"&gt;&lt;EM&gt;The metric view definition: five dimensions and one measure, all in YAML.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Querying it looks like regular SQL, with one difference: measures are wrapped in the &lt;CODE style="font-family: 'Courier New', Consolas, monospace; background: #F0F4F6; padding: 2px 6px; border-radius: 4px; font-size: 15px; color: #c03020;"&gt;MEASURE()&lt;/CODE&gt; function.&lt;/P&gt;
&lt;PRE style="background: #1B3139; border-left: 4px solid #FF3621; border-radius: 6px; padding: 20px 24px; margin: 24px 0; font-family: 'Courier New', Consolas, monospace; font-size: 14px; line-height: 1.6; color: #e8ecf0; overflow-x: auto; white-space: pre;"&gt;&lt;STRONG&gt;SELECT&lt;/STRONG&gt;
  `Event Date`,
  `Event Type`,
  MEASURE(`Ticket Count`) &lt;STRONG&gt;AS&lt;/STRONG&gt; tickets,
  SUM(MEASURE(`Ticket Count`)) &lt;STRONG&gt;OVER&lt;/STRONG&gt; (
    &lt;STRONG&gt;PARTITION BY&lt;/STRONG&gt; `Event Type`
    &lt;STRONG&gt;ORDER BY&lt;/STRONG&gt; `Event Date`
  ) &lt;STRONG&gt;AS&lt;/STRONG&gt; cumulative_tickets
&lt;STRONG&gt;FROM&lt;/STRONG&gt; ticket_metrics
&lt;STRONG&gt;WHERE&lt;/STRONG&gt; `Event Date` &lt;STRONG&gt;IS NOT NULL&lt;/STRONG&gt;
&lt;STRONG&gt;GROUP BY&lt;/STRONG&gt; `Event Date`, `Event Type`
&lt;STRONG&gt;ORDER BY&lt;/STRONG&gt; `Event Date`, `Event Type`;&lt;/PRE&gt;
&lt;P style="text-align: center; margin: 28px 0;"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="metric-view-cumulative.png" style="width: 865px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/25407i830A4055185C0A98/image-size/large?v=v2&amp;amp;px=999" role="button" title="metric-view-cumulative.png" alt="metric-view-cumulative.png" /&gt;&lt;/span&gt;&lt;EM&gt;&lt;FONT size="2" color="#999999"&gt;&lt;SPAN&gt;Same cumulative result, now powered by the metric view and the MEASURE() function.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The results are identical to the view query. But the metric definition now lives in the catalog. Anyone with access can query it. Genie can use it. Another dashboard team can build on it without rewriting the logic.&lt;/P&gt;
&lt;P&gt;And because dimensions are independent of measures, consumers can slice the data any way they want at query time:&lt;/P&gt;
&lt;PRE style="background: #1B3139; border-left: 4px solid #FF3621; border-radius: 6px; padding: 20px 24px; margin: 24px 0; font-family: 'Courier New', Consolas, monospace; font-size: 14px; line-height: 1.6; color: #e8ecf0; overflow-x: auto; white-space: pre;"&gt;-- By category
&lt;STRONG&gt;SELECT&lt;/STRONG&gt;
  `Category`,
  `Event Type`,
  MEASURE(`Ticket Count`) &lt;STRONG&gt;AS&lt;/STRONG&gt; tickets
&lt;STRONG&gt;FROM&lt;/STRONG&gt; ticket_metrics
&lt;STRONG&gt;WHERE&lt;/STRONG&gt; `Event Date` &lt;STRONG&gt;IS NOT NULL&lt;/STRONG&gt;
&lt;STRONG&gt;GROUP BY&lt;/STRONG&gt; `Category`, `Event Type`
&lt;STRONG&gt;ORDER BY&lt;/STRONG&gt; `Category`, `Event Type`;&lt;/PRE&gt;
&lt;P style="text-align: center; margin: 28px 0;"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="metric-view-category.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/25408iC521DE1FFB2E9AF4/image-size/large?v=v2&amp;amp;px=999" role="button" title="metric-view-category.png" alt="metric-view-category.png" /&gt;&lt;/span&gt;&lt;FONT size="2" color="#808080"&gt;&lt;SPAN&gt;Same metric, sliced by category. Billing has the most open tickets.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE style="background: #1B3139; border-left: 4px solid #FF3621; border-radius: 6px; padding: 20px 24px; margin: 24px 0; font-family: 'Courier New', Consolas, monospace; font-size: 14px; line-height: 1.6; color: #e8ecf0; overflow-x: auto; white-space: pre;"&gt;-- By assignee
&lt;STRONG&gt;SELECT&lt;/STRONG&gt;
  `Assignee`,
  `Event Type`,
  MEASURE(`Ticket Count`) &lt;STRONG&gt;AS&lt;/STRONG&gt; tickets
&lt;STRONG&gt;FROM&lt;/STRONG&gt; ticket_metrics
&lt;STRONG&gt;WHERE&lt;/STRONG&gt; `Event Date` &lt;STRONG&gt;IS NOT NULL&lt;/STRONG&gt;
&lt;STRONG&gt;GROUP BY&lt;/STRONG&gt; `Assignee`, `Event Type`
&lt;STRONG&gt;ORDER BY&lt;/STRONG&gt; `Assignee`, `Event Type`;&lt;/PRE&gt;
&lt;P style="text-align: center; margin: 28px 0;"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="metric-view-assignee.png" style="width: 975px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/25409i5DEDF560984303B9/image-size/large?v=v2&amp;amp;px=999" role="button" title="metric-view-assignee.png" alt="metric-view-assignee.png" /&gt;&lt;/span&gt;&lt;EM&gt;&lt;FONT size="2" color="#808080"&gt;Same metric, sliced by assignee. No logic duplication across any of these queries.&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Same metric, different cuts. No logic duplication.&lt;/P&gt;
&lt;H2 style="font-size: 26px; font-weight: bold; color: #1b3139; margin-top: 40px; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 3px solid #FF3621; display: inline-block;"&gt;How this maps to Power BI&lt;/H2&gt;
&lt;P&gt;If you're coming from Power BI, here's the translation:&lt;/P&gt;
&lt;TABLE style="width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px;"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH style="background: #1B3139; color: #ffffff; font-weight: bold; text-align: left; padding: 12px 16px;"&gt;Power BI concept&lt;/TH&gt;
&lt;TH style="background: #1B3139; color: #ffffff; font-weight: bold; text-align: left; padding: 12px 16px;"&gt;Databricks equivalent&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="padding: 10px 16px; border-bottom: 1px solid #E0E0E0;"&gt;Star schema with date dimension&lt;/TD&gt;
&lt;TD style="padding: 10px 16px; border-bottom: 1px solid #E0E0E0;"&gt;SQL view that reshapes data (unpivot)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="padding: 10px 16px; border-bottom: 1px solid #E0E0E0; background: #F8FAFB;"&gt;DAX measure in semantic model&lt;/TD&gt;
&lt;TD style="padding: 10px 16px; border-bottom: 1px solid #E0E0E0; background: #F8FAFB;"&gt;Metric view measure in Unity Catalog&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="padding: 10px 16px; border-bottom: 1px solid #E0E0E0;"&gt;Measure reuse across reports&lt;/TD&gt;
&lt;TD style="padding: 10px 16px; border-bottom: 1px solid #E0E0E0;"&gt;Metric view queryable from any dashboard, Genie, or SQL&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="padding: 10px 16px; border-bottom: 1px solid #E0E0E0; background: #F8FAFB;"&gt;Cross-filtering across visuals&lt;/TD&gt;
&lt;TD style="padding: 10px 16px; border-bottom: 1px solid #E0E0E0; background: #F8FAFB;"&gt;Single dataset via view, all filter columns preserved&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;The key difference: in Power BI, your measures live inside the .pbix file or a published dataset. In Databricks, they live in Unity Catalog alongside your tables and views. They're governed, discoverable, and not locked inside any single tool.&lt;/P&gt;
&lt;H2 style="font-size: 26px; font-weight: bold; color: #1b3139; margin-top: 40px; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 3px solid #FF3621; display: inline-block;"&gt;Wrapping up&lt;/H2&gt;
&lt;P&gt;The pattern here is broadly applicable. Any time you need to visualize the same fact across two different date dimensions (or any two dimension columns) in a single chart with working cross-filters, the approach is:&lt;/P&gt;
&lt;OL style="margin: 16px 0 20px 24px;"&gt;
&lt;LI style="margin-bottom: 10px;"&gt;&lt;STRONG&gt;Unpivot&lt;/STRONG&gt; the dimensions into a single column using a &lt;CODE style="font-family: 'Courier New', Consolas, monospace; background: #F0F4F6; padding: 2px 6px; border-radius: 4px; font-size: 15px; color: #c03020;"&gt;UNION ALL&lt;/CODE&gt; view&lt;/LI&gt;
&lt;LI style="margin-bottom: 10px;"&gt;Use the &lt;STRONG&gt;event type discriminator&lt;/STRONG&gt; to split your chart lines or series&lt;/LI&gt;
&lt;LI style="margin-bottom: 10px;"&gt;Optionally, promote the logic into a &lt;STRONG&gt;Metric View&lt;/STRONG&gt; so the metrics are reusable and governed&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;This post was inspired by &lt;A style="color: #ff3621;" href="https://community.databricks.com/t5/warehousing-analytics/databricks-dashboards-is-there-an-equivalent-to-power-bi-s/td-p/152299" target="_blank"&gt;a question on the Databricks community forum&lt;/A&gt; about building cumulative charts with cross-filtering. If you've run into a similar problem, I hope this gives you a clear path forward.&lt;/P&gt;
&lt;P&gt;If you want to go deeper on metric views, the &lt;A style="color: #ff3621;" href="https://docs.databricks.com/en/metric-views/" target="_blank"&gt;official documentation&lt;/A&gt; covers joins, window measures, and materialization.&lt;/P&gt;
&lt;HR /&gt;
&lt;P style="font-style: italic; color: #5a7a86; padding-top: 16px;"&gt;Questions or a different use case where this pattern helped? Drop a comment below.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 27 Mar 2026 16:54:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/community-articles/solving-multi-dimension-analytics-in-databricks-dashboards-with/m-p/152340#M1115</guid>
      <dc:creator>Ashwin_DSA</dc:creator>
      <dc:date>2026-03-27T16:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: Solving Multi-Dimension Analytics in Databricks Dashboards with Views and Metric Views</title>
      <link>https://community.databricks.com/t5/community-articles/solving-multi-dimension-analytics-in-databricks-dashboards-with/m-p/152361#M1116</link>
      <description>&lt;P&gt;Thanks for sharing great example with detailed explanation.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Mar 2026 08:08:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/community-articles/solving-multi-dimension-analytics-in-databricks-dashboards-with/m-p/152361#M1116</guid>
      <dc:creator>Nidhig</dc:creator>
      <dc:date>2026-03-28T08:08:53Z</dc:date>
    </item>
  </channel>
</rss>

