<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: sam manox</title>
    <description>The latest articles on DEV Community by sam manox (@sam_manox).</description>
    <link>https://dev.to/sam_manox</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4086125%2F347b72d1-f120-422f-bf6f-a3353dc9dd85.jpg</url>
      <title>DEV Community: sam manox</title>
      <link>https://dev.to/sam_manox</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sam_manox"/>
    <language>en</language>
    <item>
      <title>Power BI Technical Article: Data Modelling, Relationships &amp; Joins</title>
      <dc:creator>sam manox</dc:creator>
      <pubDate>Sun, 13 Sep 2026 11:13:18 +0000</pubDate>
      <link>https://dev.to/sam_manox/power-bi-technical-article-data-modelling-relationships-joins-4l1d</link>
      <guid>https://dev.to/sam_manox/power-bi-technical-article-data-modelling-relationships-joins-4l1d</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Power BI is a business intelligence tool that enables the conversion of raw data into reports and dashboards. However, the quality of the Power BI report is influenced by how the data is prepared and structured in advance. &lt;br&gt;
Data modelling is the act of organizing the tables, columns, keys, and relationships in such a way that allows Power BI to process how the various data parts are connected. A correctly constructed model brings better performance of the report, eases calculations in DAX, minimizes redundancy of data, improves scalability, and simplifies understanding of the solution. &lt;br&gt;
The article describes key modelling schemes, fact and dimension tables, relationships, direction of filters, and joins in Power Query. It also illustrates the difference between the functions of merging tables in Power Query and creating relationships in the Power BI model.&lt;/p&gt;
&lt;h2&gt;
  
  
  1. Data Modelling in Power BI
&lt;/h2&gt;
&lt;h3&gt;
  
  
  What is Data Modelling?
&lt;/h3&gt;

&lt;p&gt;Data modelling in Power BI involves designing the structure of tables and defining how they relate to one another. Instead of treating every dataset as one large table, related information can be separated into logical tables and connected using keys.&lt;/p&gt;

&lt;p&gt;For example, a sales system may contain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Customer information&lt;/li&gt;
&lt;li&gt;Product information&lt;/li&gt;
&lt;li&gt;Date information&lt;/li&gt;
&lt;li&gt;Location information&lt;/li&gt;
&lt;li&gt;Sales transactions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These can be organized into a model where a central &lt;code&gt;FactSales&lt;/code&gt; table connects to several descriptive dimension tables.&lt;/p&gt;

&lt;p&gt;A good data model:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Improves report and query performance&lt;/li&gt;
&lt;li&gt;Makes DAX measures easier to write&lt;/li&gt;
&lt;li&gt;Reduces unnecessary data duplication&lt;/li&gt;
&lt;li&gt;Makes relationships and filter propagation easier to understand&lt;/li&gt;
&lt;li&gt;Allows the model to scale as more data is added&lt;/li&gt;
&lt;li&gt;Makes reports easier to maintain&lt;/li&gt;
&lt;li&gt;Reduces the risk of incorrect calculations&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  1.1 Flat Table
&lt;/h3&gt;

&lt;p&gt;A flat table stores all information in one table. All data is kept in one single grid or file without links to other tables; it lacks relational database connections, which often leads to repeated or redundant information.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Sale_ID&lt;/th&gt;
&lt;th&gt;Date&lt;/th&gt;
&lt;th&gt;Customer&lt;/th&gt;
&lt;th&gt;Product&lt;/th&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;City&lt;/th&gt;
&lt;th&gt;Quantity&lt;/th&gt;
&lt;th&gt;Sales&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1001&lt;/td&gt;
&lt;td&gt;01/09/2026&lt;/td&gt;
&lt;td&gt;John&lt;/td&gt;
&lt;td&gt;Laptop&lt;/td&gt;
&lt;td&gt;Electronics&lt;/td&gt;
&lt;td&gt;Nairobi&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;80,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1002&lt;/td&gt;
&lt;td&gt;02/09/2026&lt;/td&gt;
&lt;td&gt;Mary&lt;/td&gt;
&lt;td&gt;Mouse&lt;/td&gt;
&lt;td&gt;Electronics&lt;/td&gt;
&lt;td&gt;Mombasa&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;3,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1003&lt;/td&gt;
&lt;td&gt;03/09/2026&lt;/td&gt;
&lt;td&gt;John&lt;/td&gt;
&lt;td&gt;Keyboard&lt;/td&gt;
&lt;td&gt;Electronics&lt;/td&gt;
&lt;td&gt;Nairobi&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;4,000&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Structure&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;br&gt;
                 FLAT TABLE&lt;br&gt;
┌───────────────────────────────────────────┐&lt;br&gt;
│ Sales                                      │&lt;br&gt;
├───────────────────────────────────────────┤&lt;br&gt;
│ Sale_ID                                    │&lt;br&gt;
│ Date                                       │&lt;br&gt;
│ Customer                                   │&lt;br&gt;
│ Product                                    │&lt;br&gt;
│ Category                                   │&lt;br&gt;
│ City                                       │&lt;br&gt;
│ Quantity                                   │&lt;br&gt;
│ Sales                                      │&lt;br&gt;
└───────────────────────────────────────────┘&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simple to understand&lt;/li&gt;
&lt;li&gt;Easy to import&lt;/li&gt;
&lt;li&gt;Convenient for small datasets&lt;/li&gt;
&lt;li&gt;Requires fewer relationships&lt;/li&gt;
&lt;li&gt;Suitable for simple analysis&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Disadvantages&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creates significant data duplication&lt;/li&gt;
&lt;li&gt;Can increase model size&lt;/li&gt;
&lt;li&gt;Changes to customer or product information may need to be repeated across many rows&lt;/li&gt;
&lt;li&gt;Can make data maintenance difficult&lt;/li&gt;
&lt;li&gt;Less suitable for large datasets&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Appropriate Use&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A flat table can be appropriate for a small, simple dataset where the data is already clean and there are relatively few repeated descriptive values.&lt;br&gt;
For large business intelligence solutions, however, a flat table is generally less desirable than a properly designed dimensional model.&lt;/p&gt;
&lt;h3&gt;
  
  
  1.2 Star Schema
&lt;/h3&gt;

&lt;p&gt;A star schema consists of a central fact table surrounded by dimension tables.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Structure&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
                       ┌───────────────┐
                       │  DimCustomer  │
                       │ CustomerID PK │
                       └───────┬───────┘
                               │ 1
                               │
                               │ *
┌───────────────┐        ┌────▼───────┐        ┌───────────────┐
│    DimDate    │───────►│ FactSales  │◄───────│  DimProduct   │
│ DateKey PK    │  1:*   │ SaleID     │  1:*   │ ProductID PK  │
└───────────────┘        │ CustomerID │        │ ProductName   │
                          │ ProductID │         │ Category      │
                          │ DateKey    │         └───────────────┘
                          │ Quantity   │
                          │ Sales      │
                          └─────▲──────┘
                               │
                               │ *
                       ┌───────┴───────┐
                       │  DimLocation  │
                       │ LocationID PK │
                       │ City          │
                       │ Region        │
                       └───────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The fact table sits at the center, while dimensions provide descriptive information; the fact table has columns that link it to the other tables.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Excellent for Power BI reporting&lt;/li&gt;
&lt;li&gt;Simple and intuitive structure&lt;/li&gt;
&lt;li&gt;Generally provides good query performance&lt;/li&gt;
&lt;li&gt;Makes DAX easier to understand&lt;/li&gt;
&lt;li&gt;Minimizes unnecessary duplication&lt;/li&gt;
&lt;li&gt;Makes filtering predictable&lt;/li&gt;
&lt;li&gt;Easy to extend with additional dimensions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Disadvantages&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Requires careful modelling&lt;/li&gt;
&lt;li&gt;Dimension tables may contain some repeated information within their own hierarchy&lt;/li&gt;
&lt;li&gt;Requires appropriate primary and foreign keys&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Appropriate Use&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The star schema is particularly appropriate for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sales reporting&lt;/li&gt;
&lt;li&gt;Financial reporting&lt;/li&gt;
&lt;li&gt;Inventory analysis&lt;/li&gt;
&lt;li&gt;Customer analytics&lt;/li&gt;
&lt;li&gt;Production reporting&lt;/li&gt;
&lt;li&gt;Operational dashboards&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is generally the preferred structure for Power BI semantic models, sitting between raw database tables and end-user tools, and turning complex schemas and SQL into everyday concepts like "Revenue" or "Customer."&lt;/p&gt;

&lt;h3&gt;
  
  
  1.3 Snowflake Schema
&lt;/h3&gt;

