<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Victor Karanja</title>
    <description>The latest articles on Forem by Victor Karanja (@victak36lgtm).</description>
    <link>https://forem.com/victak36lgtm</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%2F3708651%2Fd2e66539-b7bd-4a09-b578-106fcec24dea.jpeg</url>
      <title>Forem: Victor Karanja</title>
      <link>https://forem.com/victak36lgtm</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/victak36lgtm"/>
    <language>en</language>
    <item>
      <title>Unlocking Insights: Transforming Messy Data Into Action Using Power BI</title>
      <dc:creator>Victor Karanja</dc:creator>
      <pubDate>Mon, 09 Feb 2026 06:37:03 +0000</pubDate>
      <link>https://forem.com/victak36lgtm/unlocking-insights-transforming-messy-data-into-action-using-power-bi-3lnn</link>
      <guid>https://forem.com/victak36lgtm/unlocking-insights-transforming-messy-data-into-action-using-power-bi-3lnn</guid>
      <description>&lt;ol&gt;
&lt;li&gt;
## How Analysts Clean Messy Data, Use DAX, and Build Dashboards Using Power BI
Power BI is an intelligent tool that helps organizations visualize and analyze their data. Raw day-to-day data can be messy and unfiltered. Analysts often deal with missing values, inconsistent formats, duplicates, and poorly structured tables. Power BI stands out because it allows analysts to clean, model, analyze, and visualize data. This article explains how analysts transform messy data into meaningful insights.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Cleaning Messy Data with Power Query
&lt;/h2&gt;

&lt;p&gt;After loading your dataset, open &lt;em&gt;transform data&lt;/em&gt; to access the Power Query Editor.&lt;/p&gt;

&lt;h3&gt;
  
  
  common data problems
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Duplicate records- Inconsistent text (e.g.  'cardiology' 'cardio dep' 'Cardiolgy')
&lt;/li&gt;
&lt;li&gt;Numbers stored as text
&lt;/li&gt;
&lt;li&gt;Multiple values in a single column
&lt;/li&gt;
&lt;li&gt;Inconsistent date form&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Some of the common Power query Transformation are:&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Data Problems
&lt;/h2&gt;

&lt;p&gt;Real-world datasets are rarely perfect. Analysts often encounter the following data issues:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Missing values (nulls or blanks)&lt;/li&gt;
&lt;li&gt;Duplicate records&lt;/li&gt;
&lt;li&gt;Inconsistent text values (cardiology, Cardiology, Cardiology dept)&lt;/li&gt;
&lt;li&gt;Incorrect data types (numbers stored as text)&lt;/li&gt;
&lt;li&gt;Inconsistent date formats&lt;/li&gt;
&lt;li&gt;Spelling errors and typos&lt;/li&gt;
&lt;li&gt;Extra spaces or hidden characters&lt;/li&gt;
&lt;li&gt;Multiple values stored in a single column&lt;/li&gt;
&lt;li&gt;Inconsistent units of measurement&lt;/li&gt;
&lt;li&gt;Outliers and extreme values&lt;/li&gt;
&lt;li&gt;Poorly structured tables&lt;/li&gt;
&lt;li&gt;Mismatched keys between tables&lt;/li&gt;
&lt;li&gt;Changing data definitions over time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Addressing these problems during data preparation ensures accurate analysis, reliable dashboards, and trustworthy business insights.&lt;/p&gt;

&lt;p&gt;Power Query automatically records every step, so you can modify your transformation at any time.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧩 Understanding Data Modelling in Power BI
&lt;/h2&gt;

&lt;p&gt;Before you start writing DAX, it’s important to understand data modelling. A data model is simply the way your tables connect inside Power BI. Think of it as the “map” that tells Power BI how your data fits together.&lt;/p&gt;

&lt;p&gt;A good data model usually includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fact tables&lt;/strong&gt; – contain numbers you want to analyze (sales, revenue, quantities).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dimension tables&lt;/strong&gt; – contain descriptive information (dates, products, customers).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Relationships&lt;/strong&gt; – links between tables that allow Power BI to filter and calculate correctly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A clean model makes your reports faster, your calculations easier, and your DAX formulas more accurate.&lt;/p&gt;

&lt;p&gt;Once your data model is organized, you can start adding DAX logic to create measures, calculations, and business rules.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using Data Analysis Expressions(&lt;em&gt;DAX)&lt;/em&gt; To create Business Logic
&lt;/h2&gt;

&lt;p&gt;With a clean data we use &lt;em&gt;dax&lt;/em&gt; to create calculations questions. &lt;br&gt;
Dax is used for:&lt;br&gt;
-conditional logic &lt;br&gt;
-time intelligence&lt;br&gt;
-Measures ratios and percentages&lt;/p&gt;

