<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Clare Mwangi</title>
    <description>The latest articles on DEV Community by Clare Mwangi (@claremwangi).</description>
    <link>https://dev.to/claremwangi</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%2F3818875%2F4922dfb4-2bda-4858-9d6c-797f63a2b8ed.png</url>
      <title>DEV Community: Clare Mwangi</title>
      <link>https://dev.to/claremwangi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/claremwangi"/>
    <language>en</language>
    <item>
      <title>Understanding Data Modeling in Power BI: Joins, Relationships and Schemas Explained</title>
      <dc:creator>Clare Mwangi</dc:creator>
      <pubDate>Tue, 28 Apr 2026 16:26:56 +0000</pubDate>
      <link>https://dev.to/claremwangi/understanding-data-modeling-in-power-bi-joins-relationships-and-schemas-explained-3npi</link>
      <guid>https://dev.to/claremwangi/understanding-data-modeling-in-power-bi-joins-relationships-and-schemas-explained-3npi</guid>
      <description>&lt;p&gt;Like I stated in my previous article &lt;a href="https://dev.to/claremwangi/"&gt;How Excel is Used in Real-World Data Analysis&lt;/a&gt;, I'm on a learning journey. The next data analysis tool to be added to my toolkit is &lt;em&gt;'you guessed it!'&lt;/em&gt; Power BI. The last 2 weeks, have been eye-opening. I have learned that in addition to Excel (still a vital tool), there exists other tools that can do similar but better job. Below, I'll be explaining some concepts I have learned so far that could benefit your learning journey as well.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data Modeling: What is it?
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;Data Model&lt;/strong&gt; is a visual representation of how data will be organized and stored in a database. It's like a map that shows what data is stored in each table and how they are connected or related to each other.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Modeling&lt;/strong&gt; is the process of creating the 'map' and connecting the different data sources, defining how they relate to one another and organizing them into a structure that supports analysis. &lt;/p&gt;

&lt;h2&gt;
  
  
  How is a Data Model Created?
&lt;/h2&gt;

&lt;p&gt;I will illustrate the process using a dataset that will hopefully help us better understand what a Data Model and Data Modeling is.&lt;/p&gt;

