<?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: Analyst Kinywa</title>
    <description>The latest articles on Forem by Analyst Kinywa (@kinyywa-data-analyst).</description>
    <link>https://forem.com/kinyywa-data-analyst</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%2F3709620%2F1d2b8c07-a4d4-433b-b8a6-0e25774691ce.jpeg</url>
      <title>Forem: Analyst Kinywa</title>
      <link>https://forem.com/kinyywa-data-analyst</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/kinyywa-data-analyst"/>
    <language>en</language>
    <item>
      <title>Connecting Power BI to a SQL Database</title>
      <dc:creator>Analyst Kinywa</dc:creator>
      <pubDate>Sat, 14 Mar 2026 11:56:26 +0000</pubDate>
      <link>https://forem.com/kinyywa-data-analyst/connecting-power-bi-to-a-sql-database-4p38</link>
      <guid>https://forem.com/kinyywa-data-analyst/connecting-power-bi-to-a-sql-database-4p38</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Microsoft Power BI is a powerful business intelligence and data visualization tool that helps organizations transform raw data into meaningful insights. It allows users to create interactive dashboards, reports and visualizations that support data-driven decision-making.&lt;/p&gt;

&lt;p&gt;Power BI can connect to many data sources, including spreadsheets, cloud services, APIs and relational databases. In many organizations, data is stored in structured databases which Power BI accesses to analyze and visualize for insights.&lt;/p&gt;

&lt;p&gt;One commonly used database for analytics is PostgreSQL, &lt;em&gt;an SQL-based database system designed to efficiently store, manage and retrieve large volumes of structured data&lt;/em&gt;. Connecting Power BI to a PostgreSQL database allows analysts to access large datasets, run SQL queries, combine multiple tables and build real-time or scheduled dashboards for better business insights.&lt;/p&gt;

&lt;p&gt;By the end of this article, we will have a step by step guide on how to connect to a local database and also to a cloud-based database.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connecting Power BI to a Local PostgreSQL Database
&lt;/h2&gt;

&lt;p&gt;This is the most common starting point for any data analyst where you are able to connect Power BI to a local PostgreSQL DB running locally on your machine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Open Power BI Desktop&lt;/strong&gt;&lt;br&gt;
Once you open, &lt;strong&gt;click Blank report&lt;/strong&gt;. This navigates you to the main page &lt;em&gt;(see below)&lt;/em&gt; of the application.&lt;/p&gt;

&lt;p&gt;On the top ribbon, click &lt;strong&gt;Get data&lt;/strong&gt;. This option allows Power BI to connect and get data from different data sources.&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%2Fpqcgl7rfwmorrltwepc2.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%2Fpqcgl7rfwmorrltwepc2.png" alt="Pop-up after clicking Get data" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Choose PostgreSQL database&lt;/strong&gt;&lt;br&gt;
From the list of the sources, look for &lt;strong&gt;PostgreSQL database&lt;/strong&gt; and then click &lt;strong&gt;Connect&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%2F1x6v7u2wnvilths9zc7m.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%2F1x6v7u2wnvilths9zc7m.png" alt="Choose the database and click connect" width="800" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Enter Database connection details&lt;/strong&gt;&lt;br&gt;
After selecting PostgreSQL database and clicking &lt;strong&gt;Connect&lt;/strong&gt;, a connection window will appear where you must enter the local database details.&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%2Fkpvl2ruev7agh5ew1yrx.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%2Fkpvl2ruev7agh5ew1yrx.png" alt="DB connection details" width="800" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For a database that runs locally on your machine, the server is usually &lt;code&gt;localhost&lt;/code&gt;. For the Database name, we will navigate to my local database and trace the connection details from there. &lt;/p&gt;

&lt;p&gt;Since I have pg4Admin 4, a graphical tool for managing and developing my PostgreSQL databases, I will open the tool and trace the details from my server properties.&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%2Fj6z6noaok5tzc0ie89ud.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%2Fj6z6noaok5tzc0ie89ud.png" alt="pg4Admin 4" width="800" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For this connection, let's use the below connection details:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Server hostname &lt;code&gt;localhost&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Username &lt;code&gt;postgres&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Input the above details and click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Enter Authentication credentials&lt;/strong&gt;&lt;br&gt;
Power BI will then prompt you to enter your database credentials. Authentication details typically include: &lt;code&gt;Username&lt;/code&gt; &amp;amp; &lt;code&gt;Password&lt;/code&gt;. For this, I will copy the username from pg4Admin 4 and for the password I will use the same password I used when setting up my pg4Admin during installation then click &lt;strong&gt;Connect&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%2Fawopbcq4wgcjgf3qgexc.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%2Fawopbcq4wgcjgf3qgexc.png" alt="Connection" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Load tables into Power BI&lt;/strong&gt;&lt;br&gt;
After connecting successfully, Power BI opens the &lt;strong&gt;Navigator&lt;/strong&gt; window, which lists all available tables in the database. Here you are able to preview each available table and select the tables you want to load then click &lt;strong&gt;Load&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%2Fq6dnmuzu3fxdmyejnzga.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%2Fq6dnmuzu3fxdmyejnzga.png" alt="Loading tables" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Alternatively, you can select &lt;strong&gt;Transform Data&lt;/strong&gt; to clean or modify the data in the Power Query Editor before loading it. Once the tables are loaded, begin analyzing and visualizing your data for insights.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connecting Power BI to a Cloud PostgreSQL DB
&lt;/h2&gt;