&lt;p&gt;Examples of &lt;strong&gt;Dax&lt;/strong&gt; measure&lt;br&gt;
Total Sales =&lt;br&gt;
SUM(Fact Sales[Sales Amount])&lt;/p&gt;

&lt;p&gt;Sales Growth =&lt;br&gt;
DIVIDE([Total Sales] - [Last Year Sales], [Last Year Sales])&lt;/p&gt;

&lt;h2&gt;
  
  
  Building Simple and Clean Dashboards
&lt;/h2&gt;

&lt;p&gt;An effective dashboard presents only the most important metrics, allowing users to understand insights at a glance without being overwhelmed by unnecessary visuals. By prioritizing key KPIs, using consistent layouts analysts create dashboards that are intuitive, easy to navigate, and focused on actionable insights. &lt;/p&gt;

&lt;p&gt;Common Power BI visuals are like;&lt;/p&gt;

&lt;p&gt;-Bar graphs and column chats&lt;/p&gt;

&lt;p&gt;-Line charts for trends&lt;/p&gt;

&lt;p&gt;-KPI cards&lt;/p&gt;

&lt;p&gt;-Tables and matrices for detail&lt;/p&gt;

&lt;p&gt;-Maps for geographic analysis&lt;/p&gt;

&lt;p&gt;Using Power Query to clean and &lt;strong&gt;Dax&lt;/strong&gt;, adding logic to data you can transform raw data into meaningful insights.&lt;/p&gt;

&lt;p&gt;Inconclusion cleaning and preparing data is the basic foundation of every Insightful &lt;strong&gt;Power BI&lt;/strong&gt; . When you build a clear data model and choose the rightful visuals, your dashboards become intuitive data or report. &lt;/p&gt;

</description>
      <category>powerbi</category>
      <category>tutorial</category>
      <category>begginer</category>
    </item>
    <item>
      <title>#Schemas and Data Modelling in Power BI</title>
      <dc:creator>Victor Karanja</dc:creator>
      <pubDate>Sun, 01 Feb 2026 22:01:17 +0000</pubDate>
      <link>https://forem.com/victak36lgtm/schemas-and-data-modelling-in-power-bi-1ad9</link>
      <guid>https://forem.com/victak36lgtm/schemas-and-data-modelling-in-power-bi-1ad9</guid>
      <description>&lt;h2&gt;
  
  
  Schemas and Data Modelling in Power BI
&lt;/h2&gt;

&lt;p&gt;Data modelling is one of the most important steps in Power BI. A well-designed data model improves performance, accuracy, and ease to analyse, while a poor model can lead to slow reports and incorrect insights.&lt;/p&gt;

&lt;p&gt;This article explains schemas and data modelling concepts in Power BI.&lt;/p&gt;




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

&lt;p&gt;Data Modelling involves organizing data sources into a structured model. In Power BI, this means organizing tables and defining relationships between them to support accurate reporting and efficient calculations.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Is a Schema?
&lt;/h2&gt;

&lt;p&gt;A schema is the structure and organization of data in a table. It's the logical arrangement of tables used in reports on Power BI.&lt;/p&gt;

&lt;p&gt;In Power BI, schemas help determine:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How data is connected&lt;/li&gt;
&lt;li&gt;How filters flow between tables&lt;/li&gt;
&lt;li&gt;How efficiently queries are executed. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;****Types of schemas in Power BI.&lt;/p&gt;

&lt;p&gt;-Galaxy schema&lt;br&gt;
-Snowflakes schema&lt;br&gt;
-star schema&lt;/p&gt;

&lt;h2&gt;
  
  
  Snowflakes schema
&lt;/h2&gt;

&lt;p&gt;Here dimensions are split into sub dimensions, that can also be split into further smaller 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%2Fzf3acrco6ua0tqlb8j33.jpg" 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%2Fzf3acrco6ua0tqlb8j33.jpg" alt="_snowflake diagram_" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;It's the mostly schema used in Excel, where it has multiple dimensions and one fact table.&lt;br&gt;
its advantages are; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Faster query performance&lt;/li&gt;
&lt;li&gt;Easier to write DAX formulas&lt;/li&gt;
&lt;li&gt;Better filter
-Easy to understand.&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%2F9hcmxfxrx8y4hbcc9bll.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%2F9hcmxfxrx8y4hbcc9bll.png" alt="_star schema image_" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Fact Tables
&lt;/h2&gt;

