<?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: Austin karianjahi</title>
    <description>The latest articles on DEV Community by Austin karianjahi (@karianjahi).</description>
    <link>https://dev.to/karianjahi</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%2F4070913%2F09f7eb05-c93c-4490-bdb7-2a42bb2f71d6.png</url>
      <title>DEV Community: Austin karianjahi</title>
      <link>https://dev.to/karianjahi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/karianjahi"/>
    <language>en</language>
    <item>
      <title>Data Modelling, Relationships &amp; Joins in PowerBI.</title>
      <dc:creator>Austin karianjahi</dc:creator>
      <pubDate>Mon, 14 Sep 2026 12:02:54 +0000</pubDate>
      <link>https://dev.to/karianjahi/data-modelling-relationships-joins-in-powerbi-1ilj</link>
      <guid>https://dev.to/karianjahi/data-modelling-relationships-joins-in-powerbi-1ilj</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;Data modeling is the foundational chapter of any power BI project; if the model is weak, the entire project including performance, calculations, and maintenance will suffer. the following article outlines the core concepts of data modelling.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data modeling
&lt;/h2&gt;

&lt;p&gt;This is the process of defining how business data is structured and how different pieces of information relate to each other, it involves organizing raw data into logical tables, establishing relationships between them and creating calculated measures using DAX to answer business questions.&lt;br&gt;
Components of a data model in power BI include;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;em&gt;Tables&lt;/em&gt; - entities that store structured data.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Relationships&lt;/em&gt; - connections that define how filters and data flow between tables.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Calculations&lt;/em&gt; - DAX measures and calculated fields created on top of the model to compute metrics eg; total sales or average profit.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Importance of  well designed Data model
&lt;/h2&gt;

&lt;p&gt;A well optimized data model serves 2 goals;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Organizing data around business objects&lt;/li&gt;
&lt;li&gt;Ensuring power BI operates with maximum efficiency through;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Reporting and Analytics - A well structured data model separates numeric facts from descriptive contex allowing report creators to easily slice, filter and group metrics.&lt;/li&gt;
&lt;li&gt;DAX calculation - Proper table structures and relationships reduce the complexity of DAX code.&lt;/li&gt;
&lt;li&gt;Performance - A well designed data model ensures fast report visual rendering, quick slicer interaction, and responsive query processing.&lt;/li&gt;
&lt;li&gt;Scalability - A well designed model scales cleanly without causing excessive memory consumption or system slow downs.&lt;/li&gt;
&lt;li&gt;Maintanability - A well structured data model establishes a clear starting point and intuitive architecture.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Data modeling approaches
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Flat table&lt;/strong&gt;&lt;br&gt;
Also called (single table), it combines all transactional events and descriptive business entities into one single denormalized table without establishing any relationships.&lt;br&gt;
Every row contains both numeric metrics and repetitive text descriptions of the associated customer, product or location.&lt;/p&gt;

