<?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: Musungu (Ruth) Ambogo</title>
    <description>The latest articles on Forem by Musungu (Ruth) Ambogo (@ambogo2).</description>
    <link>https://forem.com/ambogo2</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%2F1282798%2F637a99ec-61e9-4516-98c5-e7841e513cde.jpeg</url>
      <title>Forem: Musungu (Ruth) Ambogo</title>
      <link>https://forem.com/ambogo2</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ambogo2"/>
    <language>en</language>
    <item>
      <title>SQL Joins &amp; Window Functions</title>
      <dc:creator>Musungu (Ruth) Ambogo</dc:creator>
      <pubDate>Mon, 02 Mar 2026 16:19:13 +0000</pubDate>
      <link>https://forem.com/ambogo2/sql-joins-window-functions-1p2n</link>
      <guid>https://forem.com/ambogo2/sql-joins-window-functions-1p2n</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;SQL joins&lt;/strong&gt; are used to combine data from multiple tables based on a related column.&lt;br&gt;
&lt;strong&gt;Window functions&lt;/strong&gt; , on the other hand perform calculations across a set of table rows related to the current row, enabling row-wise aggregations without collapsing the data&lt;br&gt;
In this article, you will learn in depth how SQL joins and window functions work, when to use them, and how they solve real business problems. Let’s get started.&lt;/p&gt;
&lt;h1&gt;
  
  
  Types of SQL joins
&lt;/h1&gt;

&lt;p&gt;There are four main types of SQL joins&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Inner join&lt;/strong&gt; - returns only the records that have matching values in both tables.&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%2Ffrndr871k9ox7so1990f.jpg" 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%2Ffrndr871k9ox7so1990f.jpg" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Business Question:
&lt;/h3&gt;

&lt;p&gt;Which customers have placed orders?&lt;/p&gt;

&lt;p&gt;Assume we have two tables:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Customers&lt;/li&gt;
&lt;li&gt;Orders&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%2Fv9z4oilc7wn6swboy5td.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%2Fv9z4oilc7wn6swboy5td.png" alt=" " width="800" height="450"&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%2F8qpy1hb5ewuodct95gj6.jpg" 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%2F8qpy1hb5ewuodct95gj6.jpg" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To answer this question, you'd write this query&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;customer_id&lt;/span&gt;&lt;span class="p"&gt;,&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_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="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;INNER&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;The query will return this result&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%2Ftvhhm0n2m7xlyej6bebs.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%2Ftvhhm0n2m7xlyej6bebs.png" alt=" " width="532" height="167"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Tim Adagala is not in the output because he has no order&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Left join&lt;/strong&gt;- returns all records on the left table and only matching rows on the right table&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%2Fd3qapsmew4mmvp7qy2ld.jpg" 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%2Fd3qapsmew4mmvp7qy2ld.jpg" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Business Question:
&lt;/h3&gt;

&lt;p&gt;Show all customers, even those who have yet to order.&lt;/p&gt;

&lt;p&gt;The query will be:&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;customer_id&lt;/span&gt;&lt;span class="p"&gt;,&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_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="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;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;The output&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%2Fom25mgi52v78ha3le51f.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%2Fom25mgi52v78ha3le51f.png" alt=" " width="585" height="217"&gt;&lt;/a&gt;&lt;br&gt;
The NULL tells you that Tim Adagala exists but he has not placed any order.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Right join&lt;/strong&gt;- returns all records on the right table and only matching rows on the left table.
It is essentially the reverse of a LEFT JOIN.&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%2Fsyhmqja9etkd1z1yv12x.jpg" 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%2Fsyhmqja9etkd1z1yv12x.jpg" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Business Question: Show all orders and their customers (if available).
&lt;/h3&gt;

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

&lt;ul&gt;
&lt;li&gt;Keep all orders&lt;/li&gt;
&lt;li&gt;Attach customer info if it exists&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Query:&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;customer_id&lt;/span&gt;&lt;span class="p"&gt;,&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_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="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;Output:&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%2Fivr1271u19nawg7dakop.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%2Fivr1271u19nawg7dakop.png" alt=" " width="535" height="202"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Full join&lt;/strong&gt; - returns all records on both tables regardless of whether there is a match or not&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%2Fuheba063yeo91dedod74.jpg" 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%2Fuheba063yeo91dedod74.jpg" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Business Question:
&lt;/h3&gt;

&lt;p&gt;Show all customers and all orders, including unmatched records on both sides.&lt;/p&gt;

&lt;p&gt;Query:&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;customer_id&lt;/span&gt;&lt;span class="p"&gt;,&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_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="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;Output&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%2Foyb55k51wfzyvvlkb0fj.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%2Foyb55k51wfzyvvlkb0fj.png" alt=" " width="528" height="183"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Window Functions
&lt;/h2&gt;

&lt;p&gt;A window function is a function that perfoms calculation across a set of rows related to the current row, without collapsing the result into a single row like &lt;strong&gt;GROUP BY&lt;/strong&gt; clause.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;syntax of a window function&lt;/strong&gt;&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="n"&gt;function_name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;column&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="k"&gt;column&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;column&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;OVER()&lt;/strong&gt;: Defines the window of rows to operate on.This is mandatory&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PARTITION BY&lt;/strong&gt; (Optional): Divides data into logical groups.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ORDER BY&lt;/strong&gt; (Sometimes Required): Defines the order of rows inside each partition.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;When is ORDER BY Required?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;ORDER BY is required for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ranking functions (ROW_NUMBER(), RANK(), DENSE_RANK(), NTILE())&lt;/li&gt;
&lt;li&gt;Navigation functions (LAG(), LEAD())&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;-Running totals&lt;/p&gt;

&lt;p&gt;It is not required for simple aggregates like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SUM&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;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;department&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;Categories of Window Functions&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Aggregate window functions - uses normal aggregate functions with OVER()
Examples: SUM(), AVG(), COUNT(), MIN(), MAX()&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;: SUM(salary) OVER (PARTITION BY department)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ranking functions
Examples

&lt;ul&gt;
&lt;li&gt;ROW_NUMBER():Always unique numbering&lt;/li&gt;
&lt;li&gt;RANK():Skips ranks when ties occur&lt;/li&gt;
&lt;li&gt;DENSE_RANK():No skipped ranks&lt;/li&gt;
&lt;li&gt;NTILE():Divides rows into n groups
Example:
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&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;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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Value/Navigation functions: Used to access data from another row.
Examples: LAG(), LEAD(), FIRST_VALUE(), LAST_VALUE()
Example:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;LAG&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;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;hire_date&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>beginners</category>
      <category>database</category>
      <category>sql</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How Analysts Translate Messy Data, DAX, and Dashboards into Action Using Power BI</title>
      <dc:creator>Musungu (Ruth) Ambogo</dc:creator>
      <pubDate>Sat, 07 Feb 2026 16:50:40 +0000</pubDate>
      <link>https://forem.com/ambogo2/how-analysts-translate-messy-data-dax-and-dashboards-into-action-using-power-bi-4lfd</link>
      <guid>https://forem.com/ambogo2/how-analysts-translate-messy-data-dax-and-dashboards-into-action-using-power-bi-4lfd</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;When it comes to data analysis, there are many tools to choose from and Power BI is one of the most powerful. &lt;strong&gt;Power BI&lt;/strong&gt; is a business intelligence tool that helps analysts transform raw data into meaningful insights that support better decision making.&lt;br&gt;
