Data marts and dashboards: what each is for

A dashboard decides how a number is shown. A data mart decides what the number means. Treating them as one layer is how one metric ends up with three values in the same meeting.

Three people bring "active customers" to the same meeting and get three numbers. One dashboard counts customers who placed an order in the last 30 days. Another counts customers with an open account. A third counts anyone who logged in. Each chart is correct for its own query. Nobody is wrong, and the meeting is still wasted.

This is what happens when a dashboard is asked to do two jobs: decide what a number means and decide how to show it. Those jobs belong to different layers. A data mart is where the meaning gets fixed. A dashboard is where it gets presented.

Two layers, two kinds of decision

The Kimball Group's description of a data warehouse front room separates the two clearly. The presentation area holds data that is "dimensionally-structured, organized by business process", kept at the most detailed level, with summaries added for performance. BI applications sit on top: ad hoc queries, standardised reports, dashboards and scorecards [1].

QuestionModelling layer (data mart)Presentation layer (dashboard)
What does one row represent?Decided here, onceInherited
What does "revenue" include?Decided here, onceInherited
Which tables join, and how?Decided hereShould not be decided here
Who is the audience?Not relevantDecided here
Which filters, periods and thresholds?Supports themDecided here
Which chart type and layout?Not relevantDecided here
Who changes it, and how often?Data team, through reviewReport owners, freely

The last row is the practical test. Dashboards should be cheap to change. Definitions should be expensive to change, because every number that uses them moves. When the definition lives inside a chart's SQL, changing the chart risks changing the definition, and copying the chart copies the definition with whatever drift it has accumulated.

Kimball's four steps, applied

Dimensional modelling gives the modelling layer a method. The Kimball Group sets out four steps: select the business process, declare the grain, identify the dimensions, identify the facts [2]. The order matters. "The grain must be declared before choosing dimensions or facts" [3].

Here is the method applied to an illustrative example: a distributor that wants to report on sales.

  1. Business process: taking customer orders. Not "the sales department", which might also care about targets, commissions and visits. Each of those is a different process with its own events.
  2. Grain: one row per order line. Kimball defines grain as what "a single fact table row represents" and encourages starting at the atomic grain, the lowest level the process captures, because it holds up against questions nobody has asked yet [3].
  3. Dimensions: order date, customer, product, sales region. Dimension tables carry the descriptive attributes that reports filter and group by, and are usually "wide, flat denormalized tables" [4].
  4. Facts: quantity, gross amount, discount, net amount. A fact table holds "the numeric measures produced by an operational measurement event" plus foreign keys to its dimensions [5].
                 dim_date
                    |
 dim_customer -- fact_order_line -- dim_product
                    |
                dim_region

 fact_order_line grain: one row per order line
 facts: quantity, gross_amount_inr, discount_inr, net_amount_inr

This is a star schema, which Kimball describes as fact tables linked to dimension tables through primary and foreign keys [6]. In PostgreSQL it is ordinary tables or views. Nothing about it requires a dedicated warehouse product.

Additivity: where dashboards most often go wrong

Kimball classifies facts by how they can be summed. Additive facts can be summed across every dimension. Semi-additive facts, such as account balances, can be summed across some dimensions but not time. Non-additive facts, such as ratios, cannot be summed at all, and the advice is to store the additive parts and compute the ratio at the end [7].

Dashboards break this rule easily. Suppose a mart stores a discount percentage per region per month, and a dashboard shows the yearly figure by averaging the monthly rows. The arithmetic below is illustrative and runs on PostgreSQL.

-- Illustrative data: two months for one region
CREATE TEMP TABLE region_month (
  month       date,
  gross_inr   numeric,
  discount_inr numeric
);
INSERT INTO region_month VALUES
  (DATE '2026-01-01', 100000, 5000),   -- 5% discount
  (DATE '2026-02-01',  10000, 2000);   -- 20% discount

-- Wrong: average of ratios
SELECT round(avg(discount_inr / gross_inr) * 100, 2) AS avg_of_ratios_pct
FROM region_month;                     -- 12.50

-- Right: ratio of sums
SELECT round(sum(discount_inr) / sum(gross_inr) * 100, 2) AS ratio_of_sums_pct
FROM region_month;                     -- 6.36

