<?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: Menje</title>
    <description>The latest articles on Forem by Menje (@derickmenje).</description>
    <link>https://forem.com/derickmenje</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%2F3849916%2F78b3004e-bcd6-4fc5-b657-f33e32c2d2a8.png</url>
      <title>Forem: Menje</title>
      <link>https://forem.com/derickmenje</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/derickmenje"/>
    <language>en</language>
    <item>
      <title>Getting Started with Python For Data Analytics: A Beginner-Friendly Introduction</title>
      <dc:creator>Menje</dc:creator>
      <pubDate>Sun, 10 May 2026 16:51:29 +0000</pubDate>
      <link>https://forem.com/derickmenje/getting-started-with-python-for-data-analytics-a-beginner-friendly-introduction-44g2</link>
      <guid>https://forem.com/derickmenje/getting-started-with-python-for-data-analytics-a-beginner-friendly-introduction-44g2</guid>
      <description>&lt;h2&gt;
  
  
  What is Python?
&lt;/h2&gt;

&lt;p&gt;Python is a beginner-friendly, "human-readable" programming language that acts like a live translator, allowing you to quickly connect different data tools and organize your work into smart, reusable packages.&lt;/p&gt;

&lt;p&gt;It handles the complex computer chores for you and lets you see results line-by-line, returning your output without requiring you to be a computer hardware expert.&lt;/p&gt;

&lt;p&gt;Python isn't just for software engineers; it’s the ultimate tool for anyone who wants to turn raw information into a clear story. Here is a look at how it works and why it’s the first language you should pick up.&lt;/p&gt;

&lt;h3&gt;
  
  
  Let's start by looking at what makes it popular in data analytics.
&lt;/h3&gt;

&lt;p&gt;Python is popular for the reasons below;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Human-Like Language: It reads like plain English, so you can focus on solving data problems rather than struggling with complex code.&lt;/li&gt;
&lt;li&gt;Pre-Built Tools (Libraries): It comes with libraries like Pandas, NumPy, and many more that do the heavy lifting for you, from cleaning spreadsheets to building AI.&lt;/li&gt;
&lt;li&gt;Instant Results: You can run code line-by-line and see your charts or tables immediately, making data exploration much faster.&lt;/li&gt;
&lt;li&gt;It easily connects different sources—like pulling data from a bank database and sending it straight into an Excel report.&lt;/li&gt;
&lt;li&gt;Massive Support System: Since millions of people use it, there is a free solution or tutorial online for almost any problem you encounter.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  1. The Essentials: Python’s Building Blocks
&lt;/h3&gt;

&lt;p&gt;Before we get into the heavy data lifting, you need to know the basic syntax of the language.&lt;/p&gt;

&lt;h4&gt;
  
  
  Simple Input &amp;amp; Output
&lt;/h4&gt;

&lt;p&gt;As we have already established, Python is famous for being direct. To see something on your screen, you just use the &lt;code&gt;print()&lt;/code&gt; function.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;print("Hello, Data!")&lt;/code&gt;. This tells the computer to output the quoted text for numbers &lt;/li&gt;
&lt;li&gt;It's like having a conversation where the computer actually listens and responds.&lt;/li&gt;
&lt;li&gt;For input, Python follows this syntax &lt;code&gt;Age = int(input("Enter Your Age: "))&lt;/code&gt; where &lt;code&gt;Age&lt;/code&gt; here is the identifier(Variable Name), &lt;code&gt;int&lt;/code&gt; specifies the data type that we want the input to be returned as, and &lt;code&gt;input&lt;/code&gt; is where the magic happens.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Data Types
&lt;/h4&gt;

&lt;p&gt;In the data world, everything you handle falls into a category:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Strings:&lt;/strong&gt; This covers Texts, like "Customer Name." and it is always wrapped in quotation marks. Wrapping a number in quotations will also return it as a string and not a number.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integers/Floats:&lt;/strong&gt; Whole numbers (10) and decimals (10.5), respectively, used for prices or ages.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Booleans:&lt;/strong&gt; True or False. perfect for filtering (e.g., Is this customer "Active"?).&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Data Structures: The Containers
&lt;/h4&gt;

&lt;p&gt;Data structures in Python(any other programming language) are the way of storing and organising data to easily use it&lt;br&gt;
These inlude;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;List&lt;/strong&gt;. For this, the data you work with is kept in a square bracket, following this format: &lt;code&gt;Ages = [15,20,73,45,23].&lt;/code&gt; Lists are mutable, to mean that you can delete, add, and even modify the data contained in them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tuples&lt;/strong&gt;. This is the container that you use when you are not planning to alter your data set at any point, because once created, tuples do not allow any changes to be made to the data(It is immutable). &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The syntax: &lt;code&gt;Age = (15,20,73,45,23)&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dictionary&lt;/strong&gt; is like a contact list where a "Key" (a name) is linked to "Value" (a phone number). In analytics, these help us keep thousands of rows of data organized.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The syntax: &lt;code&gt;Contact_list = {"Key_1" : Value_1, "Key_2": Value_2,...,"Key_n": Value_n}&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Set&lt;/strong&gt;. Use this when you want your output to always contain distinct values.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Syntax: &lt;code&gt;set_example = {"cat", "mouse", "donkey", "cow"}&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Your Data Analytics Toolkit (Libraries)
&lt;/h3&gt;

