<?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: tonny otieno</title>
    <description>The latest articles on DEV Community by tonny otieno (@tonny-o).</description>
    <link>https://dev.to/tonny-o</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%2F3716729%2F2fcd77d2-ec1e-41e7-b148-dbdb8bc2b67b.png</url>
      <title>DEV Community: tonny otieno</title>
      <link>https://dev.to/tonny-o</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tonny-o"/>
    <language>en</language>
    <item>
      <title>Connecting power BI to a SQL database</title>
      <dc:creator>tonny otieno</dc:creator>
      <pubDate>Fri, 20 Mar 2026 14:26:26 +0000</pubDate>
      <link>https://dev.to/tonny-o/connecting-power-bi-to-a-sql-database-57g0</link>
      <guid>https://dev.to/tonny-o/connecting-power-bi-to-a-sql-database-57g0</guid>
      <description>&lt;h1&gt;
  
  
  POWER BI
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Power BI stands for power business intelligence&lt;/strong&gt; which is a collection of software services, tools and connectors. Power BI is a business analytics platform that helps transform data into actionable insights.&lt;/p&gt;

&lt;h2&gt;
  
  
  Uses of Power BI in data analytics and business intelligence
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data visualization and reporting&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Power bi is used for communicating findings visually to stakeholders through reports and dashboards representing data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data integration&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Power Bi helps in merging different sector datasets and coming to a conclusion. E.g. &lt;em&gt;product data and market data&lt;/em&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Collaboration&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Power Bi facilitates collaboration by providing a centralized platform for teams to build, share, and work on data insights securely. This is particularly enabled through role-based access control.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data transformation&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Power bi's query editor enables users to clean, shape and combine data from various sources such as excel, PostgreSQL and web.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Companies connects Power Bi to databases like SQL, PostgreSQL which can take real time tracking of Key Performance Indicators as the data changes. Artificial Intelligence and machine learning is also embedded to make business predictions based on data store in the connected databases. Databases such relational or not relational, allow large volume of data compared to excel sheet. Through functions such as triggers and events it's easy to update database for correct storage of data.&lt;/p&gt;

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

&lt;p&gt;1 open the power BI desktop and click on get data on the tool bar.&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%2Fgf0gp2s1uidl4x5zdccc.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%2Fgf0gp2s1uidl4x5zdccc.png" alt=" " width="800" height="530"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2 click on more option and select databases.&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%2Ffe4xh7gklqlmzbz16fy7.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%2Ffe4xh7gklqlmzbz16fy7.png" alt=" " width="800" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3 select PostgreSQL database then click connect.&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%2F5pe2s3zxe4u8czsfgtgl.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%2F5pe2s3zxe4u8czsfgtgl.png" alt=" " width="800" height="505"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4 Enter your PostgreSQL details, select import then click OK.&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%2F9wi8g9zd42l98f0e0xef.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%2F9wi8g9zd42l98f0e0xef.png" alt=" " width="800" height="423"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5 Enter your credentials and click connect.&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%2Fsnjbm797u1vowncxdap8.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%2Fsnjbm797u1vowncxdap8.png" alt=" " width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;7 You have successfully connect to your local PostgreSQL database, choose your table of interest and load them for use.&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%2Fdky57787yei0k85m1msv.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%2Fdky57787yei0k85m1msv.png" alt=" " width="800" height="413"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The tables shown are loaded and Power Bi automatically finds &lt;strong&gt;foreign key&lt;/strong&gt; to then and joins then creating schema through the relationships.&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%2Fp11yuq9ba1x15291goep.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%2Fp11yuq9ba1x15291goep.png" alt=" " width="800" height="551"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Connecting Power BI to cloud database e.g. aiven PostgreSQL
&lt;/h2&gt;