In this article, we’ll walk through the journey of using Power BI, from &lt;strong&gt;importing and preparing&lt;/strong&gt; data to &lt;strong&gt;building an interactive&lt;/strong&gt;, visually compelling dashboard. You’ll see how messy data can be structured, analyzed, and presented in a way that tells a clear story and drives informed business decisions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting and Cleaning Data in Power BI
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Get the dataset&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The first step in any powerbi project is to load the dataset&lt;br&gt;
PowerBI allows you to connect to different data sources such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Excel files&lt;/li&gt;
&lt;li&gt;CSV files&lt;/li&gt;
&lt;li&gt;Databases&lt;/li&gt;
&lt;li&gt;Cloud sources
&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%2Fuww4ehvxwj4b64eibf0p.png" alt=" " width="800" height="450"&gt;
Once connected, the data is brought into Power Query Editor, where preparation begins&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2.Cleaning the data using power query&lt;/strong&gt;&lt;br&gt;
Once you've loaded the dataset, the next step usually is &lt;strong&gt;cleaning&lt;/strong&gt;. To get the most accurate results this step is a must&lt;br&gt;
In powerbi, we use &lt;strong&gt;powerquery&lt;/strong&gt; to do the clean and prepare data before analysis&lt;br&gt;
To get powerquery editor,go to the home tab and click transform data. This should open the editor&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%2F8fxm3cremu0apzppfen1.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%2F8fxm3cremu0apzppfen1.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Common data issues you may encounter&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Duplicates:&lt;/strong&gt; repeated rows can lead to misleading analysis&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Incorrect data type:&lt;/strong&gt; Numbers stored as text, dates stored as strings, etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Missing values:&lt;/strong&gt; Blanks may affect analysis&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unnecessary columns:&lt;/strong&gt; Fields that are not relevant to your analysis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Date formatting:&lt;/strong&gt; if dates are not in the desired format, or you need to extract a specific date&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So to illustrate this we will use an example&lt;br&gt;
&lt;strong&gt;Example :&lt;/strong&gt; Fixing an Incorrect Data Type&lt;br&gt;
A column that contains numbers is formatted as a text&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;select the column&lt;/li&gt;
&lt;li&gt;Click the data type icon at the top (e.g., ABC, 123, Date)&lt;/li&gt;
&lt;li&gt;Choose the right data type
&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%2Fqgwkaz1qzmdcd3rgl6qg.jpg" alt=" " width="800" height="450"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Using DAX to Add Intelligence
&lt;/h2&gt;

&lt;p&gt;Once data is cleaned, DAX is used to create calculations and business logic&lt;br&gt;
Key uses of DAX include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Measures (most important for analysis)&lt;/li&gt;
&lt;li&gt;KPIs (Key Performance Indicators)&lt;/li&gt;
&lt;li&gt;Time intelligence (YTD, MTD, growth %)&lt;/li&gt;
&lt;li&gt;Applying business rules and logic
DAX (Data Analysis Expressions) is a formula language used to create calculations, measures, and business logic in Power BI. It contains functions that help analysts analyze data, calculate totals, averages, percentages, growth rates, and more.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Types of DAX Functions
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Aggregate functions&lt;/strong&gt;
Used to summarize data.
Examples: &lt;code&gt;SUM&lt;/code&gt;, &lt;code&gt;AVERAGE&lt;/code&gt;, &lt;code&gt;COUNT&lt;/code&gt;, &lt;code&gt;MIN&lt;/code&gt;, &lt;code&gt;MAX&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Logical Functions&lt;/strong&gt;
Used for conditions and decision-making.
Examples: &lt;code&gt;IF&lt;/code&gt;, &lt;code&gt;SWITCH&lt;/code&gt;, &lt;code&gt;AND&lt;/code&gt;, &lt;code&gt;OR&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Date and time functions&lt;/strong&gt;
Used for time-based analysis.
Examples: &lt;code&gt;TODAY&lt;/code&gt;, &lt;code&gt;YEAR&lt;/code&gt;, &lt;code&gt;MONTH&lt;/code&gt;, &lt;code&gt;DATE&lt;/code&gt;, &lt;code&gt;EOMONTH&lt;/code&gt;, &lt;code&gt;DATEDIFF&lt;/code&gt;, &lt;code&gt;DATEADD&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Text functions&lt;/strong&gt;
Used to manipulate text.
Examples: &lt;code&gt;LEFT&lt;/code&gt;, &lt;code&gt;RIGHT&lt;/code&gt;, &lt;code&gt;MID&lt;/code&gt;, &lt;code&gt;CONCATENATE&lt;/code&gt;, &lt;code&gt;UPPER&lt;/code&gt;, &lt;code&gt;LOWER&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Table &amp;amp; Filter functions&lt;/strong&gt;
Used to modify filter context or return filtered tables.
Examples: &lt;code&gt;FILTER&lt;/code&gt;, &lt;code&gt;ALL&lt;/code&gt;, &lt;code&gt;CALCULATE&lt;/code&gt;,&lt;code&gt;VALUES&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  How Values Are Created Using DAX
&lt;/h3&gt;

&lt;p&gt;In Power BI, DAX is used to create new values in three main ways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Measures&lt;/strong&gt;
A &lt;em&gt;measure&lt;/em&gt; is a calculation that is performed on the fly, depending on what is shown in a visual.
Measures do not store values in the table — they calculate results dynamically
Example: calculating the total revenue of all transactions using &lt;code&gt;SUMX&lt;/code&gt; function&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;SUMX&lt;/code&gt; is used when calculation must be done row by row before summing.&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%2Fgxs3ys5jlm7bpx7f3nd9.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%2Fgxs3ys5jlm7bpx7f3nd9.png" alt=" " width="800" height="41"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Calculated columns&lt;/strong&gt; &lt;br&gt;
A calculated column creates a new column in a table using DAX.&lt;br&gt;
The result is calculated row by row and stored in the model.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Example: &lt;strong&gt;Creating a column to classify age&lt;/strong&gt; into different age groups using &lt;code&gt;IF&lt;/code&gt; function&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%2F7ezlxqorx2wol2vy1t5r.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%2F7ezlxqorx2wol2vy1t5r.png" alt=" " width="800" height="53"&gt;&lt;/a&gt;&lt;br&gt;
This adds a new column to the customers table&lt;br&gt;
Its best for &lt;strong&gt;classification&lt;/strong&gt; and &lt;strong&gt;grouping&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Tables&lt;/strong&gt;
DAX can also create entirely new tables.
Used when you need:

&lt;ul&gt;
&lt;li&gt;Summary tables&lt;/li&gt;
&lt;li&gt;Custom date tables useful for time analysis&lt;/li&gt;
&lt;li&gt;Special reporting structures
Example: Creating a custom date table
In the table view,go to Table tools and click on New table&lt;/li&gt;
&lt;/ul&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%2Ftgz9xtoem1a4vgkw0m3z.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%2Ftgz9xtoem1a4vgkw0m3z.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copy and paste the code below into the formula bar&lt;br&gt;
&lt;code&gt;&lt;br&gt;
Date Table = &lt;br&gt;
ADDCOLUMNS(&lt;br&gt;
    CALENDAR(&lt;br&gt;
        MIN(transactions[transaction_date]),&lt;br&gt;
        MAX(transactions[transaction_date])&lt;br&gt;
    ),&lt;br&gt;
    "Year", YEAR([Date]),&lt;br&gt;
    "Month Name", FORMAT([Date], "MMMM"),&lt;br&gt;
    "Month Number", MONTH([Date]),&lt;br&gt;
    "Quarter", "Q" &amp;amp; FORMAT([Date], "Q")&lt;br&gt;
)&lt;br&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%2Fcmf8r3pphsnpfbjif9xl.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%2Fcmf8r3pphsnpfbjif9xl.png" alt=" " width="800" height="212"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This code will create a new table with dates for every day between a period of first transaction and last transaction, also add separate columns that identify month, year, quarter, week &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%2Fc0o1gf4xhhdrq286d3tv.jpg" 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%2Fc0o1gf4xhhdrq286d3tv.jpg" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you go to the model view, you will see a date table, now simply create a one to many relationship with the fact table in this case(transaction table)&lt;br&gt;
More about creating relationships below..&lt;/p&gt;