&lt;p&gt;Python’s real strength lies in its &lt;strong&gt;Libraries&lt;/strong&gt;. These are pre-written code that acts like tools for specific tasks.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pandas:&lt;/strong&gt; The "Excel of Python." It’s used for handling tables (called DataFrames). If you need to merge two files or find an average, Pandas does it in one line.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NumPy:&lt;/strong&gt; The math expert. It handles complex calculations and large sets of numbers at lightning speed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Matplotlib &amp;amp; Seaborn:&lt;/strong&gt; Your visualization helpers. These libraries turn boring numbers into beautiful line graphs, heatmaps, and bar charts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is important to note that there are several other libraries that you will interact with as you dive deep into the Python world.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. The Workflow: Clean, Analyze, Visualize
&lt;/h3&gt;

&lt;p&gt;In a typical data project, Python takes you through three main stages:&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 1: Cleaning
&lt;/h4&gt;

&lt;p&gt;Real-world data is dirty. There are missing values, typos, and duplicates. Python can automatically scan a million rows, find every "N/A," and replace it with a zero or a mean value in seconds.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 2: Analyzing
&lt;/h4&gt;

&lt;p&gt;Once the data is clean, you use &lt;strong&gt;Functions&lt;/strong&gt;. Think of a function as a "recipe." You write it once, say, a recipe to calculate "Monthly Profit", and then you can run that same recipe on any new data that comes in without rewriting the math.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 3: Visualizing
&lt;/h4&gt;

&lt;p&gt;Here is where you take your analyzed data and tell Python to plot it. Instead of clicking through menus in a spreadsheet, you write a simple command, and a professional-grade chart appears.&lt;/p&gt;

&lt;h4&gt;
  
  
  You might be wondering, "Now where do I start doing all these?"
&lt;/h4&gt;

&lt;p&gt;It’s one thing to know what Python is, but you need a place to actually type these commands and see them come to life. In the tech world, we call these IDEs (Integrated Development Environments) or Notebooks. Think of them as the place where your code lives.&lt;/p&gt;

&lt;p&gt;Here are the most popular ways to get your hands dirty with data:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Jupyter Notebooks&lt;/strong&gt;: If you are focused on data analytics, this is almost certainly where you will start. Unlike a traditional program that runs from top to bottom, a Jupyter Notebook lets you write code in small "cells." It’s like a digital scratchpad. You write a few lines of code, hit run, and the table or chart appears directly below it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;VS Code (Visual Studio Code)&lt;/strong&gt;: VS Code is a free, lightweight code editor from Microsoft. It’s incredibly popular because it’s clean and customizable. It feels like a high-tech workshop. You can write simple scripts, build entire websites, or even run Jupyter Notebooks right inside of it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Google Colab&lt;/strong&gt;: The "No-Install" Option. Don't want to download anything to your computer? Google Colab is a version of Jupyter Notebooks that runs entirely in your web browser.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;PyCharm&lt;/strong&gt;: This is an IDE built specifically for Python. It’s a bit "heavier" than VS Code, but it’s very smart. It checks your code for errors in real-time and helps you organize huge projects.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  4. Real-World Examples
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Retail:&lt;/strong&gt; A local shop uses Python to analyze past sales to predict exactly how much bread to bake for next Tuesday so they don't waste money.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Finance:&lt;/strong&gt; Banks use Python to scan thousands of transactions per second to spot "weird" patterns that might be credit card fraud.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Healthcare:&lt;/strong&gt; Researchers use it to sift through patient records to see which treatments are most effective for specific symptoms.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. Why You Should Start Today
&lt;/h3&gt;

&lt;p&gt;The best part about Python is that it &lt;strong&gt;scales with you.&lt;/strong&gt; You can start by using it to automate a simple 5-minute task in your current job, and eventually use it to build complex AI models.&lt;/p&gt;

&lt;p&gt;It’s a "human-natural" language. It doesn't want to confuse you; it wants to help you. By learning Python, you’re learning how to make data work for you, rather than you working for the data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ready to write your first line?&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;print("This is the start of my Python journey! Exhilarating!!")&lt;/code&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>python</category>
      <category>datascience</category>
      <category>data</category>
    </item>
    <item>
      <title>Subqueries and CTEs in SQL</title>
      <dc:creator>Menje</dc:creator>
      <pubDate>Tue, 21 Apr 2026 20:51:06 +0000</pubDate>
      <link>https://forem.com/derickmenje/subqueries-and-ctes-in-sql-2e39</link>
      <guid>https://forem.com/derickmenje/subqueries-and-ctes-in-sql-2e39</guid>
      <description>&lt;p&gt;When working with SQL, you eventually run into situations where a single query just isn’t enough. You need to break a problem into parts, compute an intermediate result, and then use that result elsewhere. That’s where subqueries and Common Table Expressions (CTEs) come in.&lt;/p&gt;