&lt;p&gt;A snowflake schema extends the star schema by dividing dimensions into related tables. For example, instead of storing Product, Category, and Department in one &lt;code&gt;DimProduct&lt;/code&gt; table, you can separate them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Structure&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                         ┌───────────────┐
                         │  DimCategory  │
                         │ CategoryID PK │
                         │ CategoryName  │
                         └───────▲───────┘
                                 │ *
                                 │
                              1  │
                         ┌───────┴───────┐
                         │  DimProduct   │
                         │ ProductID PK  │
                         │ CategoryID FK │
                         │ ProductName   │
                         └───────┬───────┘
                                 │ *
                                 │
                              1  │
                         ┌───────▼───────┐
                         │   FactSales   │
                         │ ProductID FK  │
                         │ CustomerID FK │
                         │ SalesAmount   │
                         └───────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Advantages&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reduces duplication within dimensions&lt;/li&gt;
&lt;li&gt;Useful for complex hierarchical data&lt;/li&gt;
&lt;li&gt;Can represent normalized source systems more closely&lt;/li&gt;
&lt;li&gt;Useful where dimensions are very large or have complex structures&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Disadvantages&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;More tables and relationships&lt;/li&gt;
&lt;li&gt;More complex filter paths&lt;/li&gt;
&lt;li&gt;DAX and report development can become less intuitive&lt;/li&gt;
&lt;li&gt;May require additional joins during analysis&lt;/li&gt;
&lt;li&gt;More difficult for beginners to understand&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Appropriate Use&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Snowflake schemas can be appropriate where dimensions have complex hierarchies or substantial repeated data. However, unnecessarily snowflaking a Power BI model can add complexity without providing enough benefit.&lt;/p&gt;

&lt;h3&gt;
  
  
  Schema Comparison
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Flat Table&lt;/th&gt;
&lt;th&gt;Star Schema&lt;/th&gt;
&lt;th&gt;Snowflake Schema&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Number of tables&lt;/td&gt;
&lt;td&gt;One&lt;/td&gt;
&lt;td&gt;Multiple&lt;/td&gt;
&lt;td&gt;Multiple&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Simplicity&lt;/td&gt;
&lt;td&gt;Very high&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Lower&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data duplication&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;td&gt;Very low&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Relationships&lt;/td&gt;
&lt;td&gt;Minimal&lt;/td&gt;
&lt;td&gt;Simple&lt;/td&gt;
&lt;td&gt;More complex&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DAX simplicity&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Lower&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scalability&lt;/td&gt;
&lt;td&gt;Limited&lt;/td&gt;
&lt;td&gt;Excellent&lt;/td&gt;
&lt;td&gt;Excellent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Power BI suitability&lt;/td&gt;
&lt;td&gt;Small models&lt;/td&gt;
&lt;td&gt;Excellent&lt;/td&gt;
&lt;td&gt;Selective&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Maintenance&lt;/td&gt;
&lt;td&gt;Difficult as data grows&lt;/td&gt;
&lt;td&gt;Easy&lt;/td&gt;
&lt;td&gt;More complex&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  2. Fact Tables and Dimension Tables
&lt;/h2&gt;

&lt;p&gt;A dimensional model normally consists of fact tables and dimension tables.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fact Table
&lt;/h3&gt;

&lt;p&gt;A fact table records measurable business events. For example, &lt;code&gt;FactSales&lt;/code&gt; may contain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sale_ID&lt;/li&gt;
&lt;li&gt;Date_Key&lt;/li&gt;
&lt;li&gt;Customer_ID&lt;/li&gt;
&lt;li&gt;Product_ID&lt;/li&gt;
&lt;li&gt;Location_ID&lt;/li&gt;
&lt;li&gt;Quantity&lt;/li&gt;
&lt;li&gt;Sales_Amount&lt;/li&gt;
&lt;li&gt;Cost_Amount&lt;/li&gt;
&lt;li&gt;Profit_Amount&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Fact tables normally contain foreign keys linking them to dimensions and numeric values that can be aggregated. Examples include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;FactSales&lt;/li&gt;
&lt;li&gt;FactOrders&lt;/li&gt;
&lt;li&gt;FactTransactions&lt;/li&gt;
&lt;li&gt;FactInventory&lt;/li&gt;
&lt;li&gt;FactProduction&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Dimension Table
&lt;/h3&gt;

&lt;p&gt;A dimension table contains descriptive information used to analyze facts.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Descriptive Attributes:&lt;/strong&gt; Stores qualitative data like names, categories, and locations (answering who, what, where, when)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Primary Key:&lt;/strong&gt; Uses a unique identifier for each row to link with foreign keys in a fact table&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Denormalized Structure:&lt;/strong&gt; Built wide and flat with fewer rows than fact tables to speed up read performance&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Examples include:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DimCustomer&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CustomerID&lt;/li&gt;
&lt;li&gt;CustomerName&lt;/li&gt;
&lt;li&gt;CustomerType&lt;/li&gt;
&lt;li&gt;Gender&lt;/li&gt;
&lt;li&gt;City&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;DimProduct&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ProductID&lt;/li&gt;
&lt;li&gt;ProductName&lt;/li&gt;
&lt;li&gt;Category&lt;/li&gt;
&lt;li&gt;Brand&lt;/li&gt;
&lt;li&gt;UnitPrice&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;DimDate&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DateKey&lt;/li&gt;
&lt;li&gt;Date&lt;/li&gt;
&lt;li&gt;Month&lt;/li&gt;
&lt;li&gt;Quarter&lt;/li&gt;
&lt;li&gt;Year&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;DimLocation&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;LocationID&lt;/li&gt;
&lt;li&gt;City&lt;/li&gt;
&lt;li&gt;County&lt;/li&gt;
&lt;li&gt;Region&lt;/li&gt;
&lt;li&gt;Country&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Facts answer questions such as: &lt;em&gt;How many? How much? How often?&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Grain or Granularity
&lt;/h3&gt;

&lt;p&gt;The grain of a fact table describes exactly what one row represents.&lt;/p&gt;

&lt;p&gt;For example, one row in &lt;code&gt;FactSales&lt;/code&gt; might represent one product sold in one sales transaction. This distinction is extremely important:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If one row represents an individual product transaction, the table might have: &lt;code&gt;SaleID | ProductID | CustomerID | Quantity | SalesAmount.&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;If one row represents an entire customer order, the grain is different.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A clearly defined grain prevents incorrect aggregation and double-counting.&lt;/p&gt;

&lt;h3&gt;
  
  
  Practical Star Schema Example
&lt;/h3&gt;

&lt;p&gt;A retail company could use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                  DimCustomer
                       │
                       │ 1:*
                       ▼
DimDate ───────► FactSales ◄────── DimProduct
                       ▲
                       │
                       │ 1:*
                       │
                  DimLocation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The central &lt;code&gt;FactSales&lt;/code&gt; table stores transactions, while the dimensions provide context. For example, selecting &lt;code&gt;Category = Electronics&lt;/code&gt; from &lt;code&gt;DimProduct&lt;/code&gt; filters &lt;code&gt;FactSales&lt;/code&gt; and allows the report to calculate total electronics sales.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Relationships in Power BI
&lt;/h2&gt;

&lt;p&gt;A relationship defines how two tables are connected through common columns. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DimCustomer.CustomerID
          │
          │ 1:*
          ▼
FactSales.CustomerID
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;CustomerID&lt;/code&gt; is unique in &lt;code&gt;DimCustomer&lt;/code&gt; but can occur many times in &lt;code&gt;FactSales&lt;/code&gt;. This allows Power BI to determine which sales belong to which customer; it acts like a link between the tables.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.1 One-to-Many Relationship (1:*)
&lt;/h3&gt;

&lt;p&gt;This is the most common relationship in a Power BI star schema. One record in the dimension can correspond to many records in the fact table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DimCustomer                 FactSales

CustomerID  1 ─────────── * CustomerID
1001                         1001
1002                         1001
1003                         1002
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Customer 1001 can have many sales transactions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to Use&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use 1:* when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The dimension contains unique values&lt;/li&gt;
&lt;li&gt;The fact table contains repeated foreign-key values&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This should normally be the default relationship in a star schema. In short: a single record in one table (the parent) can connect to multiple records in another table (the child), but each child record links back to only one parent.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.2 One-to-One Relationship (1:1)
&lt;/h3&gt;

&lt;p&gt;A one-to-one relationship means each record in one table corresponds to exactly one record in another table. It occurs when one record in a database table or entity connects to exactly one record in another table, and vice versa.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;EmployeeDetails             EmployeeSecurity

EmployeeID  1 ─────────── 1 EmployeeID
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;When to Use&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It may be useful when information about the same entity has been intentionally split into two tables. However, a 1:1 relationship should not be used simply because tables &lt;em&gt;can&lt;/em&gt; be joined — in many cases, combining the information into a single dimension is simpler.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.3 Many-to-Many Relationship (&lt;em&gt;:&lt;/em&gt;)
&lt;/h3&gt;