&lt;p&gt;Structure - There is only one table, columns that would normally live in  separate dimension tables are repeated on every row alongside the transaction measures .&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%2Fav75b0ol0rl13qotawpj.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%2Fav75b0ol0rl13qotawpj.png" alt=" " width="395" height="199"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Advantages include;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is simple to build.&lt;/li&gt;
&lt;li&gt;There is no relationship to configure or debug.&lt;/li&gt;
&lt;li&gt;It is fast for small datasets &lt;/li&gt;
&lt;li&gt;It is easy to export and use by non technical users.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Disadvantages include;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Massive redundancy, repeated attribute values bloat file size&lt;/li&gt;
&lt;li&gt;Update anomalies changing one customers city means editing every row for the customer.&lt;/li&gt;
&lt;li&gt;Hard to maintain data integrity or enforce consistent attribute values.&lt;/li&gt;
&lt;li&gt;Doesn't scale well as data volume or complexity grows.&lt;/li&gt;
&lt;li&gt;Poor compressions in columnar engines (like Power BI's VertiPaq) because repeated text columns don't compress as well as normalized dimension keys.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A flat table is suitable only for small, single source ad-hoc reports, rapid prototyping,  or simple exports where relational complexity is unnecessary.&lt;/p&gt;

&lt;p&gt;A flat table implicates performance on power BI through poor performance on large datasets because power BI's compression and query engines are optimized for relational dimensional models, not massive unsplit flat tables.&lt;br&gt;
It also implicates model complexity through low structural complexity (only one table), but high calculation and maintenance complexity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Star schema&lt;/strong&gt;&lt;br&gt;
A star schema is a dimensional modeling architecture where a central Fact Table holding transactional metrics is directly surrounded by independent Dimension Tables, forming the visual shape of a star.&lt;/p&gt;

&lt;p&gt;One fact table holds transactional or event-level data and foreign keys pointing to each dimension. Each dimension table is flat (not further normalized) e.g., the Product dimension contains ProductName, Category, and Subcategory all in one table, rather than splitting Category into its own 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%2Ftfvquj2srkeb49a4vfzu.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%2Ftfvquj2srkeb49a4vfzu.png" alt=" " width="576" height="359"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Advantages include;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simple, intuitive relationships easy for report authors to navigate.&lt;/li&gt;
&lt;li&gt;Very fast query performance; VertiPaq compresses low-cardinality dimension columns efficiently.&lt;/li&gt;
&lt;li&gt;Fewer joins than a snowflake, so DAX filter propagation is fast and predictable&lt;/li&gt;
&lt;li&gt;Well-supported best practice model for Power BI, Tabular models, and most BI tools&lt;/li&gt;
&lt;li&gt;Easier to explain to business users (facts vs. descriptive attributes)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Disadvantages include;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Some redundancy remains within each dimension (e.g., Category repeated per product).&lt;/li&gt;
&lt;li&gt;Larger dimension tables can be harder to maintain if source data is highly normalized.&lt;/li&gt;
&lt;li&gt;Not ideal for very deep hierarchies with many-to-many sub-attributes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A star schema is the default choice for almost all Power BI or analytical reporting models for sales, finance, operations dashboards, and most business reporting scenarios where performance and simplicity both matter.&lt;/p&gt;

&lt;p&gt;It has implications on;&lt;br&gt;
Power BI Performance as Fast query response times, optimal memory compression, and highly efficient filter context handling.&lt;br&gt;
Model complexity as Low-to-moderate structural complexity; clean, intuitive, and highly maintainable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Snowflake Schema&lt;/strong&gt;&lt;br&gt;
A snowflake schema is a star schema whose dimension tables are further normalized into multiple related sub-dimension tables, removing redundancy within the dimensions themselves.&lt;br&gt;
The result looks like a star with each point branching further outward.&lt;/p&gt;

&lt;p&gt;The fact table still sits at the center, but instead of one flat "Dim_Product" table, product attributes are split for example, Dim_Product links to a separate Dim_Category table, which may link to a separate Dim_Department table. Each level is normalized: each attribute is stored once, in its own table, referenced by key.&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%2Fbul59ex2sun3vwoun0ky.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%2Fbul59ex2sun3vwoun0ky.png" alt=" " width="576" height="323"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Advantages include;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Minimizes redundancy within dimension attributes as each value stored once.&lt;/li&gt;
&lt;li&gt;Enforces stronger referential or data integrity for shared hierarchy attributes.&lt;/li&gt;
&lt;li&gt;Can reduce storage for very large, highly repetitive attribute sets in traditional (non-columnar) databases.&lt;/li&gt;
&lt;li&gt;Mirrors normalized source or OLTP systems, which can simplify ETL from those sources.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Disadvantages include;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;More tables and relationships to maintain and document.&lt;/li&gt;
&lt;li&gt;Extra joins or hops mean more complex, sometimes slower DAX filter propagation.&lt;/li&gt;
&lt;li&gt;Harder for report authors to navigate the model&lt;/li&gt;
&lt;li&gt;In Power BI specifically, the storage savings rarely matter as VertiPaq already compresses a flat dimension almost as well.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is Reserved for extreme cases where dimension tables are massive and memory optimization is mandatory.&lt;/p&gt;

&lt;p&gt;A snowflake schema has implications on;&lt;br&gt;
Power BI Performance as slower query execution compared to Star Schema due to multi-table joins and indirect filter propagation.&lt;br&gt;
Model Complexity is High structural complexity with numerous interconnected relationships.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fact Tables
&lt;/h3&gt;

&lt;p&gt;Fact Tables record business events, transactions, or activities answering what happened. They contain surrogate or foreign keys to connect to dimensions, timestamps or date keys, and numeric values such as quantity, sales amount, discount, cost, and profit used for mathematical calculations.&lt;br&gt;
A fact table captures the quantitative results of business operations. Each row represents a specific historical event or transaction. Normally, a fact table contains four key elements:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Transaction Identifiers&lt;/strong&gt; - Unique order or invoice IDs to identify the event.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Foreign Keys (IDs)&lt;/strong&gt; - Key columns that link the transaction to surrounding dimension tables e.g. CustomerID, ProductID, StoreID.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Date and Time Information&lt;/strong&gt; - Timestamps or date keys recording exactly when the business activity occurred e.g. OrderDate, ShipDate.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Numeric Metrics/Measures&lt;/strong&gt; - Quantitative values used for mathematical aggregations and calculations e.g. Quantity, SalesAmount, Discount, UnitCost, Profit.
Examples of a fact table include;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;FactSales&lt;/code&gt; - Individual item sales, transactions, quantities, and revenue totals.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;FactOders&lt;/code&gt; - Header level order totals,, shipping costs and order dates.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;FactTransactions&lt;/code&gt; - Inventory movements, bank deposits, or ledger entries. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Dimension Tables
&lt;/h3&gt;

&lt;p&gt;Dimension Tables store descriptive attributes that provide context to facts answering who, what, where, and when. &lt;br&gt;
Each row represents a unique business entity e.g. a specific product or customer with descriptive attributes such as product name, category, brand, or customer region used for filtering and grouping in reports.&lt;/p&gt;

&lt;p&gt;A dimension table holds the master descriptive data for a single business entity. Each row represents one unique object for instance, exactly one product or one customer. A dimension table contains:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Primary Key (ID)&lt;/strong&gt; - A unique identifier for every record e.g. ProductID or CustomerID.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Descriptive Attributes&lt;/strong&gt; - Textual or categorical details describing the object e.g. ProductName, Category, Subcategory, Brand, Color, CustomerName, Region, City.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Examples of dimension tables include;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;DimCustomer&lt;/code&gt; - Unique customer profiles, email addresses, demographics and customer segments.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;DimProduct&lt;/code&gt; - Master product list, categories, subcategories, colors and unit prices.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;DimDate&lt;/code&gt; - Comprehensive calendar table listing dates, years, quarters, months and fiscal periods.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Dimlocation&lt;/code&gt; - Store location names, addresses, cities, states, and regions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Measures/numeric business events versus descriptive attributes.
&lt;/h3&gt;

&lt;p&gt;The core functional distinction comes down to numbers versus labels:&lt;br&gt;
&lt;strong&gt;Numeric Business Events (Measures)&lt;/strong&gt; - Located in fact tables, these are continuous numeric measurements meant to be aggregated using mathematical operations such as &lt;em&gt;SUM, AVERAGE, COUNT, or MIN/MAX&lt;/em&gt;. For example, SalesAmount is a numerical value that makes sense to sum across multiple sales.&lt;br&gt;
&lt;strong&gt;Descriptive Attributes&lt;/strong&gt; - Located in dimension tables, these are textual labels, categories, or dates used to slice, filter, and group the numeric metrics in reports. For instance, placing Category from a dimension table onto a chart axis groups the SalesAmount numbers from the fact table to generate a Sales by Category visual.&lt;/p&gt;

&lt;p&gt;An example illustrating how a central fact table can be connected to several dimension tables to form a star schema.&lt;/p&gt;

&lt;p&gt;Imagine a retail chain analyzing sales performance. &lt;code&gt;FactSales&lt;/code&gt; sits at the center, with one row per line item sold grain: one row per product, per order, per store, per day. Each row carries the numeric measures Quantity, &lt;code&gt;SalesAmount&lt;/code&gt; and foreign keys pointing outward to four dimensions:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;DimDate&lt;/code&gt; — when the sale happened (year, month, quarter)&lt;br&gt;
&lt;code&gt;DimCustomer&lt;/code&gt; — who bought it (name, segment, city)&lt;br&gt;
&lt;code&gt;DimProduct&lt;/code&gt; — what was bought (name, category, brand)&lt;br&gt;
&lt;code&gt;DimLocation&lt;/code&gt; — where it was sold (store, region, country)&lt;br&gt;
A report author can then drag &lt;code&gt;SalesAmount&lt;/code&gt; from the fact table onto a visual, slice it by Category from &lt;code&gt;DimProduct&lt;/code&gt; and Region from &lt;code&gt;DimLocation&lt;/code&gt;, and Power BI's engine aggregates the numeric fact rows according to the filters coming from each connected dimension.&lt;/p&gt;

&lt;h3&gt;
  
  
  Relationships in power BI
&lt;/h3&gt;

&lt;p&gt;In Power BI, a relationship is a logical connection established between two tables using a common key column. Relationships define how data in one table relates to data in another, allowing Power BI to automatically propagate filters, aggregate numbers, and perform cross-table analysis.&lt;/p&gt;

&lt;p&gt;When building analytical models raw data is split across multiple tables—separating numeric transactional activities &lt;em&gt;facts&lt;/em&gt; from descriptive attributes &lt;em&gt;dimensions&lt;/em&gt;. Without relationships Power BI would treat each table as an isolated island requiring complex DAX logic or manual joins to combine metrics with descriptive categories. Relationships enable a clean relational structure where slicers and filters applied to context tables automatically adjust the metrics calculated in transaction tables.&lt;/p&gt;

&lt;p&gt;Core foundational concepts of relationships in power BI include;&lt;br&gt;
&lt;strong&gt;Primary Key (PK)&lt;/strong&gt; - A column in a table typically a dimension where every value is strictly unique and non-null. It serves as the definitive identifier for each unique record e.g., CustomerID in DimCustomer or ProductID in DimProduct.&lt;br&gt;
&lt;strong&gt;Foreign Key (FK)&lt;/strong&gt; - A column in another table typically a fact table that references the Primary Key of a dimension table. Unlike Primary Keys, Foreign Key values repeat across multiple rows whenever an event occurs multiple times e.g., CustomerID appearing in FactSales.&lt;br&gt;
&lt;strong&gt;Unique Values&lt;/strong&gt; - The requirement on the "1" side of a 1-to-Many relationship where every key value appears exactly once. If duplicate keys exist on the dimension side, Power BI cannot establish a standard 1-to-Many relationship.&lt;br&gt;
&lt;strong&gt;Cardinality&lt;/strong&gt; - Refers to the numerical ratio and direction of matching records between two related tables. It dictates whether keys are unique on one side (1:&lt;em&gt;), unique on both sides (1:1), or non-unique on both sides (&lt;/em&gt;:&lt;em&gt;).&lt;br&gt;
**Referential Integrity&lt;/em&gt;* - This is the data quality principle ensuring that every Foreign Key value in a fact table has a corresponding Primary Key match in the connected dimension table. If a sale contains a CustomerID that does not exist in DimCustomer, referential integrity is violated, creating a blank row in visuals.&lt;br&gt;
&lt;strong&gt;Active Relationship&lt;/strong&gt; - This is the primary default connection between two tables. Filters automatically flow through active relationships in visuals and DAX calculations. Only one active relationship can exist between any two tables at a time.&lt;br&gt;
*&lt;em&gt;Inactive Relationship *&lt;/em&gt;- Secondary connections created when multiple relationships exist between the same two tables for example, connecting FactSales[OrderDate] and FactSales[ShipDate] both to DimDate[Date]. Inactive relationships do not propagate filters automatically; they must be explicitly activated in DAX measures using the USERELATIONSHIP() function.&lt;/p&gt;

&lt;p&gt;Why CustomerID might contain unique values in a DimCustomer table but &lt;br&gt;
appear multiple times as a foreign key in a FactSales table.&lt;br&gt;
In DimCustomer CustomerID is a Primary Key containing strictly unique values because each row describes one specific customer. In FactSales CustomerID acts as a Foreign Key appearing multiple times. This occurs because a single customer can place dozens of orders over time each order logs the customer's ID alongside transaction metrics like sales amount and quantity. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One-to-Many (1:*) Relationship&lt;/strong&gt;&lt;br&gt;
A single record in Table A the dimension table connects to zero, one, or multiple records in Table B the fact table. The key on the "1" side contains strictly unique values, while the key on the side contains repeating values.&lt;br&gt;
For example&lt;br&gt;
Connecting DimCustomer&lt;a href="https://dev.to1"&gt;CustomerID&lt;/a&gt; to FactSales&lt;a href="https://dev.to*"&gt;CustomerID&lt;/a&gt;. Selecting a customer in a slicer filters the sales table down to only orders placed by that specific customer.&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%2F0k0fei3u4pj10vr5epnb.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%2F0k0fei3u4pj10vr5epnb.png" alt=" " width="604" height="142"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When to use - This is the gold standard default for Power BI models. Use 1:* to connect dimension tables to fact tables in a Star Schema.&lt;br&gt;
When NOT to use - Do not use if key columns on both sides contain repeating duplicate values.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One-to-One (1:1) Relationship&lt;/strong&gt;&lt;br&gt;
Each row in Table A matches at most one row in Table B and vice versa. Key values in both columns are strictly unique.&lt;br&gt;
For example;&lt;br&gt;
An Employee table and an EmployeeConfidential table containing salary or ID number split apart for security/access reasons, each keyed on the same unique EmployeeID.&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%2Fqi0bio7n7cbalc8me72v.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%2Fqi0bio7n7cbalc8me72v.png" alt=" " width="648" height="148"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When to use-  Useful when splitting off sensitive or security-restricted attributes into a separate table for Row-Level Security (RLS) or isolating secondary attributes that are rarely queried.&lt;br&gt;
When NOT to use - Avoid using 1:1 relationships for standard dimension modeling. In almost all cases, two tables with a 1:1 relationship should be merged into a single dimension table in Power Query to eliminate unnecessary model overhead.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Many-to-Many (:) Relationship&lt;/strong&gt;&lt;br&gt;
Neither table's key column contains unique values; duplicate keys exist on both sides of the relationship.&lt;br&gt;
For example&lt;br&gt;
A joint bank account scenario — DimCustomer to DimAccount, where one customer can hold multiple accounts and one account (a joint account) can be held by multiple customers. Neither CustomerID nor AccountID is unique in the bridging structure.&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%2Fxe9yo78zg8r1xc8vas7w.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%2Fxe9yo78zg8r1xc8vas7w.png" alt=" " width="653" height="128"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When to use - Valid for handling complex multi-valued relationships e.g., bank accounts shared by multiple customers using a intermediate bridge table.&lt;br&gt;
When NOT to use - Never connect two fact tables directly using a Many-to-Many relationship. Fact tables should always be connected through a shared dimension table such as a shared DimProduct or DimDate via clean 1:* relationships to form a Star Schema or Galaxy Schema.&lt;/p&gt;

&lt;h3&gt;
  
  
  Filter Direction
&lt;/h3&gt;

&lt;p&gt;When a user selects a value in a slicer, clicks a visual element, or applies a report filter Power BI evaluates the active relationships connected to that table. The filter context flows across the relationship to restrict rows in related tables before evaluating DAX measures.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Single-direction filtering&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;In single-direction filtering, filters flow strictly from the dimension table to the fact table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Both/Bidirectional filtering&lt;/strong&gt; &lt;br&gt;
Bidirectional filtering allows filters to flow in both directions across a relationship dimension filters fact, AND fact filters dimension.&lt;br&gt;
While bidirectional filtering may seem convenient, it presents serious design risks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ambiguous Filter Paths - Enabling bidirectional filtering across multiple tables creates circular filter loops. Power BI cannot determine which relationship path to evaluate, leading to model errors or inaccurate calculation results.&lt;/li&gt;
&lt;li&gt;Unintended Visual Filtering - Selecting a customer might unintentionally filter slicers for products or dates, confusing report end-users.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example  to demonstrate how selecting a value from a dimension such as DimProduct can filter records in FactSales.&lt;br&gt;
Selecting "Laptops" in a slicer from DimProduct[Category] propagates a filter through the 1:* relationship to FactSales. FactSales is immediately filtered down to only display transaction rows matching laptop product IDs. However, filtering FactSales does not filter DimProduct.&lt;/p&gt;

&lt;h3&gt;
  
  
  Joins in Power Query
&lt;/h3&gt;

&lt;p&gt;A join is a way of combining rows from two tables based on a matching key column in Power BI, this is done in Power Query using Merge Queries. Rather than manually looking up values, a merge lets you say match this table to that table wherever these key columns are equal and Power Query decides which rows to keep based on the join type you choose.&lt;br&gt;
Example&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%2Fp1bxga9u21ee11zuc0kz.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%2Fp1bxga9u21ee11zuc0kz.png" alt=" " width="753" height="456"&gt;&lt;/a&gt;&lt;br&gt;
Carol and David have no orders and order 104 belongs to CustomerID 5, who doesn't exist in Customers. This lets every join type produce a visibly different result.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Inner Join&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;How it works - Keeps only rows where the key exists in both tables no nulls, no unmatched rows.&lt;br&gt;
Records retained - Matches only.&lt;br&gt;
Expected result&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%2F8sagc6gvwakr1y2otdiv.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%2F8sagc6gvwakr1y2otdiv.png" alt=" " width="733" height="167"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When to use it - When you only want records that genuinely have a counterpart on both sides e.g., analyzing customers who have actually placed orders. &lt;br&gt;
When not to use it - Avoid it if you need to preserve customers with zero orders for a churn or "never purchased" analysis, an inner join would silently delete exactly the rows you care about.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Left Outer Join&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;How it works - Keeps all rows from the first (left) table, plus any matching rows from the second (right) table. Where there's no match, the right-side columns come back as null.&lt;br&gt;
Records retained - Everything from the left table, matched data attached where it exists.&lt;/p&gt;

&lt;p&gt;Expected output Customers = 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhiy2as50ajpjnfrkxa9t.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%2Fhiy2as50ajpjnfrkxa9t.png" alt=" " width="727" height="227"&gt;&lt;/a&gt;&lt;br&gt;
When to use it - This is the most common join type in real reporting scenarios  e.g., you want every customer in a report, even ones with no orders yet.&lt;br&gt;
 When not to use it - Don't use it if unmatched rows with nulls will break downstream calculations like a SUM expecting numeric values unless you handle the nulls afterward.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Right Outer Join&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;How it works - The mirror image of a left join keeps all rows from the second (right) table, plus matches from the first (left) table where they exist.&lt;br&gt;
Records retained - Everything from the right table, matched data attached where it exists.&lt;/p&gt;

&lt;p&gt;Expected output (Customers = left, Orders = right)&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%2Fp2xeo80t9eaq01pwr82f.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%2Fp2xeo80t9eaq01pwr82f.png" alt=" " width="732" height="192"&gt;&lt;/a&gt;&lt;br&gt;
When to use it - Useful when the driving table is really the second one selected e.g., you want every transaction, and you're attaching customer details onto it. In practice, most people just swap table order and use a left join instead, since it's more intuitive.&lt;br&gt;
 When not to use it - Rarely needed as a distinct choice in Power Query it's functionally identical to a left join with the tables swapped, so use whichever reads more naturally for the table order you already have.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Full Outer Join&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;How it works - Keeps every row from both tables, matched where possible, with nulls filled in on whichever side has no counterpart.&lt;br&gt;
Records retained: The union of both tables.&lt;/p&gt;

&lt;p&gt;Expected output:&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%2F8a7at0v1obgde4rpnd4j.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%2F8a7at0v1obgde4rpnd4j.png" alt=" " width="724" height="268"&gt;&lt;/a&gt;&lt;br&gt;
When to use it - Useful for data-quality checks spotting orphaned records on either side of a relationship in one pass customers with no orders and orders with no customer.&lt;br&gt;
When not to use it - Rarely used in a final reporting model, since the resulting nulls on both sides usually need cleanup before the table is analysis-ready.&lt;/p&gt;

&lt;p&gt;Left Anti Join&lt;/p&gt;

&lt;p&gt;How it works - Keeps only rows from the left table that have no match in the right table. No columns from the right table are brought in this is purely a filter.&lt;br&gt;
Records retained - Left-only, unmatched rows.&lt;/p&gt;

&lt;p&gt;Expected output:&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%2Fhe4vl3nsrkaje4xvzxzr.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%2Fhe4vl3nsrkaje4xvzxzr.png" alt=" " width="662" height="115"&gt;&lt;/a&gt;&lt;br&gt;
When to use it - Perfect for "find the gaps" questions customers who've never ordered, products that have never sold, employees with no assigned manager.&lt;br&gt;
When not to use it - Not useful if you actually need the matched rows too it deliberately excludes them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Right Anti Join&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;How it works - The mirror of a left anti join keeps only rows from the right table that have no match in the left table.&lt;br&gt;
Records retained: Rightonly, unmatched rows.&lt;/p&gt;

&lt;p&gt;Expected output:&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%2F2nauc4awi39un8ded28l.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%2F2nauc4awi39un8ded28l.png" alt=" " width="699" height="71"&gt;&lt;/a&gt;&lt;br&gt;
When to use it - This is the classic "orphaned transaction" check — orders, payments, or events referencing a key that no longer (or never did) exist in the reference table, which is exactly the kind of referential integrity break we talked about earlier.&lt;br&gt;
When not to use it - Not useful when you need the matched data too, since it deliberately discards it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Power Query Joins vs Power Bi Relationships
&lt;/h3&gt;

&lt;p&gt;Understanding the distinction between merging (joining) tables in Power Query and creating relationships in the Power BI Data Model is one of the most fundamental concepts in Power BI architecture. While both operations link data across tables, they operate at completely different stages of the Power BI workflow, alter physical data structures differently, and serve distinct modeling purposes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does a Power Query merge physically combine data?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes. A merge in Power Query is a physical, row-level combination  it's the direct equivalent of a SQL join. When you merge Orders with Customers on CustomerID, Power Query actually looks up matching rows and writes the matched columns directly into the output table e.g., CustomerName becomes a real column sitting inside Orders. The two source queries still exist independently, but the merged query is a brand-new table containing physically combined data new rows, new columns, actual duplicated values on disk/in memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does creating a relationship combine the tables?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No — and this is the core distinction. A relationship in the Power BI data model is not a data operation at all. It doesn't touch, copy, or duplicate any values. It's a stored instruction  these two columns can be matched that the DAX/VertiPaq engine uses at query time, every time a visual needs to combine data across tables. Customers and Orders remain two separate tables in the model, exactly as they were loaded, and Power BI joins them live, in memory, only for the duration of each query.&lt;/p&gt;

&lt;p&gt;The stage at which Power BI operation workflow occur&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%2F7jhoub3pp5rdbvwjmj74.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%2F7jhoub3pp5rdbvwjmj74.png" alt=" " width="729" height="293"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to choose a merge instead of a relationship&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Merges make sense when you need to reshape data before it becomes a table in the model, not to link tables that will remain separate analytical entities. Typical reasons:&lt;/p&gt;

&lt;p&gt;Bringing in a lookup value from a reference table permanently e.g., pulling a TaxRate or ExchangeRate column into a transactions table so it's available for row-level calculation logic that can't rely on relationship filter propagation.&lt;br&gt;
Flattening a snowflaked source merging Category into Product before load, so the model receives a single, flat dimension as recommended in the star vs. snowflake discussion earlier.&lt;br&gt;
Combining files with different structures e.g., appending or merging exports from two systems into one clean table before anything reaches the model.&lt;br&gt;
Deduplication or enrichment logic that needs to happen once, in ETL, rather than being recalculated by every visual.&lt;/p&gt;

&lt;p&gt;By contrast, use a relationship whenever the two tables represent genuinely distinct entities that should stay independently filterable and reusable across many visuals which, in practice, is almost every fact-to-dimension link in a normal report.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How excessive merging affects the model&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you merge everything upstream  flattening every dimension directly into the fact table rather than relating them — you end up rebuilding a flat table by another name (the very structure discussed as a poor Power BI performer earlier). Specific problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;File size and refresh time balloon, since merged columns duplicate dimension text across every fact row instead of letting VertiPaq compress a small, separate dimension table.&lt;/li&gt;
&lt;li&gt;You lose reusability — a DimDate merged into five different fact tables can't be used as a single shared slicer across all five; each fact table carries its own disconnected copy of date attributes.&lt;/li&gt;
&lt;li&gt;Loss of flexibility - relationships can be toggled active/inactive, support bi-directional filtering, and let you build "what-if" or role-playing dimensions (like OrderDate vs ShipDate) — none of which is possible once the data's already flattened into one table.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Harder maintenance - updating a category name means re-running ETL and refreshing a wide fact table, instead of just editing one row in a small dimension table.&lt;br&gt;
&lt;strong&gt;Reasons for keeping fact tables and dimension tables separate&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Centralized Logic &amp;amp; Reusability - A well-structured star schema model built around business domains can serve as a single source of truth for multiple reports. Changes made in one central model automatically propagate standards across all dependent reports.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Drastically Simplified DAX - Because filters naturally flow from surrounding dimension tables down to the central fact table through relationships, DAX measures become concise and straightforward (e.g., Total Sales = SUM(FactSales[LineTotal])) without needing complex override logic.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Optimized Engine Performance - When filtering a report visual such as selecting a Product Category in a slicer, Power BI scans a small, lightweight dimension table instantly rather than scanning millions of transaction rows.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Recommended Power BI Model
&lt;/h3&gt;

&lt;p&gt;For a typical BI project, I'd recommend a star schema as the default, with snowflaking used only selectively for specific hierarchies that genuinely need it, and a flat table avoided except for very small, one-off datasets. Here's the reasoning against each factor:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Query and report performance. VertiPaq compresses columns most efficiently when dimension attributes are isolated in small, low-cardinality tables and the fact table is kept narrow (mostly keys and numbers). A star schema is exactly this shape, so it consistently outperforms both a flat table (which forces massive redundant text into every row) and a snowflake (which adds extra join hops the engine has to traverse for every filter).&lt;/li&gt;
&lt;li&gt;DAX simplicity. DAX measures written against a star schema are shorter and easier to reason about, because filter context only has to travel one hop from dimension to fact. Snowflaking forces filters through multiple tables before reaching the fact table, which makes measures involving RELATED, multi-level hierarchies, or CALCULATE modifiers noticeably harder to write and debug correctly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model readability&lt;/strong&gt; - A star schema's diagram is genuinely legible at a glance  a fact table with dimensions radiating outward. A snowflake's extra branching sub-dimensions make the model view cluttered, and a flat table, while trivially readable as a single table, hides all structure and forces users to scroll through dozens of repeated columns to understand what's actually being measured versus described.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability&lt;/strong&gt; - As row counts and business complexity grow, a star schema scales gracefully because the fact table — the fastest-growing table stays lean. A flat table's redundancy compounds with every new row, and a snowflake's extra relationship hops compound with every new sub-dimension, both of which degrade faster than a star schema under growth.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data redundancy&lt;/strong&gt; - A snowflake technically minimizes redundancy the most, but as discussed earlier, VertiPaq already compresses a flat dimension so efficiently that the storage savings rarely justify the added complexity. A star schema accepts a small, deliberate amount of redundancy within each dimension in exchange for simplicity — a reasonable trade in a columnar engine. A flat table has redundancy at the far end of the spectrum and gains nothing from it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maintainability&lt;/strong&gt; - Fewer tables and shallower relationships mean fewer things to break. A star schema is easy to extend (add a new dimension, add a new fact table sharing existing dimensions) without restructuring what's already there. A snowflake requires maintaining referential integrity across more tables and relationship hops; a flat table requires re-engineering the whole structure any time the granularity or a shared attribute needs to change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ease of creating reports&lt;/strong&gt; - Report authors work with field lists and drag-and-drop visuals — a star schema maps naturally onto that mental model measures from the fact table, slicers/axes from the dimensions. A snowflake forces authors to know which sub-table an attribute lives in; a flat table offers everything from one list but with no structural guidance on what's a measure versus a filter.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Filter propagation&lt;/strong&gt; - This is where the star schema's advantage is cleares with single-hop, one-to-many relationships, filter context propagates predictably and quickly from dimension to fact. Multi-hop snowflake relationships introduce more places where propagation can behave unexpectedly, especially if any relationship along the chain is set to bi-directional.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model complexity&lt;/strong&gt; - Lowest complexity that still supports proper analytical modeling. A flat table is simpler only in the trivial sense of having one table it has no real modeling structure at all, which becomes a liability rather than a virtue once you need real reporting flexibility.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Relationships and filter direction
&lt;/h3&gt;

&lt;p&gt;For the star schema itself, I'd implement:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One-to-many (1:*) relationships from each dimension to the fact table, as the default and near-universal choice each dimension's key is unique, each fact row references it once.&lt;/li&gt;
&lt;li&gt;Single-direction filtering (dimension → fact) as the default for every relationship, since that matches how star schema filtering is meant to work and avoids the ambiguous, sometimes duplicated-aggregation behavior that bi-directional filtering can introduce.&lt;/li&gt;
&lt;li&gt;Bi-directional filtering reserved for specific, deliberate cases  most commonly a many-to-many bridge table (e.g., linking FactSales to a promotions or sales-channel bridge), where filtering needs to flow both ways to work correctly. I would not turn on bi-directional filtering broadly across the model just in case.&lt;/li&gt;
&lt;li&gt;Inactive relationships plus USERELATIONSHIP() for any case where a fact table needs to relate to the same dimension more than once the classic example being OrderDate and ShipDate both pointing to DimDate. Keep one active by default, and invoke the second explicitly inside specific measures.&lt;/li&gt;
&lt;li&gt;Many-to-many relationships resolved through a bridge table wherever feasible, rather than direct M:M links, since bridge tables reduce to two well-behaved one-to-many relationships and give far more predictable performance and filter behavior.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>modelling</category>
      <category>powerbi</category>
      <category>datamodeling</category>
      <category>relationships</category>
    </item>
    <item>
      <title>Getting Started With Exel For Data Analysis.</title>
      <dc:creator>Austin karianjahi</dc:creator>
      <pubDate>Sun, 30 Aug 2026 08:58:52 +0000</pubDate>
      <link>https://dev.to/karianjahi/getting-started-with-exel-for-data-analysis-304i</link>
      <guid>https://dev.to/karianjahi/getting-started-with-exel-for-data-analysis-304i</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;Microsoft Excel is a spreadsheet application developed by Microsoft. It allows users to store data in rows and columns and perform calculations and analysis using formulas and functions.&lt;/p&gt;

&lt;p&gt;Excel is important in data analytics because it provides tools for almost every stage of basic data preparation. An analyst can use Excel to import or manually enter data, clean inconsistencies, calculate metrics, filter records, identify trends, and create reports.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the Excel interface
&lt;/h2&gt;

&lt;p&gt;The Excel interface consists of several components.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The &lt;strong&gt;Ribbon&lt;/strong&gt; - is located at the top of the application and contains different tabs, including Home, Insert, Page Layout, Formulas, Data, Review, and View. Each tab provides tools for a particular category of tasks. For example, the Data tab contains tools for sorting, filtering, removing duplicates, and splitting data using Text to Columns.&lt;/li&gt;
&lt;/ol&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%2Fdp1tcue9gty90kbilsuv.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%2Fdp1tcue9gty90kbilsuv.png" alt=" " width="799" height="84"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2.&lt;strong&gt;Worksheets&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An Excel workbook can contain multiple worksheets. Each worksheet provides a separate environment for storing data.&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%2F37hp9zmbbdxbkxy8i23u.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%2F37hp9zmbbdxbkxy8i23u.png" alt=" " width="800" height="268"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3.&lt;strong&gt;Cells, rows, and columns&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A cell is the basic unit in an Excel worksheet. Each cell has a unique address based on its column and row.&lt;/p&gt;

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

&lt;p&gt;A1&lt;/p&gt;

&lt;p&gt;means column A, row 1.&lt;/p&gt;

&lt;p&gt;Rows are identified using numbers, while columns are identified using letters.&lt;/p&gt;

&lt;p&gt;A range such as:&lt;/p&gt;

&lt;p&gt;A2:A13&lt;/p&gt;

&lt;p&gt;represents all cells from A2 through A13.&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%2Fbwcn2lk2wmzunbujuyu1.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%2Fbwcn2lk2wmzunbujuyu1.png" alt=" " width="800" height="281"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding Data Types
&lt;/h2&gt;

&lt;p&gt;Correctly identifying data types is essential for analysis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Text&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Text represents characters or categorical information.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Name&lt;/li&gt;
&lt;li&gt;Email&lt;/li&gt;
&lt;li&gt;Department&lt;/li&gt;
&lt;li&gt;Gender&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Numbers&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Numbers can be used in mathematical calculations.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Salary&lt;/li&gt;
&lt;li&gt;Bonus&lt;/li&gt;
&lt;li&gt;Perfomance score&lt;/li&gt;
&lt;li&gt;Experience&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Dates&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Dates are particularly important in analytics because they allow data to be analyzed over time.&lt;/p&gt;

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

&lt;p&gt;2026-01-05&lt;/p&gt;

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

&lt;p&gt;Data cleaning is the process of identifying and correcting inaccurate, inconsistent, incomplete, duplicated, or improperly formatted information.&lt;/p&gt;

&lt;p&gt;A clean dataset should be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Consistent.&lt;/li&gt;
&lt;li&gt;Accurate.&lt;/li&gt;
&lt;li&gt;Complete where possible.&lt;/li&gt;
&lt;li&gt;Properly structured.&lt;/li&gt;
&lt;li&gt;Free from unnecessary duplicates.&lt;/li&gt;
&lt;li&gt;Suitable for analysis.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Removing duplicates&lt;/strong&gt;&lt;br&gt;
Excel provides a Remove Duplicates feature under:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Data → Remove Duplicates&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Before removing duplicates, the analyst should determine which column or combination of columns uniquely identifies a record.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sorting Data&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sorting reorganizes records according to a selected column.&lt;/p&gt;

&lt;p&gt;For example, the sales dataset can be sorted by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Employee name from A-Z.&lt;/li&gt;
&lt;li&gt;Employee name from Z-A.&lt;/li&gt;
&lt;li&gt;Age from smallest to largest.&lt;/li&gt;
&lt;li&gt;Age from largest to smallest.&lt;/li&gt;
&lt;li&gt;Hire date from oldest to newest.&lt;/li&gt;
&lt;li&gt;Hire date from newest to oldest.&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%2F9qhn99940ugkg9hsxlh2.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%2F9qhn99940ugkg9hsxlh2.png" alt=" " width="290" height="253"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Find and Replace&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Find &amp;amp; Replace feature allows analysts to locate specific values and replace them with standardized values.&lt;/p&gt;

&lt;p&gt;The shortcut is:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Ctrl + H&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For example, suppose the dataset contains:&lt;/p&gt;

&lt;p&gt;Nairobi&lt;br&gt;
nairobi&lt;br&gt;
NAIROBI&lt;/p&gt;

&lt;p&gt;These technically represent the same region, but inconsistent capitalization can cause problems when grouping or filtering data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Filtering Data&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Filtering temporarily hides records that do not meet specified conditions.&lt;/p&gt;

&lt;p&gt;The AutoFilter can be activated from:&lt;/p&gt;

&lt;p&gt;Data → Filter&lt;/p&gt;

&lt;p&gt;or by using the keyboard shortcut:&lt;/p&gt;

&lt;p&gt;Ctrl + Shift + L&lt;/p&gt;

&lt;p&gt;Once filtering is enabled, dropdown arrows appear beside the column headings.&lt;/p&gt;

&lt;p&gt;For example, an analyst could filter the Region column to display only:&lt;br&gt;
Nairobi&lt;/p&gt;

&lt;p&gt;The dataset can also be filtered using conditions such as:&lt;/p&gt;

&lt;p&gt;Greater than KSh 10,000.&lt;br&gt;
Less than KSh 5,000.&lt;br&gt;
Contains "Single".&lt;br&gt;
Begins with a particular letter.&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%2F3pmdzradq53p86cz4x63.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%2F3pmdzradq53p86cz4x63.png" alt=" " width="196" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Working with Formulas
&lt;/h2&gt;

&lt;p&gt;Excel formulas allow analysts to perform calculations directly inside cells.&lt;/p&gt;

&lt;p&gt;A formula begins with:&lt;/p&gt;

&lt;p&gt;=&lt;/p&gt;

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

&lt;p&gt;=E2*F2&lt;/p&gt;

&lt;p&gt;could calculate the sales value if A2 contains quantity and A2 contains unit price.&lt;/p&gt;

&lt;p&gt;The four &lt;strong&gt;arithmetic operators&lt;/strong&gt; are:&lt;/p&gt;

&lt;p&gt;Addition: &lt;code&gt;+&lt;/code&gt;&lt;br&gt;
Subtraction: &lt;code&gt;-&lt;/code&gt;&lt;br&gt;
Multiplication: &lt;code&gt;*&lt;/code&gt;&lt;br&gt;
Division:&lt;code&gt;/&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic Excel Functions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Excel functions provide predefined methods for performing calculations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SUM()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=SUM(J2:J13)&lt;/p&gt;

&lt;p&gt;calculates the total of a range.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AVERAGE()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=AVERAGE(J2:J13)&lt;/p&gt;

&lt;p&gt;calculates the arithmetic mean.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MIN()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=MIN(J2:J13)&lt;/p&gt;

&lt;p&gt;returns the smallest value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MAX()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=MAX(J2:J13)&lt;/p&gt;

&lt;p&gt;returns the largest value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;COUNT()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=COUNT(A2:A13)&lt;/p&gt;

&lt;p&gt;counts cells containing numerical values.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;COUNTA()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=COUNTA(B2:B13)&lt;/p&gt;

&lt;p&gt;counts non-empty cells, including cells containing text.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LEFT()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=LEFT(B2,5)&lt;/p&gt;

&lt;p&gt;returns the first five characters from a text value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;RIGHT()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=RIGHT(B2,5)&lt;/p&gt;

&lt;p&gt;returns the last five characters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LEN()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=LEN(B2)&lt;/p&gt;

&lt;p&gt;returns the number of characters in a cell.&lt;/p&gt;

&lt;p&gt;This can be useful for identifying unexpected values.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TRIM()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=TRIM(B2)&lt;/p&gt;

&lt;p&gt;removes unnecessary spaces from text.&lt;/p&gt;

&lt;p&gt;This is particularly useful for the raw dataset because some customer names contain leading or trailing spaces.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UPPER()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=UPPER(D2)&lt;/p&gt;

&lt;p&gt;converts text to uppercase.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LOWER()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=LOWER(D2)&lt;/p&gt;

&lt;p&gt;converts text to lowercase.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PROPER()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=PROPER(B2)&lt;/p&gt;

&lt;p&gt;converts text into title case.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Date and Time Functions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Dates are extremely important in analytics because organizations frequently analyze trends over time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TODAY()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=TODAY()&lt;/p&gt;

&lt;p&gt;returns the current date.&lt;/p&gt;

&lt;p&gt;This is useful for calculations that need to remain current.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOW()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=NOW()&lt;/p&gt;

&lt;p&gt;returns the current date and time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;YEAR()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=YEAR(H2)&lt;/p&gt;

&lt;p&gt;extracts the year from a date.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MONTH()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=MONTH(H2)&lt;/p&gt;

&lt;p&gt;extracts the month number.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DAY()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=DAY(H2)&lt;/p&gt;

&lt;p&gt;extracts the day of the month.&lt;/p&gt;

&lt;p&gt;These functions allow analysts to transform a date into useful analytical dimensions such as year, month, and day.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DATEDIF()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;DATEDIF() calculates the difference between two dates.&lt;/p&gt;

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

&lt;p&gt;Excel provides a strong foundation for learning data analytics because it combines data entry, organization, cleaning, transformation, calculation, and analysis in one environment.&lt;/p&gt;

</description>
      <category>analytics</category>
      <category>beginners</category>
    </item>
    <item>
      <title>My First GitHub Project: From a Local Folder to GitHub Using Git and SSH</title>
      <dc:creator>Austin karianjahi</dc:creator>
      <pubDate>Sat, 22 Aug 2026 12:14:27 +0000</pubDate>
      <link>https://dev.to/karianjahi/my-first-github-project-from-a-local-folder-to-github-using-git-and-ssh-hlf</link>
      <guid>https://dev.to/karianjahi/my-first-github-project-from-a-local-folder-to-github-using-git-and-ssh-hlf</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;This article is a walk through of my first project where I pushed a local folder containing health data to Github using Git and SSH.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools used
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Github - This is an online service where you can store Git repositories and it makes it possible to share and collaborate on projects.&lt;/li&gt;
&lt;li&gt;Git - This is a version control system that runs on your computer and keeps track of changes made to your project.&lt;/li&gt;
&lt;li&gt;SSH (&lt;em&gt;secure shell&lt;/em&gt;) - We use SSH when your computer needs a secure way to prove to Github that it is authorized to access your Github account and its repositories.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  On windows
&lt;/h2&gt;

&lt;p&gt;Open Gitbash and check your current location&lt;br&gt;
Run &lt;br&gt;
&lt;code&gt;pwd&lt;/code&gt; &lt;br&gt;
Which stands for &lt;em&gt;print working directory&lt;/em&gt;&lt;br&gt;
running &lt;code&gt;pwd&lt;/code&gt; asks which folder am I currently inside?&lt;/p&gt;

&lt;h3&gt;
  
  
  List files and folders around you
&lt;/h3&gt;

&lt;p&gt;Run&lt;br&gt;
&lt;code&gt;ls&lt;/code&gt;&lt;br&gt;
Which shows the files and folders inside your current directory&lt;/p&gt;

&lt;h3&gt;
  
  
  Move to the Desktop
&lt;/h3&gt;

&lt;p&gt;I created my project on the Desktop by running&lt;br&gt;
&lt;code&gt;cd Desktop&lt;/code&gt;&lt;br&gt;
Where &lt;code&gt;cd&lt;/code&gt; means &lt;em&gt;Change Directory&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Create the project folder
&lt;/h3&gt;

&lt;p&gt;I named my project&lt;br&gt;
kenya-health-records and run&lt;br&gt;
&lt;code&gt;mkdir kenya-health-records&lt;/code&gt;&lt;br&gt;
Where &lt;code&gt;mkdir&lt;/code&gt; means &lt;em&gt;Make Directory&lt;/em&gt; or &lt;em&gt;create new folder&lt;/em&gt;&lt;br&gt;
To confirm that the folder exists &lt;br&gt;
run&lt;br&gt;
&lt;code&gt;ls&lt;/code&gt; and you should see &lt;code&gt;kenya-health-records&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Enter the project folder
&lt;/h3&gt;

&lt;p&gt;Run&lt;br&gt;
&lt;code&gt;cd kenya-health-records&lt;/code&gt;&lt;br&gt;
Then verify the project by running&lt;br&gt;
&lt;code&gt;pwd&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Create a proper project structure
&lt;/h3&gt;

&lt;p&gt;Here I created three project folders by running&lt;br&gt;
&lt;code&gt;mkdir data&lt;/code&gt;&lt;br&gt;
&lt;code&gt;mkdir notebooks&lt;/code&gt;&lt;br&gt;
&lt;code&gt;mkdir scripts&lt;/code&gt;&lt;br&gt;
Then I created the README by running&lt;br&gt;
&lt;code&gt;touch README.md&lt;/code&gt;&lt;br&gt;
Which explains the entire project&lt;/p&gt;

&lt;h3&gt;
  
  
  Adding the existing hospital dataset
&lt;/h3&gt;

&lt;p&gt;Since the hospital dataset was already on my computer under &lt;em&gt;Downloads&lt;/em&gt;&lt;br&gt;
I copied the dataset directly from downloads to the data folder I had created inside the project.&lt;br&gt;
To verify the dataset was copied I run&lt;br&gt;
&lt;code&gt;ls data&lt;/code&gt;&lt;br&gt;
And the outcome was &lt;em&gt;kenya_health_records.csv&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Adding content to the README.md
&lt;/h3&gt;

&lt;p&gt;Since the README.md explains the project to anyone who opens the Github repository.&lt;br&gt;
I started with &lt;code&gt;echo "#kenya hospital records" &amp;gt;README.md&lt;/code&gt;&lt;br&gt;
where &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;echo&lt;/code&gt; means &lt;em&gt;print text&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;# is a Markdown syntax for a large heading&lt;/li&gt;
&lt;li&gt;&amp;gt; Redirects the text into a file in this case to README.md&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then I added the project overview, tools used, and project challenges.&lt;br&gt;
 To check my README I run&lt;br&gt;
&lt;code&gt;cat README.md&lt;/code&gt; &lt;br&gt;
Which displayed the contents in the README including the tittle, project overview, tools used and project challenges.&lt;/p&gt;

&lt;h3&gt;
  
  
  Initializing the project with Git
&lt;/h3&gt;

&lt;p&gt;Run&lt;br&gt;
&lt;code&gt;git init&lt;/code&gt;&lt;br&gt;
Where &lt;code&gt;git init&lt;/code&gt; means initialize this directory as a Git repository.&lt;/p&gt;

&lt;p&gt;To check the project status&lt;br&gt;
Run &lt;br&gt;
&lt;code&gt;git status&lt;/code&gt;&lt;br&gt;
Where this command is asking Git what is happening to the project.&lt;br&gt;
Because this was a new repository Git showed the files as &lt;em&gt;untracked&lt;/em&gt;&lt;br&gt;
Then run &lt;br&gt;
&lt;code&gt;git add&lt;/code&gt; &lt;br&gt;
Which stages the project from the current directory&lt;br&gt;
Then check&lt;br&gt;
&lt;code&gt;git status&lt;/code&gt; again &lt;/p&gt;

&lt;h3&gt;
  
  
  Create the first commit
&lt;/h3&gt;

&lt;p&gt;Run&lt;br&gt;
&lt;code&gt;git commit -m "Add kenya hospital project"&lt;/code&gt;&lt;br&gt;
where &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;git commit&lt;/code&gt; - creates a saved Git checkpoint.&lt;/li&gt;
&lt;li&gt;-m - means message.&lt;/li&gt;
&lt;li&gt;"Add kenya hospital project" is the commit message that explains what was saved.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Short commit history
&lt;/h3&gt;

&lt;p&gt;To get a shorter project history&lt;br&gt;
Run&lt;br&gt;
&lt;code&gt;git log --online&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Check the current branch
&lt;/h3&gt;

&lt;p&gt;Run&lt;br&gt;
&lt;code&gt;git branch&lt;/code&gt;&lt;br&gt;
which returns &lt;br&gt;
*master&lt;br&gt;
rename it by running&lt;br&gt;
&lt;code&gt;git branch -M main&lt;/code&gt;&lt;br&gt;
then run &lt;code&gt;git branch&lt;/code&gt; and it changed to *main&lt;/p&gt;

&lt;h3&gt;
  
  
  Create Github repository
&lt;/h3&gt;

&lt;p&gt;Open Github on browser and create a new repository and name it as &lt;em&gt;kenya  health project&lt;/em&gt; and add a brief description of the repository and choose it s a public repository and create the repository.&lt;br&gt;
After creating the repository Github displays connection options&lt;br&gt;
select SSH and git hub will givean adress which is &lt;em&gt;&lt;a href="mailto:git@github.com"&gt;git@github.com&lt;/a&gt;:karianjahi8/kenya-health-records.git&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conecting the local project to Github
&lt;/h3&gt;

&lt;p&gt;Return to the gitbash terminal then run&lt;br&gt;
&lt;code&gt;git remote add origin git@github.com:karianjahi8/kenya-health-records.git&lt;/code&gt;&lt;br&gt;
Where &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;remote&lt;/em&gt; is another Git repository your local repository can communicate with. &lt;/li&gt;
&lt;li&gt;
&lt;em&gt;add&lt;/em&gt; is a new remote connection.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;origin&lt;/em&gt;  is the conventional nickname for the main remote repository.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Push the prioject on Github
&lt;/h3&gt;

&lt;p&gt;Run &lt;br&gt;
&lt;code&gt;git push -u origin main&lt;/code&gt; &lt;br&gt;
Where&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;git push&lt;/em&gt; sends committed changes from my computer to the remote repository.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;-u&lt;/em&gt; sets an upstream relationship&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;origin&lt;/em&gt; The nickname of the Github repository&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;main&lt;/em&gt; The branch being uploaded&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Verify project on github
&lt;/h3&gt;

&lt;p&gt;Return to your github browser and refresh the page and you will see your project listed.&lt;/p&gt;

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

&lt;p&gt;Getting a project onto GitHub for the first time involves two separate concerns Git, which tracks your project's history locally, and SSH, which securely proves your identity to GitHub so it'll accept your pushes.&lt;/p&gt;

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