&lt;p&gt;They solve similar problems, but they do it in slightly different ways, and choosing between them can affect not just performance, but also how readable and maintainable your code is.&lt;/p&gt;

&lt;p&gt;Let's Dive into it;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is a Subquery?
&lt;/h3&gt;

&lt;p&gt;A subquery is a query written inside another query. It produces a result that the outer query depends on.&lt;/p&gt;

&lt;p&gt;A helpful way to think about it is like asking a question within a question. For example, instead of directly filtering employees by salary, you might first calculate the average salary and then compare each employee against that value. That inner calculation is the subquery.&lt;/p&gt;

&lt;p&gt;Subqueries are usually embedded in clauses like WHERE, SELECT, or FROM, depending on what role they’re playing.&lt;/p&gt;

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

&lt;p&gt;Subqueries come in a few forms, depending on their behavior and the results they return.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Scalar subqueries return a single value. These are often used in comparisons, like checking whether something is above or below an average or a maximum.&lt;/li&gt;
&lt;li&gt;Multi-row subqueries return multiple values and are typically used with operators like IN. For example, you might retrieve a list of departments and then filter employees based on whether they belong to any of them.&lt;/li&gt;
&lt;li&gt;Correlated subqueries are a bit different. They rely on values from the outer query, meaning they don’t run just once—they run repeatedly, once for each row being processed. This makes them powerful but also potentially slow if not used carefully.&lt;/li&gt;
&lt;li&gt;Nested subqueries are simply subqueries inside other subqueries. While technically valid, they can quickly become hard to read and are often a sign that the logic could be reorganized more clearly.&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  When Should You Use Subqueries?
&lt;/h4&gt;

&lt;p&gt;Subqueries are useful when the logic is relatively straightforward and doesn’t need to be reused. They’re great for quick calculations or filters, especially when the result is only needed once.&lt;br&gt;
They also work well when you want to keep everything compact and close together, rather than breaking it into multiple steps.&lt;br&gt;
That said, once subqueries become deeply nested or start depending on each other, they can become difficult to follow. Correlated subqueries in particular should be used carefully, as they may lead to performance issues on large datasets.&lt;/p&gt;

&lt;h3&gt;
  
  
  What are CTEs (Common Table Expressions)?
&lt;/h3&gt;

&lt;p&gt;A Common Table Expression, or CTE, is a named temporary result set defined at the beginning of a query. Instead of embedding logic inside the query, you define it upfront and then reference it by name.&lt;br&gt;
In a way, CTEs let you structure your query more like a sequence of steps. You compute something, give it a name, and then use it later. This makes the overall logic easier to read and reason about.&lt;/p&gt;

&lt;h3&gt;
  
  
  Types and Use Cases of CTEs
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Simple CTEs are used to make queries more readable. Instead of writing everything in one block, you separate parts of the logic into named sections.&lt;/li&gt;
&lt;li&gt;Multiple CTEs allow you to build queries step by step. One CTE can depend on another, which helps when dealing with more complex transformations or filtering logic. This layered approach often feels more natural than stacking multiple subqueries.&lt;/li&gt;
&lt;li&gt;Recursive CTEs are used for hierarchical data, such as organizational structures or category trees. They repeatedly reference themselves to build results that would otherwise require loops or multiple queries. This is something subqueries are not well-suited for.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Subqueries vs CTEs
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Readability
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Subqueries tend to become harder to read as they grow, especially when nested. You often have to work from the inside out to understand what’s happening.&lt;/li&gt;
&lt;li&gt;CTEs, on the other hand, present the logic in a more structured way. You can read them from top to bottom, which makes complex queries easier to follow and debug.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Performance
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;There’s no simple rule here. Some subqueries are optimized very well by database engines, especially simple ones. However, correlated subqueries can be expensive because they run multiple times.&lt;/li&gt;
&lt;li&gt;CTEs can sometimes be materialized (stored temporarily), which might affect performance depending on the database system. In other cases, they’re optimized just like subqueries.&lt;/li&gt;
&lt;li&gt;In practice, performance depends more on how the query is written and how the data is indexed than on whether you use a subquery or a CTE.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Reusability
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Subqueries are typically written inline and used once. If you need the same logic in multiple places, you often end up repeating it.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CTEs allow you to define something once and reference it multiple times within the same query. This reduces duplication and makes updates easier.&lt;/p&gt;
&lt;h4&gt;
  
  
  Handling Complexity
&lt;/h4&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Subqueries work well for simple problems, but they can become unwieldy when layered.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CTEs are better suited for complex queries because they let you break the logic into manageable steps. This is especially useful when multiple transformations or filters are involved.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  When Should You Use Each?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Subqueries are a good choice when the task is simple, the result is only needed once, and keeping the query compact makes sense.&lt;/li&gt;
&lt;li&gt;CTEs are more appropriate when the logic is complex, when readability matters, or when you need to reuse intermediate results. They’re also the better option for hierarchical data through recursion.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Final Thoughts
&lt;/h3&gt;