&lt;p&gt;Many companies host their databases in the cloud instead of locally. One example is &lt;strong&gt;Aiven&lt;/strong&gt; which provides managed PostgreSQL databases. Connecting Power BI to a cloud PostgreSQL database follows a similar process but requires additional connection details.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Create a PostgreSQL DB on Aiven&lt;/strong&gt;&lt;br&gt;
Creating a PostgreSQL database on Aiven is a straightforward process that allows you to host and manage a cloud database without worrying about infrastructure setup. First, create an account and log in to the Aiven console. Once logged in, click Create Service on the dashboard. From the list of available services, select PostgreSQL as the database engine.&lt;/p&gt;

&lt;p&gt;Next, configure the service by choosing a cloud provider, selecting a region where the database will be hosted and picking a pricing plan that fits your needs. After entering a name for the service, click &lt;strong&gt;Create Service&lt;/strong&gt;. Aiven will then automatically deploy the PostgreSQL database in the cloud.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Download SSL certificate from Aiven&lt;/strong&gt;&lt;br&gt;
Cloud databases often require secure encrypted connections. From the Aiven console, navigate to Connection Information and download the CA Certificate (SSL certificate).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Connecting to Aiven Using PostgreSQL ODBC&lt;/strong&gt;&lt;br&gt;
To connect applications such as Microsoft Power BI, Excel or other analytics tools to a cloud database hosted on Aiven, you can use the ODBC &lt;em&gt;(Open Database Connectivity)&lt;/em&gt; driver for PostgreSQL. ODBC provides a standardized way for software applications to communicate with database systems.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First, download the version that matches your system (32-bit or 64-bit) and install the PostgreSQL ODBC driver, commonly known as &lt;strong&gt;psqlODBC&lt;/strong&gt;. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Download the driver from &lt;a href="https://www.postgresql.org/ftp/odbc/releases/REL-17_00_0008-mimalloc/" rel="noopener noreferrer"&gt;https://www.postgresql.org/ftp/odbc/releases/REL-17_00_0008-mimalloc/&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open ODBC Data Source Administrator, navigate to System DSN then click Add. Another Create New Data Source will appear and give you an option to select a driver for which you want to set up a data source. Choose PostgreSQL Unicode(x64) and click Finish.&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%2Ffh2rle6jo7jt6gj8w1d9.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%2Ffh2rle6jo7jt6gj8w1d9.png" alt="ODBC Data Source Admin" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Another psqlOBDC set up window will appear requesting for connection details. All these connection details can be traced from a running service on Aiven. Copy and paste on this set up window and test connection.&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%2Ful5q3ydjhvn7c8it6oh1.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%2Ful5q3ydjhvn7c8it6oh1.png" alt="Aiven Connection Details" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Note: Ensure the SSL Mode is set to require.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Connect Power BI Using the ODBC Source&lt;/strong&gt;&lt;br&gt;
Once the ODBC data source is configured, navigate to Power BI Desktop. On the home page, click Get data, select &lt;strong&gt;ODBC&lt;/strong&gt; and &lt;strong&gt;Connect&lt;/strong&gt;. Another window will appear where you will be required to choose your DSN (Data Source Name). Choose &lt;strong&gt;PostgreSQL ODBC&lt;/strong&gt; and click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You will then be prompted to input the Username and Password available from Aiven then click Connect. Power BI will then retrieve the tables from the PostgreSQL database hosted on Aiven. Select the tables you need and click &lt;strong&gt;Load&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;It is important to note that, SSL certificates are required because they encrypt the connection between Power BI and the database. When we attempt to get data from the cloud-based database hosted on Aiven, the PostgreSQL ODBC driver automatically establishes a secure and an encrypted connection using the SSL certificate we downloaded locally.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating relationships between tables
&lt;/h2&gt;

&lt;p&gt;Power BI automatically detects relationships between tables based on matching columns based on the primary &amp;amp; foreign keys. &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%2F1886096dv6dybypwb3t8.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%2F1886096dv6dybypwb3t8.png" alt="Model View in Power BI" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;See below relationships we are working with from the data we just loaded on Power BI.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Table&lt;/th&gt;
&lt;th&gt;Related Table&lt;/th&gt;
&lt;th&gt;Relationship&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;customers&lt;/td&gt;
&lt;td&gt;sales&lt;/td&gt;
&lt;td&gt;customer_id&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;sales&lt;/td&gt;
&lt;td&gt;products&lt;/td&gt;
&lt;td&gt;product_id&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;products&lt;/td&gt;
&lt;td&gt;inventory&lt;/td&gt;
&lt;td&gt;product_id&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;sales&lt;/td&gt;
&lt;td&gt;inventory&lt;/td&gt;
&lt;td&gt;product_id&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;From these relationships, Power BI knows how tables relate to each other so that calculations and visualizations are accurate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why SQL skills are important for Power BI analysts
&lt;/h2&gt;