&lt;p&gt;Just like the above steps , &lt;br&gt;
1 open the power BI desktop.&lt;br&gt;
2 click on get data on the tool bar.&lt;br&gt;
3 click on more option and select databases.&lt;br&gt;
4 select PostgreSQL database then click connect.&lt;br&gt;
5 Go to aiven and download the CA certificate.&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%2Fi18lxmrlt1u7zlhmkwuh.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%2Fi18lxmrlt1u7zlhmkwuh.png" alt=" " width="800" height="329"&gt;&lt;/a&gt;&lt;br&gt;
The SSL certificate from aiven, is a trusted and encrypted for security purposes. Ensuring that only the computer having the certificate can connect to the cloud database.&lt;/p&gt;
&lt;h1&gt;
  
  
  Why do you need SQL skills for power BI analyst?
&lt;/h1&gt;

&lt;p&gt;As we have seen above, power bi can be connected to different databases be it &lt;strong&gt;locally or in a cloud&lt;/strong&gt;. It is essential for an analyst to have knowledge of SQL to apply them in data manipulation. Database performance by &lt;strong&gt;indexing and query optimization&lt;/strong&gt; is important to achieve normalization in a vast fast changing environment.&lt;/p&gt;

&lt;p&gt;SQl has variety of built-in functions that can be uses to &lt;strong&gt;retrieve&lt;/strong&gt;, &lt;strong&gt;filter data&lt;/strong&gt; and &lt;strong&gt;perform aggregation&lt;/strong&gt;. We have conditional evaluation using WHERE to return dataset satisfying the given condition e.g.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;first_name&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;first_name&lt;/span&gt; &lt;span class="k"&gt;like&lt;/span&gt; &lt;span class="s1"&gt;'%T'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;SQL's window function&lt;/strong&gt; offers an easy way in ranking rows, partitioning ranking and even grouping different entities. One of the powerful functions are &lt;strong&gt;GROUP BY&lt;/strong&gt; and &lt;strong&gt;HAVING&lt;/strong&gt;. Some of the common aggregate functions include &lt;strong&gt;count&lt;/strong&gt;, &lt;strong&gt;sum&lt;/strong&gt;, &lt;strong&gt;max&lt;/strong&gt;, &lt;strong&gt;min&lt;/strong&gt; etc&lt;/p&gt;

</description>
      <category>analytics</category>
      <category>database</category>
      <category>sql</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>SQL JOINS AND WINDOW FUNCTIONS</title>
      <dc:creator>tonny otieno</dc:creator>
      <pubDate>Mon, 02 Mar 2026 12:19:25 +0000</pubDate>
      <link>https://dev.to/tonny-o/sql-joins-and-window-functions-334h</link>
      <guid>https://dev.to/tonny-o/sql-joins-and-window-functions-334h</guid>
      <description>&lt;h1&gt;
  
  
  SQL Joins and Window Functions
&lt;/h1&gt;

&lt;p&gt;SQL joins allows you to collate/add two or more tables together using a common identifier e.g. a foreign key. Due to normalization, one may not get all the required columns in a single table in order to reduce data redundancies. &lt;br&gt;
The common identifier acts as a transportation between the two tables allowing columns from both tables be included in the query result set.&lt;/p&gt;


&lt;h2&gt;
  
  
  Sample Tables Used for Illustration
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Student Table
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;student_id&lt;/th&gt;
&lt;th&gt;name&lt;/th&gt;
&lt;th&gt;course_id&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Willis Kip&lt;/td&gt;
&lt;td&gt;001&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Edwin Sifuna&lt;/td&gt;
&lt;td&gt;002&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Tonny Oti&lt;/td&gt;
&lt;td&gt;NULL&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h3&gt;
  
  
  Course Table
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;course_id&lt;/th&gt;
&lt;th&gt;course_name&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;001&lt;/td&gt;
&lt;td&gt;Botany&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;002&lt;/td&gt;
&lt;td&gt;Political_sci&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;004&lt;/td&gt;
&lt;td&gt;English&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;


&lt;h1&gt;
  
  
  Types of SQL Joins
&lt;/h1&gt;
&lt;h2&gt;
  
  
  1️⃣ INNER JOIN
&lt;/h2&gt;