&lt;h2&gt;
  
  
  Data Modeling –&amp;gt; Building Relationships
&lt;/h2&gt;

&lt;p&gt;Data modeling involves creating relationships between tables. A well structured model ensures accurate calculations and efficient reporting.&lt;/p&gt;

&lt;p&gt;For example: An ecommerce dataset with two tables(transactions table as a fact table and customer table as a dimension table)forming a structure called a &lt;strong&gt;star schema&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To create relationship between the two, we use &lt;em&gt;model view&lt;/em&gt; in PowerBI&lt;/li&gt;
&lt;li&gt;The model view shows all your tables as boxes with their columns as shown below
&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%2F4xzuoyfh15kv3dixj6eo.png" alt=" " width="800" height="386"&gt;
&lt;/li&gt;
&lt;li&gt;To create a relationship between the two tables:

&lt;ul&gt;
&lt;li&gt;find the Customer_id column in the Customer table&lt;/li&gt;
&lt;li&gt;Drag Customer_id and drop it onto Customer_id in the Transactions table&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;This opens a dialog box to create relationship.&lt;/li&gt;

&lt;li&gt;From the dialog box:

&lt;ul&gt;
&lt;li&gt;Pick the common columns for both tables which is the Customer_id&lt;/li&gt;
&lt;li&gt;And Cardinality as : One-to-Many (1 → ∞) i.e one customer can have many transactions
-Then press OK to create a reltionship
&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%2Fpt1yf3ecdkyodk5f95h2.jpg" alt=" " width="800" height="450"&gt;
The model now looks like this
&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%2Fzsqzoiqeg3p3foa82ru2.jpg" alt=" " width="800" height="450"&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Creating Visuals and Dashboards
&lt;/h2&gt;

&lt;p&gt;To perfom analysis, we use charts  and visuals to represent data in a way that is easier to understand&lt;br&gt;
commonly used visuals include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Bar chart/column chart&lt;/strong&gt;:used to compare values across categories (e.g., You want to compare Revenue by payment method)&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%2Feqfu9drxx8mw0awufwex.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%2Feqfu9drxx8mw0awufwex.png" alt=" " width="297" height="217"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;line chart&lt;/strong&gt;:- shows trends over time
Used when your X-axis is time (date, month, year).
Example: store revenue by month&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%2Fo9a6cmdet6xhzw8hfukn.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%2Fo9a6cmdet6xhzw8hfukn.png" alt=" " width="336" height="268"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Pie/Donut Charts&lt;/strong&gt;:- shows part to whole relationships&lt;br&gt;
Best when you have few categories (3–5 max)&lt;br&gt;
Example:Revenue distribution by gender&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%2Ftwi3j4zahp8p9lvykmf1.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%2Ftwi3j4zahp8p9lvykmf1.png" alt=" " width="402" height="233"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Tables and matrices&lt;/strong&gt;:- shows detailed data inform of a summary table&lt;br&gt;
&lt;strong&gt;Tables&lt;/strong&gt; only show simple rows and columns ie only one category wheares &lt;strong&gt;matrices&lt;/strong&gt; dispays more than one category&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example: A table showing summaries of product_id and revenue&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%2Fdud3cdhyeeoj8el5atyc.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%2Fdud3cdhyeeoj8el5atyc.png" alt=" " width="236" height="217"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scatter plot&lt;/strong&gt;:-Shows relationship between two &lt;em&gt;numeric&lt;/em&gt; variables&lt;br&gt;
Helps find patterns, clusters, or outliers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cards&lt;/strong&gt;:- Display key metrics (KPIs)&lt;br&gt;
Shows a single important number.&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%2F1m1pq3w0vupmr9n5hg5l.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%2F1m1pq3w0vupmr9n5hg5l.png" alt=" " width="783" height="147"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;combo charts&lt;/strong&gt;:- combines two charts eg a column chart and a line chart&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Map:- Shows geographic data&lt;br&gt;
Used when location matters.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Funnel&lt;/strong&gt;:- Shows stages in a process where values decreases at each step&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Slicers&lt;/strong&gt;:- these acts as interactive filters on a dashboard&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Dashboard
&lt;/h3&gt;

&lt;p&gt;A dashboard is a collection of visual elements that display key information in one place&lt;br&gt;
What makes a good dashboard design:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Visual hierarchy: Place KPIs and most important metrics at the top&lt;/li&gt;
&lt;li&gt;KPI placement&lt;/li&gt;
&lt;li&gt;Consistent scales&lt;/li&gt;
&lt;li&gt;Avoid clutter&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example of a Dashboard&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%2Furrnkxfaxzls7c8loe1e.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%2Furrnkxfaxzls7c8loe1e.png" alt=" " width="800" height="464"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Finding Insights
&lt;/h2&gt;

&lt;p&gt;After building visuals, patterns start to appear:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which products perform best&lt;/li&gt;
&lt;li&gt;Seasonal trends&lt;/li&gt;
&lt;li&gt;Underperforming regions&lt;/li&gt;
&lt;li&gt;Customer behavior&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Turning Insights into Decisions
&lt;/h2&gt;

&lt;p&gt;This is where Power BI delivers real value. Businesses can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adjust pricing strategies&lt;/li&gt;
&lt;li&gt;Improve marketing focus&lt;/li&gt;
&lt;li&gt;Optimize inventory&lt;/li&gt;
&lt;li&gt;Track performance goals&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Power BI is more than just &lt;strong&gt;charts&lt;/strong&gt; and &lt;strong&gt;dashboards&lt;/strong&gt;. It is a complete system for transforming messy data into structured insights that guide real-world decisions. By combining &lt;strong&gt;data cleaning&lt;/strong&gt;, &lt;strong&gt;DAX calculations&lt;/strong&gt;, &lt;strong&gt;data modeling&lt;/strong&gt;, and &lt;strong&gt;visualization&lt;/strong&gt;, analysts can turn raw information into powerful business intelligence.&lt;/p&gt;

</description>
      <category>data</category>
      <category>tutorial</category>
      <category>powerbi</category>
    </item>
    <item>
      <title>Schemas and Data Modelling in Power BI</title>
      <dc:creator>Musungu (Ruth) Ambogo</dc:creator>
      <pubDate>Sun, 01 Feb 2026 16:02:26 +0000</pubDate>
      <link>https://forem.com/ambogo2/schemas-and-data-modelling-in-power-bi-37c7</link>
      <guid>https://forem.com/ambogo2/schemas-and-data-modelling-in-power-bi-37c7</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Data modelling&lt;/strong&gt; is the process of structuring data into tables and defining relationships between them so it can be efficiently analyzed and produce accurate insights.&lt;br&gt;
&lt;strong&gt;A schema&lt;/strong&gt; refers to the logical structure that organizes how these tables are arranged and connected within a data model.&lt;br&gt;
In this article, we will be exploring data modelling and schemas in PowerBI and understand how they help build efficient and reliable reports.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding Tables in a Data Model
&lt;/h2&gt;

&lt;p&gt;When data is loaded into Power BI, it doesn’t just sit there as one big sheet. It’s organized into tables, and each table has a specific role in the model.&lt;br&gt;
Tables hold different types of information. Some store measurable values like sales and revenue, while others store descriptive information like customer names, product categories, or dates. Understanding the purpose of each table is the first step to building a strong data model.&lt;/p&gt;

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

