Module 13 · Power BI and Tableau: Dashboards People Use · Lesson 43 of 51

What BI tools do, and the data model

Where Power BI and Tableau fit, how they compare, the path from data source to published dashboard, and the star schema of fact and dimension tables that makes dashboards fast and correct.

In this lesson · about 40 minutes

  • Explain what business-intelligence tools are for and compare Power BI with Tableau
  • Describe the path from source data to a published, refreshed dashboard
  • Design a star schema with a fact table and dimension tables

Try it · data lab

Build a sales dashboard

Six months of café orders. Use the slicers, pick a measure, an axis and a visual, and see the matching Power BI and Tableau formulas.

Slicers (they filter everything on the page)

Branch
Category
From
To

Total sales (+3% vs prev.)

$14,834

Orders (+0.3% vs prev.)

2,213

Average order value (+2.7% vs prev.)

$6.70

Items sold (+3.6% vs prev.)

3,218

Build the visual

Measure
Axis
Visual

Total sales by month · Apr–Jun

0254750944928.25Apr5093.5May4812.25Jun
Columns by month work well for a few periods. With many months, a line shows the trend more cleanly.
Show the formula in

Power BI

-- Measures (Modeling → New measure)
Total Sales = SUM(Orders[total])
Prev Period = CALCULATE([Total Sales], DATEADD('Date'[Date], -3, MONTH))
Change % = DIVIDE([Total Sales] - [Prev Period], [Prev Period])

-- Visual: Clustered column chart; X-axis Month; Values Total sales
-- Slicers filter the page: Apr–Jun

Power BI and Tableau side by side

Power BITableau
Made byMicrosoftSalesforce
Strong atFits Excel, Teams and Microsoft 365; low cost per user; strong data modellingFlexible, beautiful visual exploration; big community
Formula languageDAX (measures) and Power Query "M" (data preparation)Calculated fields, table calculations and LOD expressions
Desktop appPower BI Desktop (free, Windows)Tableau Desktop; Tableau Public is free (work is public)
SharingPower BI Service (workspaces, apps)Tableau Server or Tableau Cloud

Job adverts ask for one or the other; the ideas transfer. Learn one well and you can pick up the other in a couple of weeks.

From data to dashboard

  1. Connect to sources: CSV, Excel, a SQL database, a cloud warehouse.
  2. Prepare: clean and shape (Power Query in Power BI, Tableau Prep or the data source page). Same ideas as pandas cleaning.
  3. Model: relate the tables (below).
  4. Calculate: measures such as total sales or average order value.
  5. Visualise: charts, KPI cards, slicers/filters.
  6. Publish and refresh: share online, schedule a refresh, control who sees what.

The star schema

Put the events in one long, thin fact table (one row per order line: date, branch id, product id, quantity, amount). Put descriptions in small dimension tables: dim_date (date, month, weekday, holiday), dim_branch (id, name, city, size), dim_product (id, item, category). Connect each dimension to the fact table with a one-to-many relationship. Drawn out, it looks like a star. Filters flow from dimensions to the fact, so picking "Coffee" in a slicer filters the orders.

Why bother? Fewer repeated words (smaller, faster), one place to fix a product name, and calculations that behave predictably. A date table is essential: time comparisons like "same period last year" need one.

Splitting orders into a star schema with pandas

Exercise

Build the product dimension and the fact table

Make dim_product with one row per distinct item/category pair, sorted by category then item, with a product_id from 1 upwards as its first column. Then make fact by merging it into orders and keeping order_id, date, branch, product_id, qty and total. Set check to (len(dim_product), len(fact), round(float(fact["total"].sum()), 2)).

Code that runs before yours
import pandas as pd
import numpy as np
orders = pd.read_csv("kc_orders.csv", parse_dates=["date"])

Sorting drill

Fact or dimension?

Where does each column belong in a star schema?

  • Quantity sold on an order line
  • Product category
  • Order amount
  • Branch city and opening date
  • Whether a date is a public holiday
  • Foreign key product_id

0 of 6 sorted

Check your understanding0 of 3 correct

Question 1

1.In a star schema, slicers on a dimension…

Question 2

2.Why add a separate date table?

Question 3

3.Power BI's language for measures is…

Quiz score: 0 of 3

Exercises solved: 0 of 1

Tip: answer every quiz question correctly first.

Written by Noviq Academy in its own words. Kettle & Crumb and all its data are made up for teaching; any resemblance to a real business is a coincidence. Python runs in your browser with Pyodide, so results can differ slightly from your own computer. Power BI, Tableau and other product names belong to their owners. Read-aloud uses your device's built-in voices.