&lt;p&gt;Returns only the rows that exist in &lt;strong&gt;both&lt;/strong&gt; 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%2Fq8r6otmcjfu7goglcj1t.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%2Fq8r6otmcjfu7goglcj1t.png" alt=" " width="294" height="199"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;course_name&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;Student&lt;/span&gt;
&lt;span class="k"&gt;INNER&lt;/span&gt; &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;Course&lt;/span&gt;
&lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;Student&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;course_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Course&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;course_id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Output
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Course_name&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Willis Kip&lt;/td&gt;
&lt;td&gt;Botany&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Edwin Sifuna&lt;/td&gt;
&lt;td&gt;Political_sci&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  2️⃣ LEFT JOIN
&lt;/h2&gt;

&lt;p&gt;Returns &lt;strong&gt;all rows from the left table&lt;/strong&gt; and matching rows from the right table.&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%2F5fbr1ebszg26hl5xz65u.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%2F5fbr1ebszg26hl5xz65u.png" alt=" " width="188" height="141"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;course_name&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;Student&lt;/span&gt;
&lt;span class="k"&gt;LEFT&lt;/span&gt; &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;Course&lt;/span&gt;
&lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;Student&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;course_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Course&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;course_id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Output
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Course_name&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Willis Kip&lt;/td&gt;
&lt;td&gt;Botany&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Edwin Sifuna&lt;/td&gt;
&lt;td&gt;Political_sci&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tonny Oti&lt;/td&gt;
&lt;td&gt;NULL&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  3️⃣ RIGHT JOIN
&lt;/h2&gt;

&lt;p&gt;Returns &lt;strong&gt;all rows from the right table&lt;/strong&gt; and matching rows from the left table.&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%2Fuucxumk0z5hg7ovfo7dv.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%2Fuucxumk0z5hg7ovfo7dv.png" alt=" " width="235" height="180"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;course_name&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;Student&lt;/span&gt;
&lt;span class="k"&gt;RIGHT&lt;/span&gt; &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;Course&lt;/span&gt;
&lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;Student&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;course_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Course&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;course_id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Output
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Course_name&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Willis Kip&lt;/td&gt;
&lt;td&gt;Botany&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Edwin Sifuna&lt;/td&gt;
&lt;td&gt;Political_sci&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NULL&lt;/td&gt;
&lt;td&gt;English&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  4️⃣ FULL JOIN
&lt;/h2&gt;

&lt;p&gt;Returns &lt;strong&gt;all rows from both tables&lt;/strong&gt;, matching where possible.&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%2Frhw7dkfjwwu4uy91ci89.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%2Frhw7dkfjwwu4uy91ci89.png" alt=" " width="192" height="116"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;course_name&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;Student&lt;/span&gt;
&lt;span class="k"&gt;FULL&lt;/span&gt; &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;Course&lt;/span&gt;
&lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;Student&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;course_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Course&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;course_id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Output
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Course_name&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Willis Kip&lt;/td&gt;
&lt;td&gt;Botany&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Edwin Sifuna&lt;/td&gt;
&lt;td&gt;Political_sci&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tonny Oti&lt;/td&gt;
&lt;td&gt;NULL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NULL&lt;/td&gt;
&lt;td&gt;English&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




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

&lt;p&gt;A &lt;strong&gt;window function&lt;/strong&gt; is a type of function that performs a calculation across a specific &lt;strong&gt;set of rows&lt;/strong&gt; (the ‘window’ in question), defined by an &lt;strong&gt;OVER () clause&lt;/strong&gt;. Window functions use values from one or multiple rows to return a value for each row, which makes them different from traditional aggregate functions, which return a single value for multiple rows&lt;/p&gt;




&lt;h2&gt;
  
  
  Syntax
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;column_1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;column_2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="k"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
           &lt;span class="k"&gt;PARTITION&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;partition_expression&lt;/span&gt;
           &lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;order_expression&lt;/span&gt;
       &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;output_column_name&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="k"&gt;table_name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Explanation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;SELECT&lt;/code&gt; → clause defines the columns you want to select from the table_name table.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;function()&lt;/code&gt; → The window function you want to apply.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;OVER()&lt;/code&gt; → Defines the window.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;PARTITION BY&lt;/code&gt; → divides rows into partitions based on the specified partition_expression; if the partition_expression is not specified, the result set will be treated as a single partition..&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ORDER BY&lt;/code&gt; → Defines row order within each partition.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;output_column_name&lt;/code&gt; → Name of the calculated column.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;dem&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;first_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;dem&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;last_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;gender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="k"&gt;AVG&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;salary&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;PARTITION&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;gender&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;avg_salary_by_gender&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employee_demographics&lt;/span&gt; &lt;span class="n"&gt;dem&lt;/span&gt;
&lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;employee_salary&lt;/span&gt; &lt;span class="n"&gt;sal&lt;/span&gt;
    &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;dem&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;employee_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;employee_id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This calculates the average salary for each gender while still displaying individual employee records.&lt;/p&gt;




&lt;h2&gt;
  
  
  Commonly Used Window Functions
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ROW_NUMBER()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;RANK()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;DENSE_RANK()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;LAG(expression, offset)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;FIRST_VALUE()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;LAST_VALUE()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Aggregate functions used as window functions:

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;SUM()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;AVG()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;MAX()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;MIN()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;COUNT()&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h1&gt;
  
  
  CONCLUSION
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;JOINs&lt;/strong&gt; when combining data from multiple tables.&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;Window Functions&lt;/strong&gt; when you need row-level results alongside aggregated calculations.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
      <category>database</category>
      <category>sql</category>
      <category>tutorial</category>
    </item>
    <item>
      <title># How Analysts Translate Messy Data, DAX, and Dashboards into Action Using Power BI</title>
      <dc:creator>tonny otieno</dc:creator>
      <pubDate>Mon, 09 Feb 2026 13:17:46 +0000</pubDate>
      <link>https://dev.to/tonny-o/-how-analysts-translate-messy-data-dax-and-dashboards-into-action-using-power-bi-467e</link>
      <guid>https://dev.to/tonny-o/-how-analysts-translate-messy-data-dax-and-dashboards-into-action-using-power-bi-467e</guid>
      <description>&lt;p&gt;Businesses interact with data periodically as part of their day-to-day operations. Raw data is often messy and needs polishing to extract value and ultimately create insights on the actions needed to be performed for improvement.&lt;/p&gt;

&lt;p&gt;One powerful tool is &lt;strong&gt;Power Query in PowerBI&lt;/strong&gt; helps a great deal in transforming data for decision making.&lt;/p&gt;

&lt;p&gt;As a data analyst, working with raw data can be broadly classified into three stages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Data Cleaning&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data Analysis&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data Visualization&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Data Cleaning
&lt;/h2&gt;

&lt;p&gt;Here you have to state the &lt;strong&gt;problem statement&lt;/strong&gt; that is specific, measurable and achievable. The problem statement will be answered in the different KPI’s to be shown in the dashboard.  Thereafter, perform a preliminary analysis on the data like: &lt;/p&gt;

&lt;p&gt;-Asigning consistent correct data types. &lt;br&gt;
-Removing duplicates.&lt;br&gt;
-Fixing misspellings/typos.&lt;br&gt;
-Checking for biases.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data Analysis
&lt;/h2&gt;

&lt;p&gt;This is the core stage of the process and must be executed carefully.&lt;br&gt;
After understanding the problem statement, adjust and format the data using &lt;strong&gt;DAX (Data Analysis and Expression)&lt;/strong&gt;. DAX is a very critical part in creating measures or columns representing calculation like &lt;strong&gt;aggregates&lt;/strong&gt;, &lt;strong&gt;filters&lt;/strong&gt;, &lt;strong&gt;time&lt;/strong&gt; and &lt;strong&gt;logic&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The choice of data modelling is also vital for performance and accurate reporting. It is advisable to adopt &lt;strong&gt;star schema&lt;/strong&gt; as it is organized and allows easy creation of large data volumes.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Data Modeling
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Best Practices for Creating Models
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Always connect &lt;strong&gt;dimension tables to fact tables&lt;/strong&gt;, not the other way around.
&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;one-to-one relationships&lt;/strong&gt; only where necessary.
&lt;/li&gt;
&lt;li&gt;Keep filter direction &lt;strong&gt;single&lt;/strong&gt; unless there is a strong reason otherwise.
&lt;/li&gt;
&lt;li&gt;Avoid unnecessary &lt;strong&gt;inactive relationships&lt;/strong&gt;.
&lt;/li&gt;
&lt;li&gt;Always validate relationships by testing &lt;strong&gt;visuals and slicers&lt;/strong&gt;.
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Once the data achieves high integrity, &lt;strong&gt;joins&lt;/strong&gt; can be introduced to combine or filter data from multiple tables based on relationships (matching columns).&lt;/p&gt;