&lt;p&gt;This is one of the most important concepts in data modelling.&lt;/p&gt;

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

&lt;p&gt;Fact tables contain the numbers you want to analyze. These are measurable, numeric values.&lt;/p&gt;

&lt;p&gt;Example: Lets say we have a &lt;em&gt;sales table&lt;/em&gt; as a fact table, the values it could contain are&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sales Amount&lt;/li&gt;
&lt;li&gt;Quantity Sold&lt;/li&gt;
&lt;li&gt;Profit&lt;/li&gt;
&lt;li&gt;Number of Orders&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Dimension tables provide descriptive information about the data in the facts table.&lt;/p&gt;

&lt;p&gt;Example: For the sales fact table, dimension tables could be&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Customer table&lt;/strong&gt;- answers who made a transaction&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Product table&lt;/strong&gt; - contains information of the products availble&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Date table&lt;/strong&gt; - when the sale happened&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;store table&lt;/strong&gt; - which store did the sale happen&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is a schema?
&lt;/h2&gt;

&lt;p&gt;A schema is the structure of how tables are arranged and related in a database or data model.&lt;/p&gt;

&lt;p&gt;Components of a schema&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Tables&lt;/em&gt; – Where data is stored&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Columns (Fields)&lt;/em&gt; – The attributes inside tables&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Data Types&lt;/em&gt; – Define what kind of data each column holds (text, number, date, etc.)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Relationships&lt;/em&gt; – How tables connect to each other&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Keys&lt;/em&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Primary keys&lt;/em&gt; (unique identifiers)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Foreign keys&lt;/em&gt; (used to link tables)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Types of schemas&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1.&lt;strong&gt;Star Schema&lt;/strong&gt; - has one central fact table surrounded by multiple dimension tables&lt;br&gt;
Looks like a star when viewed in the model&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%2Fz6wdqu7pi2s9y3x8z4uc.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%2Fz6wdqu7pi2s9y3x8z4uc.png" alt=" " width="800" height="494"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2.&lt;strong&gt;Snowflakes Schema&lt;/strong&gt; - This is like a star schema, but dimension tables are split into more sub dimensions&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%2Fq4r1omx5h3k8apfcqazv.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%2Fq4r1omx5h3k8apfcqazv.png" alt=" " width="800" height="552"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Schema Relationships
&lt;/h2&gt;

&lt;p&gt;PowerBI &lt;em&gt;model view&lt;/em&gt; provides a way of establishing relationships between tables so that data can flow correctly across the model.&lt;br&gt;
Relationships explains how tables are connected logically to one another&lt;br&gt;
The connection is done using keys, either:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Primary key&lt;/strong&gt;: unique identifier&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Foreign key&lt;/strong&gt;: references a primary key in another table&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Types of relationships
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1.One-to-One (1:1)&lt;/strong&gt;&lt;br&gt;
Each record in &lt;em&gt;Table A&lt;/em&gt; matches only one value in &lt;em&gt;Table B&lt;/em&gt; and vice versa&lt;br&gt;
Example: A Person can have one National ID, and each National ID belongs to only one Person.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.One-to-Many (1:*)&lt;/strong&gt;&lt;br&gt;
This is the most common type.&lt;br&gt;
One value in a &lt;em&gt;dimension table&lt;/em&gt; connects to many rows in a fact table.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Sales table (Fact table)&lt;/li&gt;
&lt;li&gt;Product table, Customer table and date table are all dimension tables&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One Product → can appear in many sales transactions&lt;br&gt;
One customer -&amp;gt; can make many purchases&lt;br&gt;
One date-&amp;gt; Many sales transactions can happen on the same date.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.Many-to-One (*:1)&lt;/strong&gt;&lt;br&gt;
This is the same as one-to-many but viewed from the other side.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.Many-to-Many (:)&lt;/strong&gt;&lt;br&gt;
Both tables contain duplicate values. This can work but should be used carefully because it may cause ambiguous filtering.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Students table&lt;/li&gt;
&lt;li&gt;StudentCourses table&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;How it works:&lt;br&gt;
One student → many records in StudentCourses&lt;br&gt;
One course → many records in StudentCourses&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Data Modeling Mistakes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Using one big flat table for everything&lt;/li&gt;
&lt;li&gt;Creating too many many-to-many relationships&lt;/li&gt;
&lt;li&gt;Not using a proper Date table&lt;/li&gt;
&lt;li&gt;Leaving unused columns in the model&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Data modelling is the foundation of every good Power BI report. Visuals may be what users see, but the structure behind the scenes is what makes everything work correctly.&lt;br&gt;
By understanding schemas, fact and dimension tables, and relationships, you build reports that are faster, cleaner, and easier to maintain&lt;/p&gt;

&lt;p&gt;&lt;em&gt;That's all for now, happy modelling&lt;/em&gt;&lt;/p&gt;

</description>
      <category>datamodelling</category>
      <category>schema</category>
    </item>
    <item>
      <title>Introduction to MS Excel for Data Analytics</title>
      <dc:creator>Musungu (Ruth) Ambogo</dc:creator>
      <pubDate>Sun, 25 Jan 2026 17:02:30 +0000</pubDate>
      <link>https://forem.com/ambogo2/introduction-to-ms-excel-for-data-analytics-1pjn</link>
      <guid>https://forem.com/ambogo2/introduction-to-ms-excel-for-data-analytics-1pjn</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Excel is a simple yet powerful tool used by data analysts to perform various tasks such as data cleaning and preparation, data analysis, and data visualization. This article will help beginners understand how Excel can be used for data analytics and build a strong foundation for further learning.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Data Analytics?
&lt;/h2&gt;

&lt;p&gt;Data analytics is the process of collecting, cleaning, and analyzing data to extract insights to support better decision-making, leading to more effective strategies and actions.&lt;br&gt;
The four types of data analytics are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Descriptive Analytics:&lt;/strong&gt; answers the question &lt;em&gt;"What has happened?"&lt;/em&gt; by summarizing historical data using reports, charts, and dashboards&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prescriptive Analytics:&lt;/strong&gt; Answers the question &lt;em&gt;"What should be done?&lt;/em&gt;" by recommending action steps to take to achieve a desired outcome&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Diagnostic Analytics:&lt;/strong&gt; Answers the question &lt;em&gt;"Why did it happen?"&lt;/em&gt; by analyzing the past data to identify patterns, trends, and relationships in data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Predictive Analytics:&lt;/strong&gt; Answers the question &lt;em&gt;"What is likely to happen?&lt;/em&gt;" by using historical data to predict future outcomes, e.g., creating models to predict an outcome&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Overview of Excel Interface
&lt;/h2&gt;

&lt;p&gt;Microsoft Excel is a spreadsheet application used to organize, analyze, and visualize data. Its interface consists of several key components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Workbook:&lt;/strong&gt; An Excel file containing more than one worksheet&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Worksheet:&lt;/strong&gt; an individual sheet where data is entered and analyzed&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Columns:&lt;/strong&gt; vertical sections labeled with letters (A, B,...) used to organize data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rows:&lt;/strong&gt; horizontal sections labeled with numbers (1, 2, ...) where records are stored&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cell:&lt;/strong&gt; An intersection of a row and a column (A1, B1,...)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Range:&lt;/strong&gt; A group of two or more selected cells, e.g., A1:A10, represents a range of cells in column A&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ribbon and key tabs:&lt;/strong&gt; A toolbar at the top of Excel that contains commands grouped into tabs such as &lt;strong&gt;Home, Insert, Formulas&lt;/strong&gt;, and &lt;strong&gt;Data.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Formula:&lt;/strong&gt; An equation that performs calculations on values. Formulas use arithmetic operations and must start with =&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Filter:&lt;/strong&gt; A tool used to show or hide specific rows based on specified criteria&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sort:&lt;/strong&gt; A tool used to arrange data in either ascending or descending order&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Below is an overview of the Excel interface showing key components. &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%2Fhbaq57u4r6yt96nn5dqe.jpg" 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%2Fhbaq57u4r6yt96nn5dqe.jpg" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Preparing data in Excel
&lt;/h2&gt;

