Fact Tables vs Dimension Tables in Power BI (Explained Simply) DAY-22 #datamindsacademy

DataMinds Academy574 words

Full Transcript

If you mix up fact and dimension tables, your PowerBI model will fight you at every step. This is day 22 of our 60 days PowerBI series. And today I will break down fact tables versus dimension tables in the simplest way possible. So you instantly know who goes where and why your report finally start making sense. Let's start with a situation almost everyone faces. You load each and every data in PowerBI. your sales data, products data, customer data, and even the date table. And the first question hits you, which table should I connect to which? That confusion exists for one reason. You don't yet see the difference between fact table and dimension tables. So, let's fix that. Think of fact table as a diary of events. It records things that happen. A sales happens, an order happens, a payment happens, a shipment happens. Fact tables answer questions like how much, how many, how often, and how long. That's why fact tables are full of numbers, sales amount, quantity, discount, cost, profit. They usually have a lot of rows, repeated values, foreign keys pointing to other tables. Now, dimension table. Think of dimension table as labels and description. They don't record events. They describe the events. Customer name, product category, region, date, employees. Dimension tables answer who, what, where, and when. Now let's look at a clean example. So this is a facts table. Here I'm having order ID, order date, product ID, customer ID, quantity and sales amount. That's it. There is no product name, no customer name and no category. Those belongs to dimension table. Now let's move on to our product table. This our product dimension table. Here we are having product ID, product name, category and price. Now let's move on to our customer dimension table. Here we are having customer ID, customer name, city and segment. And this is our date table. Here we are having date, month, year, month number and year. Now here's the magic. This fact table connect to all these three dimension table using keys. So let's see in model view. So here product ID links sales to the product. This customer ID links sales to our customer and date link sales to date. This structure creates a clean star shape. One fact at the center and other dimensions around it. Filter flows smoothly from dimension to fact. calculation runs faster and the model becomes predictable. Now let's talk about the most common beginner mistake. They try to connect dimension with another dimension table. This creates loop and confusion. Rule to remember dimension do not connect to other dimension table. They only connect to a fact table. Fact tables sit in the middle. Dimensions surround it. Another important difference is size. Fact tables are big, thousands of millions of records. Dimension tables are smaller, hundreds or few thousand records. That's why you never want to repeat dimension information inside a fact table. So let's have a quick recap. Fact tables store events, contain numbers, have many rows, sit at the center and connects two dimensions. Dimension tables store description, contains text and categories, have fewer rows and surround facts and control filtering. Once you clearly separate facts and dimensions, PowerBI stops feeling confusing and starts feeling logical. If you want to quickly revise what a data model is and why it matters, that video is popping up on your screen. Tap it.

Need a transcript for another video?

Get free YouTube transcripts with timestamps, translation, and download options.

Transcript content is sourced from YouTube's auto-generated captions or AI transcription. All video content belongs to the original creators. Terms of Service · DMCA Contact

Fact Tables vs Dimension Tables in Power BI (Explained Si...