<?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>Forem: Mburu</title>
    <description>The latest articles on Forem by Mburu (@mburu_champ).</description>
    <link>https://forem.com/mburu_champ</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3710367%2F7ba4569d-5f6b-4e44-bb89-9d74fbb294f0.jpg</url>
      <title>Forem: Mburu</title>
      <link>https://forem.com/mburu_champ</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/mburu_champ"/>
    <language>en</language>
    <item>
      <title>SQL Joins &amp; Window Functions: The Skills That Separate Analysts from Beginners</title>
      <dc:creator>Mburu</dc:creator>
      <pubDate>Tue, 03 Mar 2026 13:21:05 +0000</pubDate>
      <link>https://forem.com/mburu_champ/sql-joins-window-functions-the-skills-that-separate-analysts-from-beginners-p9g</link>
      <guid>https://forem.com/mburu_champ/sql-joins-window-functions-the-skills-that-separate-analysts-from-beginners-p9g</guid>
      <description>&lt;p&gt;You have learned the basics of SQL - 'SELECT', 'WHERE', 'GROUP BY' and now you are ready to level up: to move from I know SQL to I can analyze data. I will help you understand Joins and Window Functions and with these you`ll be able to answer much more complex questions from your data.&lt;/p&gt;

&lt;h2&gt;
  
  
  PART 1: SQL JOINS
&lt;/h2&gt;

&lt;p&gt;Imagine you have two tables:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One table has Customers&lt;/li&gt;
&lt;li&gt;Another table has Orders&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want to know which customer made which order, &lt;br&gt;
you will need a JOIN.&lt;/p&gt;
&lt;h3&gt;
  
  
  What Is a JOIN?
&lt;/h3&gt;

&lt;p&gt;A Join lets you combine these two tables so you can see the customer alongside their order all in one result.&lt;br&gt;
In simple terms: A Join connects rows from two or more tables based on a related column between them.&lt;/p&gt;
&lt;h2&gt;
  
  
  Example Tables
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Customers Table
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;customer_id&lt;/th&gt;
&lt;th&gt;name&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;Shujaa&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Achieng&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Brian&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h3&gt;
  
  
  Orders Table
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;order_id&lt;/th&gt;
&lt;th&gt;customer_id&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;5000&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;3000&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;7000&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h2&gt;
  
  
  INNER JOIN
&lt;/h2&gt;

&lt;p&gt;This is the Most Common join and returns only the rows where there is a match in both tables.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;sql&lt;br&gt;
SELECT &lt;br&gt;
    c.name,&lt;br&gt;
    o.order_id,&lt;br&gt;
    o.amount&lt;br&gt;
FROM Customers c&lt;br&gt;
INNER JOIN Orders o&lt;br&gt;
    ON c.customer_id = o.customer_id;&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  What Happens?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Shujaa → 2 orders&lt;/li&gt;
&lt;li&gt;Achieng → 1 order&lt;/li&gt;
&lt;li&gt;Brian → No orders → NOT shown&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Only records that match in both tables are returned.&lt;/p&gt;
&lt;h2&gt;
  
  
  LEFT JOIN
&lt;/h2&gt;

&lt;p&gt;Returns all rows from the left table, and the matching rows from the right table. If there's no match, you get &lt;code&gt;NULL&lt;/code&gt; on the right side.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;sql&lt;br&gt;
SELECT &lt;br&gt;
    c.name,&lt;br&gt;
    o.order_id,&lt;br&gt;
    o.amount&lt;br&gt;
FROM Customers c&lt;br&gt;
LEFT JOIN Orders o&lt;br&gt;
    ON c.customer_id = o.customer_id;&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  What Happens?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Shujaa → 2 orders&lt;/li&gt;
&lt;li&gt;Achieng → 1 order&lt;/li&gt;
&lt;li&gt;Brian → NULL values for order columns&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;LEFT JOIN keeps all customers even those who haven`t placed an order yet. Those customers will show up with NULL in the order column.&lt;/p&gt;
&lt;h2&gt;
  
  
  RIGHT JOIN
&lt;/h2&gt;

&lt;p&gt;The opposite of LEFT JOIN. Returns all rows from the right table, and matching rows from the left.&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="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;order_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;amount&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;c&lt;/span&gt;
&lt;span class="k"&gt;RIGHT&lt;/span&gt; &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;Orders&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;
    &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keeps all orders even if a customer is missing.&lt;br&gt;
Pro tip: RIGHT JOINs are less common. Most developers just flip the table order and use a LEFT JOIN instead: same result, easier to read.&lt;/p&gt;
&lt;h2&gt;
  
  
  FULL OUTER JOIN
&lt;/h2&gt;

&lt;p&gt;It has give me everything vibes. Returns all rows from both tables, with &lt;code&gt;NULL&lt;/code&gt; where there's no match on either side.&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="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;order_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;amount&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;c&lt;/span&gt;
&lt;span class="k"&gt;FULL&lt;/span&gt; &lt;span class="k"&gt;OUTER&lt;/span&gt; &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;Orders&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;
    &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keeps all records from both sides.&lt;/p&gt;

&lt;h2&gt;
  
  
  CROSS JOIN
&lt;/h2&gt;

&lt;p&gt;Every combination possible&lt;/p&gt;

&lt;p&gt;Returns the Cartesian product every row from the left table paired with every row from the right table.&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="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;amount&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;CROSS&lt;/span&gt; &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;amounts&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If Table A has 100 rows and Table B has 100 rows, you get 10,000 rows back so use with caution!&lt;/p&gt;

&lt;h2&gt;
  
  
  Why JOINS Matter in Real Life
&lt;/h2&gt;

&lt;p&gt;Joins allow you to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Connect sales with products&lt;/li&gt;
&lt;li&gt;Connect patients with visits&lt;/li&gt;
&lt;li&gt;Connect employees with departments&lt;/li&gt;
&lt;li&gt;Connect transactions with accounts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without joins, analysis is incomplete.&lt;/p&gt;

&lt;h2&gt;
  
  
  PART 2: WINDOW FUNCTIONS
&lt;/h2&gt;

&lt;p&gt;If JOINs combine tables, Window functions analyze data without collapsing it. A regular &lt;code&gt;GROUP BY&lt;/code&gt; aggregation collapses your rows into one summary row per group. But what if you want the aggregated value AND the individual row at the same time?&lt;/p&gt;

&lt;p&gt;That's exactly what Window Functions do.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Is a Window Function?
&lt;/h3&gt;

&lt;p&gt;A Window Function performs a calculation across a set of rows related to the current row without collapsing them into one.&lt;br&gt;
Think of it like looking through a sliding window across your data. The window moves row by row, and for each row, it calculates something based on a defined group of surrounding rows.&lt;/p&gt;
&lt;h3&gt;
  
  
  Basic Example: Total Sales Per Customer
&lt;/h3&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;order_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;SUM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;PARTITION&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;customer_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;total_per_customer&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;Orders&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  What Is Happening?
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;PARTITION BY customer_id&lt;/code&gt;&lt;br&gt;
= Group by customer internally&lt;/p&gt;

&lt;p&gt;But it does NOT remove rows.&lt;/p&gt;

&lt;p&gt;Instead, it adds a new column showing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Shujaa → 8000 (5000 + 3000)&lt;/li&gt;
&lt;li&gt;Achieng → 7000&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each order still appears individually.&lt;/p&gt;
&lt;h2&gt;
  
  
  Common Window Functions
&lt;/h2&gt;
&lt;h3&gt;
  
  
  ROW_NUMBER()
&lt;/h3&gt;

&lt;p&gt;Assigns a sequential number to each row within a partition.&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;order_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;ROW_NUMBER&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="k"&gt;PARTITION&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;customer_id&lt;/span&gt;
        &lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;rank_per_customer&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;Orders&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This helps answer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is each customer’s highest purchase?&lt;/li&gt;
&lt;li&gt;Which transaction came first?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  RANK() and DENSE RANK()
&lt;/h3&gt;