&lt;p&gt;Before analyzing any dataset, it is important to prepare it properly&lt;br&gt;
This includes importing, cleaning, and formatting the data so it’s ready for analysis.&lt;/p&gt;

&lt;h3&gt;
  
  
  Importing data
&lt;/h3&gt;

&lt;p&gt;Excel allows you to import data from multiple sources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CSV files&lt;/li&gt;
&lt;li&gt;Text files&lt;/li&gt;
&lt;li&gt;Databases&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Data cleaning and preparation
&lt;/h3&gt;

&lt;p&gt;Proper cleaning ensures accuracy in your analysis&lt;br&gt;
To perform data cleaning, you should:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Format data types:&lt;/strong&gt; data can be represented in different ways, as text, number, date, or currency
Ensure that each column is formatted correctly so that calculations and analysis work properly.
How to do it:

&lt;ul&gt;
&lt;li&gt;Select the column.&lt;/li&gt;
&lt;li&gt;Right-click → Format Cells → Choose the appropriate type (Number, Date, Text, Currency).&lt;/li&gt;
&lt;/ul&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%2Fzoyniq9rfjpysj7sn7qd.jpg" 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%2Fzoyniq9rfjpysj7sn7qd.jpg" alt=" " width="800" height="392"&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%2Ffkskbvcnrvutjomnpfv0.jpg" 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%2Ffkskbvcnrvutjomnpfv0.jpg" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Remove duplicates:&lt;/strong&gt; use a unique column in the data set (like Customer ID or Email) to check for duplicates and remove them if found.
How to do it:

&lt;ul&gt;
&lt;li&gt;Select the column or the entire dataset.&lt;/li&gt;
&lt;li&gt;Go to Data → Remove Duplicates.&lt;/li&gt;
&lt;li&gt;Choose the column(s) to check for duplicates and click OK.&lt;/li&gt;
&lt;/ul&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%2Fpkbi87fyu48g1ww2f3lp.jpg" 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%2Fpkbi87fyu48g1ww2f3lp.jpg" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Handle missing values:&lt;/strong&gt; Blank cells or missing data can affect calculations and analysis. You can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fill missing values with averages, zeros, or default values&lt;/li&gt;
&lt;li&gt;Delete rows with critical missing data&lt;/li&gt;
&lt;li&gt;Leave them blank if appropriate
How to do it:&lt;/li&gt;
&lt;li&gt;Use formulas like IF(ISBLANK(B2), 0, B2)&lt;/li&gt;
&lt;li&gt;Or manually fill/delete blank cells&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Data validation:&lt;/strong&gt; restricts the data type that can be entered in a cell&lt;br&gt;
How to do it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select the cells.&lt;/li&gt;
&lt;li&gt;Go to Data → Data Validation → List.&lt;/li&gt;
&lt;li&gt;Enter allowed values (e.g., furniture, office supplies, technology).&lt;/li&gt;
&lt;/ul&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%2F9s1yzxnkgup433tiwmjz.jpg" 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%2F9s1yzxnkgup433tiwmjz.jpg" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
In a “Category” column, only the listed categories can be entered, preventing typos like “offce”&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Text-to-Columns:&lt;/strong&gt; a tool used to split text into multiple columns based on a delimiter
How to do it:

&lt;ul&gt;
&lt;li&gt;Select the column with text.&lt;/li&gt;
&lt;li&gt;Go to Data → Text to Columns → Delimited.&lt;/li&gt;
&lt;li&gt;Choose the delimiter and finish the wizard.&lt;/li&gt;
&lt;/ul&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%2Fqqvm3hx2i6g7ymrtygt1.jpg" 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%2Fqqvm3hx2i6g7ymrtygt1.jpg" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
A “Full Name” column contains "Mary Jane". Using Text to Columns with a space delimiter splits it into "Mary" (first name) and "Jane" (last name).&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%2F36asgt73wcidh5i1p441.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%2F36asgt73wcidh5i1p441.png" alt=" " width="788" height="527"&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%2F6t8ubx94xdnbaiovtbn3.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%2F6t8ubx94xdnbaiovtbn3.png" alt=" " width="441" height="215"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Find &amp;amp; Replace:&lt;/strong&gt; Allows you to locate specific text or values within a worksheet and replace them with other text or values.
How to do it:

&lt;ul&gt;
&lt;li&gt;Press Ctrl + H.&lt;/li&gt;
&lt;li&gt;Enter the value to find and the value to replace it with.&lt;/li&gt;
&lt;li&gt;Click Replace All.
Example:
Replace all "NYC" entries with "New York City" to ensure consistency in a city column.&lt;/li&gt;
&lt;/ul&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%2F5evh6e807dkbpf0ivx4m.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%2F5evh6e807dkbpf0ivx4m.png" alt=" " width="800" height="246"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Conditional Formatting:&lt;/strong&gt; highlights values in a range based on the condition in the cell to make patterns, trends, or outliers visible.
How to do it:

&lt;ul&gt;
&lt;li&gt;Select the range.&lt;/li&gt;
&lt;li&gt;Go to Home → Conditional Formatting → Highlight Cells Rules.&lt;/li&gt;
&lt;li&gt;Choose a condition (e.g., salary greater than 10,000) and select a highlight color.&lt;/li&gt;
&lt;/ul&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%2Fnm343o63swwaif9rz626.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%2Fnm343o63swwaif9rz626.png" alt=" " width="800" height="450"&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%2Fe5wcpi2cb4x8hihxr8ld.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%2Fe5wcpi2cb4x8hihxr8ld.png" alt=" " width="87" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Excel functions for data analysis
&lt;/h2&gt;

&lt;p&gt;Excel functions are built-in formulas that help summarize, analyze data, and automate tasks. &lt;br&gt;
Common categories&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Aggregate functions:&lt;/strong&gt; used to summarize data

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SUM():&lt;/strong&gt; Finds the sum of values in a range
=SUM(A1:A6) This adds numbers from cell A1 to A6&lt;/li&gt;
&lt;/ul&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%2F4xv0pqvyau8bwyvzo0c2.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%2F4xv0pqvyau8bwyvzo0c2.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AVERAGE():&lt;/strong&gt; Calculates mean
=AVERAGE(A1:A6) This returns a mean from cell A1 to A6&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%2Ffh9rdbora58lf33w4l16.jpg" 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%2Ffh9rdbora58lf33w4l16.jpg" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MIN():&lt;/strong&gt; Finds the smallest number in a range&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MAX():&lt;/strong&gt; Finds the largest number in a range&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;COUNT():&lt;/strong&gt; counts the number of cells that contain numeric values.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;COUNTIF():&lt;/strong&gt; counts cells that meet one condition&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;COUNTA():&lt;/strong&gt; counts cells that are not empty (text or numbers)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;2.&lt;strong&gt;Logical functions:&lt;/strong&gt; used to automate decision-making&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;IF():&lt;/strong&gt; performs a logical test and returns one value for TRUE and another value for FALSE&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%2Fmzioftbnt8eo0cxgtuyh.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%2Fmzioftbnt8eo0cxgtuyh.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AND():&lt;/strong&gt; Returns TRUE if all conditions are met.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OR():&lt;/strong&gt; Returns TRUE if at least one condition is met.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Creating Categories Using AND &amp;amp; OR
&lt;/h3&gt;