&lt;p&gt;Although Power BI provides powerful visual tools, SQL remains an essential skill for data analysts. SQL helps analysts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Write queries that assist to retrieve data efficiently&lt;/li&gt;
&lt;li&gt;To filter data before importing it into Power BI which reduces the dataset size and improves performance.&lt;/li&gt;
&lt;li&gt;Perform aggregate operations that assist to prepare analytical datasets before visualization&lt;/li&gt;
&lt;li&gt;To join multiple tables, clean the dataset and build aggregated tables in preparation for the creation of dashboards in Power BI.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Power BI is a powerful business intelligence platform that enables organizations to transform raw data into interactive dashboards and insights. By connecting Power BI to local or cloud-based SQL databases such as PostgreSQL, data analysts can work with large datasets directly from the source rather than relying on manual data exports.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Feel free to leave comments!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>microsoft</category>
      <category>postgres</category>
      <category>sql</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>SQL Joins and Window Functions</title>
      <dc:creator>Analyst Kinywa</dc:creator>
      <pubDate>Mon, 02 Mar 2026 16:49:18 +0000</pubDate>
      <link>https://forem.com/kinyywa-data-analyst/sql-joins-and-window-functions-13ia</link>
      <guid>https://forem.com/kinyywa-data-analyst/sql-joins-and-window-functions-13ia</guid>
      <description>&lt;h1&gt;
  
  
  SQL Joins
&lt;/h1&gt;

&lt;p&gt;What is a Join? A JOIN combines rows from two or more tables based on a related column. They are the backbone of relational databases, spreading data across normalized tables and reuniting it at query time.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;INNER JOIN&lt;/strong&gt; - returns only rows with a match in both tables.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT e.full_name, d.department_name
FROM employees e
INNER JOIN departments d ON e.department_id = d.id;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;LEFT JOIN&lt;/strong&gt; - returns all rows from the left table; unmatched right-side rows return NULL.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT e.full_name, d.department_name
FROM employees e
LEFT JOIN departments d ON e.department_id = d.id;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;RIGHT JOIN&lt;/strong&gt; - opposite of LEFT JOIN; all rows from the right table are returned.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT e.full_name, d.department_name
FROM employees e
RIGHT JOIN departments d ON e.department_id = d.id;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;FULL OUTER JOIN&lt;/strong&gt; - returns all rows from both tables; NULLs fill the gaps where there's no match.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT e.full_name, d.department_name
FROM employees e
FULL OUTER JOIN departments d ON e.department_id = d.id;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;CROSS JOIN&lt;/strong&gt; - produces the Cartesian product; every row from table A paired with every row from table B.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT products.name, colors.color
FROM products
CROSS JOIN colors;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;SELF JOI&lt;/strong&gt;N - joins a table with itself; perfect for hierarchical data like org charts.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT e1.full_name AS employee, e2.name AS manager
FROM employees e1
INNER JOIN employees e2 ON e1.manager_id = e2.id;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-- Sales report combining orders, customers and products
SELECT
    c.name        AS customer,
    p.product_name,
    o.order_date,
    o.quantity,
    (o.quantity * p.price) AS total_value
FROM orders o
INNER JOIN customers c ON o.customer_id = c.id
INNER JOIN products  p ON o.product_id  = p.id
WHERE o.order_date &amp;gt;= '2024-01-01'
ORDER BY total_value DESC;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Window Functions
&lt;/h1&gt;

&lt;p&gt;What Are Window Functions? A Window Function performs calculations across a set of rows related to the current row - its window - without collapsing the result set like GROUP BY does. Every row keeps its identity, the function just adds a computed value beside it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Window Functions with sample queries
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;ROW_NUMBER()&lt;/strong&gt; - unique sequential number per partition&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT full_name, department, salary,
    ROW_NUMBER() OVER (PARTITION BY department ORDER BY salary DESC) AS rank_in_dept
FROM employees;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;RANK() vs DENSE_RANK()&lt;/strong&gt; - RANK skips numbers on ties while DENSE_RANK does not&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT full_name, salary,
    RANK()       OVER (ORDER BY salary DESC) AS rank,
    DENSE_RANK() OVER (ORDER BY salary DESC) AS dense_rank
FROM employees;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;LAG() / LEAD()&lt;/strong&gt; - look backwards or forwards without a self-join&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT month, revenue,
    LAG(revenue, 1)  OVER (ORDER BY month) AS prev_month,
    LEAD(revenue, 1) OVER (ORDER BY month) AS next_month,
    revenue - LAG(revenue, 1) OVER (ORDER BY month) AS mom_change
FROM monthly_sales;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;NTILE(n)&lt;/strong&gt; - bucket rows into n equal groups&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT name, salary,
    NTILE(4) OVER (ORDER BY salary DESC) AS salary_quartile
