<?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: John Ngugi</title>
    <description>The latest articles on DEV Community by John Ngugi (@johnngugi).</description>
    <link>https://dev.to/johnngugi</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3957036%2F1bbc8c98-820d-47a2-83dc-d521c24bb6eb.jpeg</url>
      <title>DEV Community: John Ngugi</title>
      <link>https://dev.to/johnngugi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/johnngugi"/>
    <language>en</language>
    <item>
      <title>Understanding Power Bi relationship schemas and joins</title>
      <dc:creator>John Ngugi</dc:creator>
      <pubDate>Sat, 04 Jul 2026 11:12:04 +0000</pubDate>
      <link>https://dev.to/johnngugi/understanding-power-bi-relationship-schemas-and-joins-46np</link>
      <guid>https://dev.to/johnngugi/understanding-power-bi-relationship-schemas-and-joins-46np</guid>
      <description>&lt;p&gt;In my beginners journey into power Bi, I have been introduces to new concepts such as joins and relationship schemas, all used to store and organise data in a database. &lt;/p&gt;

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

&lt;p&gt;schema relationships show how data is related across different tables in a database. To enable the connections to be made, primary and foreign keys are used to define that relationship.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdt9pt1zxg7b55bd06x0y.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdt9pt1zxg7b55bd06x0y.png" alt=" " width="382" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Primary Keys.
&lt;/h3&gt;

&lt;p&gt;These are unique identifiers in a table, for example, in the above table, the customer_id is the primary key. &lt;/p&gt;

&lt;h3&gt;
  
  
  Foreign Keys.
&lt;/h3&gt;

&lt;p&gt;They refer to a primary key that is in a different 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fct9dnk4flceioxp3dxil.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fct9dnk4flceioxp3dxil.png" alt=" " width="749" height="261"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this example above, the same customer customer_id that was a primary key in it's own table becomes a foreign key. &lt;/p&gt;

&lt;h2&gt;
  
  
  Cardinality.
&lt;/h2&gt;

&lt;p&gt;When the primary and foreign keys are used to join tables together, they bring in an element called &lt;em&gt;cardinality&lt;/em&gt;. &lt;br&gt;
There are 4 types of cardinality according to the number of keys interconnecting across the tables&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;One to One - means that one column connects to another column in a different table. The primary key will be used to connect them.&lt;/li&gt;
&lt;li&gt;One to many - one column connects to multiple in a different table. when viewed from the other table, that relationship becomes the *&lt;em&gt;Many to one *&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Many to many - multiple columns from one table link to other multiple in a different table. &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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyust5h5nfsxzfq5xm208.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyust5h5nfsxzfq5xm208.png" alt=" " width="656" height="515"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When tables have been joined and relationships defined, a schema is created. It shows how different tables(dimensions) relate in data model form. &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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0rst65iar720qc4f850m.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0rst65iar720qc4f850m.png" alt="Star Schema model" width="800" height="485"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;h3&gt;
  
  
  Star Schema.
&lt;/h3&gt;

&lt;p&gt;A star schema has different dimensions connected to a central fact table, which contains data related to the other dimension tables. The above image is an example of a star schema. &lt;/p&gt;

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

&lt;p&gt;A snowflake schema has different dimension tables interconnecting, related data has been divided further to show more detailed information. &lt;/p&gt;

&lt;h3&gt;
  
  
  Galaxy/Constellation schema.
&lt;/h3&gt;

&lt;p&gt;A galaxy schema has multiple fact tables that share dimension tables, therefore creating an interconnected data model. &lt;/p&gt;

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

&lt;p&gt;Different models are used at different occasions according to the data being analysed. For straight forward data, a star schema is recommended. For more complex data that requires a lot of details to be analysed, the snowflake schema will come in handy. &lt;br&gt;
When there are multiple fact tables, we use a galaxy schema.&lt;/p&gt;

&lt;p&gt;In my power bi study journey, I continue to learn different concepts and  increase to my data analytics tools. &lt;/p&gt;

</description>
      <category>powerbi</category>
      <category>analytics</category>
      <category>beginners</category>
      <category>datascience</category>
    </item>
    <item>
      <title>Excel in Real World Data Analysis</title>
      <dc:creator>John Ngugi</dc:creator>
      <pubDate>Sat, 06 Jun 2026 20:16:27 +0000</pubDate>
      <link>https://dev.to/johnngugi/excel-in-real-world-data-analysis-58l8</link>
      <guid>https://dev.to/johnngugi/excel-in-real-world-data-analysis-58l8</guid>
      <description>&lt;h2&gt;
  
  
  Excel Intro
&lt;/h2&gt;

&lt;p&gt;Excel is a spreadsheet software, used to organize and store data ,create  data visualization dashboards and generate reports. &lt;br&gt;
As a beginner in the data science and data analysis, it has been quite daunting to learn it's many features, sometimes, I was wondering if a time will come when ill be able to use all of them.&lt;br&gt;
I have however enjoyed learning about cells, formulas and different functions that will enable me to analyze data. In the real world , excel is used for various purposes like;&lt;/p&gt;

&lt;h2&gt;
  
  
  Expense tracking in businesses
&lt;/h2&gt;

&lt;p&gt;When running a business, the entrepreneur should be able to evaluate whether the capital directed towards different business functions is delivering the expected outcomes&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%2Fm7ubq086ama4iux9w71g.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%2Fm7ubq086ama4iux9w71g.png" alt="Training vs project performance" width="606" height="386"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The chart above investigates whether more work hours put into training improves their performance as reflected by the number of projects they are able to finish annually. This will inform whether to invest more in training or redirect the investment that is being used for training to other areas where it would bring in better returns on investment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tracking company goals
&lt;/h2&gt;

&lt;p&gt;As companies grow, their internal goals that should be achieved by certain timelines need to be tracked. For example, we have witnessed multinational corporations work towards achieving a balance in employment amongst gender lines. For such a company which cannot track all the employees with a headcount, they can use tools such as excel to check the gender balance across all it's departments and infer whether their goals have been achieved. &lt;br&gt;
I recently learnt of the COUNTIFS function and it would come in handy sorting the data from various departments of a multinational and check if the goals have been achieved.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data based hiring
&lt;/h2&gt;

&lt;p&gt;When hiring, firing or promoting employees, data can come in handy to ensure the most qualified person is hired or the most deserving one is promoted. Analyzing the data of who has completed most projects, brought most income or such parameters would inform the promotions in a corporation. &lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;Excel is a versatile tool which is relatively easy to use. It is invaluable in the data driven world which businesses operate in. I am looking forward to learning more about how it works and how much more i can do with it other than the quick SUM or MAX function to get simple data on a subject.&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>beginners</category>
      <category>data</category>
      <category>analyst</category>
    </item>
  </channel>
</rss>