The two answers differ by almost a factor of two, and the averaged one overweights the small month. If the mart stores gross_inr and discount_inr and publishes the percentage only as a defined calculation, every dashboard that uses it gets 6.36. If the mart stores only the percentage, every dashboard author has to know not to average it, and some will not.

The same reasoning applies to distinct counts. "Customers who ordered" in January plus "customers who ordered" in February is not "customers who ordered" in the two months together, because some customers ordered in both. A mart can make this hard to get wrong by keeping the order-line grain available, so the distinct count is always recomputed at the level the dashboard asks for.

Conformed dimensions and the bus matrix

One mart is useful. Several marts become far more useful when they share dimensions. Kimball calls dimensions conformed when attributes in separate dimension tables have the same column names and domain contents, and describes this as "the essence of integration" because it lets results from different fact tables line up on the same rows [8].

The planning tool is the bus matrix: business processes as rows, dimensions as columns, with a mark wherever a process uses a dimension. The matrix shows which dimensions must be conformed and suggests building one row at a time [9]. For the distributor:

Business processDateCustomerProductRegionWarehouseCarrier
OrdersXXXX
ShipmentsXXXXXX
InvoicesXXXX
ReturnsXXXXX

Reading down the Customer column tells you that all four processes must use the same customer dimension, with the same keys and the same attribute values. If they do, a dashboard can show orders, shipments and returns per customer segment side by side, and the segments will mean the same thing in each column. If the shipments team built its own customer table with its own segment names, that comparison is unreliable no matter how good the dashboard looks.

When a dashboard needs a mart

Not every chart needs a modelling layer behind it. A one-off exploration over a single clean table does not. The signals below are design judgements for when it starts to pay.

SignalWhy it points to a mart
The same metric appears on more than one dashboardOne definition, many consumers; drift starts at the second copy
A chart's SQL joins several operational tablesThe join logic is a definition and should be reviewed once
The metric is a ratio, a distinct count or a balanceAdditivity rules need to be built in, not remembered
The source is the live transactional databaseAnalytical queries compete with the application for resources
People ask "how was this calculated?"The answer should be one place, not one per chart
A conversational or AI tool will query the dataClear grain and named facts reduce wrong answers (see below)

The last signal is newer. When a language model writes SQL, a mart with one fact table at a declared grain and a column called net_amount_inr leaves far less room for error than a set of operational tables where revenue has to be reconstructed. That argument is developed in From PostgreSQL to conversational analytics.

Where a mart lives in PostgreSQL

A mart is a logical layer. In PostgreSQL there are three common physical forms, and the choice is mostly about freshness against cost.

FormFreshnessQuery costNotes
ViewAlways currentRecomputed on every querySimplest; fine while the underlying queries are fast
Materialized viewAs of last refreshRead like a tableNeeds a refresh schedule
Table loaded by a pipelineAs of last loadRead like a tableMost control: history, slowly changing attributes, tests

PostgreSQL's documentation states the materialized view trade-off directly: access is often much faster than querying the underlying tables, but the data is not always current [10]. REFRESH MATERIALIZED VIEW replaces the contents completely. Without CONCURRENTLY, a refresh that affects many rows tends to finish faster but can block connections reading the view. CONCURRENTLY does not lock out readers, but it needs a view that is already populated and at least one unique index that uses only column names, with no expression and no WHERE clause [11].

CREATE MATERIALIZED VIEW reporting.sales_region_month AS
SELECT date_trunc('month', d.calendar_date)::date AS month,
       r.region_name,
       sum(f.gross_amount_inr)    AS gross_inr,
       sum(f.discount_inr)        AS discount_inr,
       sum(f.net_amount_inr)      AS net_inr
FROM reporting.fact_order_line f
JOIN reporting.dim_date   d ON d.date_key   = f.date_key
JOIN reporting.dim_region r ON r.region_key = f.region_key
GROUP BY 1, 2;

CREATE UNIQUE INDEX ON reporting.sales_region_month (month, region_name);

REFRESH MATERIALIZED VIEW CONCURRENTLY reporting.sales_region_month;

One operational detail is worth knowing if you harden the database. This example was run on PostgreSQL 16.15 in a scratch database where TEMPORARY had been revoked from PUBLIC. The concurrent refresh, run as the view's owner, failed with "permission denied to create temporary tables". A plain refresh by the same role succeeded, and the concurrent refresh succeeded once the role was granted TEMPORARY on the database or the default grant to PUBLIC was restored. The REFRESH MATERIALIZED VIEW reference page does not mention this, so treat it as observed behaviour and check it on your own version. From PostgreSQL 17, the right to refresh can also be granted to a role that is not the owner, through the MAINTAIN privilege [11][13].