&lt;p&gt;Both rank rows, but handle ties differently:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;RANK()&lt;/code&gt; — Skips numbers after a tie (1, 2, 2, &lt;strong&gt;4&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;DENSE_RANK()&lt;/code&gt; — Does NOT skip numbers after a tie (1, 2, 2, &lt;strong&gt;3&lt;/strong&gt;)
&lt;/li&gt;
&lt;/ul&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;amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;RANK&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;sales_rank&lt;/span&gt;
    &lt;span class="n"&gt;DENSE&lt;/span&gt; &lt;span class="n"&gt;RANK&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;sales_dense_rank&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;Orders&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If two orders have same amount → same rank.&lt;/p&gt;

&lt;h3&gt;
  
  
  Running Total
&lt;/h3&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;order_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;SUM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;order_id&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;running_total&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;Orders&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Shows cumulative growth over time.&lt;/p&gt;

&lt;p&gt;Very powerful for dashboards.&lt;/p&gt;

&lt;h3&gt;
  
  
  LAG() and LEAD()
&lt;/h3&gt;

&lt;p&gt;Look backwards and forwards&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;LAG()&lt;/code&gt; — Gets the value from the previous row&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;LEAD()&lt;/code&gt; — Gets the value from the next row
&lt;/li&gt;
&lt;/ul&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="k"&gt;month&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;revenue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;LAG&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;revenue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="k"&gt;month&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;prev_month_revenue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;revenue&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;LAG&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;revenue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="k"&gt;month&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;month_over_month_change&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;sales&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Use case:&lt;/strong&gt; Calculate month-over-month revenue growth without a self-join.&lt;/p&gt;

&lt;h3&gt;
  
  
  SUM(), AVG(), COUNT() as Window Functions
&lt;/h3&gt;

&lt;p&gt;Running totals and moving averages&lt;/p&gt;

&lt;p&gt;Yes, your familiar aggregate functions can be used as window functions too!&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="c1"&gt;-- Running total of sales&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt;
  &lt;span class="n"&gt;order_date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="k"&gt;SUM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;order_date&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;running_total&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- Moving average over the last 3 rows&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt;
  &lt;span class="n"&gt;order_date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="k"&gt;AVG&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;order_date&lt;/span&gt;
    &lt;span class="k"&gt;ROWS&lt;/span&gt; &lt;span class="k"&gt;BETWEEN&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="k"&gt;PRECEDING&lt;/span&gt; &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="k"&gt;CURRENT&lt;/span&gt; &lt;span class="k"&gt;ROW&lt;/span&gt;
  &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;moving_avg_3&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  NTILE()
&lt;/h3&gt;

&lt;p&gt;Divide rows into buckets&lt;/p&gt;

&lt;p&gt;Splits rows into N equal groups (quartiles, deciles, percentiles, etc.).&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;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;salary&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;NTILE&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;salary&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;salary_quartile&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Use case:&lt;/strong&gt; Segment customers into top 25%, second 25%, etc.&lt;/p&gt;

&lt;h3&gt;
  
  
  Window Functions - Key Points Summary
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Function&lt;/th&gt;
&lt;th&gt;What It Does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ROW_NUMBER()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Unique sequential number per row&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;RANK()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Rank with gaps after ties&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;DENSE_RANK()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Rank without gaps after ties&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;LAG()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Value from a previous row&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;LEAD()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Value from a next row&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;SUM() OVER()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Running total&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;AVG() OVER()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Moving average&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;NTILE(n)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Divide rows into n buckets&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  JOIN vs WINDOW FUNCTION
&lt;/h2&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;JOIN&lt;/th&gt;
&lt;th&gt;Window Function&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Combines tables&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Keeps all rows&lt;/td&gt;
&lt;td&gt;Depends&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Used for ranking&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Used for cumulative totals&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;They solve different problems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real Business Example 1
&lt;/h2&gt;

&lt;p&gt;Imagine you're analyzing hospital data:&lt;/p&gt;

&lt;p&gt;You might:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JOIN patients with visits&lt;/li&gt;
&lt;li&gt;JOIN visits with prescriptions&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Then use window functions to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rank top diseases&lt;/li&gt;
&lt;li&gt;Calculate running monthly admissions&lt;/li&gt;
&lt;li&gt;Find most expensive prescriptions per patient&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;This is how analysts think.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real Business Example 2
&lt;/h2&gt;

&lt;p&gt;Let's say you work at an e-commerce company and want to answer this question:&lt;/p&gt;

&lt;p&gt;For each customer, show their total orders, their most recent order date, and rank them by total spend.&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="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="k"&gt;COUNT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;total_orders&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="k"&gt;MAX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;order_date&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;last_order_date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="k"&gt;SUM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;total_spend&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;RANK&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="k"&gt;SUM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;spend_rank&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;c&lt;/span&gt;
&lt;span class="k"&gt;LEFT&lt;/span&gt; &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_id&lt;/span&gt;
&lt;span class="k"&gt;GROUP&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;spend_rank&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This single query uses both a LEFT JOIN (to include customers with no orders) and a Window Function (&lt;code&gt;RANK()&lt;/code&gt;) to rank customers by spend - all in one clean result. &lt;/p&gt;

&lt;h2&gt;
  
  
  Key Concepts Explained Simply
&lt;/h2&gt;

&lt;h3&gt;
  
  
  JOIN = Attach Information
&lt;/h3&gt;

&lt;p&gt;-You have information in different places.&lt;br&gt;
JOIN brings them together.&lt;br&gt;
-Master &lt;code&gt;INNER&lt;/code&gt;, &lt;code&gt;LEFT&lt;/code&gt;, and &lt;code&gt;FULL OUTER&lt;/code&gt; and you'll cover 95% of real-world use cases.&lt;/p&gt;

&lt;h3&gt;
  
  
  WINDOW FUNCTION = Calculations that need context from surrounding rows without losing your individual row data.
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;OVER()&lt;/code&gt; clause is the heart of every window function. Learn &lt;code&gt;PARTITION BY&lt;/code&gt; and &lt;code&gt;ORDER BY&lt;/code&gt; inside it first.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;LAG()&lt;/code&gt; and &lt;code&gt;LEAD()&lt;/code&gt; are underrated gems. They eliminate the need for messy self-joins when comparing rows.&lt;/li&gt;
&lt;li&gt;You can combine Joins and Window Functions in the same query for powerful, real-world analytics&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Beginner Mistakes to Avoid
&lt;/h2&gt;

&lt;p&gt;❌ Using GROUP BY when you need row-level detail&lt;br&gt;
❌ Forgetting the ON condition in JOIN&lt;br&gt;
❌ Mixing up PARTITION BY and GROUP BY&lt;br&gt;
❌ Not ordering inside window functions when needed&lt;/p&gt;

&lt;h2&gt;
  
  
  What You Should Remember
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;JOINs combine data from multiple tables.&lt;/li&gt;
&lt;li&gt;INNER JOIN returns matches only.&lt;/li&gt;
&lt;li&gt;LEFT JOIN keeps everything from the left table.&lt;/li&gt;
&lt;li&gt;Window functions calculate across rows without collapsing them.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;PARTITION BY&lt;/code&gt; groups data internally.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ORDER BY&lt;/code&gt; inside OVER() controls ranking and running totals.&lt;/li&gt;
&lt;li&gt;As an analysts, you can use JOINs and Window Functions together in real projects.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  In My Own Words
&lt;/h2&gt;

&lt;p&gt;If SQL were a toolbox:&lt;/p&gt;

&lt;p&gt;JOINs are like screws and bolts - they connect pieces.&lt;br&gt;
Window functions are like measuring tools - they help you analyze the structure without breaking it apart.&lt;/p&gt;

&lt;p&gt;If you found this helpful, try this challenge:&lt;/p&gt;

&lt;p&gt;Challenge: Write a query that finds the highest purchase per customer using JOIN and ROW_NUMBER().&lt;/p&gt;

&lt;p&gt;Happy querying! If this helped you, share it with a fellow developer/analyst who's just getting started with SQL. &lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>sql</category>
      <category>joins</category>
      <category>windowfunctions</category>
    </item>
    <item>
      <title>How Analysts Translate Messy Data, DAX, and Dashboards into Action Using Power BI</title>
      <dc:creator>Mburu</dc:creator>
      <pubDate>Sat, 07 Feb 2026 19:11:20 +0000</pubDate>
      <link>https://forem.com/mburu_champ/how-analysts-translate-messy-data-dax-and-dashboards-into-action-using-power-bi-464j</link>
      <guid>https://forem.com/mburu_champ/how-analysts-translate-messy-data-dax-and-dashboards-into-action-using-power-bi-464j</guid>
      <description>&lt;p&gt;Most businesses fail not because they lack data but because they misunderstand their own numbers. Sales are recorded, expenses are tracked and reports are produced yet decisions are still made using instinct, politics, or whichever Excel file looks most convincing in the meeting. You will find most businesses have duplicate transactions from their POS systems, different branches using different product names and discounts entered manually with zero controls. Then in the corporate world you will have member`s data split across systems, inconsistent loan classifications and reports that change depending on who prepared them. From a business perspective, this is not a technical issue. It’s a risk management failure and when Power BI is used properly, it disrupts this culture and that’s why many organizations resist it.&lt;/p&gt;

&lt;p&gt;This article explains how analysts use Power BI to turn messy data, DAX, and dashboards into decisions that protect revenue, margins, and strategy.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Messy Data Is Not a Technical Problem it’s a Business Risk
&lt;/h2&gt;

&lt;p&gt;In most retail chains, distributors, SACCOs, and NGOs, messy data shows up as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Branches using different product names for the same item
&lt;/li&gt;
&lt;li&gt;Discounts entered manually with no approval limits
&lt;/li&gt;
&lt;li&gt;Duplicate sales from POS exports
&lt;/li&gt;
&lt;li&gt;Missing or altered transaction dates
&lt;/li&gt;
&lt;li&gt;Adjusted figures with no audit trail
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From a business point of view, this leads to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Overstated revenue
&lt;/li&gt;
&lt;li&gt;Inflated branch performance
&lt;/li&gt;
&lt;li&gt;Incorrect incentive payouts
&lt;/li&gt;
&lt;li&gt;Poor expansion decisions
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Where Power BI comes in
&lt;/h3&gt;

&lt;p&gt;Using Power Query, analysts enforce discipline by: standardizing product and branch names, remove duplicate transactions, flag negative prices or extreme discounts and create audit-ready transformation steps. This is not data cleaning. It is risk control.&lt;/p&gt;

&lt;h3&gt;
  
  
  Typical Messy Business Data Flow
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;(Raw Excel → POS exports → WhatsApp files → Final.xlsx)&lt;/em&gt;&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.amazonaws.com%2Fuploads%2Farticles%2F6045vasipezi9gx6zd68.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.amazonaws.com%2Fuploads%2Farticles%2F6045vasipezi9gx6zd68.png" alt="Typical Messy Business Data Flow" width="800" height="700"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. KPIs Mean Nothing if the Data Model Is Wrong
&lt;/h2&gt;

&lt;p&gt;If your totals change when filters are applied, your business decisions are already compromised. Executives rarely see the model they see the numbers and everyone trust numbers.&lt;/p&gt;

&lt;p&gt;Many businesses still operate with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One massive flat table
&lt;/li&gt;
&lt;li&gt;Multiple calculated totals
&lt;/li&gt;
&lt;li&gt;Conflicting monthly reports
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How poor modelling Impacts Business
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Sales appears higher than reality
&lt;/li&gt;
&lt;li&gt;Branch comparisons are misleading
&lt;/li&gt;
&lt;li&gt;Year-on-year growth cannot be trusted
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Power BI Fix: Star Schema
&lt;/h3&gt;

&lt;p&gt;A proper model separates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fact tables: Sales, Loans, Transactions
&lt;/li&gt;
&lt;li&gt;Dimension tables: Branch, Product, Customer, Date
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This ensures:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;KPIs remain consistent
&lt;/li&gt;
&lt;li&gt;Finance and operations see the same numbers
&lt;/li&gt;
&lt;li&gt;Strategic discussions focus on action, not reconciliation
&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.amazonaws.com%2Fuploads%2Farticles%2Fte9cafy81noyxfd5r4ro.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.amazonaws.com%2Fuploads%2Farticles%2Fte9cafy81noyxfd5r4ro.png" alt="Business-Friendly Star Schema (Sales Perspective)" width="800" height="627"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Dashboards Are Executive Control Panels
&lt;/h2&gt;

&lt;p&gt;If a dashboard does not change decisions, it is a waste of money. A business-grade dashboard should highlight uncomfortable truths, show who is missing targets and expose margin erosion with the ability to change the tone of a meeting. In most businesses, where hierarchy can silence data, Power BI dashboards give analysts evidence that speaks louder than titles.&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.amazonaws.com%2Fuploads%2Farticles%2F2b3z8fy5qeus8dniv6uq.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.amazonaws.com%2Fuploads%2Farticles%2F2b3z8fy5qeus8dniv6uq.png" alt="Executive Dashboard with Action-Focused KPIs" width="800" height="576"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Analysts Who Don’t Understand Business Will Be Replaced&lt;br&gt;
Analysts who only build charts are replaceable but analysts who challenge assumptions are not. Executives don’t need more visuals, more tables, more complexity; They need clarity and Power BI gives analysts the evidence to comfortably say: Sales are up, but profit is down due to big discount margins and low revenue in Nairobi branches. This statement alone  statement changes the strategy on how the business handles the market.&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.amazonaws.com%2Fuploads%2Farticles%2Fo3xca87wgzqmq3z18tam.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.amazonaws.com%2Fuploads%2Farticles%2Fo3xca87wgzqmq3z18tam.png" alt="From Messy Files to Power Quaery" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;Power BI does not improve businesses, it exposes the truth about margins, controls performance, and have a say in leadership decisions. Organizations that embrace this grow stronger and those that resist continue doing guess work. For analysts, Power BI is not a reporting tool, it is leverage!!!&lt;/p&gt;

</description>
      <category>luxdevhq</category>
      <category>beginners</category>
      <category>powerbi</category>
      <category>analyst</category>
    </item>
    <item>
      <title>Understanding Data Modeling in Power BI: Your Guide to Building Better Reports</title>
      <dc:creator>Mburu</dc:creator>
      <pubDate>Mon, 02 Feb 2026 17:47:11 +0000</pubDate>
      <link>https://forem.com/mburu_champ/understanding-data-modeling-in-power-bi-your-guide-to-building-better-reports-2o7e</link>
      <guid>https://forem.com/mburu_champ/understanding-data-modeling-in-power-bi-your-guide-to-building-better-reports-2o7e</guid>
      <description>&lt;p&gt;Have you ever opened Power BI and wondered why your reports are running slower than a Monday morning, or why your calculations aren't quite adding up, chances are the culprit isn't the tool itself, it's how your data is structured. Let me walk you through the world of data modeling and I promise to keep it as simple as possible.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Exactly Is Data Modeling?
&lt;/h2&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.amazonaws.com%2Fuploads%2Farticles%2F589boiw7qxr6wxa05ekr.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.amazonaws.com%2Fuploads%2Farticles%2F589boiw7qxr6wxa05ekr.png" alt=" " width="800" height="598"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Think of data modeling like organizing your kitchen. You could throw everything into one giant drawer, your utensils, plates, spices, and that random collection of takeout from KFC and Pizza Inn, but good luck finding anything when you need it. Or, you could organize things logically: plates in the plates drawer, spices in a rack, utensils in their own drawer and the take outs boxes in the dustbin. Data modeling is essentially the same concept, but for your business information.&lt;/p&gt;

&lt;p&gt;In Power BI, data modeling is how you structure and connect your data tables to make them work efficiently together. It's the foundation that everything else sits on your visuals, your calculations, your insights. Get this right, and you're golden. Get it wrong, and you'll be waiting for reports to load while questioning your career choices.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Two Heavyweights: Star Schema and Snowflake Schema
&lt;/h2&gt;

&lt;p&gt;When it comes to organizing data in Power BI, two approaches dominate the conversation: star schema and snowflake schema. Let's break them down.&lt;/p&gt;

&lt;h3&gt;
  
  
  Star Schema:
&lt;/h3&gt;

&lt;p&gt;Imagine looking down at a star from above and you've got a bright center with points radiating outward. That's exactly how a star schema works. At the center, you have your fact table (this is the numbers, the metrics, the stuff you actually want to analyze), and surrounding it are your dimension tables (the context that makes those numbers meaningful).&lt;/p&gt;

&lt;p&gt;Here's a real-world example: Let's say you have a few stores around Nairobi. Your fact table might be called "Sales" and contain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Time &lt;/li&gt;
&lt;li&gt;Item &lt;/li&gt;
&lt;li&gt;Branch &lt;/li&gt;
&lt;li&gt;Location &lt;/li&gt;
&lt;li&gt;Units sold&lt;/li&gt;
&lt;li&gt;Revenue
Your dimension tables would then provide the details:&lt;/li&gt;
&lt;li&gt;Time table: Time, day, day of the week, month, quarter, year&lt;/li&gt;
&lt;li&gt;Items table: Customer ID, Name, Location, Age Group&lt;/li&gt;
&lt;li&gt;Branch table: Date, Month, Quarter, Year, Day of Week&lt;/li&gt;
&lt;li&gt;Location table: Date, Month, Quarter, Year, Day of Week&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.amazonaws.com%2Fuploads%2Farticles%2Farhlmhzdd5rtvs7w47ho.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.amazonaws.com%2Fuploads%2Farticles%2Farhlmhzdd5rtvs7w47ho.png" alt=" " width="800" height="598"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each dimension table connects directly to the fact table i.e. no middlemen, no complicated chains. It's clean, it's simple, and Power BI loves it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of Star Schema:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lightning fast query performance&lt;/li&gt;
&lt;li&gt;Easy to understand (even your manager will get it)&lt;/li&gt;
&lt;li&gt;Simpler DAX calculations&lt;/li&gt;
&lt;li&gt;Less room for error&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Now, take that star schema and imagine someone said, "let`s be extra and organize this even more!" That's snowflake schema. It is an extension of the star Schema, where each point explodes into more points. In a star schema, each dimension is represented by a single dimensional table, whereas in a snowflake schema, that dimensional table is normalized into multiple lookup tables, each representing a level in the dimensional hierarchy. &lt;/p&gt;

&lt;p&gt;Using our Nairobi store example, instead of having all product information in one table, you might split it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sales table: Time, Item, branch, location, revenue, units sold&lt;/li&gt;
&lt;li&gt;Items table: Item ID, Item name, Brand, Type, Supplier Key&lt;/li&gt;
&lt;li&gt;Supplier table: Supplier, Supplier type&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;See what happened? We created a chain. Sales connects to Items, which connects to Supplier. It looks like a snowflake with its intricate branches. Same with the sales which connects to location which then connects to City.&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.amazonaws.com%2Fuploads%2Farticles%2Fojsa0hw94fhoyewcwfz0.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.amazonaws.com%2Fuploads%2Farticles%2Fojsa0hw94fhoyewcwfz0.png" alt=" " width="800" height="598"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Snowflake advantages:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Helps to reduce space by normalizing dimension tables&lt;/li&gt;
&lt;li&gt;Potentially smaller storage footprint&lt;/li&gt;
&lt;li&gt;It has normalized structures with are easier to build and maintain
&lt;strong&gt;Snowflake disadvantages:&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;It is more complex to build &lt;/li&gt;
&lt;li&gt;Power BI has to work harder to connect the dots&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For Power BI specifically, star schema is almost always the better choice. Power BI's engine is optimized for star schemas, and storage space is rarely an issue these days. Save yourself the headache; stick with star and be a star in data modelling.&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.amazonaws.com%2Fuploads%2Farticles%2Fstnv781p2w4t6kaylkb4.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.amazonaws.com%2Fuploads%2Farticles%2Fstnv781p2w4t6kaylkb4.png" alt=" " width="800" height="598"&gt;&lt;/a&gt;&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.amazonaws.com%2Fuploads%2Farticles%2Fev3kemz62hnuh6oa5dsb.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.amazonaws.com%2Fuploads%2Farticles%2Fev3kemz62hnuh6oa5dsb.png" alt=" " width="800" height="598"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Fact Tables vs. Dimension Tables:
&lt;/h2&gt;

&lt;p&gt;Understanding the difference between fact and dimension tables is crucial.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fact Tables:
&lt;/h3&gt;

&lt;p&gt;Fact tables store the measurements, the metrics, the things you want to add up, average, or analyze. They're typically long and narrow, lots of rows, fewer columns. Think of them as the what happened tables.&lt;/p&gt;

&lt;p&gt;Common characteristics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Contain numeric values (sales amounts, quantities, costs)&lt;/li&gt;
&lt;li&gt;Have many rows&lt;/li&gt;
&lt;li&gt;Represent transactions or events&lt;/li&gt;
&lt;li&gt;Grow over time as new events occur&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Examples: Sales transactions, website clicks, inventory movements, customer service tickets.&lt;/p&gt;

&lt;h3&gt;
  
  
  Dimension Tables:
&lt;/h3&gt;

&lt;p&gt;Dimension tables are the who, what, where, when, and why of your data. They're typically shorter and wider with fewer rows, more descriptive columns. They give meaning to the numbers in your fact tables.&lt;/p&gt;

&lt;p&gt;Common characteristics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Contain descriptive text and attributes&lt;/li&gt;
&lt;li&gt;Have fewer rows &lt;/li&gt;
&lt;li&gt;Include a primary key&lt;/li&gt;
&lt;li&gt;Provide context for analysis&lt;/li&gt;
&lt;li&gt;Change less frequently&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Examples: Customer details, product catalogs, geographic locations, time periods.&lt;/p&gt;

&lt;p&gt;The relationship between the two: Fact tables reference dimension tables through keys. A sale (fact) happened to a specific customer (dimension) for a specific product (dimension) on a specific date (dimension). This is how you can slice and dice your numbers in a million different ways.&lt;/p&gt;

&lt;h2&gt;
  
  
  Relationships:
&lt;/h2&gt;

&lt;p&gt;In Power BI, relationships are the bridges between your tables. They tell Power BI how data in one table relates to data in another. Get these wrong, and your reports will show incorrect numbers or worse, nothing at all.&lt;/p&gt;

&lt;h3&gt;
  
  
  Types of Relationships
&lt;/h3&gt;

&lt;p&gt;One-to-Many: This is the bread and butter of Power BI relationships. One record in the dimension table relates to many records in the fact table. For example, one customer can have many sales transactions.&lt;/p&gt;

&lt;p&gt;Many-to-One: Just the reverse of one-to-many. Power BI automatically handles the direction.&lt;/p&gt;

&lt;p&gt;One-to-One: Rare in practice. Each record in one table matches exactly one record in another. Usually indicates you could combine the tables.&lt;/p&gt;

&lt;p&gt;Many-to-Many: The complicated one. Avoid if possible, but sometimes necessary. Requires careful handling and can impact performance.&lt;/p&gt;

&lt;h3&gt;
  
  
  Relationship Best Practices
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Use single-column relationships: Don't try to relate tables on multiple columns. If you need to, create a composite key column first.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;2.Set the correct cardinality: Power BI usually detects this automatically, but always double-check.&lt;/p&gt;

&lt;p&gt;3.Mind the filter direction: Typically, filters flow from dimension to fact (one-side to many-side). This is called single direction filtering. Bi-directional filtering can be useful but use it sparingly as it can create ambiguity and slow things down.&lt;/p&gt;

&lt;p&gt;4.Avoid circular relationships: If Power BI can navigate from Table A to Table B to Table C and back to Table A, you've created a circular dependency. Power BI will complain, and rightfully so.&lt;/p&gt;

&lt;p&gt;5.Use inactive relationships when needed: Sometimes you need multiple relationships between the same tables like Order Date and Ship Date both connecting to a Date table. Make one active and use DAX's USERELATIONSHIP function for the others.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Good Data Modeling Matters
&lt;/h2&gt;

&lt;p&gt;Let me paint you two scenarios.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario A&lt;/strong&gt;: You import all your data as it is, create some relationships that seem right, and start building visuals. Your report takes 30 seconds to load. Your all year calculations are showing weird numbers. Your boss asks why the regional breakdown doesn't match the finance report. You spend hours troubleshooting, only to realize your relationships are creating duplicate counts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario B&lt;/strong&gt;: You spend an afternoon properly modeling your data; creating a clean star schema, establishing correct relationships, building a proper date table. Your reports load in 2 seconds. Your calculations are accurate. When your boss asks for a new breakdown, you add it in minutes. You look like a tech wizard.&lt;/p&gt;

&lt;p&gt;Which scenario sounds better? Tell me down in the comments.&lt;/p&gt;

&lt;h3&gt;
  
  
  Performance Benefits
&lt;/h3&gt;

&lt;p&gt;Good data modeling directly impacts performance:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Faster queries: Star schemas mean Power BI's engine can retrieve data quickly&lt;/li&gt;
&lt;li&gt;Smaller file sizes: Proper modeling eliminates redundancy and allows better compression&lt;/li&gt;
&lt;li&gt;Efficient calculations: Clean relationships mean DAX doesn't have to work overtime&lt;/li&gt;
&lt;li&gt;Smoother user experience: Nobody likes waiting for visuals to load&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Accuracy Benefits
&lt;/h3&gt;

&lt;p&gt;Even more critical than speed is correctness:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No duplicate counting: Proper relationships prevent the same sale from being counted multiple times&lt;/li&gt;
&lt;li&gt;Correct aggregations: Your totals actually total correctly&lt;/li&gt;
&lt;li&gt;Reliable filters: When users filter by region, they get that region's data—all of it, and only it&lt;/li&gt;
&lt;li&gt;Trustworthy insights: When your CEO makes a decision based on your report, you can sleep at night&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Maintenance Benefits
&lt;/h3&gt;

&lt;p&gt;Future you will thank present you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easier updates: Adding new data sources or columns is straightforward&lt;/li&gt;
&lt;li&gt;Simpler troubleshooting: When something breaks, you can find the issue quickly&lt;/li&gt;
&lt;li&gt;Better collaboration: Other people can understand and work with your model&lt;/li&gt;
&lt;li&gt;Scalability: As your data grows, your model still performs well&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Practical Tips for Building Your Model
&lt;/h2&gt;

&lt;p&gt;Ready to put what you have learnt into practice? Here's your game plan:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Start with a Plan
&lt;/h3&gt;

&lt;p&gt;Before importing anything, sketch out your model on paper or a whiteboard. Identify:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What are you measuring? (These become fact tables)&lt;/li&gt;
&lt;li&gt;What provides context? (These become dimension tables)&lt;/li&gt;
&lt;li&gt;How do they connect?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Build a Proper Date Table
&lt;/h3&gt;

&lt;p&gt;Never ever use the auto-generated date hierarchy. Create a dedicated date dimension table with all the columns you need: year, quarter, month, week, day of week, fiscal periods, holidays, etc. This single table will be used by all your fact tables.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Keep Dimension Tables Clean
&lt;/h3&gt;

&lt;p&gt;Each dimension table should have a clear primary key. Avoid duplicates. Keep descriptive attributes together. If you find yourself with a dimension table that has millions of rows, it might actually be a fact table in disguise.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Use Meaningful Names
&lt;/h3&gt;

&lt;p&gt;Call your tables and columns what they actually are. "DimCustomer" and "FactSales" are better than "Table1" and "Query2." Your future self will thank you.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Hide What Users Don't Need
&lt;/h3&gt;

&lt;p&gt;Hide foreign columns, intermediate calculation columns, and anything else that would just confuse report builders. Keep the field list clean and intuitive.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Test Your Model
&lt;/h3&gt;

&lt;p&gt;Before building dozens of visuals, create a few simple tables to verify:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Totals match your source systems&lt;/li&gt;
&lt;li&gt;Filters work as expected&lt;/li&gt;
&lt;li&gt;Relationships are functioning correctly&lt;/li&gt;
&lt;li&gt;No unexpected blanks or duplicates appear&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  7. Document Your Decisions
&lt;/h3&gt;

&lt;p&gt;Add descriptions to your tables and measures. When someone, probably you, in six months from now asks "Why did we model it this way?" you'll have the answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Pitfalls to Avoid
&lt;/h2&gt;

&lt;p&gt;Learn from others' mistakes:&lt;/p&gt;

&lt;p&gt;Using flat files: Importing one giant Excel file with everything might seem easier, but it's a performance nightmare and makes calculations complicated.&lt;/p&gt;

&lt;p&gt;Bi-directional filters everywhere: These can create ambiguous filter paths and slow performance. Use them only when absolutely necessary.&lt;/p&gt;

&lt;p&gt;Ignoring data types: Make sure numbers are numbers, dates are dates, and text is text. Wrong data types break calculations and sorting.&lt;/p&gt;

&lt;p&gt;Skipping the date table: Seriously, build a proper date table. Time intelligence functions need it.&lt;/p&gt;

&lt;p&gt;Creating calculated columns when measures would work: Calculated columns are computed during refresh and stored, bloating your file. Measures are computed on-the-fly and are usually more efficient.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion and Take aways
&lt;/h2&gt;

&lt;p&gt;Data modeling might not be the flashiest part of Power BI. Building those gorgeous visuals is way more fun, but it's absolutely the most important. A well-modeled dataset is like a solid foundation for a house, you don't see it, but everything depends on it.&lt;/p&gt;

&lt;p&gt;Start with a star schema. Clearly separate your facts from your dimensions. Establish clean, simple relationships. Test thoroughly. And remember: the hour you spend modeling properly will save you dozens of hours of troubleshooting later.&lt;/p&gt;

&lt;p&gt;Your reports will load faster, your numbers will be accurate, and you'll actually enjoy working in Power BI instead of fighting with it. And isn't that worth the effort?&lt;/p&gt;

&lt;p&gt;Now go forth and model with confidence. Your data is waiting to be organized, and you've got the knowledge to do it right.&lt;/p&gt;

</description>
      <category>luxdevhq</category>
      <category>powerfuldevs</category>
      <category>beginners</category>
      <category>schemas</category>
    </item>
    <item>
      <title>Introduction to MS Excel for Data Analytics</title>
      <dc:creator>Mburu</dc:creator>
      <pubDate>Sun, 25 Jan 2026 12:59:43 +0000</pubDate>
      <link>https://forem.com/mburu_champ/a-beginners-guide-mastering-ms-excel-3opd</link>
      <guid>https://forem.com/mburu_champ/a-beginners-guide-mastering-ms-excel-3opd</guid>
      <description>&lt;p&gt;If you’re new to data, Microsoft Excel is the best place to start. You can download Microsoft office from &lt;a href="https://getintopc.com/" rel="noopener noreferrer"&gt;Google&lt;/a&gt; and you will find excel there.&lt;/p&gt;

&lt;p&gt;If you`re new to data, before you learn Power BI, SQL, Python, or Data Science you start with Excel. It’s simple, powerful, and used everywhere: in schools, businesses, NGOs, startups, and tech companies.&lt;/p&gt;

&lt;p&gt;This guide explains how data works using Excel in a way that is friendly for complete beginners.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Data?
&lt;/h2&gt;

&lt;p&gt;Data is simply information.&lt;/p&gt;

&lt;p&gt;Examples of data:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Names of students&lt;/li&gt;
&lt;li&gt;Exam scores&lt;/li&gt;
&lt;li&gt;Sales records&lt;/li&gt;
&lt;li&gt;Monthly expenses&lt;/li&gt;
&lt;li&gt;Attendance lists&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When the above information is listed it holds simple to no meaning but when the information is organized, it becomes meaningful. Excel helps you to organize this data in a way that you will understand.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Microsoft Excel?
&lt;/h2&gt;

&lt;p&gt;Microsoft Excel is a spreadsheet application developed by Microsoft which is used to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Store data&lt;/li&gt;
&lt;li&gt;Organize data&lt;/li&gt;
&lt;li&gt;Calculate values&lt;/li&gt;
&lt;li&gt;Analyze information&lt;/li&gt;
&lt;li&gt;Create charts and reports&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Think of Excel as a digital notebook with calculation powers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the Excel Workspace
&lt;/h2&gt;

&lt;p&gt;When you open Excel, you’ll see several important parts.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Workbook&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;A workbook is the &lt;strong&gt;entire Excel file&lt;/strong&gt;.&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.amazonaws.com%2Fuploads%2Farticles%2Fxd9sf970vht1ei4rfsu5.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.amazonaws.com%2Fuploads%2Farticles%2Fxd9sf970vht1ei4rfsu5.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Excel startup screen showing a blank workbook&lt;/p&gt;

&lt;h3&gt;
  
  
  Worksheet
&lt;/h3&gt;

&lt;p&gt;Inside a workbook are worksheets (tabs at the bottom).&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.amazonaws.com%2Fuploads%2Farticles%2Fx9a64dtfvj1j0mk97la7.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.amazonaws.com%2Fuploads%2Farticles%2Fx9a64dtfvj1j0mk97la7.png" alt=" " width="800" height="113"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sheet tabs labeled Sheet1, Sheet2, Sheet3&lt;/p&gt;

&lt;p&gt;Each worksheet holds data. You have have different or same data in each worksheet. You add a worksheet using the plus (+) Infront of the sheet.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rows, Columns, and Cells
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Rows → horizontal (1, 2, 3…)&lt;/li&gt;
&lt;li&gt;Columns → vertical (A, B, C…)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Where a row and column meet is a cell.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A1&lt;/li&gt;
&lt;li&gt;B3&lt;/li&gt;
&lt;li&gt;C10&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.amazonaws.com%2Fuploads%2Farticles%2F53i8wveosc9ib3x5p6ex.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.amazonaws.com%2Fuploads%2Farticles%2F53i8wveosc9ib3x5p6ex.png" alt=" " width="800" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Excel grid highlighting rows, columns, and a selected cell&lt;/p&gt;

&lt;h2&gt;
  
  
  How Data Is Stored in Excel.
&lt;/h2&gt;

&lt;p&gt;Data is stored in tables.&lt;/p&gt;

&lt;p&gt;A good table has:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Clear headers&lt;/li&gt;
&lt;li&gt;One idea per column&lt;/li&gt;
&lt;li&gt;One record per row&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example Table
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Student Name&lt;/th&gt;
&lt;th&gt;Subject&lt;/th&gt;
&lt;th&gt;Score&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Amina&lt;/td&gt;
&lt;td&gt;Math&lt;/td&gt;
&lt;td&gt;78&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Brian&lt;/td&gt;
&lt;td&gt;English&lt;/td&gt;
&lt;td&gt;65&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Faith&lt;/td&gt;
&lt;td&gt;Science&lt;/td&gt;
&lt;td&gt;82&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.amazonaws.com%2Fuploads%2Farticles%2Fk2qj4m9s5h4gbr2re7xd.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.amazonaws.com%2Fuploads%2Farticles%2Fk2qj4m9s5h4gbr2re7xd.png" alt=" " width="800" height="234"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Simple student results table in Excel&lt;/p&gt;

&lt;h2&gt;
  
  
  Types of Data in Excel
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Text Data
&lt;/h3&gt;

&lt;p&gt;Used for names and descriptions.&lt;/p&gt;

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

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
John&lt;br&gt;
Nairobi&lt;br&gt;
Economics&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  2. Number Data
&lt;/h3&gt;

&lt;p&gt;Used for calculations.&lt;/p&gt;

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

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
450&lt;br&gt;
78.5&lt;br&gt;
12000&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  3. Date &amp;amp; Time Data
&lt;/h3&gt;

&lt;p&gt;Used for tracking time-based records.&lt;/p&gt;

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

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
25/01/2026&lt;br&gt;
14:26&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&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.amazonaws.com%2Fuploads%2Farticles%2Fak5cibzqip3ljoe27p1j.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.amazonaws.com%2Fuploads%2Farticles%2Fak5cibzqip3ljoe27p1j.png" alt=" " width="800" height="162"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cells formatted as date and time&lt;/p&gt;
&lt;h2&gt;
  
  
  Why Data Structure Matters
&lt;/h2&gt;

&lt;p&gt;Bad structure leads to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Errors&lt;/li&gt;
&lt;li&gt;Wrong results&lt;/li&gt;
&lt;li&gt;Confusion&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Good structure allows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Accurate calculations&lt;/li&gt;
&lt;li&gt;Easy analysis&lt;/li&gt;
&lt;li&gt;Clean reports&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;NB: Golden rule of data:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One column = one type of data&lt;/p&gt;
&lt;h2&gt;
  
  
  Basic Excel Skills Every Beginner Must Know
&lt;/h2&gt;
&lt;h3&gt;
  
  
  1. Entering Data
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Click a cell&lt;/li&gt;
&lt;li&gt;Type your data&lt;/li&gt;
&lt;li&gt;Press Enter&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.amazonaws.com%2Fuploads%2Farticles%2Fchlnm862auhj3iytccn4.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.amazonaws.com%2Fuploads%2Farticles%2Fchlnm862auhj3iytccn4.png" alt=" " width="800" height="234"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Typed data into Excel cells&lt;/p&gt;
&lt;h3&gt;
  
  
  2. Saving Your Work
&lt;/h3&gt;

&lt;p&gt;Always save your file.&lt;/p&gt;

&lt;p&gt;Shortcut:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
Ctrl + S&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Use clear file names:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
January Sales 2026.xlsx&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  3. Formatting Data
&lt;/h3&gt;

&lt;p&gt;Formatting improves readability:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bold headers&lt;/li&gt;
&lt;li&gt;Adjust column width&lt;/li&gt;
&lt;li&gt;Add borders&lt;/li&gt;
&lt;li&gt;Apply number formats&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.amazonaws.com%2Fuploads%2Farticles%2Fywfaxr56uxa0t1im8msi.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.amazonaws.com%2Fuploads%2Farticles%2Fywfaxr56uxa0t1im8msi.png" alt=" " width="725" height="545"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Formatted table with bold headers and borders&lt;/p&gt;

&lt;p&gt;For &lt;strong&gt;Student name&lt;/strong&gt; and &lt;strong&gt;subject&lt;/strong&gt; use text (for all columns that aren`t calculated) &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.amazonaws.com%2Fuploads%2Farticles%2Fk37gy8jsuiya9kz35r7j.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.amazonaws.com%2Fuploads%2Farticles%2Fk37gy8jsuiya9kz35r7j.png" alt=" " width="800" height="354"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For &lt;strong&gt;score&lt;/strong&gt; and any data that you can calculate use numbers.&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.amazonaws.com%2Fuploads%2Farticles%2F9vlwmc7vuwmr3okst0y0.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.amazonaws.com%2Fuploads%2Farticles%2F9vlwmc7vuwmr3okst0y0.png" alt=" " width="800" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;NB: Number formats change how numbers look without changing their actual value. &lt;/p&gt;