&lt;p&gt;Essentially, joins enrich data and checks quality. Based on the required outcome one can either choose inner join, left join, right join, left-anti join, right-anti join etc.&lt;/p&gt;




&lt;h2&gt;
  
  
  Data Visualization
&lt;/h2&gt;

&lt;p&gt;After completing the first two stages, a &lt;strong&gt;dashboard&lt;/strong&gt; is created to visualize key KPIs. A dashboard is a well-organized visual representation of data designed for presentation and sharing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data visualization&lt;/strong&gt; is the graphical representation of information and data. By using visual elements like &lt;strong&gt;charts&lt;/strong&gt;, &lt;strong&gt;graphs&lt;/strong&gt;, &lt;strong&gt;tables&lt;/strong&gt; and &lt;strong&gt;maps&lt;/strong&gt;. &lt;br&gt;
Data visualization tools provide an accessible way to see and understand &lt;strong&gt;trends&lt;/strong&gt;, &lt;strong&gt;outliers&lt;/strong&gt;, and &lt;strong&gt;patterns&lt;/strong&gt; in data. Here is where non-technical people understand the KPI’s e.g. trend over time, relationship between different factors. This is possible by filtering through slicers on a given metric.  &lt;/p&gt;

&lt;p&gt;Once visual data is analyzed, informed decisions can be made to improve business performance and focus on specific areas—backed by data rather than guesswork.&lt;/p&gt;

&lt;p&gt;Simply no flying blind in decision-making.&lt;/p&gt;

&lt;p&gt;Without taking action, results are bound to fail. This is often the tipping point that differentiates &lt;strong&gt;good organizations from great ones&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Principles of a Good Dashboard
&lt;/h2&gt;

&lt;p&gt;A well-designed dashboard should emphasize:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Simplicity&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Clarity&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Contextualization&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It should be clean, well-organized, and not overdone.&lt;/p&gt;

</description>
      <category>analytics</category>
      <category>datascience</category>
      <category>microsoft</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>POWER BI- Schema and Data Modelling.</title>
      <dc:creator>tonny otieno</dc:creator>
      <pubDate>Mon, 02 Feb 2026 14:10:56 +0000</pubDate>
      <link>https://dev.to/tonny-o/power-bi-schema-and-data-modelling-289d</link>
      <guid>https://dev.to/tonny-o/power-bi-schema-and-data-modelling-289d</guid>
      <description>&lt;h1&gt;
  
  
  Schema and Data Modelling in Power BI
&lt;/h1&gt;

&lt;p&gt;We will explore schema and data modeling in Power BI, and why good modeling is critical for performance and accurate reporting. Key terms covered include &lt;strong&gt;Star Schema&lt;/strong&gt;, &lt;strong&gt;Snowflake Schema&lt;/strong&gt;, &lt;strong&gt;Relationship Table&lt;/strong&gt;, &lt;strong&gt;Fact Table&lt;/strong&gt;, and &lt;strong&gt;Dimension Table&lt;/strong&gt;.&lt;/p&gt;

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

&lt;p&gt;Data modelling is the process of creating structured visual representation of a given data to support analysis and eventually make informed decisions.Its simply focuses on how your data should make sense.&lt;/p&gt;

&lt;h2&gt;
  
  
  Star Schema
&lt;/h2&gt;