&lt;p&gt;Subqueries and CTEs aren’t competing tools so much as different ways of thinking about the same problem. Subqueries are quick and direct, while CTEs are structured and expressive.&lt;br&gt;
In practice, it’s common to start with a subquery and then switch to a CTE as the query grows in complexity. That shift usually reflects a deeper understanding of the problem—and a move toward writing queries that are not just correct, but also clear and easy to maintain.&lt;/p&gt;

</description>
      <category>sql</category>
      <category>subqueries</category>
      <category>ctes</category>
    </item>
    <item>
      <title>A Deep Dive into SQL Basics</title>
      <dc:creator>Menje</dc:creator>
      <pubDate>Sun, 12 Apr 2026 14:37:18 +0000</pubDate>
      <link>https://forem.com/derickmenje/mastering-the-fundamentals-a-deep-dive-into-sql-basics-3onn</link>
      <guid>https://forem.com/derickmenje/mastering-the-fundamentals-a-deep-dive-into-sql-basics-3onn</guid>
      <description>&lt;p&gt;This week, I transitioned from simply viewing data to actively managing it. Using a practical assignment focused on a hypothetical "Nairobi Academy," I explored how SQL serves as the backbone for creating, modifying, and querying relational databases. Here is a breakdown of the core concepts and how they were applied.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Architecture of Data: DDL vs. DML
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;DDL (Data Definition Language): This is used to define the structure of the database. It includes commands like &lt;code&gt;CREATE&lt;/code&gt; (to build tables or schemas), &lt;code&gt;ALTER&lt;/code&gt; (to change the structure), and &lt;code&gt;DROP&lt;/code&gt; (to delete the structure).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DML (Data Manipulation Language): This is used to manage the data within the structures that have been defined by the DDL. It includes commands like &lt;code&gt;INSERT&lt;/code&gt; (adding records), &lt;code&gt;UPDATE&lt;/code&gt; (modifying existing records), and &lt;code&gt;DELETE&lt;/code&gt; (removing records).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step By Step example in a hypothetical project.
&lt;/h3&gt;