&lt;p&gt;Below is a representation of what the dataset looks like in Excel. It contains multiple tables(customers, products, stores, sales) in different worksheets.&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%2Fy9pk9o65f66514nvytxp.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%2Fy9pk9o65f66514nvytxp.png" alt=" " width="800" height="553"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are three methods used in Power BI:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Table View&lt;/strong&gt; (highlighted in the picture): We start with loading our data into Power BI by opening a blank report and load our workbook using the Get Data command found in the ribbon. (we assume we have a clean dataset if not use the transform button to clean your dataset first then build your 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%2F8ur2fz7uwxb2cscc387d.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%2F8ur2fz7uwxb2cscc387d.png" alt=" " width="800" height="103"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once your dataset is loaded, we can now begin building our Data Model using the Manage Relationships features seen on 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%2Fs0rzw5iosx1azxjk36da.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%2Fs0rzw5iosx1azxjk36da.png" alt=" " width="800" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Model View&lt;/strong&gt; (highlighted in the picture): We can also use the Manage Relationships feature under this set up to build our model. &lt;br&gt;
Below is a snapshot what our model looks like before establishing the relationships between the tables.&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%2Fujmhbj1jxp79vai5aj38.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%2Fujmhbj1jxp79vai5aj38.png" alt=" " width="800" height="386"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is how we 'Manage Relationships' between our tables. Once you click on the manage relationships feature, a pop out will appear with a large green button written '+New Relationship', click on it and below is what you should see.&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%2F67feba7n806ot4tv0k8s.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%2F67feba7n806ot4tv0k8s.png" alt=" " width="800" height="418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From our example, we are establishing the relationship between the sales table and the customers table by selecting their shared column which is the ID columns. After doing the same with the rest of the tables this is our output: &lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;Data Model&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%2F4h99l9hetlmvsfk2lmlv.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%2F4h99l9hetlmvsfk2lmlv.png" alt=" " width="800" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Report View&lt;/strong&gt; (the icon above the table view icon I've highlighted in the snapshot above): You can also Manage relationships from there and build your model.&lt;/p&gt;

&lt;h2&gt;
  
  
  Joins
&lt;/h2&gt;

&lt;p&gt;These are methods used to combine rows in tables based on related columns. In Power BI, they are executed using the Merge Queries Command in Power Query.&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%2F647kjywmrhoh1a23tclb.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%2F647kjywmrhoh1a23tclb.png" alt=" " width="800" height="111"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Different types of Joins in Power BI explained:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Left Outer Join: This is the most common join type. It will keep all rows in your left table and match with the ones from your right table. In the Merge queries pop up window, look at the very bottom to see how many rows have been matched. If it's less than the total rows, it means there are extra rows in the left table that do not exist in the right table and will return as null.&lt;/li&gt;
&lt;li&gt;Right Outer Join: This join merges tables by retaining all the rows in the right table and matching them to the related rows in the left table. In this case, whatever is in the left table that does not exist in the right table will return as null in the left table.&lt;/li&gt;
&lt;li&gt;Full Outer Join: This join merges both the left and right table by keeping all the rows. Whatever row is missing in the right table will return as null, and if there is a match the rows are combined. The same happens in the left table.&lt;/li&gt;
&lt;li&gt;Inner Join: It combines  the left and right tables by matching exact rows therefore, reducing the number rows in the final table.&lt;/li&gt;
&lt;li&gt;Left Anti Join: This join checks for matches and only returns the rows in the left table that don't match with the right table. &lt;/li&gt;
&lt;li&gt;Right Anti Join: This join also checks for matches from the right table to the left table and will return the rows from the right table that don't match with the rows left table. &lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;In Power Bi, Relationships refer to the links or connections between tables. This is how Power BI is able to know which table is related to which via a common column.&lt;/p&gt;

&lt;p&gt;Types of relationships:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;1:M&lt;/strong&gt; - This is a One to Many relationship, meaning one table links to many other tables. From our model view above you can see that the sales table is linked to the other 3 tables. This is the most common relationship and can also be termed as a Many to One. This also enables smooth aggregation of data when it comes to analysis. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;M:M&lt;/strong&gt; - This is a Many to Many relationship, meaning multiple fields in one table are related to multiple fields in another table. This could cause errors during calculations and so it's best to avoid it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;1:1&lt;/strong&gt; - This is a One to One relationship, meaning one table is connected to another table via a related column. This is rare to occur.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Active vs Inactive&lt;/strong&gt; - You can have multiple relationships between tables. By default Power BI will use the active relationship every time you are conducting your analysis. For the inactive relationship to be used, you must manually instruct power bi to do so.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cardinality&lt;/strong&gt; - This defines the nature of relationships between tables [1:M, M:M or 1:1].&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-filter direction&lt;/strong&gt; -This is a feature in Power BI that determines how filters will affect the data in your related tables. There are two types of cross-direction filters:

&lt;ul&gt;
&lt;li&gt;Single direction: This filter only moves in one direction from the main table to the other tables connected to it but not the other way around, meaning that when you apply a filter in your secondary table, it will not affect the main table.&lt;/li&gt;
&lt;li&gt;Bidirectional: This filter moves both ways from the main table to the secondary tables and vice versa.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;The difference between Joins and Relationships is that, Joins literally combines tables into one big table and Relationships show you how the tables are connected but it keeps them separate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Schemas
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Star Schema&lt;/strong&gt; is a data model with a central table and several lookup tables, like in our data model. The sales table is our central table and the customers, products, stores are our lookup tables. The central table is also known as a &lt;strong&gt;Facts tables&lt;/strong&gt;. This is because it contains facts that can be measured(quantitative data) like quantity sold, price, stock levels etc. The lookup tables are also known as &lt;strong&gt;Dimension tables&lt;/strong&gt;. They give context to the facts tables meaning they contain descriptive information(qualitative data) like names, cities, categories, email addresses etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Snowflake Schema&lt;/strong&gt; is a data model where the dimension tables also have dimension tables(sub-dimensions). One way to do it is by extending the dimensions tables in a star schema.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Flat Table (DLAT)&lt;/strong&gt; - This is a table that contains all the information, what is supposed to be in the facts table and dimension tables is combined in a single table. For example, a single excel worksheet with all business information acting as its database.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Key points to note is to always use cleaned data before building your data model. This can easily be done using power query, you don't have to use excel. Use a star schema, it's easy to comprehend relationships between the tables and avoid many to many relationships as this could complicate computations and lead to errors. &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>powerbi</category>
      <category>analytics</category>
      <category>datamodeling</category>
    </item>
    <item>
      <title>You Want To Learn SQL? Here Is What I know So far...</title>
      <dc:creator>Clare Mwangi</dc:creator>
      <pubDate>Tue, 28 Apr 2026 12:12:59 +0000</pubDate>
      <link>https://dev.to/claremwangi/you-want-to-learn-sql-here-is-what-i-know-so-far-4k0n</link>
      <guid>https://dev.to/claremwangi/you-want-to-learn-sql-here-is-what-i-know-so-far-4k0n</guid>
      <description>&lt;h1&gt;
  
  
  SQL: What is it?
&lt;/h1&gt;

&lt;p&gt;First of all, it stands for Structured Query language. It is one of the programming languages used to communicate with relational databases. It's used to store, extract and manipulate data in a database. &lt;/p&gt;

&lt;p&gt;There are  different SQL command categorizaions used to facilate the different uses of SQL.&lt;/p&gt;

&lt;p&gt;These are:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. DDL (Data Definition Language)&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. DML (Data Manipulation Language)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. DQL (Data Query Language)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. DCL ( Data Control Language)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. TCL ( Transactional Control Language)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this article, we'll be covering the first three types. Why? We are only just beginning and I'd like to take you step by step.&lt;/p&gt;

&lt;p&gt;Say you've been tasked with building a database to store data, manipulate it and query it(retrieve). Which type of commands will you use?&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Data Definition Language (DDL)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;These are commands for defining and managing database structures. &lt;/p&gt;

&lt;p&gt;They are: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CREATE:&lt;/strong&gt; When you want to build something new like schemas and tables, this is the command to use. &lt;/li&gt;
&lt;/ul&gt;

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

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

        CREATE TABLE students (
            student_id SERIAL PRIMARY KEY,
            first_name VARCHAR(50),
            last_name VARCHAR(50)
       );
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ALTER:&lt;/strong&gt; When you want to modify your existing table structure, say you forgot one column and would like to add it to your table without having to create the table afresh, this is the command to use. &lt;/li&gt;
&lt;/ul&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;       ALTER TABLE students
       ADD COLUMN phone_number VARCHAR(20);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;You later realize you don't need the phone numbers after all and would like to do away with them, this is the command to use.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;       ALTER TABLE students
       DROP COLUMN phone_number;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;DROP:&lt;/strong&gt; When you want to remove permanently.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;      DROP TABLE students; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;TRUNCATE:&lt;/strong&gt; This is used when you want to remove all rows from your table but retain the table structure. &lt;/li&gt;
&lt;/ul&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;      TRUNCATE TABLE students;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Data Manipulation Language (DML)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;These are commands for working with data. So you have your tables ready and you want to input your data.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;INSERT:&lt;/strong&gt; We use this commands to fill in our records.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example; &lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;     `INSERT TABLE students (student_id, first_name, last_name)
     VALUES ('Clare', 'Mwangi'); 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The reason as to why I have not included the student ID in my statement is because when 'CREATING' our table above, I used the function SERIAL which will auto-populate our ID's starting from the number 1. We'll talk about functions and constraints (primary key) later.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;UPDATE:&lt;/strong&gt; used when you want to modfify existing data e.g change a student's location because they relocated.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    ` UPDATE students
      SET city = 'Nairobi'
      WHERE student_id = 5;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;DELETE:&lt;/strong&gt; This used when you want to remove specific data from your table because you no longer need it.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    ` DELETE FROM students
      WHERE result_id = 9;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Data Query Language (DQL)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;These are commands for retrieving data. You want to extract information from your database or rather ask questions so as to conduct your analysis and gain insights, this is the command to use: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SELECT:&lt;/strong&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    SELECT * 
    FROM students;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This command will enable you view the entire students'table with its data.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   `SELECT * 
    FROM students
    WHERE city = 'Nairobi';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This command will extract data only for students who come from Nairobi.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    SELECT result_id, student_id, grade
    From exam_results
    Where grade = 'A' AND grade = 'B';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This command will return data from the exam_reults table of students who scored an A or B.&lt;/p&gt;

&lt;p&gt;By now, you've noted we've been using where quite a bit to extract specific information from our tables. That is exactly what the WHERE CLAUSE is used for to filter datasets.&lt;/p&gt;

&lt;p&gt;You may also need to categorize you data without altering the tables you created and are wondering what command to use; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CASE WHEN:&lt;/strong&gt;&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    SELECT * 
    CASE 
        when marks &amp;gt;= 80 then 'Distinction'
        when marks &amp;gt;= 60 then 'Merit'
        when marks &amp;gt;= 40 then  'Pass'
        else 'Fail'
    END as Performance 
    FROM exam_results;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This is a big one, I know! It may look complicated but it's okay, I'll walk you through it.&lt;/p&gt;

&lt;p&gt;What this command is doing is: First, it want to extract all columns' data from the exam_results table. Second, it wants to label the marks, this is where CASE WHEN comes into play. Anybody who scored an 80 and above will be labelled as having a 'Distinction' and so on and so forth. The END as performance gives the label column a name 'Performance'&lt;/p&gt;

&lt;p&gt;This would be the output of our query: &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%2Fauzb8lvr1tr8errtfcw7.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%2Fauzb8lvr1tr8errtfcw7.png" alt=" " width="800" height="303"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So far so good! I would say. There is more coming. &lt;/p&gt;

</description>
      <category>sql</category>
      <category>data</category>
      <category>analytics</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How Excel is Used in Real-World Data Analysis</title>
      <dc:creator>Clare Mwangi</dc:creator>
      <pubDate>Sat, 28 Mar 2026 20:55:25 +0000</pubDate>
      <link>https://dev.to/claremwangi/how-excel-is-used-in-real-world-data-analysis-l0f</link>
      <guid>https://dev.to/claremwangi/how-excel-is-used-in-real-world-data-analysis-l0f</guid>
      <description>&lt;p&gt;Organizations in healthcare, finance, manufacturing, retail and every other you can think of, use Excel for various reasons. For example, financial institutions like banks use Excel to create budgets, track cashflow or forecast revenue. Retailers may use Excel to track their stock levels or store their suppliers' data. Healthcare organizations may use Excel to store patient data and many other uses. &lt;/p&gt;

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

&lt;p&gt;Excel is a spreadsheet program developed by Microsoft that is used to organize, analyze and even visualize data. It stores data in a tabular format and provides a wide range of formulas, functions and visualization features such as charts which are used in the data analysis process. Despite the increase in advanced analytical tools, Excel is still widely used because it is user friendly, flexible and powerful enough to handle large datasets. It is also a great tool for novice data analysts to start off with in their analytical journey. Being a beginner as well, the first tool in &lt;em&gt;my data analytics toolkit&lt;/em&gt; is none other than Excel. &lt;/p&gt;

&lt;h3&gt;
  
  
  Useful Features in Excel for Data Analysts
&lt;/h3&gt;

&lt;p&gt;Several functions and formulas in Excel are commonly used to transform and analyze data: &lt;/p&gt;

&lt;h4&gt;
  
  
  Data Cleaning
&lt;/h4&gt;

&lt;p&gt;Data is often 'dirty' and therefore a bit of cleaning is recommended before analyzing it to ensure accuracy. Below is a couple of features I use in my data preparation: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Find and Replace&lt;/strong&gt;: You can find this feature in the Home tab or through the shortcut [Ctrl+H]. This feature is used to remove unwanted texts or characters from your dataset. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TRIM Function&lt;/strong&gt;: is used to remove extra spaces from text data type. [e.g. =TRIM(A2)] where A2 is the cell reference of the text you want to clean.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Text to Columns&lt;/strong&gt;: Found in the Data tab, this feature is used to split data into separate columns. For example, if your dataset contains a field/column with full names and you would like to separate them into different columns, this feature will come in handy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conditional Formatting&lt;/strong&gt;: Also found in the Home tab in the Excel ribbon. For example, you may have a dataset with duplicate entries say in the name column, use conditional formatting to highlight the cells with duplicates while assessing data in the entire row, if it's also duplicated you can do away with the duplicates and remain with one entry.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Validation&lt;/strong&gt;: I recommend using this feature when gathering your data, to avoid e.g. 'typos' and any other inconsistencies. This feature found in the Data tab, will help to lighten the data cleaning process due to the preset rules at the point of data entry.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Data Transformation
&lt;/h4&gt;

&lt;p&gt;You want to analyze data that is in a usable format and below as some functions that could be useful in transforming your data: &lt;/p&gt;

&lt;h5&gt;
  
  
  &lt;strong&gt;By Formatting&lt;/strong&gt;
&lt;/h5&gt;

&lt;p&gt;Once you open your dataset and you are finding it difficult to comprehend what you are looking at e.g. some columns might not be visible or the data cuts off at some point, some cells might be blank or you can't tell if your fields/columns have a title, this is why formatting is recommended to improve readability. In your Home tab, you'll find all formatting tools you need to improve your dataset. You can bolden the column titles to distinguish them from the rest of the dataset, you can autofit the column width to make all cells with data visible and also change the font type and size to your liking and many more.&lt;/p&gt;

&lt;h5&gt;
  
  
  &lt;strong&gt;Using Functions&lt;/strong&gt;
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;ABS: [=ABS(cell reference)] This feature known as absolute, is useful when you want to convert negative values to positive values.&lt;/li&gt;
&lt;li&gt;VALUE: [=VALUE(cell reference)] is used when converting numbers that are in text format to numbers.&lt;/li&gt;
&lt;li&gt;UPPER: [UPPER(cell reference)] This feature is used to convert text that is in small letters to capital letters.&lt;/li&gt;
&lt;li&gt;LOWER: [=Lower(cell reference)] is used to convert text that is in capital letters to small letters.&lt;/li&gt;
&lt;li&gt;PROPER: [=PROPER(cell reference)] This is used to convert the first letter of the text to a capital letter.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are more Excel features used by Data analysts to transform messy datasets into usable and readable formats. I only mentioned these few for a start that are, in my opinion; easy to grasp for a beginner.&lt;/p&gt;

&lt;h4&gt;
  
  
  Data Analysis
&lt;/h4&gt;

&lt;p&gt;This is the part where the processed data is analyzed to generate insights that are used in decision making by stakeholders e.g. management, marketing team, healthcare professionals.&lt;/p&gt;

&lt;h5&gt;
  
  
  A few &lt;strong&gt;functions&lt;/strong&gt; used in data analysis:
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;MEAN/AVERAGE: [=AVERAGE(range of cells)]&lt;/li&gt;
&lt;li&gt;MEDIAN: [=MEDIAN(range of cells)]&lt;/li&gt;
&lt;li&gt;MODE: [=MODE(range of cells)] &lt;/li&gt;
&lt;li&gt;SUM: [=SUM(range of cells)]&lt;/li&gt;
&lt;li&gt;COUNT: [=COUNT(range of cells)] &lt;/li&gt;
&lt;li&gt;MAX: [=MAX(range of cells)] &lt;/li&gt;
&lt;li&gt;MIN: [=MIN(range of cells)] &lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  &lt;strong&gt;Pivot Tables&lt;/strong&gt;
&lt;/h5&gt;

&lt;p&gt;When you want fast results, think pivot tables. These are tables used in summarizing data according to the output you are looking of. This is a quick method and tool used in analyzing large datasets. Please note that it does not change the original dataset. It facilitates identifying patterns and trends and comparing metrics across groups or categories to list a few. &lt;/p&gt;

&lt;p&gt;To create a pivot table, navigate to the Excel ribbon and click the insert tab and to the left most section of your ribbon click on pivot table and choose where to place it in your workbook.&lt;/p&gt;

&lt;p&gt;Time may not always be on your side as an analyst, so pivot tables are a great tool to use when you want to save time from manual calculations listed above, explore your dataset quickly and are also helpful in creating dashboards and reports. &lt;/p&gt;

&lt;h4&gt;
  
  
  Data Visualization
&lt;/h4&gt;

&lt;p&gt;Stakeholders; these are the people interested in what the data is 'communicating'. You'll be sharing the results with them and most will not be interested in seeing the process it took you to get to the results. &lt;br&gt;
This is why dashboards are essential. While there are tools specifically developed for data visualization, Excel can still manage to handle visualization tasks.&lt;/p&gt;

&lt;p&gt;You are able to create charts such as &lt;strong&gt;Bar Charts&lt;/strong&gt;, &lt;strong&gt;Column Charts&lt;/strong&gt;, &lt;strong&gt;Scatter Plots&lt;/strong&gt;, &lt;strong&gt;Pie charts&lt;/strong&gt;, &lt;strong&gt;Maps&lt;/strong&gt; and many more depending on what you need to visualize.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;The Data Analytics journey can feel overwhelming in the beginning, &lt;em&gt;You are not alone!&lt;/em&gt;. Choosing which tool to start your learning journey can be confusing and the &lt;em&gt;persistent&lt;/em&gt; need to learn everything at once will leave you stressed and feeling inept. &lt;em&gt;I've been there!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Pick one tool to learn at a time. It's not about the quantity of knowledge and skill but the quality. Take your time in grasping the concepts, understanding how to question the data, understanding why inconsistencies exist and how to handle them and what different variables represent.&lt;/p&gt;

&lt;p&gt;I chose to learn Excel first, and the experience strengthened both my technical and analytical skills. I still have a long way to go in terms of tools I intend to add to my &lt;em&gt;toolkit&lt;/em&gt;, but I am now more confident in my ability to work with data. &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>analytics</category>
      <category>tooling</category>
      <category>microsoft</category>
    </item>
  </channel>
</rss>
