Ravindra BagaleCourses & study guides मराठी Track your progress

11. Data Modelling

11.1 Why Data Modelling Matters

Start with a problem

Shraddha put store, city, region and manager details into every order row. The table is wide, repetitive, and the manager's email is repeated many times.

Explain simply

Data modelling splits data into a fact table (events such as orders) and dimension tables (descriptions such as stores), joined by keys. This is a star schema.

Show the data

Table Rows Example columns
Orders (fact) 8 Order ID, Store, Amount
DarkStores (dimension) 5 Store, City, Region, Manager

About this data: This table uses columns: Table, Rows, Example columns. This table uses columns: Region, Total Sales (₹). This table uses columns: Wrong result, Reason, Correction. Values shown are the lesson examples already on this page (not a new dataset).

Fictional sample data. Practice file: dark_stores_maharashtra.csv, visuals_orders_apr_may_2026.csv (source: src/practice/).

Demonstrate

  1. Load both CSVs.
  2. Model view: drag DarkStores[Store] onto Orders[Store].
  3. Check one-to-many (1 → *), single direction.
  4. Matrix: Region from DarkStores, Total Sales from Orders.

Show the result

Your result should look like this (fictional sample):

Region Total Sales (₹)
West Maharashtra 850
North Maharashtra 800
South Maharashtra 450
Total 2,100

Explain what happened

The relationship lets the store's Region filter its orders; each store detail is stored once.

Explore further

  • Module 11.2 explains fact and dimension tables in detail.

Detailed reference for this lesson:

A data model is the set of tables, the relationships between them and the calculations on top. A good model makes DAX simple, reports fast and numbers correct. A poor model (one giant flat table, or many-to-many relationships everywhere) causes slow reports and wrong totals. In interviews, strong modelling knowledge is what separates a report maker from a Power BI developer.

Ravindra Bagale's Tip

Friends, many students build every visual on one big flat table exported from Excel and then struggle with totals and slow reports. Split it into a fact table and dimensions early. A good model makes DAX simple, and a bad model makes every measure a fight. Never forget this.

Fix common mistakes

Wrong result Reason Correction
Every region shows ₹2,100 No relationship Create Store relationship
Many-to-many warning Duplicate stores in DarkStores Remove duplicates
Region blank Store spelling mismatch Clean keys

Practise independently

Practice task

Which region is Kolhapur in, and what is its total?

Hints
  • DarkStores.
Solution

South Maharashtra, ₹450.

Think like a professional

Star schema is the most common modelling interview question; draw it.

Ravi Sir's Cards for this lesson

मराठी cards