&lt;p&gt;Common formats: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;General (default) &lt;/li&gt;
&lt;li&gt;Number (can show decimal places) &lt;/li&gt;
&lt;li&gt;Currency (shows a currency symbol) &lt;/li&gt;
&lt;li&gt;Accounting &lt;/li&gt;
&lt;li&gt;Percentage (%) &lt;/li&gt;
&lt;li&gt;Date &lt;/li&gt;
&lt;li&gt;Time &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Steps: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select the cells with numbers. &lt;/li&gt;
&lt;li&gt;Home tab &amp;gt; Number group. &lt;/li&gt;
&lt;li&gt;Use the dropdown to choose Number, Currency, Percentage, Short Date, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Introduction to Excel Formulas
&lt;/h2&gt;

&lt;p&gt;This is now the powerhouse of Excel.&lt;/p&gt;
&lt;h3&gt;
  
  
  What Is a Formula?
&lt;/h3&gt;

&lt;p&gt;A formula tells Excel to calculate something.&lt;/p&gt;

&lt;p&gt;Something key to note is that all formulas start with &lt;code&gt;=&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Common Beginner Formulas
&lt;/h3&gt;
&lt;h3&gt;
  
  
  SUM – Add Numbers
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;=SUM(c2:c4)
&lt;/code&gt;&lt;/pre&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.amazonaws.com%2Fuploads%2Farticles%2F4q0nvfx8xjjmzqmfns8n.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.amazonaws.com%2Fuploads%2Farticles%2F4q0nvfx8xjjmzqmfns8n.png" alt=" " width="721" height="514"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SUM formula calculating total score&lt;/p&gt;
&lt;h3&gt;
  
  
  AVERAGE – Find the Mean
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;=AVERAGE(c2:c4)
&lt;/code&gt;&lt;/pre&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.amazonaws.com%2Fuploads%2Farticles%2Fh3dua09f10vfo549rzsl.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.amazonaws.com%2Fuploads%2Farticles%2Fh3dua09f10vfo549rzsl.png" alt=" " width="725" height="529"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Average score calculation&lt;/p&gt;
&lt;h3&gt;
  
  
  MAX and MIN – Highest &amp;amp; Lowest Values