&lt;p&gt;Project Goal: Building a school management system from scratch (nairobi_academy project)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CREATE: I first established a schema named &lt;code&gt;nairobi_academy&lt;/code&gt; and then defined three core tables: students, subjects, and exam_results.&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%2F05yrh8e17xpfh4yq4vbz.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%2F05yrh8e17xpfh4yq4vbz.png" alt=" " width="800" height="215"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;INSERT: Once the structure existed, I populated the tables with data.&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%2Fuh6ml9ymukhg0wdmg0xl.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%2Fuh6ml9ymukhg0wdmg0xl.png" alt=" " width="800" height="208"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;UPDATE: Data is rarely static. When one of the students relocated from Nakuru to Nairobi, I used the &lt;code&gt;UPDATE&lt;/code&gt; command paired with a &lt;code&gt;WHERE&lt;/code&gt; clause to modify her specific record.&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%2Fdullxmsz0avxm8f3306v.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%2Fdullxmsz0avxm8f3306v.png" alt=" " width="800" height="66"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DELETE: To handle errors or cancellations, I used &lt;code&gt;DELETE&lt;/code&gt; to remove specific rows from the table in question.&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%2Fxcafq46ayjz2k5cgrvkh.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%2Fxcafq46ayjz2k5cgrvkh.png" alt=" " width="800" height="48"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Precision Querying with WHERE clause
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;WHERE&lt;/code&gt; clause is the most powerful tool for filtering data. With it, we can find exactly what we need. During the assignment, I practiced using various operators:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Comparison (=, &amp;gt;=): Finding all female students (&lt;code&gt;gender = 'F'&lt;/code&gt;) or identifying high achievers (&lt;code&gt;marks &amp;gt;= 70&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;BETWEEN: This allowed for clean range filtering, such as finding exams taken within a specific four-day window in March 2024.&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%2F8hwtwwi19dkz27w0mcxc.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%2F8hwtwwi19dkz27w0mcxc.png" alt=" " width="800" height="54"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;IN: A more efficient way to check against a list. Instead of multiple &lt;code&gt;OR&lt;/code&gt; statements, I used &lt;code&gt;IN ('Nairobi', 'Mombasa', 'Kisumu')&lt;/code&gt; to find students from specific cities.&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%2F2hy0vqczrs357p4z0f17.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%2F2hy0vqczrs357p4z0f17.png" alt=" " width="800" height="54"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;LIKE (Wild Card): Essential for pattern matching. I used this to find all subjects containing the word "Studies" (&lt;code&gt;%Studies%&lt;/code&gt;) or students whose names started with "A" or "E".&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%2Fx2ooejfgcm6pll3h4vn3.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%2Fx2ooejfgcm6pll3h4vn3.png" alt=" " width="800" height="50"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Transforming Data with CASE WHEN
&lt;/h3&gt;

&lt;p&gt;One of the most interesting tools explored was the &lt;code&gt;CASE WHEN&lt;/code&gt; statement. This allows for conditional logic within a query, effectively creating new data labels without changing the original table.&lt;/p&gt;

&lt;p&gt;For the Nairobi Academy, I used &lt;code&gt;CASE WHEN&lt;/code&gt; to:&lt;br&gt;
Assign Grades: Convert numeric marks into labels like 'Distinction', 'Merit', or 'Pass'.&lt;br&gt;
Classify Levels: Group students into 'Senior' (Form 3/4) or 'Junior' (Form 1/2) categories based on their class.&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%2Fvyiu9anhub30p7jsga6u.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%2Fvyiu9anhub30p7jsga6u.png" alt=" " width="800" height="79"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Reflection
&lt;/h3&gt;

&lt;p&gt;The most interesting part of this week was realizing how critical the order of operations is, especially when dealing with Foreign Keys or dropping columns. A small challenge I encountered was dealing with instances where the column name I was trying to create had the same name as one of the SQL functions &lt;code&gt;CLASS&lt;/code&gt;. For this, I had to wrap the column name in double quotes to specify that it is the column I’m referring to and not the function.&lt;/p&gt;

&lt;p&gt;The highlight was definitely the &lt;code&gt;CASE WHEN&lt;/code&gt; logic. It feels like "programming" within SQL, providing a way to turn raw numbers into meaningful insights that a school principal or teacher could actually use. It’s the difference between seeing "78" and seeing a "Distinction."&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>database</category>
      <category>sql</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>From Desktop to Web: A Guide to Publishing and Embedding Power BI Reports</title>
      <dc:creator>Menje</dc:creator>
      <pubDate>Sun, 05 Apr 2026 19:54:31 +0000</pubDate>
      <link>https://forem.com/derickmenje/from-desktop-to-web-a-guide-to-publishing-and-embedding-power-bi-reports-bkj</link>
      <guid>https://forem.com/derickmenje/from-desktop-to-web-a-guide-to-publishing-and-embedding-power-bi-reports-bkj</guid>
      <description>&lt;p&gt;Power BI is a powerful business intelligence tool that transforms raw data into immersive, interactive visual stories. However, the true value of a report is realized only when it is shared with stakeholders. Publishing is the process of moving your report from the local Power BI Desktop environment to the cloud-based Power BI Service, where it can be managed, shared, and integrated into other platforms like company websites or portals.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Creating a Workspace
&lt;/h2&gt;

&lt;p&gt;A Workspace is a collaborative container in the Power BI Service where you house your reports, dashboards, and datasets.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sign in to the Power BI Service.&lt;/li&gt;
&lt;li&gt;On the left-hand navigation pane, click on Workspaces. &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%2Fwxpmgw5sstpv7tzn6c01.png" alt=" " width="800" height="370"&gt;
&lt;/li&gt;
&lt;li&gt;Select Create a workspace (usually at the bottom of the pane). &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%2F9o1i4gc01dv3190pmfec.png" alt=" " width="800" height="527"&gt;
&lt;/li&gt;
&lt;li&gt;Give your workspace a unique name (e.g., "Sales Analytics 2026") and description. Click Save. You now have a dedicated "folder" in the cloud for your project.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 2: Uploading and Publishing Your Report
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Once your report is ready in Power BI Desktop, you need to push it to the workspace you just created.&lt;/li&gt;
&lt;li&gt;Open your report in Power BI Desktop.&lt;/li&gt;
&lt;li&gt;On the Home tab of the ribbon, click the Publish button on the far right. &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%2Fvd47zvvqpj5zuv3tnvwq.png" alt=" " width="800" height="142"&gt;
&lt;/li&gt;
&lt;li&gt;A dialog box will appear asking you to select a destination. Choose the Workspace you created in Step 1.&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%2Fw9b7vukoo7gnqz6pu9kg.png" alt=" " width="467" height="243"&gt;
&lt;/li&gt;
&lt;li&gt;Click Select. Power BI will begin uploading the file and its underlying data model.&lt;/li&gt;
&lt;li&gt;Once the "Success!" message appears, click the link to open the report in the Power BI Service.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 3: Generating the Embed Code
&lt;/h2&gt;

&lt;p&gt;To put your report on a website, you need a snippet of code (an iFrame) that tells the website how to display the Power BI content.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In Power BI Service, open the report you just published.&lt;/li&gt;
&lt;li&gt;Click the File menu in the top left corner. &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%2Fumhjnhdvvhzm5ifcqt2l.png" alt=" " width="746" height="406"&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select Embed report.&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%2Fojm7x43iftpwmv6863nb.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%2Fojm7x43iftpwmv6863nb.png" alt=" " width="746" height="406"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose Publish to web (Public).&lt;br&gt;
Note: This option makes the data visible to anyone with the link. For internal company data, you would typically use the "Website or portal" option, which requires users to sign in.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click Create embed code and then Publish to confirm.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A dialog will appear showing two links: a URL for email sharing and an HTML iFrame code for website embedding. Copy the iFrame code.&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%2F8rby9f451kn6lwt1va04.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%2F8rby9f451kn6lwt1va04.png" alt=" " width="735" height="384"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 4: Embedding the Report on a Website
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Now, you simply need to place that code into the HTML structure of your website. (For this, I used a basic custom HTML code from W3Schools HTML tutorials.)&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%2Fb44sobyfhws3g7mu8n71.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%2Fb44sobyfhws3g7mu8n71.png" alt=" " width="800" height="397"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open the HTML editor of your website (e.g., WordPress, Wix, or a custom .html file). &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%2F2bbxwqkhhft5whr20lay.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%2F2bbxwqkhhft5whr20lay.png" alt=" " width="800" height="272"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Navigate to the page or section where you want the report to appear.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Paste the iFrame code you copied in Step 3. &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%2Fmpj2k9ht0yplc5amhfa2.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%2Fmpj2k9ht0yplc5amhfa2.png" alt=" " width="800" height="241"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Save and refresh your webpage. Your interactive Power BI report should now be live on the site! &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%2Feaykytgh3jfen26ogdnp.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%2Feaykytgh3jfen26ogdnp.png" alt=" " width="800" height="431"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Key Insights
&lt;/h3&gt;

&lt;p&gt;• Security First: "Publish to Web" is for public data only. Always use "Website or Portal" for sensitive business data to ensure only authorized users can see the visuals.&lt;br&gt;
• Data Freshness: Publishing is a one-time move. To keep the website data current, you must configure a Scheduled Refresh in the Power BI Service settings.&lt;br&gt;
• Mobile Optimization: If your website is viewed on phones, consider creating a Mobile Layout in Power BI Desktop before publishing to ensure the charts resize correctly.&lt;/p&gt;

</description>
      <category>analytics</category>
      <category>beginners</category>
      <category>microsoft</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Understanding Data Modeling in Power BI: Joins, Relationships, and Schemas Explained</title>
      <dc:creator>Menje</dc:creator>
      <pubDate>Sun, 29 Mar 2026 20:26:06 +0000</pubDate>
      <link>https://forem.com/derickmenje/understanding-data-modeling-in-power-bi-joins-relationships-and-schemas-explained-22ia</link>
      <guid>https://forem.com/derickmenje/understanding-data-modeling-in-power-bi-joins-relationships-and-schemas-explained-22ia</guid>
      <description>&lt;p&gt;If you think of Power BI as a high-performance engine, data modeling is the blueprint that ensures every part connects perfectly. Without a solid model, even the most beautiful dashboards will provide slow, inaccurate, or confusing results. Data modeling is the process of connecting different data sources, defining how they relate to one another, and organizing them into a structure that Power BI can easily navigate.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The Building Blocks: Fact vs. Dimension Tables
&lt;/h2&gt;

&lt;p&gt;Before we connect anything, we must categorize our tables.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fact Tables: These contain the "quantitative" data; these are the numbers you want to aggregate.&lt;/li&gt;
&lt;li&gt;Dimension Tables: These are "lookup" tables containing descriptive attributes. Examples include a Product table (Product Name, Category), a Customer table, or a Geography table. Dimensions allow you to "slice and dice" the facts.&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%2Fnii8n6gyw2zuvl7eefpj.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%2Fnii8n6gyw2zuvl7eefpj.jpg" alt="Fact VS Dimension Table" width="735" height="952"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. SQL Joins: Merging Data in Power Query
&lt;/h2&gt;

&lt;p&gt;In Power BI, joins usually happen in Power Query (via the "Merge Queries" button), which can be accessed from the ribbon.&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%2Fasqywa15ax9z4lhlbfd6.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%2Fasqywa15ax9z4lhlbfd6.png" alt="Where to get 'Merge Queries'" width="800" height="123"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Joins physically combine two tables into one based on a matching column.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Inner Join: Only returns rows where there is a match in both tables. If a product has no sales, it won't appear.&lt;/li&gt;
&lt;li&gt;Left Outer Join: Keeps everything from the left table and only matching rows from the right. (Most common for adding descriptions to sales data).&lt;/li&gt;
&lt;li&gt;Right Outer Join: Keeps everything from the right table and matching rows from the left.&lt;/li&gt;
&lt;li&gt;Full Outer Join: Keeps all rows from both tables, filling in nulls where there are no matches.&lt;/li&gt;
&lt;li&gt;Left Anti Join: Returns rows only in the left table that have no match in the right. (Great for finding "Products that never sold").&lt;/li&gt;
&lt;li&gt;Right Anti Join: Returns rows only in the right table that have no match in the left.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Power BI Relationships: The Model View
&lt;/h2&gt;

&lt;p&gt;Unlike joins, Relationships do not merge tables; they create a connection between them in the Model View. This is more efficient for large datasets.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cardinality
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;One-to-Many (1:M): The gold standard. One product in the Dimension table appears many times in the Fact sales table.&lt;/li&gt;
&lt;li&gt;One-to-One (1:1): Rare; usually means the tables should have been merged into one.&lt;/li&gt;
&lt;li&gt;Many-to-Many (M: M): Avoid where possible, as it introduces ambiguity. For example, if many students are enrolled in many classes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Cross-Filter Direction
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Single (One-Way): The dimension table filters the fact table. This is the safest and most performant setting.&lt;/li&gt;
&lt;li&gt;Both (Bi-directional): The fact table can also filter the dimension. Use this sparingly; this is because it can cause "circular dependency" errors.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Active vs. Inactive
&lt;/h2&gt;

&lt;p&gt;A model can only have one Active relationship between two tables at a time. If you have two dates (Order Date and Shipping Date) connecting to a Calendar table, one must be Inactive. You can "wake it up" using the DAX function USERELATIONSHIP.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Designing the Architecture: Schemas
&lt;/h2&gt;

&lt;p&gt;How you arrange these tables determines your "Schema."&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Star Schema: The "Gold Standard" for Power BI. One Fact table in the center, surrounded by Dimension tables. It is fast, simple, and easy to maintain.&lt;/li&gt;
&lt;li&gt;Snowflake Schema: An extension of the Star where dimensions are further broken down (e.g., Product connects to Sub-Category, which connects to Category). It saves space but can slow down performance.&lt;/li&gt;
&lt;li&gt;Flat Table (Denormalized): Everything in one massive table. While easy for small Excel files, it becomes a nightmare for performance and data integrity in Power BI.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Advanced Concepts &amp;amp; Common Issues
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Role-Playing Dimensions: This is when a single dimension acts in multiple roles. The best example is a Date Table that needs to handle both OrderDate and ShipDate.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Common Issues:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Circular References: When two tables filter each other in a loop, breaking the logic.&lt;/li&gt;
&lt;li&gt;Ambiguity: When there are multiple paths between two tables, and Power BI doesn't know which one to follow.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6. Step-by-Step: Where to Create These
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;To Join (Merge): Go to Home &amp;gt; Transform Data. In Power Query, select Merge Queries from the ribbon. Choose your two tables and the type of join (Inner, Left, etc.).&lt;/li&gt;
&lt;li&gt;To Create Relationships: Click the Model View icon (the three small boxes on the far left). Drag a column from the Dimension table (e.g., ProductID) and drop it onto the matching column in the Fact table.&lt;/li&gt;
&lt;li&gt;To Manage Details: Go to Modeling &amp;gt; Manage Relationships. Here you can toggle relationships as Active/Inactive or change the Cross-filter direction.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>analytics</category>
      <category>data</category>
      <category>dataengineering</category>
      <category>datascience</category>
    </item>
    <item>
      <title>How Excel is Used in Real-World Data Analysis</title>
      <dc:creator>Menje</dc:creator>
      <pubDate>Sun, 29 Mar 2026 19:17:09 +0000</pubDate>
      <link>https://forem.com/derickmenje/how-excel-is-used-in-real-world-data-analysis-5f68</link>
      <guid>https://forem.com/derickmenje/how-excel-is-used-in-real-world-data-analysis-5f68</guid>
      <description>&lt;p&gt;In today’s data-driven world, the ability to analyze and interpret data is an essential skill across many industries. One of the most widely used tools for this purpose is Microsoft Excel. While often perceived as a simple spreadsheet application, Excel is in fact a powerful data analysis tool used by businesses, researchers, and analysts to organize, clean, and extract insights from data.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Excel?
&lt;/h2&gt;

&lt;p&gt;Microsoft Excel is a spreadsheet software that allows users to store data in a tabular format (rows and columns), perform calculations, and create visualizations. Its strength lies in its flexibility. It can handle everything from basic data entry to complex analytical tasks.&lt;/p&gt;

&lt;p&gt;In real-world scenarios, Excel is used in finance for budgeting, in sales for performance tracking, in logistics for inventory management, and even in research for statistical analysis.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using Excel in Real-World Data Analysis
&lt;/h2&gt;

&lt;p&gt;To better understand how Excel is applied in practice, below is a preview of a sales dataset I worked with.&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%2Fef4xbrv3hf9t1cphyge0.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%2Fef4xbrv3hf9t1cphyge0.png" alt="Figure 2: Preview of the data before clean up" width="800" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Figure 1: Preview of Sales Dataset&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Data Cleaning and Organization
&lt;/h3&gt;

&lt;p&gt;Before any analysis can begin, data must be clean and well-structured. In the dataset, columns like ORDER DATE, SALES USD, and REGION needed to be consistent and properly formatted.&lt;br&gt;
For example:&lt;br&gt;
• Dates were standardized to ensure correct sorting and filtering.&lt;br&gt;
• Column names were reviewed for clarity and consistency.&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%2F55tt78a6bthkgb5dwii8.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%2F55tt78a6bthkgb5dwii8.png" alt="Figure 2: Preview of the data before clean up" width="800" height="113"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Figure 2: Preview of the data before clean up&lt;/p&gt;

&lt;p&gt;This step is critical in real-world analysis because messy data can lead to incorrect conclusions.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Aggregation Using Functions
&lt;/h3&gt;

&lt;p&gt;One of the most useful Excel functions I applied is SUMIF.&lt;br&gt;
For instance, to calculate total sales for a specific region:&lt;br&gt;
=SUMIF(D:D, "East", F:F)&lt;br&gt;
This formula sums all values in the SALES USD column where the REGION is "East".&lt;br&gt;
Similarly, COUNTIF can be used to count entries that meet certain conditions. For example:&lt;br&gt;
=COUNTIF(I:I, "Q1")&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%2Fk1dsnt7oj7p48f7i38jq.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%2Fk1dsnt7oj7p48f7i38jq.png" alt="Using COUNTIF()" width="203" height="70"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This counts how many sales occurred in Quarter 1.&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%2Fkgpdtabhma1jdtqf1m1c.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%2Fkgpdtabhma1jdtqf1m1c.png" alt="Result of the COUNTIF()" width="200" height="69"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These functions are widely used in business settings to quickly summarize large datasets without manually filtering data.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Grouping and Summarizing with Pivot Tables
&lt;/h3&gt;

&lt;p&gt;Pivot tables are one of Excel’s most powerful features for data analysis.&lt;br&gt;
Using the dataset, I created a pivot table to:&lt;br&gt;
• Summarize total sales by region&lt;br&gt;
• Compare performance across Sales Persons&lt;br&gt;
• Analyze trends across Quarters (QTR)&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%2Fvbm3t0kfeta7vxh8m9xq.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%2Fvbm3t0kfeta7vxh8m9xq.png" alt="Figure 3:Pivot table showing Sales by Region and Quarter" width="800" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Figure 3:Pivot table showing Sales by Region and Quarter&lt;/p&gt;

&lt;p&gt;This makes it easy to answer questions like:&lt;br&gt;
• Which region generates the highest revenue?&lt;br&gt;
• Which quarter has the most sales?&lt;br&gt;
• Which salesperson performs best?&lt;br&gt;
In real-world scenarios, managers use pivot tables to make quick, data-driven decisions.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Time-Based Analysis
&lt;/h3&gt;

&lt;p&gt;With columns like YEAR, MONTH, and QTR, Excel makes it easy to analyze trends over time.&lt;br&gt;
For example:&lt;br&gt;
• Grouping sales by quarter shows seasonal patterns.&lt;br&gt;
• Comparing monthly sales helps identify growth or decline.&lt;br&gt;
A simple pivot table or chart can reveal whether sales increase in certain periods, which is useful for planning and forecasting.&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%2Fvyjf2i5tyrlds2wv3stg.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%2Fvyjf2i5tyrlds2wv3stg.png" alt="Figure 4: Chart showing Sales by Month" width="800" height="327"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Figure 4: Chart showing Sales by Month&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Data Visualization
&lt;/h3&gt;

&lt;p&gt;Excel allows users to turn raw data into meaningful visuals.&lt;br&gt;
Using charts such as:&lt;br&gt;
• Bar charts for comparing regions&lt;br&gt;
• Line charts for trends over time&lt;br&gt;
I was able to present insights more clearly.&lt;br&gt;
Visualization is important because it helps stakeholders understand data quickly without needing to interpret raw numbers.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Building Dashboards for Decision-Making
&lt;/h3&gt;

&lt;p&gt;After all of the above and followed by performing descriptive and trend analysis, the next step is to present insights in a more interactive and decision-friendly way. This is where dashboards come in.&lt;/p&gt;

&lt;p&gt;A dashboard in Excel is a visual summary of key metrics, often presented using charts, tables, and slicers in a single view. It allows users to monitor performance and make decisions without going back to the raw 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%2Finz2xo80qv13vdepzv7a.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%2Finz2xo80qv13vdepzv7a.png" alt="Figure 5: Dashboard Analyzing Pricing, Discounts, and Customer Reviews" width="800" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Figure 5: Dashboard Analyzing Pricing, Discounts, and Customer Reviews&lt;/p&gt;

&lt;p&gt;In this project, I created a JUMIA PRODUCT PERFORMANCE DASHBOARD, which focuses on analyzing pricing, discounts, and customer reviews.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real-World Excel Application
&lt;/h2&gt;

&lt;p&gt;In a business context, a dataset like Figure 1 Preview of Sales Dataset this could be used to:&lt;br&gt;
• Track company revenue across different regions&lt;br&gt;
• Evaluate the performance of sales personnel&lt;br&gt;
• Identify top-performing products&lt;br&gt;
• Monitor partnerships through the CHANNEL PARTNERS column&lt;br&gt;
For example, if one region consistently underperforms, management can investigate and take action.&lt;/p&gt;

&lt;h2&gt;
  
  
  Personal Reflection
&lt;/h2&gt;

&lt;p&gt;Learning Excel has completely changed how I approach data. Before, I would look at numbers as just figures without much meaning. Now, I see patterns, relationships, and stories behind the data.&lt;br&gt;
Working with functions like SUMIF() and tools like pivot tables has made me realize how quickly large amounts of data can be transformed into useful insights. It has also improved my attention to detail, especially when cleaning and organizing data, something I now understand is just as important as the analysis itself.&lt;/p&gt;

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