&lt;p&gt;A many-to-many relationship occurs when multiple records in one table can relate to multiple records in another.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Students * ───────── * Courses
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A student can take many courses, and a course can have many students.&lt;/p&gt;

&lt;p&gt;In dimensional modelling, many-to-many relationships should generally be handled carefully. A bridge table is often preferable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DimStudent       BridgeStudentCourse       DimCourse
    1                  *   *                  1
    │──────────────────┘   └──────────────────│
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The bridge table resolves the many-to-many association. In a standard star schema, a single row in a fact table links to only one row in a dimension table (a many-to-one relationship). However, real-world business processes often break this rule. A bridge table sits between the tables, containing pairs of foreign keys or group keys that map multiple dimension items to a single event or group.&lt;/p&gt;

&lt;h3&gt;
  
  
  Primary Keys and Foreign Keys
&lt;/h3&gt;

&lt;p&gt;A &lt;strong&gt;primary key&lt;/strong&gt; uniquely identifies a record. For example:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DimCustomer&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;CustomerID&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1001&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1002&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1003&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;CustomerID&lt;/code&gt; must be unique.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;foreign key&lt;/strong&gt; references the primary key of another table — a field in one table that points to the unique ID (primary key) in another table to connect them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How It Works&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Link:&lt;/strong&gt; It builds a bridge between two lists of data so the database knows they belong together.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Rule:&lt;/strong&gt; It acts like a security guard, stopping you from adding data to a table if it does not match a real ID in the connected table.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;FactSales&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;CustomerID&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1001&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1001&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1002&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1003&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1001&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The same &lt;code&gt;CustomerID&lt;/code&gt; can appear many times because a customer can make many purchases.&lt;/p&gt;

&lt;h3&gt;
  
  
  Referential Integrity
&lt;/h3&gt;

&lt;p&gt;Referential integrity means that foreign-key values should correspond to valid records in the related dimension. For example, if &lt;code&gt;FactSales&lt;/code&gt; contains &lt;code&gt;CustomerID&lt;/code&gt; 1005 but &lt;code&gt;DimCustomer&lt;/code&gt; does not contain &lt;code&gt;CustomerID&lt;/code&gt; 1005, the model has a referential integrity problem.&lt;/p&gt;

&lt;h3&gt;
  
  
  Active and Inactive Relationships
&lt;/h3&gt;

&lt;p&gt;An &lt;strong&gt;active relationship&lt;/strong&gt; is normally used automatically when Power BI propagates filters between tables. An &lt;strong&gt;inactive relationship&lt;/strong&gt; exists but is not used automatically.&lt;/p&gt;

&lt;p&gt;For example, a &lt;code&gt;FactSales&lt;/code&gt; table might contain both &lt;code&gt;OrderDate&lt;/code&gt; and &lt;code&gt;DeliveryDate&lt;/code&gt;. &lt;code&gt;DimDate&lt;/code&gt; could have relationships to both columns, but normally only one relationship is active. DAX can explicitly use the inactive relationship when required, for example with &lt;code&gt;USERELATIONSHIP()&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Filter Direction
&lt;/h2&gt;

&lt;p&gt;Filter direction determines how filters travel between related tables.&lt;/p&gt;

&lt;h3&gt;
  
  
  Single-Direction Filtering
&lt;/h3&gt;

&lt;p&gt;In a typical star schema, filtering moves from the dimension to the fact.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DimProduct
    │
    │ Filter
    ▼
FactSales
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Suppose a report user selects &lt;code&gt;Product Category = Electronics&lt;/code&gt;. The filter travels from &lt;code&gt;DimProduct&lt;/code&gt; to &lt;code&gt;FactSales&lt;/code&gt;, so only sales associated with Electronics are included in the calculation. This is generally the preferred approach because it is predictable and reduces ambiguity; thus requires defining clear objectives, communicating openly, and documenting specific expectations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bidirectional Filtering
&lt;/h3&gt;

&lt;p&gt;Bidirectional filtering allows filters to travel in both directions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DimProduct
    ↕
FactSales
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Although this can be useful in specific scenarios, it should not be enabled unnecessarily. Potential problems include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ambiguous filter paths&lt;/li&gt;
&lt;li&gt;Unexpected results&lt;/li&gt;
&lt;li&gt;Circular filtering paths&lt;/li&gt;
&lt;li&gt;More complicated DAX behavior&lt;/li&gt;
&lt;li&gt;Increased model complexity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Therefore, single-direction filtering should normally be preferred in a standard star schema, while bidirectional filtering should be used only when there is a clear modelling reason.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Joins in Power Query
&lt;/h2&gt;

&lt;p&gt;Power Query is the data preparation and transformation component of Power BI. A join, performed using Merge Queries, combines information from two tables based on matching columns. For example:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Customers&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;CustomerID&lt;/th&gt;
&lt;th&gt;CustomerName&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;John&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Mary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Peter&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Orders&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;OrderID&lt;/th&gt;
&lt;th&gt;CustomerID&lt;/th&gt;
&lt;th&gt;Amount&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;101&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;10,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;102&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;5,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;103&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;8,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;104&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;3,000&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;CustomerID&lt;/code&gt; is the matching column.&lt;/p&gt;

&lt;h3&gt;
  
  
  5.1 Left Outer Join
&lt;/h3&gt;

&lt;p&gt;A Left Outer Join retains all records from the left table and matching records from the right table.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Customers LEFT JOIN Orders&lt;/code&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;CustomerID&lt;/th&gt;
&lt;th&gt;CustomerName&lt;/th&gt;
&lt;th&gt;OrderID&lt;/th&gt;
&lt;th&gt;Amount&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;John&lt;/td&gt;
&lt;td&gt;101&lt;/td&gt;
&lt;td&gt;10,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;John&lt;/td&gt;
&lt;td&gt;102&lt;/td&gt;
&lt;td&gt;5,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Mary&lt;/td&gt;
&lt;td&gt;103&lt;/td&gt;
&lt;td&gt;8,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Peter&lt;/td&gt;
&lt;td&gt;null&lt;/td&gt;
&lt;td&gt;null&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Customer 3 is retained even though there is no order.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Case:&lt;/strong&gt; Useful when you want all customers and any orders associated with them.&lt;/p&gt;

&lt;h3&gt;
  
  
  5.2 Right Outer Join
&lt;/h3&gt;

&lt;p&gt;A Right Outer Join retains all records from the right table and matching records from the left table.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Customers RIGHT JOIN Orders&lt;/code&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;CustomerID&lt;/th&gt;
&lt;th&gt;CustomerName&lt;/th&gt;
&lt;th&gt;OrderID&lt;/th&gt;
&lt;th&gt;Amount&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;John&lt;/td&gt;
&lt;td&gt;101&lt;/td&gt;
&lt;td&gt;10,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;John&lt;/td&gt;
&lt;td&gt;102&lt;/td&gt;
&lt;td&gt;5,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Mary&lt;/td&gt;
&lt;td&gt;103&lt;/td&gt;
&lt;td&gt;8,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;null&lt;/td&gt;
&lt;td&gt;104&lt;/td&gt;
&lt;td&gt;3,000&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Order 104 is retained even though CustomerID 4 does not exist in Customers.&lt;/p&gt;

&lt;h3&gt;
  
  
  5.3 Full Outer Join
&lt;/h3&gt;

&lt;p&gt;A Full Outer Join retains all records from both tables.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Customers FULL JOIN Orders&lt;/code&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;CustomerID&lt;/th&gt;
&lt;th&gt;CustomerName&lt;/th&gt;
&lt;th&gt;OrderID&lt;/th&gt;
&lt;th&gt;Amount&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;John&lt;/td&gt;
&lt;td&gt;101&lt;/td&gt;
&lt;td&gt;10,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;John&lt;/td&gt;
&lt;td&gt;102&lt;/td&gt;
&lt;td&gt;5,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Mary&lt;/td&gt;
&lt;td&gt;103&lt;/td&gt;
&lt;td&gt;8,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Peter&lt;/td&gt;
&lt;td&gt;null&lt;/td&gt;
&lt;td&gt;null&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;null&lt;/td&gt;
&lt;td&gt;104&lt;/td&gt;
&lt;td&gt;3,000&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This is useful when the objective is to identify both matched and unmatched records.&lt;/p&gt;

&lt;h3&gt;
  
  
  5.4 Inner Join
&lt;/h3&gt;