&lt;p&gt;A star schema is a multi-dimensional data model used to design data warehouse and relational database so that it is easy to understand and analyze.It mainly denormalizes data into dimentions and fact. Fact being the centre of star schema with foreign keys to other tables joining it.&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%2Fwrv3a98x4mqwxinuo74p.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%2Fwrv3a98x4mqwxinuo74p.png" alt="Star Schema Diagram" width="800" height="631"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Benefits of Star Schema
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Usability&lt;/strong&gt;: Clean, organized data makes reports intuitive&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Query Performance&lt;/strong&gt;: Fewer joins enable faster queries on large datasets vs. normalized models&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simple Queries&lt;/strong&gt;: Minimal join dependency compared to snowflake schemas&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Snowflake Schema
&lt;/h2&gt;

&lt;p&gt;A snowflake schema extends the star schema by normalizing dimension tables into sub-tables, creating branching structures. It's like multiple star schemas interconnected.&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%2F9gpnyf5hhzgi2u7d1vpd.webp" 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%2F9gpnyf5hhzgi2u7d1vpd.webp" alt="Snowflake Schema Diagram" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Benefits of Snowflake Schema
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Fast data retrieval&lt;/li&gt;
&lt;li&gt;Enforces data quality&lt;/li&gt;
&lt;li&gt;Common data warehousing model&lt;/li&gt;
&lt;li&gt;Storage efficient&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Fact Table
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;Fact Table&lt;/strong&gt; is the central table in a data warehouse schema e.g. in star and snowflake schemas. It stores &lt;strong&gt;quantitative data&lt;/strong&gt; (measures/metrics) or facts about a business process and links to dimension tables through foreign keys. Example of data stored in a fact table is unit sold, amount etc.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dimension Table
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Dimentional table&lt;/strong&gt; is almost same as fact table, only that it stores descriptive data like time, product etc. They use a unique surrogate key (often an integer) that acts as a primary key, which is referenced by a corresponding foreign key in the fact table.&lt;/p&gt;

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

&lt;p&gt;Good Power BI data modeling optimizes memory usage, speeds up DAX query processing, reduces memory footprint, and ensures accurate aggregations. Poor models cause slow performance and scalability issues as datasets grow.&lt;/p&gt;

</description>
      <category>analytics</category>
      <category>database</category>
      <category>dataengineering</category>
      <category>microsoft</category>
    </item>
    <item>
      <title>Introduction to MS Excel for Data Analytics</title>
      <dc:creator>tonny otieno</dc:creator>
      <pubDate>Sat, 24 Jan 2026 21:20:51 +0000</pubDate>
      <link>https://dev.to/tonny-o/introduction-to-ms-excel-for-data-analytics-4p00</link>
      <guid>https://dev.to/tonny-o/introduction-to-ms-excel-for-data-analytics-4p00</guid>
      <description>&lt;p&gt;Computing has advanced over time and is now essential across industries to help organizations make better decisions and boost profits through data analysis. A simple tool like Microsoft Excel serves as an excellent starting point for analyzing various datasets, including medical records, sales data, student performance, and social media metrics. &lt;/p&gt;

&lt;h2&gt;
  
  
  Data Analysis Basics
&lt;/h2&gt;

&lt;p&gt;Data analysis involves examining, cleaning, organizing, and interpreting data to uncover useful insights, identify patterns, and support decision-making.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Clean Your Data?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Ensures high integrity by removing biases.&lt;/li&gt;
&lt;li&gt;Enables correct use of formulas.&lt;/li&gt;
&lt;li&gt;Aligns with the problem statement.&lt;/li&gt;
&lt;li&gt;Maximizes use of complete sample size.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Types of Data Analysis
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Prescriptive&lt;/strong&gt; - Uses historical data to recommend actions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Predictive&lt;/strong&gt; - Analyzes past patterns to forecast the future.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Diagnostic&lt;/strong&gt; - Explains &lt;em&gt;why&lt;/em&gt; something is happening.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Common Excel Terms
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Workbook&lt;/strong&gt; - The entire Excel file containing multiple sheets.&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%2Ftanav3ol6hw15wsmwh24.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%2Ftanav3ol6hw15wsmwh24.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cell&lt;/strong&gt; - The smallest "box" where data is entered (e.g., A1).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Column&lt;/strong&gt; - Vertical groups of cells, labeled A, B, C... at the top.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Row&lt;/strong&gt; - Horizontal groups of cells, labeled 1, 2, 3... on the left.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dataset&lt;/strong&gt; - A collection of related data organized for analysis.&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%2Fg2bjiil03gx6t426xoy0.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%2Fg2bjiil03gx6t426xoy0.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Basic Excel Functions
&lt;/h2&gt;