&lt;/h3&gt;

&lt;p&gt;Max is the highest value in the dataset&lt;br&gt;
Min is the lowest value in the dataset&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;=MAX(C2:C4)
=MIN(C2:C4)
&lt;/code&gt;&lt;/pre&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.amazonaws.com%2Fuploads%2Farticles%2Fe52k0z4wetbs9r90j6za.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.amazonaws.com%2Fuploads%2Farticles%2Fe52k0z4wetbs9r90j6za.png" alt=" " width="760" height="579"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Highest and lowest score highlighted&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Excel Is Important for Data Beginners
&lt;/h2&gt;

&lt;p&gt;Excel helps you learn:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data organization&lt;/li&gt;
&lt;li&gt;Logical thinking&lt;/li&gt;
&lt;li&gt;Accuracy&lt;/li&gt;
&lt;li&gt;Problem solving&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once you understand Excel, moving to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Power BI&lt;/li&gt;
&lt;li&gt;SQL&lt;/li&gt;
&lt;li&gt;Python&lt;/li&gt;
&lt;li&gt;Data Analytics&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;becomes so much easier and understandable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Beginner Mistakes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Mixing text and numbers in one column&lt;/li&gt;
&lt;li&gt;Missing headers&lt;/li&gt;
&lt;li&gt;Using merged cells in raw data&lt;/li&gt;
&lt;li&gt;Not saving regularly&lt;/li&gt;
&lt;li&gt;Clean data beats fancy formatting.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to Practice Excel as a Beginner
&lt;/h2&gt;