&lt;p&gt;An Inner Join retains only records that have matching values in both tables.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;CustomerID&lt;/th&gt;
&lt;th&gt;CustomerName&lt;/th&gt;
&lt;th&gt;OrderID&lt;/th&gt;
&lt;th&gt;Amount&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;John&lt;/td&gt;
&lt;td&gt;101&lt;/td&gt;
&lt;td&gt;10,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;John&lt;/td&gt;
&lt;td&gt;102&lt;/td&gt;
&lt;td&gt;5,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Mary&lt;/td&gt;
&lt;td&gt;103&lt;/td&gt;
&lt;td&gt;8,000&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Customer 3 and Order 104 are excluded because they do not have matches on both sides.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Case:&lt;/strong&gt; Useful when only matching records are required.&lt;/p&gt;

&lt;h3&gt;
  
  
  5.5 Left Anti Join
&lt;/h3&gt;

&lt;p&gt;A Left Anti Join returns records from the left table that have no matching record in the right table.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Customers LEFT ANTI JOIN Orders&lt;/code&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;CustomerID&lt;/th&gt;
&lt;th&gt;CustomerName&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Peter&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This can be used to identify customers who have never placed an order.&lt;/p&gt;

&lt;h3&gt;
  
  
  5.6 Right Anti Join
&lt;/h3&gt;

&lt;p&gt;A Right Anti Join returns records from the right table that have no matching record in the left table.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;OrderID&lt;/th&gt;
&lt;th&gt;CustomerID&lt;/th&gt;
&lt;th&gt;Amount&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;104&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;3,000&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This identifies orders containing CustomerIDs that do not exist in the Customers table.&lt;/p&gt;

&lt;h3&gt;
  
  
  Join Summary
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Join Type&lt;/th&gt;
&lt;th&gt;Records Retained&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Left Outer&lt;/td&gt;
&lt;td&gt;All left + matching right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Right Outer&lt;/td&gt;
&lt;td&gt;All right + matching left&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Full Outer&lt;/td&gt;
&lt;td&gt;All records from both&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Inner&lt;/td&gt;
&lt;td&gt;Only matching records&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Left Anti&lt;/td&gt;
&lt;td&gt;Unmatched left records&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Right Anti&lt;/td&gt;
&lt;td&gt;Unmatched right records&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  6. Power Query Joins vs Power BI Relationships
&lt;/h2&gt;

&lt;p&gt;Although both concepts connect tables, they perform different functions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Power Query Merge
&lt;/h3&gt;

&lt;p&gt;A Power Query merge occurs during the data preparation stage. It combines columns from one query with another query based on matching values.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Customers
     +
Orders
     ↓
Merged Table
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The result can contain: &lt;code&gt;CustomerID&lt;/code&gt;, &lt;code&gt;CustomerName&lt;/code&gt;, &lt;code&gt;OrderID&lt;/code&gt;, &lt;code&gt;OrderDate&lt;/code&gt;, &lt;code&gt;Amount&lt;/code&gt;. A merge can therefore physically create a wider table containing columns from both sources.&lt;/p&gt;

&lt;h3&gt;
  
  
  Power BI Relationship
&lt;/h3&gt;

&lt;p&gt;A relationship is created in the data model after data loading/transformation. It does &lt;strong&gt;not&lt;/strong&gt; physically combine the tables.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DimCustomer
     │
     │ 1:*
     ▼
FactSales
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The two tables remain separate. Power BI uses the relationship to propagate filters and evaluate calculations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Differences
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Power Query Merge&lt;/th&gt;
&lt;th&gt;Power BI Relationship&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Data preparation stage&lt;/td&gt;
&lt;td&gt;Data modelling stage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Combines columns&lt;/td&gt;
&lt;td&gt;Connects tables logically&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Creates a resulting query/table&lt;/td&gt;
&lt;td&gt;Tables remain separate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Used for transformation&lt;/td&gt;
&lt;td&gt;Used for analysis&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Can increase table width&lt;/td&gt;
&lt;td&gt;Preserves dimensional structure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Similar to SQL JOIN&lt;/td&gt;
&lt;td&gt;Similar to a logical model relationship&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;When should we merge like real ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A merge may be appropriate when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A column is genuinely required in the resulting table&lt;/li&gt;
&lt;li&gt;The data is naturally one table after transformation&lt;/li&gt;
&lt;li&gt;You need to clean or enrich a dataset before loading it&lt;/li&gt;
&lt;li&gt;Combining the tables reduces unnecessary complexity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;However, excessive merging can produce extremely wide tables with duplicated descriptive data. For example, repeatedly merging customer, product, location, and other descriptive information into &lt;code&gt;FactSales&lt;/code&gt; can effectively recreate a flat table.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Keep Fact and Dimension Tables Separate?
&lt;/h3&gt;

&lt;p&gt;Keeping them separate is normally preferable because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It reduces redundancy&lt;/li&gt;
&lt;li&gt;It makes the model easier to understand&lt;/li&gt;
&lt;li&gt;It improves dimensional analysis&lt;/li&gt;
&lt;li&gt;It supports reusable dimensions&lt;/li&gt;
&lt;li&gt;It simplifies DAX&lt;/li&gt;
&lt;li&gt;It allows dimensions to filter multiple fact tables&lt;/li&gt;
&lt;li&gt;It makes the model easier to maintain and expand&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                 DimCustomer
                      │
                      ▼
DimDate ────────► FactSales ◄──────── DimProduct
                      ▲
                      │
                      │
                 DimLocation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same &lt;code&gt;DimDate&lt;/code&gt; could also be used to analyze &lt;code&gt;FactOrders&lt;/code&gt;, &lt;code&gt;FactReturns&lt;/code&gt;, and &lt;code&gt;FactInventory&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Recommended Power BI Model
&lt;/h2&gt;

&lt;p&gt;For a typical business intelligence project, a star schema is recommended:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                       DimCustomer
                            │
                            │ 1:*
                            ▼
                       FactSales
                            ▲
                            │ 1:*
       ┌────────────────────┼────────────────────┐
       │                    │                    │
       │                    │                    │
   DimProduct            DimDate            DimLocation
       │                    │                    │
       └──────────── 1:* ───┴──── 1:* ──────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;More precisely, each dimension should normally have a one-to-many relationship to the fact table:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DimCustomer  1 ───────── * FactSales
DimProduct   1 ───────── * FactSales
DimDate      1 ───────── * FactSales
DimLocation  1 ───────── * FactSales
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Recommended Design Principles
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Use a star schema provides a good balance between performance, simplicity, and scalability.
2.Keep dimensions separate from facts reduces redundancy and makes the model easier to maintain.&lt;/li&gt;
&lt;li&gt;Use 1:*\ relationships dimension tables should normally contain unique keys, while fact tables contain repeated foreign keys.&lt;/li&gt;
&lt;li&gt;Prefer single-direction filtering filters should normally flow Dimension then Fact, reducing ambiguous filter paths and making report behaviour easier to predict.&lt;/li&gt;
&lt;li&gt;Define the grain of every fact table before building measures, determine exactly what one row represents.&lt;/li&gt;
&lt;li&gt;Use meaningful primary and foreign keys like &lt;code&gt;DimProduct.ProductID&lt;/code&gt; and &lt;code&gt;FactSales.ProductID&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Use bidirectional relationships carefully should only be introduced where the business requirement genuinely requires them.&lt;/li&gt;
&lt;li&gt;Avoid unnecessary snowflaking snowflake design can be useful for complex dimensions, but a simpler star schema is generally easier to work with in Power BI.&lt;/li&gt;
&lt;li&gt;Use Power Query for transformation cleaning, filtering, splitting, merging, and shaping data should generally happen before the data reaches the semantic model.&lt;/li&gt;
&lt;li&gt;Use relationships for analysis once tables are appropriately prepared, relationships should connect the fact and dimension tables without unnecessarily physically merging them.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The key to effective Power BI reporting is having a well-constructed data model. Data modelling defines how Power BI interprets the data of the business, affecting various aspects of reporting such as performance, DAX calculations, filtering, and maintenance of models.&lt;/p&gt;

&lt;p&gt;A flat table is easy to use, minimizing overhead costs when working with smaller datasets. However, as the data grows, dealing with flat tables can become problematic. A snowflake schema provides excellent normalization but adds additional tables and complexity in building relationships. In business intelligence applications, a star schema is considered the most efficient approach, balancing simplicity and performance.&lt;/p&gt;

&lt;p&gt;Fact tables need to have a defined level of detail, while dimension tables should have the descriptive characteristics that allow understanding of the facts. Dimensions should have one-to-many relationships with facts, which have unique primary keys and repeating foreign keys.&lt;/p&gt;

&lt;p&gt;The correct interpretation of relationship connectors is important to provide proper filter propagation, meaning that single relationships from dimensions to facts should generally be applied. Bidirectional relationships should be used only when necessary, as they can create confusion.&lt;/p&gt;