&lt;p&gt;Formulas &lt;strong&gt;must&lt;/strong&gt; start with &lt;code&gt;=&lt;/code&gt;. They can include numbers, cell references (A1, B2), operators (+, -, *, /), and functions.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;MAX &amp;amp; MIN&lt;/strong&gt; - Find maximum/minimum values in a range.&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%2Ffkieyihpt7fp3yrmnhu5.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%2Ffkieyihpt7fp3yrmnhu5.png" alt="Image" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;LEN&lt;/strong&gt; - Returns the length of text.&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%2Fiz0abexitfoi1hv6cafp.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%2Fiz0abexitfoi1hv6cafp.png" alt="Image" width="800" height="278"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;TRIM&lt;/strong&gt; - Removes leading/trailing spaces.&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%2Frhnyw0ozs0cpzjrq613q.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%2Frhnyw0ozs0cpzjrq613q.png" alt="Image" width="800" height="296"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;CONCATENATE&lt;/strong&gt; (or &lt;code&gt;CONCAT&lt;/code&gt;) - Joins text strings.&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%2Fi7voomhh3080fdypjh0f.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%2Fi7voomhh3080fdypjh0f.png" alt="Image" width="800" height="252"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AVERAGE&lt;/strong&gt; - Calculates the mean of a range.&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%2Fy5nj85bar05i75mno5fj.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%2Fy5nj85bar05i75mno5fj.png" alt="Image" width="729" height="396"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Logical Functions
&lt;/h2&gt;

&lt;p&gt;Logical functions test conditions and return results based on TRUE/FALSE.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. IF &amp;amp; IFS
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;IF&lt;/strong&gt;: &lt;code&gt;=IF(logical_test, value_if_true, value_if_false)&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IFS&lt;/strong&gt;: Multiple conditions &lt;code&gt;=IFS(condition1, result1, condition2, result2, ...)&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;=IF(G2&amp;gt;30,"OLD","YOUNG")&lt;br&gt;
=IFS(G2&amp;gt;50,"OLD", G2&amp;gt;40,"ABOVE-MEDIUM", G2&amp;gt;30,"MEDIUM","YOUNG")&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%2Fjqikz1f1b2t73xd2fbu3.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%2Fjqikz1f1b2t73xd2fbu3.png" alt=" " width="800" height="247"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. AND &amp;amp; OR
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AND&lt;/strong&gt;: All conditions must be true.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OR&lt;/strong&gt;: Any condition can be true.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;=IF(AND(G2&amp;gt;40,E2&amp;gt;70000),"H--R","OTHERS")&lt;br&gt;
=IF(OR(G2&amp;gt;40,E2&amp;gt;70000),"H--R","OTHERS")&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%2F7oputfo55qx91zfz7ydu.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%2F7oputfo55qx91zfz7ydu.png" alt=" " width="800" height="165"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. NOT
&lt;/h3&gt;

&lt;p&gt;Negates a condition: &lt;code&gt;=NOT(logical_test)&lt;/code&gt; or use &lt;code&gt;&amp;lt;&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Other operators: &lt;code&gt;&amp;lt;&lt;/code&gt;, &lt;code&gt;&amp;gt;&lt;/code&gt;, &lt;code&gt;=&lt;/code&gt;, &lt;code&gt;&amp;lt;&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;=&lt;/code&gt;, &lt;code&gt;&amp;gt;=&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data Filtering &amp;amp; Sorting
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sorting&lt;/strong&gt;: Arranges data (A-Z, newest-oldest, etc.).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Filtering&lt;/strong&gt;: Shows data meeting specific conditions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Filter Function Example&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;=FILTER(A2:F10, D2:D10="HR")&lt;/p&gt;