&lt;p&gt;A fact table stores quantitative data (measures) that can be analysed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Characteristics of Fact Tables:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Contain numerical values&lt;/li&gt;
&lt;li&gt;Have many rows&lt;/li&gt;
&lt;li&gt;Reference dimension tables using keys&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Examples:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Costomer Id&lt;/li&gt;
&lt;li&gt;Name&lt;/li&gt;
&lt;li&gt;Age&lt;/li&gt;
&lt;li&gt;Region&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Dimension Tables
&lt;/h2&gt;

&lt;p&gt;A dimension table contains descriptive information that provides context to facts.&lt;/p&gt;

&lt;h3&gt;
  
  
  Characteristics of Dimension Tables:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Contain text or categorical data&lt;/li&gt;
&lt;li&gt;Have fewer rows than fact tables&lt;/li&gt;
&lt;li&gt;Used for filtering and grouping data&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Examples:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Date&lt;/li&gt;
&lt;li&gt;Product&lt;/li&gt;
&lt;li&gt;Customer ID&lt;/li&gt;
&lt;li&gt;Location&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What Is a Relationship in Power BI?
&lt;/h2&gt;

&lt;p&gt;A relationship connects a column in one table to a column in another table, usually through a key.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Sales[ProductID] → Product[ProductID]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This allows Power BI to understand how records relate across tables.&lt;/p&gt;




&lt;h2&gt;
  
  
  Relationship Types in Power BI
&lt;/h2&gt;

&lt;h3&gt;
  
  
  One-to-Many
&lt;/h3&gt;

&lt;p&gt;This is the most common and recommended relationship type.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One record in a dimension table&lt;/li&gt;
&lt;li&gt;Many matching records in a fact table&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;One product → many sales records&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Used in star schemas.&lt;/p&gt;




&lt;h3&gt;
  
  
  Many-to-Many (&lt;em&gt;:&lt;/em&gt;)
&lt;/h3&gt;

&lt;p&gt;Occurs when both tables contain duplicate values.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Can cause ambiguous results&lt;/li&gt;
&lt;li&gt;Should be avoided when possible&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use only when necessary and with caution.&lt;/p&gt;




&lt;h3&gt;
  
  
  One-to-One (1:1)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Each value appears once in both tables&lt;/li&gt;
&lt;li&gt;Rarely used in analytical models&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Relationship Direction
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Single Direction (Recommended)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Filters flow from dimension tables to fact tables&lt;/li&gt;
&lt;li&gt;Predictable and efficient behavior&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Best practice for star schemas.&lt;/p&gt;




&lt;h3&gt;
  
  
  Both Direction (Bi-Directional)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Filters flow both ways&lt;/li&gt;
&lt;li&gt;Can cause confusion and performance issues&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use only when absolutely necessary.&lt;/p&gt;




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

&lt;p&gt;In a star schema:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;All dimension tables connect directly to the fact table&lt;/li&gt;
&lt;li&gt;Relationships are one-to-many&lt;/li&gt;
&lt;li&gt;Filter direction is single&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This results in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Faster performance&lt;/li&gt;
&lt;li&gt;Simpler DAX formulas&lt;/li&gt;
&lt;li&gt;Accurate filtering&lt;/li&gt;
&lt;/ul&gt;




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

&lt;p&gt;In a snowflake schema:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dimension tables connect to other dimension tables&lt;/li&gt;
&lt;li&gt;More relationships are required&lt;/li&gt;
&lt;li&gt;More joins occur during queries&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reduce performance in Power BI&lt;/li&gt;
&lt;li&gt;Complicate filter behavior&lt;/li&gt;
&lt;li&gt;Make DAX harder to write and maintain&lt;/li&gt;
&lt;/ul&gt;




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

&lt;p&gt;Correct relationships:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ensure accurate calculations&lt;/li&gt;
&lt;li&gt;Control how filters behave&lt;/li&gt;
&lt;li&gt;Improve report performance&lt;/li&gt;
&lt;li&gt;Prevent incorrect totals&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Poor relationships can lead to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Incorrect results&lt;/li&gt;
&lt;li&gt;Slow visuals&lt;/li&gt;
&lt;li&gt;Broken slicers and filters&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Best Practices for Power BI Relationships
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Use star schema whenever possible&lt;/li&gt;
&lt;li&gt;Keep relationships one-to-many&lt;/li&gt;
&lt;li&gt;Use single-direction filtering&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  - Avoid many-to-many relationships
&lt;/h2&gt;

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

&lt;p&gt;Good data modelling is the foundation of effective Power BI reporting. By using well-structured schemas such as the star and snowflake schema and defining correct relationships, you can improve performance, ensure accurate calculations, and create reports that are easy to understand and maintain. Investing time in proper modelling leads to faster insights and more reliable decision-making.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