&lt;p&gt;Try these simple projects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Personal budget tracker&lt;/li&gt;
&lt;li&gt;Daily expenses list&lt;/li&gt;
&lt;li&gt;Student marks sheet&lt;/li&gt;
&lt;li&gt;Shop inventory list&lt;/li&gt;
&lt;li&gt;Monthly sales report&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Date&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;Amount (KES)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;01/01/2026&lt;/td&gt;
&lt;td&gt;Transport to work&lt;/td&gt;
&lt;td&gt;Transport&lt;/td&gt;
&lt;td&gt;200&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;02/01/2026&lt;/td&gt;
&lt;td&gt;Lunch&lt;/td&gt;
&lt;td&gt;Food&lt;/td&gt;
&lt;td&gt;350&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;03/01/2026&lt;/td&gt;
&lt;td&gt;Internet bundle&lt;/td&gt;
&lt;td&gt;Utilities&lt;/td&gt;
&lt;td&gt;500&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;04/01/2026&lt;/td&gt;
&lt;td&gt;Groceries&lt;/td&gt;
&lt;td&gt;Food&lt;/td&gt;
&lt;td&gt;1,200&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;05/01/2026&lt;/td&gt;
&lt;td&gt;Movie night&lt;/td&gt;
&lt;td&gt;Entertainment&lt;/td&gt;
&lt;td&gt;600&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;EXAMPLE: A Simple expense tracker created in Excel&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.amazonaws.com%2Fuploads%2Farticles%2Fd2lgi5qysbmwasi24zr8.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.amazonaws.com%2Fuploads%2Farticles%2Fd2lgi5qysbmwasi24zr8.png" alt=" " width="800" height="497"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;Excel is not just for accountants or finance bros. It’s a foundational data skill used in almost every profession. If you’re new to data, start here, master the basics, and build confidently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Happy learning&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If this helped you, give it a ❤️ and follow for more beginner-friendly data content.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>msexcel</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>A Beginner’s Guide: Mastering Git, GitHub, and Basic Workflows</title>
      <dc:creator>Mburu</dc:creator>
      <pubDate>Fri, 16 Jan 2026 18:39:51 +0000</pubDate>
      <link>https://forem.com/mburu_champ/a-beginners-guide-mastering-git-github-and-basic-workflows-2ccl</link>
      <guid>https://forem.com/mburu_champ/a-beginners-guide-mastering-git-github-and-basic-workflows-2ccl</guid>
      <description>&lt;h2&gt;
  
  
  A simple Beginner`s tutorial on how to install Git, connect to GitHub, and use basic Git workflows
&lt;/h2&gt;

&lt;p&gt;New to tech? Don't worry. I will take you through a simple step by step guide to help you install Git, connect it to GitHub, and use basic git commands that will help your new journey and boost your understanding. I started my Data analytics, science and AI journey early this week at &lt;a href="https://www.luxdevhq.ai/" rel="noopener noreferrer"&gt;LUX DEV HQ&lt;/a&gt; on 12/01/2026 and I am happy to share my journey here.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Overview&lt;/li&gt;
&lt;li&gt;Install Git (Windows / macOS / Linux)&lt;/li&gt;
&lt;li&gt;Configure Git identity&lt;/li&gt;
&lt;li&gt;Create a GitHub account and connect (SSH recommended)&lt;/li&gt;
&lt;li&gt;Create, commit, push, and pull (basic workflow)&lt;/li&gt;
&lt;li&gt;Inspecting history and tracking changes&lt;/li&gt;
&lt;li&gt;Undoing changes (safe commands)&lt;/li&gt;
&lt;li&gt;Simple teamwork workflow (feature branches + pull requests)&lt;/li&gt;
&lt;li&gt;Quick cheat-sheet you can use later&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Git saves snapshots of your project so you can track changes, collaborate, and revert mistakes. GitHub stores repositories online so you can share code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install Git
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Windows
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Download the installer: &lt;a href="https://git-scm.com/download/win" rel="noopener noreferrer"&gt;https://git-scm.com/download/win&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Run the installer and accept the default options. &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.amazonaws.com%2Fuploads%2Farticles%2F2iksjzxjq4o885lxy1sg.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.amazonaws.com%2Fuploads%2Farticles%2F2iksjzxjq4o885lxy1sg.png" alt="Click Next" width="800" height="530"&gt;&lt;/a&gt; &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.amazonaws.com%2Fuploads%2Farticles%2Fotmicd220atf6r0ktjxw.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.amazonaws.com%2Fuploads%2Farticles%2Fotmicd220atf6r0ktjxw.png" alt="Use VS Code as default editor" width="800" height="525"&gt;&lt;/a&gt;&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.amazonaws.com%2Fuploads%2Farticles%2Fuhzjjv1rqwoorosjxhr8.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.amazonaws.com%2Fuploads%2Farticles%2Fuhzjjv1rqwoorosjxhr8.png" alt="Install" width="800" height="569"&gt;&lt;/a&gt;&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.amazonaws.com%2Fuploads%2Farticles%2Fa9ic7yhatyyea4bxpk20.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.amazonaws.com%2Fuploads%2Farticles%2Fa9ic7yhatyyea4bxpk20.png" alt="Launch Git" width="800" height="542"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Open &lt;strong&gt;Git Bash&lt;/strong&gt; from the Start menu and verify:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Windows
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Open Terminal and run:
&lt;code&gt;&lt;/code&gt;&lt;code&gt;
git --version
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;
&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.amazonaws.com%2Fuploads%2Farticles%2Fpfuo5qlra2xsr9sp5f3n.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.amazonaws.com%2Fuploads%2Farticles%2Fpfuo5qlra2xsr9sp5f3n.png" alt=" " width="800" height="410"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  macOS
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Open Terminal and run:
&lt;code&gt;&lt;/code&gt;&lt;code&gt;
git --version
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;
If not installed, macOS will prompt to install the Xcode command line tools — accept to install.
Alternatively download: &lt;a href="https://git-scm.com/download/mac" rel="noopener noreferrer"&gt;https://git-scm.com/download/mac&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Linux (Ubuntu/Debian)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Open Terminal and run:
&lt;code&gt;&lt;/code&gt;&lt;code&gt;
sudo apt update
sudo apt install git -y
git --version
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Configure Git identity
&lt;/h2&gt;

&lt;p&gt;Run these once (replace with your name and email):&lt;br&gt;
&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
git config --global user.name "Your Name"&lt;br&gt;
git config --global user.email "you@example.com"&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&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.amazonaws.com%2Fuploads%2Farticles%2F6vvcgo9z8e6n1xefke0f.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.amazonaws.com%2Fuploads%2Farticles%2F6vvcgo9z8e6n1xefke0f.png" alt=" " width="800" height="410"&gt;&lt;/a&gt;&lt;br&gt;
Check your settings:&lt;br&gt;
&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
git config --list&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&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.amazonaws.com%2Fuploads%2Farticles%2Fldbdmu73h9i8brbh1ueg.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.amazonaws.com%2Fuploads%2Farticles%2Fldbdmu73h9i8brbh1ueg.png" alt=" " width="800" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Create a GitHub account and connect Git to GitHub (SSH recommended)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Create a GitHub account
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Go to &lt;a href="https://github.com" rel="noopener noreferrer"&gt;https://github.com&lt;/a&gt; and sign up.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Generate an SSH key (recommended)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;In Git Bash:
&lt;code&gt;&lt;/code&gt;&lt;code&gt;
ssh-keygen -t ed25519 -C "you@example.com"
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;
&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.amazonaws.com%2Fuploads%2Farticles%2F43yz3gaos34y332hgjgg.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.amazonaws.com%2Fuploads%2Farticles%2F43yz3gaos34y332hgjgg.png" alt=" " width="800" height="420"&gt;&lt;/a&gt;&lt;br&gt;
   If ed25519 is unavailable, use:&lt;br&gt;
   &lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
   ssh-keygen -t rsa -b 4096 -C "you@example.com"&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;br&gt;
   Press Enter to accept defaults and optionally set a passphrase.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start the ssh-agent and add your key:&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;macOS / Linux:&lt;br&gt;
 &lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
 eval "$(ssh-agent -s)"&lt;br&gt;
 ssh-add ~/.ssh/id_ed25519&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Windows (Git Bash): Copy the path where your path was saved&lt;br&gt;
 &lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
 eval "$(ssh-agent -s)"&lt;br&gt;
 ssh-add //c/Users/Administrator/.ssh/id_ed25519&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;&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.amazonaws.com%2Fuploads%2Farticles%2F2s74hng5km7if3ionfeq.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.amazonaws.com%2Fuploads%2Farticles%2F2s74hng5km7if3ionfeq.png" alt=" " width="800" height="416"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Copy the public key to your clipboard:&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;macOS:&lt;br&gt;
 &lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
 pbcopy &amp;lt; ~/.ssh/id_ed25519.pub&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Linux (with xclip):&lt;br&gt;
 &lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
 xclip -sel clip &amp;lt; ~/.ssh/id_ed25519.pub&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Windows (Git Bash):&lt;br&gt;
 &lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
 cat ~/.ssh/id_ed25519.pub | clip&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;&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.amazonaws.com%2Fuploads%2Farticles%2F72d4fgasmq3un2do6vgc.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.amazonaws.com%2Fuploads%2Farticles%2F72d4fgasmq3un2do6vgc.png" alt=" " width="800" height="415"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;On GitHub: Settings → SSH and GPG keys → New SSH key → paste the key → Save.&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.amazonaws.com%2Fuploads%2Farticles%2F4nebsjf8yqdhi0omp9ab.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.amazonaws.com%2Fuploads%2Farticles%2F4nebsjf8yqdhi0omp9ab.png" alt=" " width="800" height="339"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Test the connection:
&lt;code&gt;&lt;/code&gt;&lt;code&gt;
ssh -T git@github.com
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;
You should see a welcome message confirming authentication.&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.amazonaws.com%2Fuploads%2Farticles%2Fclbtrponnsbhfq8f7135.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.amazonaws.com%2Fuploads%2Farticles%2Fclbtrponnsbhfq8f7135.png" alt=" " width="800" height="415"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Basic Git workflow (create, track, commit, push, pull)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Create a local repository and make your first commit
&lt;/h3&gt;

&lt;p&gt;Create a project folder and initialize Git:&lt;br&gt;
   &lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
   mkdir my-project&lt;br&gt;
   cd my-project&lt;br&gt;
   git init&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;br&gt;
This creates a .git folder that tracks changes.&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2Fiy8xy7yu4bzxtg6d3ea8.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.amazonaws.com%2Fuploads%2Farticles%2Fiy8xy7yu4bzxtg6d3ea8.png" alt=" " width="800" height="389"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Add files and make first commit
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Create a file (example):&lt;br&gt;
&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
echo "# My Project" &amp;gt; README.md&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check repository status:&lt;br&gt;
&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
git status&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Stage files:&lt;br&gt;
&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
git add README.md&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;br&gt;
To stage everything:&lt;br&gt;
&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
git add .&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Commit staged files with a message:&lt;br&gt;
&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
git commit -m "Add README"&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;&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.amazonaws.com%2Fuploads%2Farticles%2Feh2rbgsiu5y6ic8k2888.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.amazonaws.com%2Fuploads%2Farticles%2Feh2rbgsiu5y6ic8k2888.png" alt=" " width="800" height="416"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Link the local repo to GitHub (push)
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;On GitHub: click &lt;strong&gt;New repository&lt;/strong&gt;, name it (for example: my-project), and copy the SSH URL:&lt;br&gt;
&lt;a href="mailto:git@github.com"&gt;git@github.com&lt;/a&gt;:username/my-project.git&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Link remote and push:&lt;br&gt;
&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
git remote add origin git@github.com:username/my-project.git&lt;br&gt;
git branch -M main&lt;br&gt;
git push -u origin main&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;br&gt;
For HTTPS use the HTTPS URL instead:&lt;br&gt;
&lt;a href="https://github.com/username/my-project.git" rel="noopener noreferrer"&gt;https://github.com/username/my-project.git&lt;/a&gt;&lt;/p&gt;&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.amazonaws.com%2Fuploads%2Farticles%2Fk1c7dtspmb1gwi9ulrxw.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.amazonaws.com%2Fuploads%2Farticles%2Fk1c7dtspmb1gwi9ulrxw.png" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Push your main branch:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`&lt;br&gt;
git branch -M main&lt;br&gt;
git push -u origin main&lt;/p&gt;