This is an aggregate in Kimball's sense: a numeric rollup of atomic data built for speed [12]. Note that it stores the additive parts and leaves the discount percentage to be computed from sums. The atomic fact_order_line stays available for questions the aggregate cannot answer.

What a dashboard should own

With the meaning settled in the mart, a dashboard can concentrate on the decisions that belong to it: who it is for, which few numbers they need first, which filters make sense, which thresholds should draw the eye, and how often it is looked at. It can be rebuilt freely without anyone worrying that the redesign changed what revenue means.

That separation is also how DataMantri, Daivota's analytics product, is organised. Analysts shape data into reusable SQL data marts, and a dashboard can be generated from a written brief with every chart backed by a real query. More detail is on the DataMantri product page. For teams designing the reporting platform underneath, the same layering question comes up in enterprise infrastructure and architecture work: where the modelling layer runs, how it is refreshed, and who reviews changes to it.

Prepared with AI-assisted research and drafting.

Sources

  1. [1] Kimball Group, "Kimball Technical DW/BI System Architecture", Kimball Group, n.d. https://www.kimballgroup.com/data-warehouse-business-intelligence-resources/kimball-techniques/technical-dw-bi-system-architecture/
  2. [2] Kimball Group, "Four-Step Dimensional Design Process", Kimball Group, n.d. https://www.kimballgroup.com/data-warehouse-business-intelligence-resources/kimball-techniques/dimensional-modeling-techniques/four-4-step-design-process/
  3. [3] Kimball Group, "Grain", Kimball Group, n.d. https://www.kimballgroup.com/data-warehouse-business-intelligence-resources/kimball-techniques/dimensional-modeling-techniques/grain/
  4. [4] Kimball Group, "Dimension Table Structure", Kimball Group, n.d. https://www.kimballgroup.com/data-warehouse-business-intelligence-resources/kimball-techniques/dimensional-modeling-techniques/dimension-table-structure/
  5. [5] Kimball Group, "Fact Table Structure", Kimball Group, n.d. https://www.kimballgroup.com/data-warehouse-business-intelligence-resources/kimball-techniques/dimensional-modeling-techniques/fact-table-structure/
  6. [6] Kimball Group, "Star Schema OLAP Cube", Kimball Group, n.d. https://www.kimballgroup.com/data-warehouse-business-intelligence-resources/kimball-techniques/dimensional-modeling-techniques/star-schema-olap-cube/
  7. [7] Kimball Group, "Additive, Semi-Additive, and Non-Additive Facts", Kimball Group, n.d. https://www.kimballgroup.com/data-warehouse-business-intelligence-resources/kimball-techniques/dimensional-modeling-techniques/additive-semi-additive-non-additive-fact/
  8. [8] Kimball Group, "Conformed Dimensions", Kimball Group, n.d. https://www.kimballgroup.com/data-warehouse-business-intelligence-resources/kimball-techniques/dimensional-modeling-techniques/conformed-dimension/
  9. [9] Kimball Group, "Enterprise Data Warehouse Bus Matrix", Kimball Group, n.d. https://www.kimballgroup.com/data-warehouse-business-intelligence-resources/kimball-techniques/dimensional-modeling-techniques/enterprise-data-warehouse-bus-matrix/
  10. [10] PostgreSQL Global Development Group, "Materialized Views", PostgreSQL 18 documentation (version 18.6), n.d., accessed 3 November 2026. https://www.postgresql.org/docs/current/rules-materializedviews.html
  11. [11] PostgreSQL Global Development Group, "REFRESH MATERIALIZED VIEW", PostgreSQL 18 documentation (version 18.6), n.d., accessed 3 November 2026. https://www.postgresql.org/docs/current/sql-refreshmaterializedview.html
  12. [12] Kimball Group, "Aggregate Fact Tables or Cubes", Kimball Group, n.d. https://www.kimballgroup.com/data-warehouse-business-intelligence-resources/kimball-techniques/dimensional-modeling-techniques/aggregate-fact-table-cube/
  13. [13] PostgreSQL Global Development Group, "Release 17", PostgreSQL release notes, 2024. https://www.postgresql.org/docs/release/17.0/