FROM employees;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Joins at a glance                                                            &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;INNER JOIN - Returns matched rows only
&lt;/li&gt;
&lt;li&gt;LEFT JOIN - Returns all left rows + matched right (NULLs for no match)
&lt;/li&gt;
&lt;li&gt;RIGHT JOIN - Returns all right rows + matched left (NULLs for no match)
&lt;/li&gt;
&lt;li&gt;FULL OUTER JOIN - Returns all rows from both tables, NULLs where unmatched
&lt;/li&gt;
&lt;li&gt;CROSS JOIN - Returns every row combination (Cartesian product)
&lt;/li&gt;
&lt;li&gt;SELF JOIN - Returns a table joined to itself
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Window Functions at a glance                                            &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ROW_NUMBER() - Unique sequential ID per row/partition
&lt;/li&gt;
&lt;li&gt;RANK() / DENSE_RANK() - Rankings with/without tie gaps
&lt;/li&gt;
&lt;li&gt;LAG() / LEAD() - Compare current row to prior/next row
&lt;/li&gt;
&lt;li&gt;SUM() / AVG() as window - Running totals, moving averages
&lt;/li&gt;
&lt;li&gt;NTILE(n) - Percentile buckets
&lt;/li&gt;
&lt;li&gt;FIRST_VALUE() / LAST_VALUE() - First or last value in a window &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Joins are like smart VLOOKUPs - they stitch data from multiple tables together using a shared key.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Window Functions are like adding a calculated column to a spreadsheet that is "aware" of its neighbors.&lt;/em&gt;               &lt;/p&gt;

</description>
      <category>sql</category>
      <category>beginners</category>
      <category>data</category>
    </item>
    <item>
      <title>From messy data to meaningful action: How analysts use Power BI to drive decisions</title>
      <dc:creator>Analyst Kinywa</dc:creator>
      <pubDate>Sun, 08 Feb 2026 12:51:34 +0000</pubDate>
      <link>https://forem.com/kinyywa-data-analyst/from-messy-data-to-meaningful-action-how-analysts-use-power-bi-to-drive-decisions-5co2</link>
      <guid>https://forem.com/kinyywa-data-analyst/from-messy-data-to-meaningful-action-how-analysts-use-power-bi-to-drive-decisions-5co2</guid>
      <description>&lt;p&gt;In most organizations, data rarely arrives in neat tables ready for analysis. Instead, analysts face fragmented systems, inconsistent formats, missing values, duplicate records and unclear business definitions. Yet executives still expect clear answers: &lt;em&gt;Are we profitable? What should we fix? Where should we invest next?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This is where Power BI becomes more than a reporting tool. When used well, it is a decision engine. Analysts translate messy data into action by combining data modeling, DAX logic and intuitive dashboards, bridging the gap between raw data and real-world impact.&lt;/p&gt;

&lt;p&gt;This article explores how that translation happens in practice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the business problem before touching the data
&lt;/h2&gt;

&lt;p&gt;A critical but often overlooked skill is problem framing. Before opening Power BI, effective analysts ask:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What decision will this analysis support?&lt;/li&gt;
&lt;li&gt;Who is the decision-maker?&lt;/li&gt;
&lt;li&gt;What action should change based on this insight?&lt;/li&gt;
&lt;li&gt;What business rules define success or failure?&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;A Head of Operations does not need all transaction data, he or she needs only exceptions, delays and trends.&lt;/li&gt;
&lt;li&gt;A Finance Manager cares about net performance but not raw totals.&lt;/li&gt;
&lt;li&gt;A Risk team focuses on outliers and exposure not averages.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This clarity ensures that technical work aligns with business outcomes not just technical completeness. &lt;em&gt;If you don’t know the decision, the dashboard will fail, no matter how good it looks.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Making sense of messy data
&lt;/h2&gt;

&lt;p&gt;Most business data is messy by default and visualizing this data &lt;em&gt;“as is”&lt;/em&gt; doesn’t create insight, it creates confusion.&lt;/p&gt;

&lt;p&gt;At this point is where analysts get the data from one of the data sources and use power query to clean &amp;amp; organize the data. Let's handle this part step by step:&lt;/p&gt;

&lt;h3&gt;
  
  
  Getting the data
&lt;/h3&gt;

&lt;p&gt;Here we will import our data saved in CSV format.&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%2Fu82fhft4knmq7q1ynutx.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%2Fu82fhft4knmq7q1ynutx.png" alt=" " width="800" height="341"&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%2Fyqvyz32hx0g2wba710qv.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%2Fyqvyz32hx0g2wba710qv.png" alt=" " width="800" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click load and your data will be loaded into Power BI.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cleaning the data
&lt;/h3&gt;