&lt;p&gt;`&lt;code&gt;&lt;/code&gt;&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.amazonaws.com%2Fuploads%2Farticles%2F4zaepycpts193pnuuluu.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.amazonaws.com%2Fuploads%2Farticles%2F4zaepycpts193pnuuluu.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Pull changes from remote
&lt;/h2&gt;

&lt;p&gt;To fetch and merge remote changes into your current branch:&lt;br&gt;
&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
git pull&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&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.amazonaws.com%2Fuploads%2Farticles%2Fdermmokpgllqvlevt18l.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.amazonaws.com%2Fuploads%2Farticles%2Fdermmokpgllqvlevt18l.png" alt=" " width="800" height="419"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Understand version control basics
&lt;/h2&gt;

&lt;p&gt;Key concepts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Repository:&lt;/strong&gt; a project with its history.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Working directory:&lt;/strong&gt; your current files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Staging area (index):&lt;/strong&gt; files you marked to include in next commit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Commit:&lt;/strong&gt; a saved snapshot with a message and ID.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Branch:&lt;/strong&gt; a parallel line of development (main is default).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remote:&lt;/strong&gt; an online copy (e.g., GitHub).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Push:&lt;/strong&gt; send commits to remote.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pull:&lt;/strong&gt; fetch remote commits and merge into local branch.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>luxdevhq</category>
      <category>datascience</category>
      <category>beginners</category>
      <category>git</category>
    </item>
  </channel>
</rss>