&lt;h2&gt;
  
  
  Pivot Tables
&lt;/h2&gt;

&lt;p&gt;Pivot tables summarize, sort, count, and reorganize data. They convert rows to columns and perform calculations (Max, Min, Average, etc.).&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%2F5sbnve7yybjucrrcbke1.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%2F5sbnve7yybjucrrcbke1.png" alt="Pivot Table Example" width="800" height="485"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Data Visualization
&lt;/h2&gt;

&lt;p&gt;Data visualization uses charts (bar, line, pie, scatter plots) to reveal patterns and relationships.&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%2Fe2wptoormjgo88jjrqob.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%2Fe2wptoormjgo88jjrqob.png" alt="Charts Example" width="800" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Benefits&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Quick pattern identification&lt;/li&gt;
&lt;li&gt;Better storytelling with data&lt;/li&gt;
&lt;li&gt;Enhanced decision-making&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Excel Dashboards
&lt;/h2&gt;

&lt;p&gt;An Excel Dashboard consolidates key visuals (PivotTables, charts, slicers) into one interactive screen for at-a-glance insights.&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%2Fdomklq7b3wejsjod4jhl.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%2Fdomklq7b3wejsjod4jhl.png" alt="Dashboard Example" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Components&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PivotTables for dynamic summaries&lt;/li&gt;
&lt;li&gt;Charts for visual impact&lt;/li&gt;
&lt;li&gt;Slicers for interactivity&lt;/li&gt;
&lt;li&gt;Clean layout design&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>analytics</category>
      <category>beginners</category>
      <category>datascience</category>
      <category>microsoft</category>
    </item>
    <item>
      <title>Getting started with GitHub</title>
      <dc:creator>tonny otieno</dc:creator>
      <pubDate>Sat, 17 Jan 2026 19:57:16 +0000</pubDate>
      <link>https://dev.to/tonny-o/getting-started-with-github-4547</link>
      <guid>https://dev.to/tonny-o/getting-started-with-github-4547</guid>
      <description>&lt;p&gt;GitHub is a version control tool that provides software as a service used to store and track changes for an individual or a team collaborating on a project. There are also other tools for the same purpose such as Gitlab,Bitbucket that also incorporates GUI.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;u&gt;Setting up Git locally&lt;/u&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Below is how to configure your git to connect to your remote account.&lt;/li&gt;
&lt;li&gt;For linux/macOS users input the commands to your terminal while windows users after installing gitbash, will use it to write the commands. Verification is done by &lt;code&gt;git config --global --list&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;git config --global user.name "Name"&lt;br&gt;
git config --global user.email "email-address"&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Navigate to your local project directory and initialize git using &lt;code&gt;git init&lt;/code&gt; . &lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Create a README.md file using &lt;code&gt;touch README.md&lt;/code&gt;or other files e.g a python file called users.py. The README.md file is used to tell what the project is all about and how one can use it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Pushing Code
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;After working on your project, you have to add the changes to the staging area using &lt;code&gt;git add .&lt;/code&gt; (for everything).&lt;/li&gt;
&lt;li&gt;Commit the changes having a short message of what is committed e.g &lt;code&gt;git commit -m "signup function"&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Push your code to the remote account using &lt;code&gt;git push -u origin main&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt; Without commiting, the changes won't be effected to the remote repository and will only remain in the local repository.First push may prompt for authentication (set up SSH keys or a Personal Access Token for HTTPS).&lt;/p&gt;

&lt;h2&gt;
  
  
  Pulling updated Code from GitHub
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;It is best practice to check the status of your code using &lt;code&gt;git status&lt;/code&gt; to ensure no uncommitted changes exist. Then do a pull using &lt;code&gt;git pull&lt;/code&gt; which is a combination of &lt;code&gt;git fetch&lt;/code&gt; (downloads the latest commits) and &lt;code&gt;git merge
&lt;/code&gt;(merges the downloaded commits)&lt;/li&gt;
&lt;/ul&gt;

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