&lt;p&gt;Logical functions are commonly used to create categories in data analytics.&lt;br&gt;
Example: &lt;strong&gt;Employee Performance Categorization&lt;/strong&gt;&lt;br&gt;
=IF(AND(D2&amp;gt;=70,E2&amp;gt;=5),"High Performer","Needs Improvement")&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%2Fcwr0ahtuu4gs9j713ibz.jpg" 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%2Fcwr0ahtuu4gs9j713ibz.jpg" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
Meaning:&lt;br&gt;
An employee is a high performer only if both conditions are met.&lt;/p&gt;

&lt;p&gt;Example Using OR&lt;br&gt;
=IF(OR(D2&amp;gt;=7,E2&amp;gt;=8),"Eligible","Not Eligible")&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%2Fhy63hqyq3diq2a98edhn.jpg" 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%2Fhy63hqyq3diq2a98edhn.jpg" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Meaning:&lt;br&gt;
An employee is eligible if any one condition is met.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Text functions&lt;/strong&gt; are used to clean, format, and combine text data in Excel.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;TRIM(): Removes all leading and excess middle spaces in data.&lt;/li&gt;
&lt;li&gt;CONCAT(): connects data from different cells together&lt;/li&gt;
&lt;li&gt;UPPER(), LOWER(), PROPER(): Standardize text formatting.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Date and time functions&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;TODAY()&lt;/strong&gt;: Returns the current date.&lt;/li&gt;
&lt;li&gt;DATEDIF(): Calculates the difference between two dates&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;YEAR(), MONTH(), DAY()&lt;/strong&gt;: Extracts part of a date&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Lookup functions&lt;/strong&gt;&lt;br&gt;
Lookup functions are used to find and retrieve related data from another table based on a matching value.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;VLOOKUP()&lt;/strong&gt;: searches for a value in the first column of a table and returns a corresponding value from another column in the same row.
Syntax:
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
Where:&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lookup value&lt;/strong&gt;: The value you want to search for&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;table_array&lt;/strong&gt;: The table range containing the data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;col_index_num&lt;/strong&gt;: The column number (from the left) to return a value from&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;range_lookup&lt;/strong&gt; →

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;FALSE&lt;/strong&gt; = exact match (recommended for analytics)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TRUE&lt;/strong&gt; = approximate match&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Example: Get customer ID using row ID&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%2Fwr96b7u7zsz4w47jyfak.jpg" 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%2Fwr96b7u7zsz4w47jyfak.jpg" alt=" " width="800" height="450"&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%2Fv1iw94og5aa4rn4kxfop.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%2Fv1iw94og5aa4rn4kxfop.png" alt=" " width="690" height="86"&gt;&lt;/a&gt;&lt;br&gt;
The customer_id is &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%2Fawaw3zsx8wz9x39ftp8q.jpg" 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%2Fawaw3zsx8wz9x39ftp8q.jpg" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;XLOOKUP(): can look left or right. XLOOKUP replaces VLOOKUP and HLOOKUP.&lt;/li&gt;
&lt;li&gt;HLOOKUP(): searches for values horizontally across the first row and returns a value from a specified row&lt;/li&gt;
&lt;li&gt;INDEX + MATCH(): returns values from a specific position in a range&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Data Analysis using Pivot tables
&lt;/h2&gt;

&lt;p&gt;A pivot table is a data processing tool that allows you to create &lt;strong&gt;summaries&lt;/strong&gt; organized in a table&lt;br&gt;
With pivot tables, you can organize data by categories, perform calculations (sum, average, count), and easily spot trends.&lt;br&gt;
&lt;strong&gt;How to create a pivot table&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select your dataset.&lt;/li&gt;
&lt;li&gt;Go to Insert → Pivot Table.&lt;/li&gt;
&lt;li&gt;Choose where to place the pivot table (new worksheet recommended).&lt;/li&gt;
&lt;li&gt;Drag fields into Rows, Columns, Values, and Filters areas.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example of a marketing dataset&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F92f42wakr9xnj4xnw1pu.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%2F92f42wakr9xnj4xnw1pu.png" alt=" " width="800" height="383"&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%2Fih7y09nk0o34diai2dk8.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%2Fih7y09nk0o34diai2dk8.png" alt=" " width="563" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pivot table showing total amount spent by age group&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%2Fvvvmfhln8yo59qt86nel.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%2Fvvvmfhln8yo59qt86nel.png" alt=" " width="357" height="172"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Charts for visualizing pivot table summaries
&lt;/h2&gt;

&lt;p&gt;Charts make pivot table summaries easy to understand at a glance. &lt;br&gt;
Excel offers many chart types:&lt;br&gt;
1.&lt;strong&gt;Bar and Column Charts:&lt;/strong&gt; Bar charts compare values across categories horizontally, while column charts compare values across categories vertically&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%2Fzuir0npguyi7c8c5ew3g.jpg" 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%2Fzuir0npguyi7c8c5ew3g.jpg" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2.&lt;strong&gt;Pie chart:&lt;/strong&gt; shows proportions (in percentage) of a whole.&lt;br&gt;
In this example, the pie chart shows the distribution of the amount spent across different age groups.&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%2F2r7kbugl60tm45fq5vdy.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%2F2r7kbugl60tm45fq5vdy.png" alt=" " width="623" height="237"&gt;&lt;/a&gt; &lt;br&gt;
3.&lt;strong&gt;Line chart:&lt;/strong&gt; shows trends over time&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%2F64fuuvc83f46qvabnira.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%2F64fuuvc83f46qvabnira.png" alt=" " width="627" height="210"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4.&lt;strong&gt;Combo chart:&lt;/strong&gt; combines two different types of charts, e.g., a line chart and a bar chart&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%2Ftylcw19qlxl8q3z6wm1x.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%2Ftylcw19qlxl8q3z6wm1x.png" alt=" " width="800" height="188"&gt;&lt;/a&gt;&lt;br&gt;
5.&lt;strong&gt;Area Chart:&lt;/strong&gt; Visualize cumulative totals&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%2Ftvqigdvmk8fjg0znpjhu.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%2Ftvqigdvmk8fjg0znpjhu.png" alt=" " width="787" height="216"&gt;&lt;/a&gt;&lt;br&gt;
6.&lt;strong&gt;Treemap:&lt;/strong&gt; used for displaying hierarchical data using nested rectangles&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%2Fye8zsesx6u31wn325z6w.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%2Fye8zsesx6u31wn325z6w.png" alt=" " width="718" height="306"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to create a chart from a pivot table:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select the pivot table.&lt;/li&gt;
&lt;li&gt;Go to Insert → Recommended Charts (or choose a specific chart type).&lt;/li&gt;
&lt;li&gt;Customize chart titles, labels, and colors as needed.&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%2F9zbup7zw78j4qh4722v5.jpg" 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%2F9zbup7zw78j4qh4722v5.jpg" alt=" " width="800" height="450"&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%2Ftldow2ip1j91ly3m5f5r.jpg" 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%2Ftldow2ip1j91ly3m5f5r.jpg" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Building Dashboards
&lt;/h2&gt;