&lt;p&gt;Open Transform Data to enter Power Query. This is where you standardize formats (dates, currencies, IDs) and remove duplicates and invalid records.&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%2F35c1rzw0o7ndtu3muxle.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%2F35c1rzw0o7ndtu3muxle.png" alt=" " width="800" height="366"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fixing incorrect data types (timestamp to Date)&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%2Fhskwutvqgu2b5rq6viji.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%2Fhskwutvqgu2b5rq6viji.png" alt=" " width="800" height="317"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Unit_price&lt;/em&gt; &amp;amp; &lt;em&gt;total_amount&lt;/em&gt; to (decimal / whole 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%2F2f8kd259uw83pkzv4xgo.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%2F2f8kd259uw83pkzv4xgo.png" alt=" " width="800" height="309"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enabling Column quality helps you check for missing or inconsistent values.&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%2Fd8zewfakj0ezlluwgx6u.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%2Fd8zewfakj0ezlluwgx6u.png" alt=" " width="800" height="230"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  DAX: Embedding business logic into the data
&lt;/h3&gt;

&lt;p&gt;DAX allows analysts to translate business questions into precise logic:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Total Sales - &lt;code&gt;Total Sales = SUM(supermarket_transactions[total_sales_amount])&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Total Quantity Sold - &lt;code&gt;Total Quantity Sold = SUM(supermarket_transactions[quantity])&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Average Transaction Value - &lt;code&gt;Average Transaction Value = AVERAGE(supermarket_transactions[total_sales_amount])&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Sales by Customer Type - &lt;code&gt;Total Sales = SUM(supermarket_transactions[total_sales_amount])&lt;/code&gt; then categorize by &lt;code&gt;customer_type&lt;/code&gt; in report view.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These measures will power your KPI cards and charts.&lt;/p&gt;

&lt;p&gt;See DAX results in report view&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%2Fe2xv8f2x9zni1g1upk0m.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%2Fe2xv8f2x9zni1g1upk0m.png" alt=" " width="800" height="279"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;DAX turns Power BI from a visualization tool into a decision framework.&lt;/p&gt;

&lt;h3&gt;
  
  
  Dashboards: Translating insights into action
&lt;/h3&gt;

&lt;p&gt;A good dashboard doesn’t show everything, it shows What’s working, What’s broken and What needs attention now. &lt;/p&gt;

&lt;p&gt;Effective Power BI dashboards use KPIs with thresholds and color indicators, highlight trends rather than static numbers, enable filtering by key dimensions using slicers and match how decision-makers scan information.&lt;/p&gt;

&lt;p&gt;Dashboard design principle: The goal is &lt;strong&gt;clarity, not decoration&lt;/strong&gt;. Every visual should answer a specific business question.&lt;/p&gt;

&lt;p&gt;See below sample dashboard showing sales analysis of a supermarket with multiple store locations.&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%2Fjt8vz0r9adb6d3xmtozz.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%2Fjt8vz0r9adb6d3xmtozz.png" alt=" " width="800" height="456"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In conclusion, Power BI skills are not valuable because they produce charts. They are valuable because they translate complexity into clarity. &lt;/p&gt;

&lt;p&gt;Analysts sit at the intersection of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Messy operational data&lt;/li&gt;
&lt;li&gt;Technical tools like Power Query, data models and DAX&lt;/li&gt;
&lt;li&gt;Business decisions that affect cost, revenue, risk and customer experience&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When done well, Power BI turns raw data into insight, insight into action and action into measurable business impact.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In today’s data-driven organizations, the analyst’s true role is not just to analyze but to enable better decisions, faster.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Enjoy the article and drop comments.&lt;/p&gt;

</description>
      <category>analytics</category>
      <category>beginners</category>
      <category>data</category>
    </item>
    <item>
      <title>Power BI: Schemas &amp; Data Modelling</title>
      <dc:creator>Analyst Kinywa</dc:creator>
      <pubDate>Mon, 02 Feb 2026 07:00:59 +0000</pubDate>
      <link>https://forem.com/kinyywa-data-analyst/schemas-and-data-modelling-in-power-bi-55no</link>
      <guid>https://forem.com/kinyywa-data-analyst/schemas-and-data-modelling-in-power-bi-55no</guid>
      <description>&lt;p&gt;When most people think about Power BI, they imagine dashboards and visuals. But the truth is great Power BI reports start with great data modelling, long before a single visual is created. A strong model improves performance, ensures accurate reporting and provides a scalable foundation for analytics. In this article, we explore fact and dimension tables, star and snowflake schemas, relationships and the importance of good modelling in Power BI.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is data modelling in Power BI?
&lt;/h2&gt;

&lt;p&gt;Data modelling refers to the process of structuring data into tables, defining relationships between them, and optimizing them for analytical queries. In Power BI, the data model sits at the heart of the solution, powering calculations written in DAX and driving how filters and aggregations behave across visuals. Unlike transactional systems that are optimized for inserts and updates, Power BI models are optimized for fast read and aggregation operations. This makes modelling techniques borrowed from data warehousing such as schemas especially relevant. &lt;/p&gt;

&lt;p&gt;Poor modelling leads to slow, inaccurate, or confusing reports. As one source puts it: &lt;em&gt;"Poor data models turn Power BI dashboards into expensive lies."&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Star schema
&lt;/h2&gt;

&lt;p&gt;Star schema is a mature modeling approach widely adopted by relational data warehouses. It requires modelers to classify their model tables as either &lt;em&gt;fact or dimension&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;key features of the star schema:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Single-level dimension tables: The dimension tables connect directly to the fact table without extra layers. Each table focuses on one area, like products, regions or time, making it simple to use.&lt;/li&gt;
&lt;li&gt;Denormalized design: In a star schema, related data is stored together in one table using a denormalized approach.&lt;/li&gt;
&lt;li&gt;Common in data warehousing: The star schema is used for quick analysis. It can easily filter or calculate totals.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s understand this with a simple star schema diagram. The fact table &lt;em&gt;&lt;strong&gt;Sales&lt;/strong&gt;&lt;/em&gt; is in the center. It holds the numeric data you want to analyze, like sales or profits. Connected to it are dimension tables with descriptive details, such as product names, customer location or dates:&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%2Fcyyyd9owev47jjo1e0f0.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%2Fcyyyd9owev47jjo1e0f0.png" alt=" " width="800" height="631"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Fact tables
&lt;/h3&gt;

&lt;p&gt;Fact tables store observations or events and can be sales orders, stock balances, exchange rates, temperatures and more. A fact table contains dimension key columns that relate to dimension tables and numeric measure columns. The dimension key columns determine the dimensionality of a fact table while the dimension key values determine the granularity of a fact table.&lt;/p&gt;

&lt;p&gt;It is also important to note that dimension tables contain a relatively small number of rows. Fact tables, on the other hand, can contain a large number of rows and continue to grow 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%2F82hy09sbg957lgdwz3do.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%2F82hy09sbg957lgdwz3do.png" alt=" " width="800" height="543"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Dimension tables
&lt;/h3&gt;

&lt;p&gt;Dimension tables describe business entities - the things you model. Entities can include products, people, places and concepts including time itself. The most consistent table you'll find in a star schema is a date dimension table. A dimension table contains a key column (or columns) that acts as a unique identifier, and other columns. Other columns support filtering and grouping your data.&lt;/p&gt;

&lt;p&gt;For example, if you are looking to determine the sales targets, you can store the attributes of the sales targets in a dimension table. Dimension tables group the data in the database when the business creates reports. For example, you can group sales targets by country, product, or retailer and those groupings are stored in dimension tables.&lt;/p&gt;

&lt;h2&gt;
  
  
  Snowflake schema
&lt;/h2&gt;

&lt;p&gt;The snowflake schema consists of one fact table that is connected to many dimension tables, which can be connected to other dimension tables through a many-to-one relationship. Tables in a snowflake schema are usually normalized to the third normal form. Each dimension table represents exactly one level in a hierarchy. &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%2Fl1929wa4kn1rzzh6fwy0.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%2Fl1929wa4kn1rzzh6fwy0.png" alt=" " width="534" height="374"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;Relationships define how tables connect and how filters propagate through the model.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Cardinality: One-to-many is the recommended standard&lt;/li&gt;
&lt;li&gt;Cross-filter direction: Single direction (from dimension to fact) is preferred&lt;/li&gt;
&lt;li&gt;Active vs inactive relationships: Only one active relationship can exist between two tables at a time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Poorly designed relationships such as many-to-many or bi-directional filters can lead to ambiguous results, performance degradation and incorrect totals. &lt;/p&gt;

&lt;h2&gt;
  
  
  Why good data modelling is critical?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Faster performance - Star schemas reduce query complexity, enabling sub‑second response times.
&lt;/li&gt;
&lt;li&gt;Accurate reporting - Good modelling prevents conflicting calculations and improves trust in analytics.
&lt;/li&gt;
&lt;li&gt;Scalability - A well‑structured model grows easily with your data.
&lt;/li&gt;
&lt;li&gt;Simpler DAX - Cleaner relationships mean easier formulas and fewer workarounds.
&lt;/li&gt;
&lt;li&gt;Stronger governance - Consistent modelling improves data integrity and decision quality.
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;In conclusion, if you want fast, accurate and scalable Power BI reports, start with great modelling. A strong model-built around a star schema, clean fact/dimension separation and well-defined relationships leads to high performance, reliable insights, simpler DAX and long‑term scalability&lt;/em&gt;  &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Great visuals don’t make great reports, great data modelling does.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>analytics</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Introduction to Microsoft Excel for Data Analytics</title>
      <dc:creator>Analyst Kinywa</dc:creator>
      <pubDate>Sat, 24 Jan 2026 07:22:16 +0000</pubDate>
      <link>https://forem.com/kinyywa-data-analyst/introduction-to-microsoft-excel-for-data-analytics-56a1</link>
      <guid>https://forem.com/kinyywa-data-analyst/introduction-to-microsoft-excel-for-data-analytics-56a1</guid>
      <description>&lt;p&gt;Microsoft Excel is one of the most widely used tools for basic data analysis. It is easy to learn for a beginner, requires no programming skills and is powerful enough to analyze, report and visualize everyday business data. In this article, we’ll explore how beginners can use Excel for data analytics step by step.&lt;/p&gt;

&lt;p&gt;Microsoft Excel is a spreadsheet application that allows you to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Store data&lt;/li&gt;
&lt;li&gt;Organize information&lt;/li&gt;
&lt;li&gt;Perform calculations&lt;/li&gt;
&lt;li&gt;Analyze trends&lt;/li&gt;
&lt;li&gt;Create visual reports&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Excel data is arranged in Columns (vertical), Rows (horizontal) and &lt;br&gt;
Cells (where a row and column meet).&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%2Fuvpiospapxs9nz27np77.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%2Fuvpiospapxs9nz27np77.png" alt=" " width="595" height="237"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Organizing data for analysis
&lt;/h3&gt;

&lt;p&gt;It is important to note that for Excel to work well as an analytics tool, data must be structured properly.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each column should have one clear header&lt;/li&gt;
&lt;li&gt;Each row should represent one record&lt;/li&gt;
&lt;li&gt;Avoid blank rows or columns inside your data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example dataset:&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%2F8swnyvms15x8vo2m6a4a.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%2F8swnyvms15x8vo2m6a4a.png" alt=" " width="596" height="199"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Basic data cleaning in excel
&lt;/h3&gt;

&lt;p&gt;Clean data leads to better analysis.&lt;/p&gt;

&lt;p&gt;Common data-cleaning tasks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Removing duplicates&lt;/li&gt;
&lt;li&gt;Fixing data types (dates as Dates, numeric fields as numbers)&lt;/li&gt;
&lt;li&gt;Handling missing values&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%2Fyzteduexdl0rjqgh2dru.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%2Fyzteduexdl0rjqgh2dru.png" alt=" " width="628" height="364"&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%2Fwy2npbu3g3kk79t9n3my.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%2Fwy2npbu3g3kk79t9n3my.png" alt=" " width="504" height="264"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Sorting and filtering data
&lt;/h3&gt;

&lt;p&gt;Sorting and filtering help you focus on specific information or data.&lt;br&gt;
Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sort salary from highest to lowest - highlight all data (Ctrl + A) and click data then sort&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%2F4w0rxsudcfommrirfdr3.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%2F4w0rxsudcfommrirfdr3.png" alt=" " width="697" height="361"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Basic calculations using formulas
&lt;/h3&gt;

&lt;p&gt;Excel allows you to perform calculations using formulas and a formula always starts with an equals sign (=).&lt;/p&gt;

&lt;p&gt;Common beginner formulas:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;=SUM(E2:E10)      // Total salary
=AVERAGE(E2:E10)  // Average salary
=COUNT(E2:E10)    // Number of values
=MAX(E2:E10)      // Highest salary amount
=MIN(E2:E10)      // Lowest salary amount
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs7s6ektffavc6zulltzg.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%2Fs7s6ektffavc6zulltzg.png" alt=" " width="504" height="295"&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%2Fyku98ny9u1qy4nlmla1u.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%2Fyku98ny9u1qy4nlmla1u.png" alt=" " width="503" height="312"&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%2F7l9713je07zsuo8jtvxk.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%2F7l9713je07zsuo8jtvxk.png" alt=" " width="504" height="336"&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%2Ftx01w0ld9e1ealpnmdja.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%2Ftx01w0ld9e1ealpnmdja.png" alt=" " width="506" height="353"&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%2Fm1ccea6fwwmrsaacjygt.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%2Fm1ccea6fwwmrsaacjygt.png" alt=" " width="507" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Visualizing data with charts
&lt;/h3&gt;

&lt;p&gt;Charts help turn numbers into visual insights.&lt;/p&gt;

&lt;p&gt;Common chart types:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Column charts - compare values&lt;/li&gt;
&lt;li&gt;Line charts - show trends over time&lt;/li&gt;
&lt;li&gt;Pie charts - show proportions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;How to create a chart:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select your data&lt;/li&gt;
&lt;li&gt;Click Insert then click Chart&lt;/li&gt;
&lt;li&gt;Choose a chart type&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, I will visualize salary  by employee using a column chart and a line 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%2Ffyfluhk9qtd5qapbs2ob.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%2Ffyfluhk9qtd5qapbs2ob.png" alt=" " width="536" height="496"&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%2Fw4105k6ghhpaox1c88oi.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%2Fw4105k6ghhpaox1c88oi.png" alt=" " width="536" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Using pivot tables for data analysis
&lt;/h3&gt;

&lt;p&gt;PivotTables are one of Excel’s most powerful features for analytics. They allow you to summarize large datasets without writing formulas.&lt;/p&gt;

&lt;p&gt;Pivot tables can answer questions like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Total salary by department&lt;/li&gt;
&lt;li&gt;Salary by employee&lt;/li&gt;
&lt;li&gt;Average salary by department&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Select inside your data&lt;/li&gt;
&lt;li&gt;Click Insert → pivot table&lt;/li&gt;
&lt;li&gt;Drag fields into rows and values&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%2Fukzj5ksnp2dysowe7ces.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%2Fukzj5ksnp2dysowe7ces.png" alt=" " width="489" height="768"&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%2Ff7r9iw765jy3pgdaumg3.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%2Ff7r9iw765jy3pgdaumg3.png" alt=" " width="397" height="274"&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%2Frwuh38adrf53b0qkf7bv.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%2Frwuh38adrf53b0qkf7bv.png" alt=" " width="479" height="773"&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%2Fh25a3jrtx2iz5shkamgy.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%2Fh25a3jrtx2iz5shkamgy.png" alt=" " width="419" height="277"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Excel is great for beginner data analysts
&lt;/h3&gt;

&lt;p&gt;Excel is ideal for beginners because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No coding required&lt;/li&gt;
&lt;li&gt;Easy to learn&lt;/li&gt;
&lt;li&gt;Widely used in organizations&lt;/li&gt;
&lt;li&gt;Strong analytical features for small and medium datasets&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Many data professionals start with Excel before moving to tools like SQL, Power BI or Python.&lt;/p&gt;

&lt;p&gt;In conclusion, Microsoft Excel is a powerful entry point into data analytics. By learning how to organize data, apply formulas, create charts and use PivotTables, beginners like me can gain valuable analytical skills and make data-driven decisions using Excel.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Feel free to comment &amp;amp; happy analyzing!!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>analytics</category>
      <category>data</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Git for Beginners: Pushing, Pulling and Tracking Code Without the Stress</title>
      <dc:creator>Analyst Kinywa</dc:creator>
      <pubDate>Mon, 19 Jan 2026 07:42:30 +0000</pubDate>
      <link>https://forem.com/kinyywa-data-analyst/git-for-beginners-blm</link>
      <guid>https://forem.com/kinyywa-data-analyst/git-for-beginners-blm</guid>
      <description>&lt;p&gt;If you’re just getting into coding, chances are you’ve heard people casually throw around words like git, commit and github and thought:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;“Yeah… I’ll figure that out later”&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Good news: now is later and git isn’t as scary as it sounds.&lt;/p&gt;

&lt;h4&gt;
  
  
  So… What exactly Is git?
&lt;/h4&gt;

&lt;p&gt;Git is a version control system. That's just a fancy way of saying:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Git keeps track of changes in your code over time&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Think of git like a save system for your project, except:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every save has a message&lt;/li&gt;
&lt;li&gt;You can go back to any previous version&lt;/li&gt;
&lt;li&gt;You can see what changed, when and why&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Why version control is a big deal
&lt;/h4&gt;

&lt;p&gt;Version control is important because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Code breaks&lt;/li&gt;
&lt;li&gt;Features change&lt;/li&gt;
&lt;li&gt;Bugs appear out of nowhere&lt;/li&gt;
&lt;li&gt;Teams work on the same files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With git, you can: Roll back to a working version, experiment without fear, collaborate without overwriting someone else’s work and understand how your project evolved.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Basically, git lets you make mistakes safely and that’s huge.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Installing git
&lt;/h3&gt;

&lt;p&gt;First things first, install git:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://git-scm.com/" rel="noopener noreferrer"&gt;https://git-scm.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After installing, check that it works on cmd:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;If you see a version number, you’re good to go 👍&lt;/p&gt;

&lt;h4&gt;
  
  
  How to push code to github
&lt;/h4&gt;

&lt;p&gt;Let’s walk through a real-world flow.&lt;/p&gt;

&lt;p&gt;Create a github repository&lt;/p&gt;

&lt;p&gt;On github:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click new repository&lt;/li&gt;
&lt;li&gt;Give it a name (e.g. your-first-repository)&lt;/li&gt;
&lt;li&gt;Click create repository&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That’s your online home for the project.&lt;/p&gt;

&lt;h4&gt;
  
  
  Setting Up Your Git Username and Email
&lt;/h4&gt;

&lt;p&gt;Before you start committing code, Git needs to know who you are. If you don’t set this up, Git will eventually stop you with an error like:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Please tell me who you are.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This information is attached to every commit you make, so GitHub and other developers can see who made each change.&lt;/p&gt;

&lt;p&gt;Run these commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --global user.name
git config --global user.email
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set your git username&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --global user.name "Your Name"
git config --global user.email "youremail@gmail.com"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run &amp;amp; you are all set&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --global --list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Initialize git in your project - This tells git: Hey, start tracking this project.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Add files to git - This means: I want git to track all current changes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Commit your changes - A commit message should explain what you changed not your life story, hehe lol.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit -m "Initial commit"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Connect your project to github - This links your local project to github.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git remote add origin https://github.com/your-username/your-first-repository.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Push your code - Boom 💥 Your code is now on GitHub.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push -u origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  How to pull code from github
&lt;/h3&gt;

&lt;p&gt;Pulling just means - “Give me the latest version from github.”&lt;/p&gt;

&lt;p&gt;Run this inside your project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git pull origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  How to track changes with git
&lt;/h3&gt;

&lt;p&gt;This is where git really shines. Check the status of your project&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;If you ever feel lost, run&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;See exactly what changed&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;This shows line-by-line changes before you commit.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;View commit history&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;This shows: past commits, messages, dates and authors&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Git feels confusing at first because it’s different, not because it’s impossible.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Once you understand:&lt;/em&gt;&lt;br&gt;
&lt;em&gt;add - stage&lt;/em&gt;&lt;br&gt;
&lt;em&gt;commit - save&lt;/em&gt;&lt;br&gt;
&lt;em&gt;push - upload&lt;/em&gt;&lt;br&gt;
&lt;em&gt;pull - download&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;…it starts to click. If you’re learning git, you’re already doing the right thing. Stick with it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Code! Add! Commit! 🚀&lt;/em&gt;&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
    </item>
  </channel>
</rss>
