Why separating “Dim” and “Fact” tables are important in Power BI Many people start with a single table. It works... until it doesn’t. As your model grows, you realise data lives in two worlds: 1️⃣ Fact tables They’re the events: every transaction or movement that happens over time. Examples: sales, orders, production, consumption. They contain dates, quantities, values, and keys that connect to dimensions. 2️⃣ Dimension tables They’re the context: the labels that give meaning to those events. Examples: materials, customers, sales orgs, plants, calendar. They’re what you use to filter, group, and explain. The secret is in how you connect them: • Dimension tables stay on the one side, with no duplicates • Fact tables stay on the many side • Filter direction flows from Dim to Fact Real example: I had to compare monthly forecasts with daily customer orders. So I built a Dimension “Date × SalesOrg × Material” and connected both fact tables (Forecast and Orders) to it. Without that layer, Power BI was summing everything as if all materials and orgs were the same. In the end, a solid model is less about formulas and more about structure. When your relationships are right, DAX almost writes itself.
Vasco Bento’s Post
More Relevant Posts
-
✨ 𝗧𝗵𝗲 𝗱𝗮𝘆 𝗺𝘆 𝗣𝗼𝘄𝗲𝗿 𝗕𝗜 𝗰𝗮𝗿𝗱 𝗿𝗲𝗳𝘂𝘀𝗲𝗱 𝘁𝗼 𝗰𝗵𝗮𝗻𝗴𝗲 I built a dashboard. The visuals changed beautifully when I used slicers… except one 𝗰𝗮𝗿𝗱 that stubbornly showed the same total no matter what I clicked. I checked my DAX three times. Nothing looked wrong. Then I realized my mistake — I had created a 𝗖𝗮𝗹𝗰𝘂𝗹𝗮𝘁𝗲𝗱 𝗖𝗼𝗹𝘂𝗺𝗻 instead of a 𝗠𝗲𝗮𝘀𝘂𝗿𝗲. That’s when it clicked: Power BI doesn’t just calculate values — it decides 𝘄𝗵𝗲𝗻 to calculate them. 𝗛𝗲𝗿𝗲’𝘀 𝘁𝗵𝗲 𝘀𝗶𝗺𝗽𝗹𝗲 𝗱𝗶𝗳𝗳𝗲𝗿𝗲𝗻𝗰𝗲 𝘁𝗵𝗮𝘁 𝗰𝗵𝗮𝗻𝗴𝗲𝗱 𝗵𝗼𝘄 𝗜 𝘁𝗵𝗶𝗻𝗸 𝗮𝗯𝗼𝘂𝘁 𝗗𝗔𝗫: 🧮 𝗖𝗮𝗹𝗰𝘂𝗹𝗮𝘁𝗲𝗱 𝗖𝗼𝗹𝘂𝗺𝗻 • Calculated 𝗿𝗼𝘄 𝗯𝘆 𝗿𝗼𝘄 when data loads or refreshes. • Stored in your model (takes space). • 𝗗𝗼𝗲𝘀𝗻’𝘁 𝗿𝗲𝗮𝗰𝘁 to slicers or filters. • Example: Sales[Line Revenue] = Sales[Qty] * Sales[Price] 📊 𝗠𝗲𝗮𝘀𝘂𝗿𝗲 • Calculated 𝗼𝗻 𝘁𝗵𝗲 𝗳𝗹𝘆, based on the current 𝗳𝗶𝗹𝘁𝗲𝗿 𝗰𝗼𝗻𝘁𝗲𝘅𝘁. • Not stored — recalculated every time you change a slicer. • Perfect for cards, KPIs, and visuals. • Example: Total Revenue = SUMX(Sales, Sales[Qty] * Sales[Price]) So, when I changed slicers and my card still showed the same number, Power BI wasn’t wrong — 𝗜 𝘄𝗮𝘀 𝗷𝘂𝘀𝘁 𝘂𝘀𝗶𝗻𝗴 𝘁𝗵𝗲 𝘄𝗿𝗼𝗻𝗴 𝗸𝗶𝗻𝗱 𝗼𝗳 𝗰𝗮𝗹𝗰𝘂𝗹𝗮𝘁𝗶𝗼𝗻. Now, my rule is simple: ➡️ If it should change with filters → it’s a 𝗠𝗲𝗮𝘀𝘂𝗿𝗲. ➡️ If it’s fixed per row → it’s a 𝗖𝗮𝗹𝗰𝘂𝗹𝗮𝘁𝗲𝗱 𝗖𝗼𝗹𝘂𝗺𝗻. Once that clicked, DAX started making sense — and my reports finally told the right story. 💬 𝗛𝗮𝘃𝗲 𝘆𝗼𝘂 𝗲𝘃𝗲𝗿 𝗰𝗿𝗲𝗮𝘁𝗲𝗱 𝗮 𝗰𝗮𝗹𝗰𝘂𝗹𝗮𝘁𝗲𝗱 𝗰𝗼𝗹𝘂𝗺𝗻 𝘄𝗵𝗲𝗻 𝘆𝗼𝘂 𝗮𝗰𝘁𝘂𝗮𝗹𝗹𝘆 𝗻𝗲𝗲𝗱𝗲𝗱 𝗮 𝗺𝗲𝗮𝘀𝘂𝗿𝗲?
To view or add a comment, sign in
-
✨99% of Power BI users get this wrong✨ ⚡They build beautiful reports, stunning visuals, even perfect DAX formulas but mess up one tiny thing that breaks their entire model.⚡ ➡️ The relationships. Let’s see if you can get this one right 👇 📊 You have three tables in your Power BI Semantic Model: Products (ProductID, ProductName) OrderHistory (OrderID, ProductID, OrderDate) Date (Year, Month, Week, Date) You need to define relationships: Products → OrderHistory OrderHistory → Date Now here’s the catch… 👉 What cardinality should I use between Products and OrderHistory? Think about it carefully 👇 Each product can appear in many orders, but each order can contain only one product (as per this data model). 🚀 Pro Tip: Always start your data model like this: Dimension → Fact → Date What about you? What’s your go-to rule before creating relationships in Power BI? Let’s hear your thoughts 👇 #PowerBI #DataModeling #MicrosoftPowerBI #DAX #BusinessIntelligence #DataEngineering #Analytics #DataVisualization
To view or add a comment, sign in
-
The Power of the Pareto Principle (80/20 Rule) in Power BI Ever heard of the saying — “80% of the results come from 20% of the causes”? That’s exactly what a Pareto Chart helps us uncover! 📊 Recently, I built a Pareto Chart in Power BI to analyze customer complaints for a client — and the insights were eye-opening: ✅ 20% of the products were causing 80% of total issues. ✅ Focusing on those few categories immediately reduced complaint volume by 30%. What’s great about a Pareto Chart: 🔹 It combines bars (frequencies) and a line (cumulative percentage). 🔹 Helps identify vital few vs. trivial many. 🔹 Perfect for root cause analysis, sales performance, quality control, and customer feedback. In Power BI, you can easily create it using: 👉 DAX cumulative measures + combo chart (column & line) 👉 Or even better, with custom visuals from AppSource. Sometimes, one simple visualization can completely shift business focus from “trying to fix everything” to “fixing what matters most.” 💡 Have you ever used a Pareto Chart in your reports? #PowerBI #ParetoChart #DataVisualization #Analytics #DAX #BusinessIntelligence
To view or add a comment, sign in
-
-
🔹 Power BI Tip: RELATED() vs RELATEDTABLE() 🔹 Ever got confused between RELATED() and RELATEDTABLE() in DAX? Here’s a quick way to remember the difference 👇 💡 RELATED() Direction: Many ➜ One Use case: When you’re working in a fact (many) table What it returns: A single value from the related lookup/dimension table Example: = RELATED(Products[Category]) 👉 Pulls the Category from the Products table into Sales. 💡 RELATEDTABLE() Direction: One ➜ Many Use case: When you’re working in a dimension (one) table What it returns: A table of all related rows from the fact (many) side Example: = COUNTROWS(RELATEDTABLE(Sales)) 👉 Counts how many Sales rows exist for each Product. ✅ In short: RELATED() → Many ➡️ One (returns a single value) RELATEDTABLE() → One ➡️ Many (returns a table) #PowerBI #DAX #DataAnalytics #BusinessIntelligence #PowerBITips
To view or add a comment, sign in
-
Context Transition in Power BI Three similar-looking formulas. Three completely different mechanisms. Let me break it down 🛠️ 📅 Example 1: Best Selling Day We have an existing Calendar table in our data model. Since it's structured at the day level, MAXX iterates through each day, calculates [Total Sales] for that specific day, and returns the maximum. The granularity of the Calendar table determines that we get the best-selling day. 📦 Example 2: Best Selling Product Same logic, different table. Our Products table exists at the SKU level (product code level). MAXX iterates through each product, evaluates [Total Sales] for that product, and returns the winner. The table's granularity gives us the best-selling product. 🗺️ Example 3: Best Selling Region Here's where it gets interesting. We don't have a dedicated dimension table for regions in our data model. So we create a virtual table using VALUES(Sales[Region]). This extracts all unique regions from the Sales table, and MAXX can then iterate through them to find the best-selling region. 🔑 The key insight: Context transition happens when MAXX iterates and converts each row into a filter context for the measure to evaluate. But the granularity of what you're iterating over, whether it's a physical dimension table or a virtual table, determines what "best" actually means. Physical tables = leverage your data model structure Virtual tables = create analysis paths that don't exist in your model #PowerBI #DAX
To view or add a comment, sign in
-
-
Power BI Journey: Day 11–14 | Return Order Analysis Dashboard 🚚📦... From raw data to refined insights—my analytics journey continues! Over the past few days (Day 11 to 14), I focused on building a comprehensive Return Order Analysis Dashboard for an eCommerce dataset using Power BI. This project helped me dive deeper into real-world business scenarios and sharpen my DAX skills. 🎯 Project Focus: Understanding why customers return products, how frequently, and what patterns emerge across categories, regions, and time periods. 📊 Dashboard Highlights: Return rate trends by product category and region Customer-wise return frequency Time-series analysis of return volume KPI cards for total orders, returns, and return percentage Interactive slicers for dynamic filtering 🧠 DAX Learning Milestones: I explored how DAX behaves under different conditions and scenarios: CALCULATE() for context transition and dynamic filtering FILTER() to isolate return orders based on status DIVIDE() to handle zero-division gracefully IF() and SWITCH() for conditional logic across categories Time intelligence functions for monthly and quarterly return trends 💡 Key Takeaway: DAX isn’t just syntax—it’s strategy. Understanding row vs filter context, evaluation order, and how measures interact with visuals helped me unlock powerful insights 🔗 If you're working on similar projects or want to collaborate on eCommerce analytics, feel free to connect! #PowerBI #DataAnalytics #DAX #ReturnOrderAnalysis #EcommerceInsights #DashboardDesign #AnalyticsJourney #LearningInPublic #ManishKaushik
To view or add a comment, sign in
-
You don’t need 100 DAX functions. Just these 10 can cover 90% of your analysis in Power BI 1. CALCULATE() Most powerful DAX function Changes the context of a calculation Example: Sales2024 = CALCULATE(SUM(Sales[Amount]), Sales[Year] = 2024) 2. SUM() / AVERAGE() / COUNT() Basic aggregation functions Frequently used in KPIs and dashboards Example: Total Sales = SUM(Sales[Amount]) 3. FILTER() Returns a table that you can use inside CALCULATE Helps define complex filter logic Example: HighSales = CALCULATE(SUM(Sales[Amount]), FILTER(Sales, Sales[Amount] > 10000)) 4. ALL() / REMOVEFILTERS() Removes filters from a table/column Essential for calculating % of total or grand totals Example: SalesPct = DIVIDE(SUM(Sales[Amount]), CALCULATE(SUM(Sales[Amount]), ALL(Sales))) 5. DATESYTD(), DATESMTD(), DATESQTD() Time intelligence functions Useful for year-to-date, month-to-date calculations Example: SalesYTD = TOTALYTD(SUM(Sales[Amount]), Dates[Date]) 6. DIVIDE() Safe division (avoids divide-by-zero errors) Preferred over / operator Example: ProfitMargin = DIVIDE([Profit], [Revenue]) 7. IF() / SWITCH() Conditional logic Used to create calculated columns or flags Example: CategoryFlag = IF(Sales[Amount] > 10000, "High", "Low") 8. EARLIER() Used in row context to refer to outer row values Mostly used in calculated columns Example: ranking, previous row comparison 9. RANKX() Ranks values across a table or category Used for top N analysis Example: SalesRank = RANKX(ALL(Products), [Total Sales]) 10. RELATED() / RELATEDTABLE() Used to fetch data from related tables Helpful in star schema models Example: CustomerRegion = RELATED(Customer[Region]). .
To view or add a comment, sign in
-
Power BI DAX ! Creating a Running Total (Cumulative Sales) measure in Power BI using DAX. It helps visualize how sales grow over time — giving a clear picture of performance trends DAX Formula: Running_Total = CALCULATE(SUM(Sheet1[Sales]),FILTER(ALL(Sheet1[Order Date].[Date]),Sheet1[Order Date].[Date]<=MAX(Sheet1[Order Date].[Date]))) What it does: This formula calculates the total sales up to each date, allowing us to track cumulative progress. Such insights are powerful for identifying growth patterns and forecasting trends. Explanation: SUM(Sheet1[Sales]) → calculates total sales. FILTER(ALL(Sheet1[Order Date].[Date]), ...) → removes existing filters on dates to consider the entire date range. Sheet1[Order Date].[Date] <= MAX(Sheet1[Order Date].[Date]) → ensures that only dates up to the current date in context are included, which gives the cumulative effect. CALCULATE() → re-applies the new filter context to compute the running total. #PowerBI #DAX #DataAnalytics #BusinessIntelligence #DataVisualization #Learning
To view or add a comment, sign in
-
-
🚀 Power BI Dashboard – Business Overview Insights Thrilled to share my latest Power BI project, where I analyzed overall business performance across products, customers, and suppliers! 🔍 Key Insights: 💰 Total Revenue: $577K with an 86% Avg Profit Margin 🧴 Top Product: Skincare dominates with $241K in sales 👩💼 Customer Segment: Male customers drive 50%+ of total revenue 🚚 Shipping: Carrier B leads with $250K revenue, showing top delivery efficiency ⚙️ Quality: Skincare has the highest defect rate (36.86%) → quality improvement opportunity 🏭 Suppliers: Supplier 3 achieves the best Profit Margin (91%) 📈 Overall Insight: Strong profitability and diverse product performance — with opportunities to enhance quality control and optimize logistics for even better growth. #PowerBI #DataAnalytics #DashboardDesign #DataVisualization #BusinessIntelligence #Insights #BesantTechnologies
To view or add a comment, sign in
-
-
The one DAX function that can change how you think about data forever: CALCULATE. Let me tell you a quick story 👇 A while ago, I was working on a sales report. Everything looked fine… Until the client asked me: Can you show me the total sales just for 2025? I used SUM(Sales) as usual but it gave me the total for all years. That’s when I realized: I didn’t just need to sum numbers. I needed a function that understands context. And that’s when CALCULATE came to the rescue. 🎯 CALCULATE(SUM(Sales), Year = 2025) With just one line, Power BI started answering questions I thought were complex: How do I compare this year’s sales with last year’s? How can I filter for a specific product or region? Because CALCULATE changes the context in which Power BI performs your calculations. That’s why it’s called the brain of DAX. 🧠 💡 In short: Before you write any measure, ask yourself: Do I just need the raw number? Or do I need to control the context? If it’s the second one CALCULATE is your best friend. ⚡ 📊 Want to learn Power BI in a way that finally makes sense? Follow me 👋 for more advanced DAX insights made simple. #PowerBI #DAX #Data_Analytics #Data_Storytelling #Business_Intelligence
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development