&lt;p&gt;Dashboards bring multiple pivot tables and charts together to provide an at-a-glance view of key metrics. &lt;br&gt;
Key elements of a dashboard:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Cards:&lt;/strong&gt; Display key metrics or KPIs (e.g., total sales, average age).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Slicers:&lt;/strong&gt; Used to filter data dynamically in pivot tables and charts.
Make dashboards interactive, allowing users to select categories like Region, Product, or Department.
&lt;strong&gt;Tip:&lt;/strong&gt; Use a &lt;strong&gt;categorical&lt;/strong&gt; column when creating a slicer (e.g., Product Category, Region)
How to add a slicer:&lt;/li&gt;
&lt;li&gt;Click on the pivot table.&lt;/li&gt;
&lt;li&gt;Go to PivotTable Analyze → Insert Slicer.&lt;/li&gt;
&lt;li&gt;Select the field(s) to filter and click OK&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chart visuals:&lt;/strong&gt; visuals generated from pivot tables&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Once you’ve created your pivot tables, pivot charts, and calculated metrics, you can build a dashboard by following these steps:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step-by-step process&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Create a New Worksheet&lt;br&gt;
Add a new worksheet and rename it “Dashboard.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Format the Background&lt;br&gt;
Select all cells and fill the background with a color (e.g., light gray) to give a professional look.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add a Header&lt;br&gt;
Insert a text box at the top of the sheet for the dashboard title.&lt;br&gt;
Format the font, size, and color to make it stand out.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add Cards or Metrics&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Insert additional text boxes to display key metrics or KPIs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy and paste metric values from pivot tables, or calculate them directly from the original dataset if needed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Format each card to match the theme of your dashboard.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add Pivot Charts&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy and paste pivot charts from the pivot tables onto the dashboard sheet.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Arrange charts according to the layout you want (e.g., top KPIs, bottom charts).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Format the charts (colors, fonts, legends) to match the overall theme.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add Slicers for Interactivity&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Insert slicers to allow users to filter data dynamically (e.g., by Product, Region, or Department).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Connect slicers to the pivot tables and charts so the dashboard updates automatically when a filter is applied.&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%2Fy38lu4f2k1xfeil3yrtl.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%2Fy38lu4f2k1xfeil3yrtl.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;Excel is a powerful tool for data analytics, allowing beginners to clean data, use pivot tables, create charts, and build interactive dashboards. By mastering these skills, you can extract insights, visualize trends, and make informed decisions. Practice on sample datasets to reinforce learning and gain confidence in using Excel for real-world analytics.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;You are on the right track. Keep learning, keep growing&lt;/em&gt;&lt;/p&gt;

</description>
      <category>analytics</category>
      <category>beginners</category>
      <category>datascience</category>
      <category>microsoft</category>
    </item>
    <item>
      <title>A Beginner's Guide on Git &amp; GitHub for Version Control</title>
      <dc:creator>Musungu (Ruth) Ambogo</dc:creator>
      <pubDate>Thu, 15 Jan 2026 19:16:05 +0000</pubDate>
      <link>https://forem.com/ambogo2/a-beginners-guide-on-git-github-for-version-control-17bd</link>
      <guid>https://forem.com/ambogo2/a-beginners-guide-on-git-github-for-version-control-17bd</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Version control helps developers track code changes and collaborate more effectively. Git and GitHub are tools that make this possible. &lt;strong&gt;Git&lt;/strong&gt; is a version control tool, while &lt;strong&gt;GitHub&lt;/strong&gt; is an online platform that stores projects in the cloud. In this article, you’ll learn the basic Git commands used for version control.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Download and install Git from the official &lt;a href="https://git-scm.com/install/windows" rel="noopener noreferrer"&gt;website&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;After installation, configure git with name and email address
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.name &lt;span class="s2"&gt;"Your Name"&lt;/span&gt;
git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.email &lt;span class="s2"&gt;"your.email@example.com
"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;On the other hand, for GitHub &lt;a href="https://github.com/signup" rel="noopener noreferrer"&gt;sign up&lt;/a&gt; for an account and set your profile&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Git Commands for Version Control
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;git init&lt;/strong&gt; - Initializes a directory so Git can start tracking changes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;git clone&lt;/strong&gt; - makes a copy of a GitHub repository to the local machine&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;git add&lt;/strong&gt; - adds files to the staging area&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;git commit&lt;/strong&gt; - saves the files that were added to the staging area &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;git push&lt;/strong&gt; - Sends recent commits from your local repository to GitHub.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;git pull&lt;/strong&gt; - Fetches and updates your local repository with changes from GitHub.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Initializing a git repository
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;We’ll use a simple example project called &lt;code&gt;my-first-repo&lt;/code&gt; to demonstrate how the Git commands work.
The steps will be as follows:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Create a project folder&lt;/li&gt;
&lt;li&gt;Navigate to the project folder&lt;/li&gt;
&lt;li&gt;Then initialize it&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%2Fm9e0qbvxdch8q69xkpbj.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%2Fm9e0qbvxdch8q69xkpbj.png" alt=" " width="800" height="168"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Once that's done, we will create a file in the project folder and check its status&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%2Fbrnwyscf3qa8lawpam2o.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%2Fbrnwyscf3qa8lawpam2o.png" alt=" " width="742" height="252"&gt;&lt;/a&gt;&lt;br&gt;
3.Adding files to staging&lt;br&gt;
Before saving changes, files must be added to the staging area.&lt;br&gt;
After that, commit the changes to save a snapshot of your work.&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%2Fzua4i88g7xdq6eyihh1t.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%2Fzua4i88g7xdq6eyihh1t.png" alt=" " width="506" height="207"&gt;&lt;/a&gt;&lt;br&gt;
4.Pushing to GitHub&lt;br&gt;
To share your project online, you need to push it to GitHub.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a new repository on GitHub&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%2Fwnmd5qo1nw58u1foyin8.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%2Fwnmd5qo1nw58u1foyin8.png" alt=" " width="800" height="257"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Copy the repository URL&lt;/li&gt;
&lt;li&gt;Connect your local project&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%2Fes4dq2iro3xppvqotfjg.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%2Fes4dq2iro3xppvqotfjg.png" alt=" " width="668" height="52"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Push your code
&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%2Fgya0a93ofg0zta98erfe.png" alt=" " width="651" height="267"&gt;
Your project is now available on GitHub&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Git Collaboration and Conflict resolution
&lt;/h2&gt;

&lt;p&gt;You can collaborate effectively on the same project by creating a branch on the repository. Branching allows each collaborator to work on the same project without conflict&lt;br&gt;
The commands that make this possible are&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;git branch&lt;/strong&gt;: to create a branch&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;git Checkout&lt;/strong&gt;: to switch to the created branch&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;git merge&lt;/strong&gt;: to merge the branch into main (or master).&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Git and GitHub are essential tools for every developer. With just a few basic commands, you can track your work, collaborate with others, and safely manage your code. By practicing commands like git init,git add,git commit, git push, and git pull, you’ll gain confidence in version control.&lt;/p&gt;

</description>
      <category>github</category>
      <category>versioncontrol</category>
      <category>git</category>
    </item>
    <item>
      <title>Building a Simple RESTful API Endpoint with Node.js and Express</title>
      <dc:creator>Musungu (Ruth) Ambogo</dc:creator>
      <pubDate>Fri, 17 Oct 2025 09:49:33 +0000</pubDate>
      <link>https://forem.com/ambogo2/building-a-simple-restful-api-endpoint-with-nodejs-and-express-1i5d</link>
      <guid>https://forem.com/ambogo2/building-a-simple-restful-api-endpoint-with-nodejs-and-express-1i5d</guid>
      <description>&lt;p&gt;I built a simple REST API that returns user information along with a random cat fact fetched from an external API. This is how I developed it.&lt;/p&gt;

&lt;p&gt;The project was part of the HNG Internship Stage 0 backend task. We were not restricted to any specific tech stack, so I chose Node.js, Express.js, and Axios, three powerful tools for building and consuming APIs.&lt;/p&gt;