&lt;p&gt;Finally, it is important to differentiate between the concepts of Power Query merging and Power BI relationships. For a typical business intelligence project, the recommended architecture is therefore:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;       DIMENSIONS
            │
            │ 1:*
            ▼
       FACT TABLE
            │
            │
      DAX MEASURES
            │
            ▼
       POWER BI REPORT
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This approach provides a model that is readable, scalable, efficient, and easier to maintain, while allowing users to analyze business performance from multiple perspectives.&lt;/p&gt;

</description>
      <category>data</category>
      <category>database</category>
      <category>performance</category>
    </item>
    <item>
      <title>Power BI Technical Article: Data Modelling, Relationships &amp; Joins</title>
      <dc:creator>sam manox</dc:creator>
      <pubDate>Sun, 13 Sep 2026 10:18:07 +0000</pubDate>
      <link>https://dev.to/sam_manox/power-bi-technical-article-data-modelling-relationships-joins-21c7</link>
      <guid>https://dev.to/sam_manox/power-bi-technical-article-data-modelling-relationships-joins-21c7</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Power BI is a business intelligence tool that enables the conversion of raw data into reports and dashboards. However, the quality of the Power BI report is influenced by how the data is prepared and structured in advance. &lt;br&gt;
Data modelling is the act of organizing the tables, columns, keys, and relationships in such a way that allows Power BI to process how the various data parts are connected. A correctly constructed model brings better performance of the report, eases calculations in DAX, minimizes redundancy of data, improves scalability, and simplifies understanding of the solution. &lt;br&gt;
The article describes key modelling schemes, fact and dimension tables, relationships, direction of filters, and joins in Power Query. It also illustrates the difference between the functions of merging tables in Power Query and creating relationships in the Power BI model.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Data Modelling in Power BI
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is Data Modelling?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Data modelling&lt;/strong&gt; in Power BI involves designing the structure of tables and defining how they relate to one another. Instead of treating every dataset as one large table, related information can be separated into logical tables and connected using keys.&lt;br&gt;
For example, a sales system may contain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Customer information&lt;/li&gt;
&lt;li&gt;Product information&lt;/li&gt;
&lt;li&gt;Date information&lt;/li&gt;
&lt;li&gt;Location information&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sales transactions&lt;br&gt;
These can be organized into a model where Fact Sales is connected to several descriptive dimension tables.&lt;br&gt;
A good data model is important because it has the following qualities:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Improves report and query performance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Makes DAX measures easier to write.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reduces unnecessary data duplication.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Makes relationships and filter propagation easier to understand.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Allows the model to scale as more data is added.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Makes reports easier to maintain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reduces the risk of incorrect calculations.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  1.1 Flat Table
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;A flat table&lt;/strong&gt; stores all information in one table. All data is kept in one single grid or file without links to other tables; it lacks relational database connections, which often leads to repeated or redundant information.&lt;br&gt;
Example&lt;br&gt;
Sale _ID    Date    Customer    Product Category    City    Quantity    Sales&lt;br&gt;
1001    01/09/2026  John    Laptop  Electronics Nairobi 1   80,000&lt;br&gt;
1002    02/09/2026  Mary    Mouse   Electronics Mombasa 2   3,000&lt;br&gt;
1003    03/09/2026  John    Keyboard    Electronics Nairobi 1   4,000&lt;/p&gt;

&lt;p&gt;Structure&lt;br&gt;
                 FLAT TABLE&lt;br&gt;
┌───────────────────────────────────────────┐&lt;br&gt;
│ Sales                                     │&lt;br&gt;
├───────────────────────────────────────────┤&lt;br&gt;
│ Sale_ID                                   │&lt;br&gt;
│ Date                                      │&lt;br&gt;
│ Customer                                  │&lt;br&gt;
│ Product                                   │&lt;br&gt;
│ Category                                  │&lt;br&gt;
│ City                                      │&lt;br&gt;
│ Quantity                                  │&lt;br&gt;
│ Sales                                     │&lt;br&gt;
└───────────────────────────────────────────┘&lt;br&gt;
Advantages&lt;br&gt;
• Simple to understand.&lt;br&gt;
• Easy to import.&lt;br&gt;
• Convenient for small datasets.&lt;br&gt;
• Requires fewer relationships.&lt;br&gt;
• Suitable for simple analysis.&lt;/p&gt;

&lt;p&gt;Disadvantages&lt;br&gt;
• Creates significant data duplication.&lt;br&gt;
• Can increase model size.&lt;br&gt;
• Changes to customer or product information may need to be repeated across many rows.&lt;br&gt;
• Can make data maintenance difficult.&lt;br&gt;
• Less suitable for large datasets.&lt;/p&gt;

</description>
      <category>analytics</category>
      <category>data</category>
      <category>database</category>
    </item>
    <item>
      <title>JUMIA PRODUCT PERFORMANCE DASHBOARD ANALYSIS</title>
      <dc:creator>sam manox</dc:creator>
      <pubDate>Sat, 05 Sep 2026 12:12:38 +0000</pubDate>
      <link>https://dev.to/sam_manox/jumia-product-performance-dashboard-analysis-3kdk</link>
      <guid>https://dev.to/sam_manox/jumia-product-performance-dashboard-analysis-3kdk</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;This project analyzes a sample of product listings from Jumia, an e-commerce marketplace, to understand how price, discount depth, ratings, and customer engagement (review counts) relate to one another and to users- insights that a seller or marketplace team could use. The entire workflow data cleaning, threshold definition, flagging, ranking, correlation analysis, and visualization was built in Microsoft Excel, using table-based formulas, named ranges, quartile-based thresholds, and native charts.&lt;/p&gt;

&lt;p&gt;What we need to consider is: Do price and discounting actually drive customer engagement and satisfaction?&lt;/p&gt;

&lt;h2&gt;
  
  
  Dataset Overview
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Source:&lt;/strong&gt; Product listings exported from Jumia (Kenya), covering household, electronics, and lifestyle categories.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Size:&lt;/strong&gt; 115 products, 6 original columns: &lt;code&gt;Product&lt;/code&gt;, &lt;code&gt;Current price&lt;/code&gt;, &lt;code&gt;old price&lt;/code&gt;, &lt;code&gt;Discount&lt;/code&gt;, &lt;code&gt;Review&lt;/code&gt;, &lt;code&gt;Rating&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Price range:&lt;/strong&gt; KSh 38 – KSh 3,750.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Discount range:&lt;/strong&gt; 1% – 64%.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data completeness:&lt;/strong&gt; Price and discount data are complete for all 115 products. &lt;strong&gt;Review count and rating are missing for 58 of 115 products (50%)&lt;/strong&gt;; this gap is preserved and clearly labeled throughout the analysis rather than treated as zero.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq844ux90lcrmnxqcugpb.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq844ux90lcrmnxqcugpb.PNG" alt=" " width="799" height="299"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Raw data issues found and corrected during cleaning:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prices stored as text with currency symbols and thousands separators like &lt;code&gt;"KSh 1,980"&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;One product listed as a &lt;strong&gt;price range&lt;/strong&gt; rather than a single value like &lt;code&gt;"KSh 1,620 - KSh 1,980"&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Ratings stored as text  &lt;code&gt;"4.5 out of 5"&lt;/code&gt; instead of numeric values.&lt;/li&gt;
&lt;li&gt;Review counts stored as &lt;strong&gt;negative numbers&lt;/strong&gt; like &lt;code&gt;-14&lt;/code&gt;, which appears to be a data extraction artifact rather than a true negative quantity.&lt;/li&gt;
&lt;li&gt;Discount stored as text with a &lt;code&gt;%&lt;/code&gt; sign.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Data Enrichment
&lt;/h2&gt;