&lt;h2&gt;
  
  
  What This API Does
&lt;/h2&gt;

&lt;p&gt;The endpoint /me returns a JSON response that includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;My user details (email, full name, and tech stack)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The current UTC timestamp&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A random cat fact fetched dynamically from the Cat Facts API&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here’s the structure of the response:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "status": "success",
  "user": {
    "email": "ruthambogo.ra@gmail.com",
    "name": "Musungu Ruth Ambogo",
    "stack": "Node.js/Express"
  },
  "timestamp": "2025-10-16T12:54:25.659Z",
  "fact": "Every year, nearly four million cats are eaten in Asia."
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Setting Up the Project
&lt;/h2&gt;

&lt;p&gt;To start, I created a new folder and initialized it with&lt;br&gt;
&lt;/p&gt;

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




```mkdir Dynamic-profile-api
cd Dynamic-profile-api
npm init -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then I installed the necessary dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install express axios&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Here’s what each package does:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Express → helps create the server and handle routes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Axios → makes HTTP requests to external APIs&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Building the /me Endpoint
&lt;/h2&gt;

&lt;p&gt;After setting up, I created an index.js file and wrote the code below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const express = require("express");
const axios = require("axios");
const cors = require("cors");

const app = express();
const PORT = process.env.PORT || 3000;

app.use(cors());

const user = {
  email: "ruthambogo.ra@gmail.com",
  name: "Musungu Ruth Ambogo",
  stack: "Node.js/Express"
};

app.get("/me", async (req, res) =&amp;gt; {
  try {
    const response = await axios.get("https://catfact.ninja/fact", { timeout: 5000 });
    const fact = response.data.fact;

    res.status(200).json({
      status: "success",
      user,
      timestamp: new Date().toISOString(),
      fact
    });
  } catch (error) {
    console.error("Error fetching cat fact:", error.message);
    res.status(500).json({
      status: "error",
      user,
      timestamp: new Date().toISOString(),
      fact: "Could not fetch a cat fact at this time. Please try again later."
    });
  }
});

app.listen(PORT, () =&amp;gt; console.log(`🚀 Server running on port ${PORT}`));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Testing the API
&lt;/h2&gt;

&lt;p&gt;I ran the server using:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;node index.js&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Then visited &lt;a href="http://localhost:3000/me" rel="noopener noreferrer"&gt;http://localhost:3000/me&lt;/a&gt;&lt;br&gt;
 in my browser.&lt;/p&gt;

&lt;p&gt;Each time I refreshed the page, I got a new cat fact, confirming that the API was successfully fetching dynamic data.&lt;/p&gt;
&lt;h2&gt;
  
  
  Deployment
&lt;/h2&gt;

&lt;p&gt;After building my API locally and confirming that it worked correctly, the next step was to deploy it online so others could access it.&lt;/p&gt;
&lt;h3&gt;
  
  
  Steps I Followed
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Pushed the Code to GitHub
I first made sure all my project files were committed and pushed to GitHub:
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;git add .&lt;br&gt;
git commit -m "Initial commit"&lt;br&gt;
git push origin main&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Connected GitHub Repo to Railway: &lt;/li&gt;
&lt;li&gt;I logged into &lt;a href="https://www.bing.com/ck/a?!&amp;amp;&amp;amp;p=fbe6e2d9c3061d7e9b4964560aae86dd48394b8f0c76b609f4aba0812f2a7416JmltdHM9MTc2MDU3MjgwMA&amp;amp;ptn=3&amp;amp;ver=2&amp;amp;hsh=4&amp;amp;fclid=0ebb5ff5-1b8f-6404-33e6-4c791a196504&amp;amp;psq=railway&amp;amp;u=a1aHR0cHM6Ly9yYWlsd2F5LmNvbS8" rel="noopener noreferrer"&gt;Railway&lt;/a&gt; using my GitHub account. &lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Clicked on "New Project" → "Deploy from GitHub Repo".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Selected my repository (Dynamic-profile-api).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Railway automatically detected that it was a Node.js app.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Clicked “Deploy”
Railway built and deployed my API in just a few minutes.
After deployment, it generated a public URL that allowed access to my /me endpoint.&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;If my API was deployed at&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dynamic-profile-api-production-522c.up.railway.app/me" rel="noopener noreferrer"&gt;https://dynamic-profile-api-production-522c.up.railway.app/me&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I can test it by visiting the link in my browser or using a tool like Postman.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;p&gt;This project may look simple, but it taught me several essential backend development concepts, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;How to build RESTful APIs using Express.js&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How to consume external APIs with Axios&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Handling asynchronous code using async/await&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Error handling — providing meaningful fallback responses when an external API fails&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Returning dynamic data (timestamp and random facts)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The importance of response consistency and proper JSON formatting&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It also helped me appreciate how backend services communicate, and how small details like response structure, status codes, and headers make a big difference in API design.&lt;/p&gt;

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

&lt;p&gt;Building this RESTful API was a fun and insightful experience. It strengthened my confidence in creating backend applications and handling third-party integrations.&lt;/p&gt;

&lt;p&gt;I’m grateful to the HNG Internship for pushing me to build something practical — this task reminded me that even simple projects can teach powerful lessons.&lt;/p&gt;

&lt;p&gt;If you’re learning backend development, I encourage you to try building your own version of this API. It’s a great starting point to understand how APIs work, how to fetch data from other services, and how to structure clean JSON responses.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>api</category>
      <category>node</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Setting Up Nginx: My First HNG12 Project</title>
      <dc:creator>Musungu (Ruth) Ambogo</dc:creator>
      <pubDate>Fri, 31 Jan 2025 18:51:48 +0000</pubDate>
      <link>https://forem.com/ambogo2/setting-up-nginx-my-first-hng12-project-1d7</link>
      <guid>https://forem.com/ambogo2/setting-up-nginx-my-first-hng12-project-1d7</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;NGINX is a web server, reverse proxy and load balancer used to server static content. The purpose of this task is to install and configure nginx on an Ubuntu server, which is the official stage 0 task of HNG 12 &lt;a href="https://hng.tech/hire/devops-engineers" rel="noopener noreferrer"&gt;DevOps&lt;/a&gt; internship program&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up and configuration
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Setting up the Ubuntu server: I first instantiated an EC2 instance on AWS. 
After setting it up, I enabled SSH access to connect to it remotely&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Steps Taken:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Logged into my AWS Management Console.&lt;/li&gt;
&lt;li&gt;Created a new EC2 instance running Ubuntu.&lt;/li&gt;
&lt;li&gt;Configured security groups to allow SSH (port 22) and HTTP (port 80) access.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Downloaded the private key (.pem file) and connected to the instance using SSH.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Installing NGINX: Once inside the server, I installed NGINX using the following command:&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;bash&lt;br&gt;
sudo apt update &amp;amp;&amp;amp; sudo apt install -y nginx&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuring NGINX to Serve a Web Page
&lt;/h2&gt;

&lt;p&gt;By default, NGINX serves files from /var/www/html. &lt;/p&gt;

&lt;h2&gt;
  
  
  Challenges
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;While setting up the EC2 instance: I had to do lots of research since it was my first time&lt;/li&gt;
&lt;li&gt;Using the Nano editor: For some reason, I couldn’t paste into the Nano editor. It took me some time to figure out the correct command.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://hng.tech/hire/platform-engineers" rel="noopener noreferrer"&gt;Platform Engineers&lt;/a&gt;&lt;br&gt;
&lt;a href="https://hng.tech/hire/infrastructure-engineers" rel="noopener noreferrer"&gt;Infrastructure Engineers&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