&lt;p&gt;Each raw data issue was resolved with a specific understanding of the data:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;Issue&lt;/th&gt;
&lt;th&gt;Resolution&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;Current price&lt;/code&gt; / &lt;code&gt;old price&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Text with &lt;code&gt;KSh&lt;/code&gt; and commas; one row was a price range&lt;/td&gt;
&lt;td&gt;Stripped currency text and commas, converted to numeric; the single range row was resolved to its &lt;strong&gt;midpoint&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Ratingd&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Text like &lt;code&gt;"4.5 out of 5"&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Extracted the numeric portion, converted to a decimal number&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Discount&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Text with &lt;code&gt;%&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Stripped the &lt;code&gt;%&lt;/code&gt; and converted to numeric&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Review&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Stored as negative integers&lt;/td&gt;
&lt;td&gt;Derived a new &lt;code&gt;Engagement&lt;/code&gt; field = &lt;code&gt;ABS(Review)&lt;/code&gt;, since review counts cannot be negative; the true engagement measure is this absolute value&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmwm5sndidl4p6odmpozw.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmwm5sndidl4p6odmpozw.PNG" alt=" " width="800" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Threshold definition (quartile-based, not arbitrary):&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;All high/low/strong/weak categories in this project are defined using the &lt;strong&gt;first (Q1)&lt;/strong&gt; and &lt;strong&gt;third (Q3) quartiles&lt;/strong&gt; of the actual dataset, calculated with &lt;code&gt;QUARTILE.INC&lt;/code&gt;, so the thresholds adapt to the data rather than relying on a fixed guess:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Q1&lt;/th&gt;
&lt;th&gt;Q3&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Price&lt;/td&gt;
&lt;td&gt;KSh 500&lt;/td&gt;
&lt;td&gt;KSh 1,663&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Discount&lt;/td&gt;
&lt;td&gt;27%&lt;/td&gt;
&lt;td&gt;49%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rating&lt;/td&gt;
&lt;td&gt;3.0&lt;/td&gt;
&lt;td&gt;4.6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Engagement (reviews)&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;14&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Derived flags&lt;/strong&gt; (each computed with an Excel formula referencing these named threshold cells):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Price Tier:&lt;/strong&gt; Low / Medium / High&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High Discount &amp;amp; Low Rating:&lt;/strong&gt; Discount ≥ 49% AND Rating ≤ 3.0&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High Discount &amp;amp; Low Engagement:&lt;/strong&gt; Discount ≥ 49% AND Reviews ≤ 5&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Many Reviews &amp;amp; Average Rating:&lt;/strong&gt; Reviews ≥ 14 AND Rating between 3.0–4.6&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Excellent Rating:&lt;/strong&gt; Reviews ≥ 14 AND Rating ≥ 4.6&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every flag returns &lt;code&gt;"Missing"&lt;/code&gt; instead of &lt;code&gt;0&lt;/code&gt; or blank when the underlying rating or review data doesn't exist, so the dashboard never silently misrepresents a data gap as poor performance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Insights
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Demand is concentrated, not broad-based.&lt;/strong&gt; Only 16 of 57 rated products (28%) meet the "Strong Engagement" threshold (≥14 reviews).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Discounting does not reliably drive demand.&lt;/strong&gt; 13 of the highest-discount products (≥49%) still fall below the engagement threshold.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A handful of high-discount products carry real reputation risk.&lt;/strong&gt; 6 products combine deep discounts with weak ratings (≤3.0); one of them also has the highest review count in the whole dataset.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Price, discount, and rating are essentially uncorrelated.&lt;/strong&gt; All three Pearson correlations tested came out near zero (|r| &amp;lt; 0.15, R² &amp;lt; 0.02).&lt;/li&gt;
&lt;li&gt;*&lt;em&gt;The catalog has a solid base of "reliable, average" sellers. *&lt;/em&gt; 10 products combine strong engagement with a respectable but not exceptional rating, representing the best low-effort improvement opportunity.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvla7uaifzyr4nrei582i.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvla7uaifzyr4nrei582i.PNG" alt=" " width="713" height="647"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Discount Analysis
&lt;/h2&gt;

&lt;p&gt;Products were split into Low (≤27%), Medium (27–49%), and High (&amp;gt;49%) discount tiers using the quartile thresholds above.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Discount Tier&lt;/th&gt;
&lt;th&gt;Avg. Reviews&lt;/th&gt;
&lt;th&gt;Avg. Rating&lt;/th&gt;
&lt;th&gt;Count&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Low (≤27%)&lt;/td&gt;
&lt;td&gt;16.7&lt;/td&gt;
&lt;td&gt;4.19&lt;/td&gt;
&lt;td&gt;13&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Medium (27–49%)&lt;/td&gt;
&lt;td&gt;12.8&lt;/td&gt;
&lt;td&gt;3.89&lt;/td&gt;
&lt;td&gt;33&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;High (&amp;gt;49%)&lt;/td&gt;
&lt;td&gt;7.6&lt;/td&gt;
&lt;td&gt;3.53&lt;/td&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Contrary to what a common belief may suggest, sales spikes are not because of a discount pattern: the number of reviews for the least discounted products is more than double in comparison with the most discounted products, with their average rating also being higher. The Pearson correlation between discount and review count is equal to &lt;strong&gt;r=-0.14&lt;/strong&gt; and &lt;strong&gt;R²=0.02&lt;/strong&gt;, which is a very weak negative correlation, indicating that it is consistent with the tier breakdown.&lt;/p&gt;

&lt;p&gt;13 products sit in the "Promotion Inefficiency" flag (discount ≥49%, reviews &amp;lt;14), nearly half of the High discount tier. Six products combine a high discount with a low rating (≤3.0), the clearest quality-risk segment in the dataset.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9gl32ivemt9d9m5tlub2.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9gl32ivemt9d9m5tlub2.PNG" alt=" " width="799" height="298"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Ratings and Reviews Analysis
&lt;/h2&gt;

&lt;p&gt;Rating distribution across the 57 products with data:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Rating Category&lt;/th&gt;
&lt;th&gt;Count&lt;/th&gt;
&lt;th&gt;% of Rated Products&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Low (≤3.0)&lt;/td&gt;
&lt;td&gt;17&lt;/td&gt;
&lt;td&gt;30%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Average (3.0–4.6)&lt;/td&gt;
&lt;td&gt;26&lt;/td&gt;
&lt;td&gt;46%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Excellent (&amp;gt;4.6)&lt;/td&gt;
&lt;td&gt;14&lt;/td&gt;
&lt;td&gt;25%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Average review count by rating band tells an important story: &lt;strong&gt;Average-rated products (16.0 avg. reviews) actually out-engage Excellent-rated products (8.0 avg. reviews)&lt;/strong&gt;. The correlation between rating and review count is essentially flat (&lt;strong&gt;r = 0.06&lt;/strong&gt;), meaning higher-rated products are not systematically the most-reviewed ones on this platform. This suggests visibility and quality are currently decoupled, a real opportunity, since improving quality on already-visible "Average" products is likely a faster win than trying to generate visibility for untested high-quality products.&lt;/p&gt;

&lt;p&gt;Price and rating also show no meaningful relationship (&lt;strong&gt;r = 0.11&lt;/strong&gt;, &lt;strong&gt;R² = 0.01)&lt;/strong&gt;; higher-priced items are not rated meaningfully better or worse than lower-priced ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  Products
&lt;/h2&gt;

&lt;p&gt;A few individual products stand out from the ranked analysis:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftsvhhw52vugl0eiorf78.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftsvhhw52vugl0eiorf78.PNG" alt=" " width="800" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Highest risk: 120W Cordless Vacuum Cleaner, the single highest review count in the dataset (69), paired with a weak 2.8 rating and a 49% discount. High visibility with a poor quality signal makes this the top candidate for a quality/fulfillment investigation.&lt;/li&gt;
&lt;li&gt;Most expensive: 32PCS Portable Cordless Drill Set KSh 3,750, the top of the Price tier, but with very limited engagement (5 reviews), raising a visibility question rather than a quality one.
-Strong performers (Strong Engagement + Excellent Rating):6 products meet both criteria, the smallest, most valuable segment in the catalog, and the best candidates for promotional placement since they carry the lowest risk of disappointing a new customer.&lt;/li&gt;
&lt;li&gt;Reliable, improvable sellers: 10 products combine high engagement with an "Average" rating and proven demand, with room to move into the "Excellent" tier through targeted quality or listing improvements.
Below is a representation of the dashboard used to show visuals:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpgv2hsu1i1ia5yi63vr4.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpgv2hsu1i1ia5yi63vr4.PNG" alt=" " width="800" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This study has revealed that there is no significant linear correlation between price, discount depth, customer rating, or customer reviews on the 115 Jumia products studied. The data does not support the premise that deeper discounts create more attraction among customers or that higher prices represent better quality. However, this dataset reveals two specific patterns that can be put into real use:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A small set of high-discount, low-rating products (6 items), most notably a cordless vacuum cleaner with the platform's highest review count, represents a concentrated reputation risk that deserves direct quality investigation rather than further discounting.&lt;/li&gt;
&lt;li&gt;A larger set of high-engagement, average-rated products (10 items) represents the most efficient improvement opportunity in the catalog: these products already have proven demand, so incremental quality or listing improvements are likely to yield a better return than trying to generate new demand from scratch or discounting further.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Recommended next steps&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Begin investigating the high discount/low rating items concerning their quality, fulfillment, or listing accuracy. The highest review count is the first to be worked on.&lt;/li&gt;
&lt;li&gt;The 13 "promotion inefficiency" items should be audited for listing content and targeting before any further discounts are put in place.&lt;/li&gt;
&lt;li&gt;Proceed with making any extra quality or content modifications for the 10 high-engagement and average-rating products. &lt;/li&gt;
&lt;li&gt;Try to push for an entire collection to be available for the review &amp;amp; rating to be done, as half the catalog is currently invisible to this analysis.&lt;/li&gt;
&lt;li&gt;Price &amp;amp; discount should be thought of as secondary tactics, as they do not seem to be efficient forms of measuring engagement/rating level in this research. Need to make any extra quality or content modifications for the 10 high-engagement and average-rating products. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Limitations:&lt;/strong&gt; &lt;br&gt;
The dataset does not include sales volume, conversion rate, listing age, product category, or complaints and returns. The correlations mentioned above are drawn from a single data collection and must be validated through experiments, that is, by conducting experiments on controlled discounts. However, it must be understood that only 50% of products have existing data on ratings and reviews; the others are missing.&lt;/p&gt;

</description>
      <category>analysis</category>
      <category>data</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Getting Started with Excel for Data Analytics: From Basics to Data Cleaning</title>
      <dc:creator>sam manox</dc:creator>
      <pubDate>Sat, 29 Aug 2026 05:26:14 +0000</pubDate>
      <link>https://dev.to/sam_manox/getting-started-with-excel-for-data-analytics-from-basics-to-data-cleaning-1md6</link>
      <guid>https://dev.to/sam_manox/getting-started-with-excel-for-data-analytics-from-basics-to-data-cleaning-1md6</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Microsoft Excel is the most popular tool for data work and analysis. Its user-friendly environment makes it easy to understand, organize, clean, and explore data.&lt;br&gt;
For a data analyst or scientist, knowing how to work with Excel goes beyond entering information into cells. Excel can be used to inspect datasets, identify errors, standardize values, filter records, sort information, remove duplicates, and prepare structured data for further analysis; in other words, clean data to draw meaningful insights from it.&lt;br&gt;
This article demonstrates the key Excel concepts covered during Week 1 from the Human Resources dataset. The dataset contains employee information such as employee ID, department, salary, hire date, age, gender, performance score, employment type, office location, project count, training hours, and manager feedback score.&lt;br&gt;
The original dataset contains &lt;em&gt;876 employee records and 21 columns.&lt;/em&gt; It is intentionally named "dirty", meaning that it contains data that an analyst should be able to clean to be able to use for insights and analysis. &lt;/p&gt;
&lt;h2&gt;
  
  
  1. Understanding the Excel Environment
&lt;/h2&gt;

&lt;p&gt;The first step in working with Excel for analytics is understanding how information is organized.&lt;br&gt;
An Excel worksheet consists of:&lt;/p&gt;

&lt;p&gt;Rows, which normally represent individual observations or records.&lt;/p&gt;

&lt;p&gt;Columns, which represent variables or attributes.&lt;/p&gt;

&lt;p&gt;Cells, which contain individual values.&lt;/p&gt;

&lt;p&gt;Worksheets, which allow related tables to be organized within the same workbook.&lt;/p&gt;

&lt;p&gt;In the HR dataset, one row represents an employee record while each column represents an employee attribute.&lt;br&gt;
For example, the columns include:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Column&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Employee ID&lt;/td&gt;
&lt;td&gt;Unique identifier for an employee&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First Name&lt;/td&gt;
&lt;td&gt;Employee's first name&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Last Name&lt;/td&gt;
&lt;td&gt;Employee's surname&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Understanding the dataset structure matters because it determines what types of analysis you can perform later.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. Inspecting the Dataset before Cleaning
&lt;/h2&gt;

&lt;p&gt;A common mistake we make when working with data is changing values immediately without first understanding the dataset. The first step should always be data profiling for a data analyst. I inspected the HR dataset to determine its size, column types, missing values, duplicate records, and inconsistent entries by using the filter function.&lt;/p&gt;

&lt;p&gt;The dataset contains &lt;em&gt;876 rows and 21 columns&lt;/em&gt;. It also contains missing values across several fields. In total, there are approximately &lt;em&gt;291 missing cells&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;For example, the Employee ID column contains missing values, while fields such as Hire Date, Gender, Bonus, Department, and Annual Training Hours also contain incomplete records. For example, some department names may appear as "HR", "H.R", "Human Resources", or "Human Resource". Although these values refer to the same department, Excel treats them as different text values. Similarly, office locations contain variations such as_ "London", "Londn", "San Francisco", "San Fransisco", and "SF"&lt;em&gt;. These needed cleaning for the department; I retained “HR” and sorted the location, for example, _“Londn” to “London”&lt;/em&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  3. Data Types in Excel
&lt;/h2&gt;

&lt;p&gt;Correct data types are essential for analysis.&lt;br&gt;
Common Excel data types include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; Text&lt;/li&gt;
&lt;li&gt; Numbers&lt;/li&gt;
&lt;li&gt; Dates&lt;/li&gt;
&lt;li&gt; Currency&lt;/li&gt;
&lt;li&gt; Percentages&lt;/li&gt;
&lt;li&gt; Logical values such as TRUE and FALSE&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, Salary should be stored as a number rather than text because we may need to calculate average salary, total payroll, minimum salary, maximum salary, Sumif, Sumifs, and Averageifs.&lt;/p&gt;

&lt;p&gt;Hire Date should be stored as an actual date so that we can calculate employee tenure or group employees by year.&lt;br&gt;
The HR dataset contains several examples of inconsistent data types.&lt;br&gt;
For instance, the Work Experience column contains numeric values such as &lt;code&gt;28&lt;/code&gt;, but some records contain values such as &lt;code&gt;"5 years"&lt;/code&gt;. Project Count is mostly numeric, but at least one value appears as &lt;code&gt;"ten"&lt;/code&gt;. The Bonus column also contains values such as &lt;code&gt;5575.99&lt;/code&gt; and text values such as &lt;code&gt;KES 1877.71&lt;/code&gt;&lt;br&gt;
These values need to be converted into a consistent numeric format before mathematical calculations can be performed reliably.&lt;/p&gt;
&lt;h2&gt;
  
  
  4. Sorting and Filtering Data
&lt;/h2&gt;

&lt;p&gt;Sorting and filtering are two of the most basic but useful Excel features for analysts.&lt;/p&gt;
&lt;h3&gt;
  
  
  Sorting
&lt;/h3&gt;

&lt;p&gt;Sorting allows records to be arranged according to a particular field.&lt;br&gt;
For example, I could sort the HR dataset by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Salary from highest to lowest&lt;/li&gt;
&lt;li&gt;Hire Date from oldest to newest&lt;/li&gt;
&lt;li&gt;Performance Score from highest to lowest&lt;/li&gt;
&lt;li&gt;Annual Training Hours from highest to lowest&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If I want to identify employees receiving the highest salaries, I can sort the Salary column in descending order.&lt;/p&gt;
&lt;h3&gt;
  
  
  Filtering
&lt;/h3&gt;

&lt;p&gt;Filtering allows specific records to be displayed while hiding records that do not meet a particular condition.&lt;/p&gt;

&lt;p&gt;For example, I could filter:&lt;br&gt;
&lt;code&gt;Department = Finance&lt;/code&gt; to view only Finance employees. I could also filter: &lt;code&gt;Employee Type = Permanent&lt;/code&gt; or: &lt;code&gt;Remote Work Status = Fully Remote&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Filtering is particularly useful when investigating data-quality problems because it allows an analyst to isolate values that don’t make sense.&lt;/p&gt;

&lt;p&gt;For example, filtering the Department column makes it easy to identify variations such as "H.R", "Human Resource", "Human Resources", and "Hr".&lt;/p&gt;
&lt;h2&gt;
  
  
  5. Identifying Missing Values
&lt;/h2&gt;

&lt;p&gt;Missing data is one of the most common problems in analytics, and understanding why it is missing. For instance, a blank cell does not automatically mean that the information is zero. It could mean that the information was not collected, was unavailable, or was accidentally omitted.&lt;br&gt;
In the HR dataset, missing values appear in several columns.&lt;br&gt;
For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; Employee ID has missing values.&lt;/li&gt;
&lt;li&gt; First Name and Last Name contain missing values.&lt;/li&gt;
&lt;li&gt; Salary contains missing values.&lt;/li&gt;
&lt;li&gt; Hire Date contains missing values.&lt;/li&gt;
&lt;li&gt; Gender contains missing values.&lt;/li&gt;
&lt;li&gt; Bonus contains missing values.&lt;/li&gt;
&lt;li&gt; Training Hours contains missing values.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Manager Feedback Score contains missing values.&lt;br&gt;
Excel provides several ways to identify missing values. A simple method is filtering a column and selecting Blanks or using the &lt;code&gt;COUNTBLANK&lt;/code&gt; function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;=COUNTBLANK(A2:A877)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This counts the number of blank cells in the specified range.&lt;br&gt;
For more complex analysis, conditional formatting can also be used to visually highlight blank cells.&lt;/p&gt;

&lt;p&gt;It is important not to automatically replace every missing value with zero. The correct treatment depends on the meaning of the variable. For example, a missing bonus may mean the employee received no bonus, but it could also mean that the bonus information was not recorded. The analyst should understand the business context before deciding how to treat it.&lt;/p&gt;
&lt;h2&gt;
  
  
  6.Converting Text into Numerical Values
&lt;/h2&gt;

&lt;p&gt;Textual representations of numbers pose a challenge when analyzing data. For example, the Bonus column has records like:&lt;br&gt;
&lt;code&gt;KES 1877.71&lt;/code&gt;. Excel processes this as a number only when the currency text is removed. We use this formula:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;=VALUE(SUBSTITUTE(K2,"KES ",""))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With &lt;code&gt;SUBSTITUTE&lt;/code&gt; deleting &lt;code&gt;"KES"&lt;/code&gt; and &lt;code&gt;VALUE&lt;/code&gt; converting the remaining text into a number.&lt;br&gt;
For example, if the original record is:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;KES 1877.71&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;the result will be:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;1877.71&lt;/code&gt;&lt;br&gt;
The same applies to the Work Experience column too. In this case, if you have &lt;code&gt;5 years&lt;/code&gt;, the numerical part is extracted and converted. This is important since I might need to calculate average work experience later on.&lt;/p&gt;
&lt;h2&gt;
  
  
  6. Simple Excel Calculations for Analysis
&lt;/h2&gt;

&lt;p&gt;Once the data has been cleaned, Excel can be applied to perform productive business calculations.&lt;br&gt;
For example, total salary can be computed as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;=SUM(E2:E870)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Average salary can be established as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;=AVERAGE(E2:E870)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Maximum salary can be obtained as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;=MAX(E2:E877)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Minimum salary can be derived as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;=MIN(E2:E877)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The number of employees can be obtained as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;=COUNTA(A2:A877)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Conditional calculations may be implemented. For example, total salary could be computed for the employees of Finance:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;=SUMIF(D:D,"Finance",E:E)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To determine how many employees work in a specific department, A COUNTIF formula may be used:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;=COUNTIF(D:D,"Finance")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These formulas illustrate how cleaning is closely connected to the process of analysis. If the Department column is not standardized, the results of those calculations will be unreliable, and analysis won't make any sense.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Insights gained from the dataset are that, from the Interaction with the HR dataset, raw data hardly ever comes in a perfect structure. Even in a straightforward dataset of employees, one may have missing values, misspellings, inconsistent capitalization, repeated entries, and information that comes in various formats. Data cleaning involves decision-making. While Excel can help in automatically detecting errors, it is up to the human analyst to determine what the proper value is. Even though the value appears as a number, it may be stored as a text string, causing some formulas and analyses to fail.&lt;/p&gt;

&lt;p&gt;Excel is a good tool for learning this process because it shows you the data issues and offers solutions on how to deal with them. Thus, developing proficient skills in using Excel for data cleaning is an important step to being a good data analyst.&lt;/p&gt;

</description>
      <category>analytics</category>
      <category>data</category>
      <category>datascience</category>
      <category>learning</category>
    </item>
    <item>
      <title>Understanding the Git Workflow: Working Directory, Staging, Commit, and Push</title>
      <dc:creator>sam manox</dc:creator>
      <pubDate>Sun, 23 Aug 2026 05:51:48 +0000</pubDate>
      <link>https://dev.to/sam_manox/understanding-the-git-workflow-working-directory-staging-commit-and-push-14c9</link>
      <guid>https://dev.to/sam_manox/understanding-the-git-workflow-working-directory-staging-commit-and-push-14c9</guid>
      <description>&lt;p&gt;The first time we were introduced to Git, we really didn't know where our code was going to be saved until I learned that Git is part of a control system. It keeps track of changes made to files in a project so you can: track what changed, see previous versions of what you were working on to undo mistakes, work on different features, collaborate with others on the code or project we were working on, and back up projects to GitHub. Once you have added the knowledge of the stages of a Git workflow, then you have total control of your project from the previous history to the current workspace.&lt;br&gt;
During our learning, we were able to cover four stages of a Git workflow: working directory, staging, committing to the local repository, and pushing to the remote repository.&lt;/p&gt;
&lt;h2&gt;
  
  
  Working Directory
&lt;/h2&gt;

&lt;p&gt;This is our working directory where we type our code, a folder where our code lives. When opening a file in the code editor and making changes, we are working in the Working Directory; at this moment Git is aware that something has changed, but it hasn't recorded anything permanently yet. If we check the status by writing a command like git status, it will show the files that have been modified or deleted. Here, the changes are tracked but not yet saved.&lt;br&gt;
Suppose we edited a file here, and we check the status. Git sees the changes, but they are unstaged. For example &lt;br&gt;
SQL CODE like;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="n"&gt;customer_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;product_id&lt;/span&gt; 
            &lt;span class="k"&gt;From&lt;/span&gt; &lt;span class="n"&gt;Customers&lt;/span&gt;
&lt;span class="k"&gt;Then&lt;/span&gt; &lt;span class="n"&gt;we&lt;/span&gt; &lt;span class="n"&gt;make&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;change&lt;/span&gt; &lt;span class="k"&gt;to&lt;/span&gt; &lt;span class="n"&gt;this&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;let&lt;/span&gt;&lt;span class="s1"&gt;'s say 
        Select customer_id, product_id,
            Sum (sales_amount) AS total_amount
            From customers 
            Group by customer_id
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At this point, the code has changed in your code editor but no permanent version of this on Git, so this is the working directory.  The changes haven’t been committed; it tells you I can see the changes, but you haven’t told me to include them in Git.&lt;/p&gt;

&lt;h2&gt;
  
  
  Staging area
&lt;/h2&gt;

&lt;p&gt;This is the preparation stage for me, like telling Git to take this screenshot and prepare it for a more committed state. Include these changes in my next commit. If we were working on a data analysis project, you would tell Git to bash.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&amp;lt;/&amp;gt;Bash
Add sql/analysis.sql
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then check the status&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&amp;lt;/&amp;gt;Bash
git status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The result will be&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;changes to be committed:
    Modified: sql/analysis.sql
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The file is now staged, and Git lets you choose which changes to include in your next commit.&lt;br&gt;
We move changes from the Working Directory into the Staging Area using:&lt;br&gt;
&lt;code&gt;git add &amp;lt;filename&amp;gt;&lt;/code&gt;&lt;br&gt;
Or, to stage everything that has changed:&lt;br&gt;
&lt;code&gt;git add&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Staging gives a chance to know what to commit at each stage, making it clear and clean, and it is a preview stage.&lt;/p&gt;
&lt;h2&gt;
  
  
  The commit (Local Repository)
&lt;/h2&gt;

&lt;p&gt;Now, since our changes have been staged, we save them permanently to project history using the commit command.&lt;br&gt;
git commit -m "A clear, descriptive message about what changed"&lt;br&gt;
like; &amp;lt;/&amp;gt; bash&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Added customer sales analysis"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a commit that is a snapshot of the changes that you have made and is stored in the local repository. We also know that the commit at this stage has a unique ID, the author's email and name, a commit message, and a timestamp, including the reference to the previous commit.&lt;br&gt;
The commits at this stage are stored locally; no one can access them, and they are a permanent safe place where you can come back to refer to if you make any errors at a given point.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Push (Remote Repository)
&lt;/h2&gt;

&lt;p&gt;Everything that we have been doing from the beginning to this point has just been happening on our computers or on our code editor platform; to share this information with our team, like we have been working on the health report in Kenya, and we have been cleaning that data, and we want to share those changes we have made, we have to push the commits to a Remote Repository like GitHub or GitLab. This can be achieved through;&lt;br&gt;
&lt;code&gt;git push origin main&lt;/code&gt;&lt;br&gt;
Here, &lt;em&gt;origin&lt;/em&gt; is the default name Git gives to the remote repository you added manually, and main is the branch you're pushing to.&lt;br&gt;
Once the changes have been pushed, the commit is available for access by anyone with access to your local repository. Now your work has been shared with your teammates. It is always a good habit to check for updates before pushing your commit.&lt;/p&gt;

&lt;p&gt;These stages are more important as a beginner; I used to ask why you just save directly, as Google Docs does, then I realized that software projects sometimes are more complex. Git stages give you control over what to commit at each stage; you can make changes to any errors you may have before committing them or saving them permanently, and you can understand each stage of your project or code history. Without forgetting, pushing and pulling help you collaborate with others, making work easier.&lt;br&gt;
&lt;code&gt;Work you edit your file normally&lt;br&gt;
git add &amp;lt;file&amp;gt;   you make changes to be included.&lt;br&gt;
git commit -m "message"   saves permanently&lt;br&gt;
git push origin &amp;lt;branch&amp;gt;   uploads commits to be shared&lt;br&gt;
git status  shows what changed, staged.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Each stage exists for a specific reason.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>git</category>
      <category>learning</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
