<?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: Joseous Ng'ash</title>
    <description>The latest articles on DEV Community by Joseous Ng'ash (@josengash).</description>
    <link>https://dev.to/josengash</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%2F3819871%2F87373f8c-b083-4dd2-82a5-a70d23d4fa83.jpg</url>
      <title>DEV Community: Joseous Ng'ash</title>
      <link>https://dev.to/josengash</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/josengash"/>
    <language>en</language>
    <item>
      <title>Python and How Python Is Used In The Data Analytics Space. A Beginner's Guide.</title>
      <dc:creator>Joseous Ng'ash</dc:creator>
      <pubDate>Fri, 15 May 2026 02:05:22 +0000</pubDate>
      <link>https://dev.to/josengash/python-and-how-python-is-used-in-the-data-analytics-space-a-beginners-guide-52dh</link>
      <guid>https://dev.to/josengash/python-and-how-python-is-used-in-the-data-analytics-space-a-beginners-guide-52dh</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;In today's digital world, data is everywhere, every time people stream movies, socialize on social media, shop online, or make online payments amongst others, data is generated. Institutions collect this type of data to be able to analyze and understands customer behavior to be able to improve services, make better decisions and come up with future predictions depending on the trend.&lt;/p&gt;

&lt;p&gt;The collected data is raw and has little value unless it is processed and analyzed. This brings about &lt;strong&gt;Data Analytics&lt;/strong&gt; which involves collecting, cleaning, transforming and interpreting data to uncover useful insights.&lt;/p&gt;

&lt;p&gt;To be able to perform data analytics processes, the analysts rely on programming tools and one of the most used programming language in data analytics is &lt;strong&gt;Python.&lt;/strong&gt; It has become a favorite among beginners and professionals because it is simple to learn, powerful and supported by rich ecosystem of libraries designed for data analysis.&lt;/p&gt;

&lt;p&gt;This article will cover what is python, why it is widely used in data analytics, the key libraries every beginner should learn, how it helps in cleaning and analyzing data and why python is the best choice for professions in data analytics.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Is Python&lt;/strong&gt;&lt;br&gt;
Python is a programming language created by &lt;em&gt;Guido Van Rossum&lt;/em&gt; and was first released in 1991.&lt;/p&gt;

&lt;p&gt;Unlike some programming languages that require complex syntax, python uses clean and straightforward commands that resemble plain English.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example of python command&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello, World!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The simple command line displays text on the screen.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Python is known for:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Large Community support&lt;/li&gt;
&lt;li&gt;Versatility&lt;/li&gt;
&lt;li&gt;Simplicity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why Python Is Popular in Data Analytics&lt;/strong&gt;&lt;br&gt;
Python has become one of mostly used tools in data analytics for several reasons.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Easy to Learn and Use&lt;/strong&gt;&lt;br&gt;
Data analysis involves solving business and technical problems. Analyst should focus on understanding data rather than struggling with difficult programming syntax.&lt;/p&gt;

&lt;p&gt;Python's simple structure allows beginners to write meaningful programs easily.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
Calculating average using python&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;nums&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;avg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;avg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The simple structure of python makes it ideal for people transitioning into analytics.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Libraries Ecosystem&lt;/strong&gt;&lt;br&gt;
Python provides specialized libraries that simplify data-related task.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Strong Data Handling Capabilities&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Python can process:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Unstructured data (text, images)&lt;/li&gt;
&lt;li&gt;Semi_structured data (JSON,XML)&lt;/li&gt;
&lt;li&gt;Structured data (tables, spreadsheets)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This flexibility makes it useful across many industries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Integration with Other Tools&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Python works well with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Jupyter Notebook&lt;/li&gt;
&lt;li&gt;MS Excel&lt;/li&gt;
&lt;li&gt;MS Power BI&lt;/li&gt;
&lt;li&gt;MySQL&lt;/li&gt;
&lt;li&gt;PostgreSQL&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This allows analyst to build complete workflows&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;High Industry Demand&lt;/strong&gt;&lt;br&gt;
Many companies actively seek python skilled analysts because it helps automate repetitive tasks and process large dataset efficiently.&lt;/p&gt;

&lt;p&gt;Industries using python includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Finance&lt;/li&gt;
&lt;li&gt;E-commerce&lt;/li&gt;
&lt;li&gt;Healthcare&lt;/li&gt;
&lt;li&gt;Marketing&lt;/li&gt;
&lt;li&gt;Education&lt;/li&gt;
&lt;li&gt;Telecommunications&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Python Libraries Used in Data Analytics.
&lt;/h3&gt;

&lt;p&gt;One of python's greatest strength is its libraries&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;library&lt;/strong&gt; is a collection of pre-written code that performs specific tasks. Some of most important libraries for beginners include:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pandas&lt;/strong&gt;&lt;br&gt;
Pandas is the most widely used library for data manipulation and analysis.&lt;br&gt;
It helps analysts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Read dataset&lt;/li&gt;
&lt;li&gt;Clean data&lt;/li&gt;
&lt;li&gt;filter rows&lt;/li&gt;
&lt;li&gt;Handle missing values&lt;/li&gt;
&lt;li&gt;Group and summarize data&lt;/li&gt;
&lt;/ul&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;pandas&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;

&lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read_csv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sales.csv&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;head&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This loads a CSV file and displays the first five rows.&lt;br&gt;
Pandas is essential for any data analyst.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NumPy&lt;/strong&gt;&lt;br&gt;
NumPy is used for numerical operations.&lt;br&gt;
It is useful for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mathematical calculations&lt;/li&gt;
&lt;li&gt;Working with arrays&lt;/li&gt;
&lt;li&gt;Statistical analysis&lt;/li&gt;
&lt;/ul&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;numpy&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;

&lt;span class="n"&gt;nums&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;array&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;mean&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Matplotlib&lt;/strong&gt;&lt;br&gt;
This library is used for creating graphs and charts.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;matplotlib.pyplot&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;plt&lt;/span&gt;

&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;],[&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;show&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It helps analysts visualize trends&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Seaborn&lt;/strong&gt;&lt;br&gt;
Seaborn build on Matplotlib and creates more attractive visualizations&lt;br&gt;
It is commonly used for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Heatmaps&lt;/li&gt;
&lt;li&gt;Bar charts&lt;/li&gt;
&lt;li&gt;Distribution&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Scikit_learn&lt;/strong&gt;&lt;br&gt;
Although mainly used in machine learning, beginners can use it for predictive analytics.&lt;br&gt;
It support:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Regression&lt;/li&gt;
&lt;li&gt;Classification&lt;/li&gt;
&lt;li&gt;Clustering&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Jupyter Notebook&lt;/strong&gt;&lt;br&gt;
Jupyter notebook allows analysts to write code, visualize results and document analysis in one place.&lt;br&gt;
It is widely used for learning and experimentation.&lt;/p&gt;
&lt;h3&gt;
  
  
  How Python Is Used to Clean, Analyze and Visualize Data.
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Data Cleaning&lt;/strong&gt;&lt;br&gt;
Raw data is usually messy, common problems include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Missing values&lt;/li&gt;
&lt;li&gt;Duplicates records&lt;/li&gt;
&lt;li&gt;Incorrect formats&lt;/li&gt;
&lt;li&gt;Typographical errors&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Python helps to clean such problems in data efficeintly.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;pandas&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;

&lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read_csv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;customers.csv&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;drop_duplicates&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;inplace&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fillna&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;inplace&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This script removes duplicates and fills missing values.&lt;br&gt;
Cleaning data is important because poor-quality data leads to inaccurate analysis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Analysis&lt;/strong&gt;&lt;br&gt;
After cleaning the dataset, analysts explore the data to identify patterns&lt;/p&gt;

&lt;p&gt;Python can calculate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Averages&lt;/li&gt;
&lt;li&gt;Totals&lt;/li&gt;
&lt;li&gt;Trends&lt;/li&gt;
&lt;li&gt;Correlations&lt;/li&gt;
&lt;/ul&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;sales&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;groupby&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Region&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Revenue&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This script calculates total revenue by region.&lt;br&gt;
Analysts use such insights to answer business questions.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Which product sells the most&lt;/li&gt;
&lt;li&gt;Which customer segment is most profitable&lt;/li&gt;
&lt;li&gt;Which month generates highest or lowest revenue&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Data Visualization&lt;/strong&gt;&lt;br&gt;
Visualizations makes insights easier to understanda.&lt;br&gt;
Instead of reading large tables, decision-makers can quickly interpret charts.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;seaborn&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;sns&lt;/span&gt;

&lt;span class="n"&gt;sns&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;barplot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Region&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Revenue&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;sales&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a bar chart showing regional revenue.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Python supports:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Line charts&lt;/li&gt;
&lt;li&gt;Pie charts&lt;/li&gt;
&lt;li&gt;Scatter plots&lt;/li&gt;
&lt;li&gt;Histograms&lt;/li&gt;
&lt;li&gt;Heatmaps
Visualization is critical because it helps communicate findings clearly&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Real-World Examples of Python in Data Analytics
&lt;/h3&gt;

&lt;p&gt;Python is widely used in real-world organizations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;E-Commerce&lt;/strong&gt;&lt;br&gt;
Online stores analyze customer purchase behaviour&lt;/p&gt;

&lt;p&gt;Python helps answer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which product sells most&lt;/li&gt;
&lt;li&gt;Which products are often bought together&lt;/li&gt;
&lt;li&gt;Which customer are likely to return
Companies like &lt;strong&gt;Alibaba&lt;/strong&gt; use data analytics extensively.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Finance&lt;/strong&gt;&lt;br&gt;
Banks and financial institutions use python for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Customer segmentation&lt;/li&gt;
&lt;li&gt;Risk analysis&lt;/li&gt;
&lt;li&gt;Fraud detection
By analyzing transaction patterns, suspicious activity can be detected quickly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Healthcare&lt;/strong&gt;&lt;br&gt;
Hospitals use python to analyze:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Patient records&lt;/li&gt;
&lt;li&gt;Disease trends&lt;/li&gt;
&lt;li&gt;Treatment outcomes
This improves decision-making and patient care&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Marketing&lt;/strong&gt;&lt;br&gt;
Business analyst analyze business performance using python.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Which audience engages most?&lt;/li&gt;
&lt;li&gt;Which advertisements perform best?&lt;/li&gt;
&lt;li&gt;What is the conversion rate?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Sports Analytics&lt;/strong&gt;&lt;br&gt;
Sports teams analyze players or club performance and match statistics. Python helps identify strengths and weaknesses. This helps improve team strategies.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Beginners Should Learn Python.
&lt;/h3&gt;

&lt;p&gt;If you are new to data analytics, python is one of the best starting points.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Beginner-Friendly&lt;/strong&gt;&lt;br&gt;
Its syntax is simple and readable.&lt;br&gt;
You can start solving real problems quickly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Strong Career Opportunities&lt;/strong&gt;&lt;br&gt;
Python is highly valued in roles such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data Analyst&lt;/li&gt;
&lt;li&gt;Data Scientist&lt;/li&gt;
&lt;li&gt;Business Analyst&lt;/li&gt;
&lt;li&gt;Machine Learning Engineer
Learning python increases employability.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Supports Career Growth&lt;/strong&gt;&lt;br&gt;
Once you master Python for analytics, you can expand into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Machine Learning&lt;/li&gt;
&lt;li&gt;Artificial intelligence&lt;/li&gt;
&lt;li&gt;Data Engineering&lt;/li&gt;
&lt;li&gt;Automation
Python opens many career paths.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Practical and In-Demand&lt;/strong&gt;&lt;br&gt;
Python is not just theoretical.&lt;br&gt;
You can immediately apply it to real datasets and projects.&lt;br&gt;
This makes learning more engaging and rewarding.&lt;/p&gt;

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

&lt;p&gt;In modern data analytics, python has become one of most important tools.&lt;/p&gt;

&lt;p&gt;With python, analyst can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Clean messy datasets&lt;/li&gt;
&lt;li&gt;Analyze trends and patterns&lt;/li&gt;
&lt;li&gt;Create meaningful visualizations&lt;/li&gt;
&lt;li&gt;Generate actionable business insights&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Python powers real world data driven decisions across industries such as E-commerce, Finance, Healthcare and sports.&lt;/p&gt;

&lt;p&gt;Learning python as a beginner in data analytics profession provides a strong technical foundation and opens doors to exciting career opportunities in the growing field of data.&lt;/p&gt;

&lt;p&gt;As data continues to shape the future, python remains one of the tools to help analysts transform raw information into valuable knowledge.&lt;/p&gt;

</description>
      <category>python</category>
      <category>datascience</category>
      <category>analytics</category>
      <category>dataengineering</category>
    </item>
    <item>
      <title>Understanding SQL Joins and SQL Functions, CTEs and Subqueries.</title>
      <dc:creator>Joseous Ng'ash</dc:creator>
      <pubDate>Tue, 05 May 2026 23:29:35 +0000</pubDate>
      <link>https://dev.to/josengash/understanding-sql-joins-and-sql-functions-ctes-and-subqueries-5g2</link>
      <guid>https://dev.to/josengash/understanding-sql-joins-and-sql-functions-ctes-and-subqueries-5g2</guid>
      <description>&lt;p&gt;As my journey in becoming a competent data analytics, my SQL knowledge continues to deepen and as a result, I also publish few things pick up through the process.&lt;br&gt;
couple of weeks back I published about SQL fundamentals, covering that is &lt;strong&gt;DDL&lt;/strong&gt;, &lt;strong&gt;DML&lt;/strong&gt; and &lt;strong&gt;Data Manipulation&lt;/strong&gt;. Read more about SQL fundamentals from this link &lt;a href="https://dev.to/josengash/understanding-sql-fundamentals-ddl-dml-and-data-manipulation-5b04"&gt;Click here to visit dev.to&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Building on SQL skills and data analysis, I have come to know you can work on different tables at the same time through the help of &lt;strong&gt;SQL joins&lt;/strong&gt; and &lt;strong&gt;SQL Functions&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  What is Join?
&lt;/h3&gt;

&lt;p&gt;A &lt;strong&gt;JOIN&lt;/strong&gt; in SQL is used to link or combine rows from two or more tables based on related column between them and it is usually a &lt;em&gt;Primary Key&lt;/em&gt; and &lt;em&gt;Foreign Key&lt;/em&gt;.&lt;br&gt;
 Think of it like, one table has students and another has scores, &lt;strong&gt;JOIN&lt;/strong&gt; will help you see which student took which course.&lt;/p&gt;
&lt;h3&gt;
  
  
  Types of Joins
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;LEFT JOIN (LEFT OUTER JOIN)&lt;/strong&gt;
This type of returns all records from Left table and matching records from the right table&lt;/li&gt;
&lt;/ul&gt;

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

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

&lt;/div&gt;



&lt;p&gt;All students appear, even if they are not assigned a course.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;INNER JOIN&lt;/strong&gt;&lt;br&gt;
This type of &lt;strong&gt;JOIN&lt;/strong&gt; returns only matching records from both tables.&lt;/p&gt;

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

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;RIGHT JOIN (RIGHT OUTER JOIN)&lt;/strong&gt;&lt;br&gt;
The &lt;strong&gt;JOIN&lt;/strong&gt; returns all records from the right table and matching ones from the left. &lt;/p&gt;

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

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

&lt;/div&gt;



&lt;p&gt;All courses appear, even if no student is enrolled.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FULL JOIN(FULL OUTER JOIN)&lt;/strong&gt;&lt;br&gt;
This type of &lt;strong&gt;JOIN&lt;/strong&gt; returns all records when there is a match in either table.&lt;/p&gt;

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

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;JOINs are about relationships between tables&lt;/li&gt;
&lt;li&gt;Without JOINs, databases would be much less powerful&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  SQL Window Functions
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;What are Window Functions?&lt;/strong&gt;&lt;br&gt;
Window functions are used to calculate across rows without collapsing them.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;department&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;salary&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="k"&gt;AVG&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;salary&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;PARTITION&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;department&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;avg_salary&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output from this query, every employee still appears, which also includes department average.&lt;/p&gt;

&lt;h3&gt;
  
  
  SQL functions Every Beginner Should Know
&lt;/h3&gt;

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

&lt;p&gt;The function counts rows present in a given table.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;COUNT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;students&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Counts total number of students&lt;/p&gt;

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

&lt;p&gt;This function is used to add numeric values.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;SUM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;salary&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will get the total salary.&lt;/p&gt;

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

&lt;p&gt;The function is used to get Average values like school exam result performance.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;AVG&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;marks&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;exams&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output will give the average marks.&lt;/p&gt;

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

&lt;p&gt;The function is used to get or change text case,&lt;br&gt;
&lt;strong&gt;UPPER()&lt;/strong&gt; is used to change text into upper case while&lt;br&gt;
&lt;strong&gt;LOWER()&lt;/strong&gt; is used to change text into lower case.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; 
   &lt;span class="k"&gt;UPPER&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;first_name&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
   &lt;span class="k"&gt;LOWER&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;last_name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;students&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The student's first name will be in upper case and second name will be in lower case.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOW()/CURRENT_DATE():&lt;/strong&gt;&lt;br&gt;
This function is used to get current date or time. It is useful when filtering recent records.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;CURRENT_DATE&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In SQL functions are many, the highlighted functions are most common and every beginner should know and understand how they work in order to ease the work as data analysts, data engineer or scientist.&lt;/p&gt;

&lt;h3&gt;
  
  
  SQL Subqueries
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;What is Subquery in SQL:&lt;/strong&gt;&lt;br&gt;
A &lt;strong&gt;Subquery&lt;/strong&gt; is a query written inside another &lt;strong&gt;SQL Query&lt;/strong&gt;, It executes first and its result is used by the outer query.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;salary&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;salary&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;AVG&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;salary&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;The inner query calculates average salary and the outer query compares the employee's salary against average&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Types of Subquery&lt;/strong&gt;&lt;br&gt;
We have different types of subqueries, they include;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scalar Subquery:&lt;/strong&gt; It is used to return single value.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;products&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;AVG&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;price&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;products&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Multiple-row Subquery:&lt;/strong&gt; This subquery returns multiple rows as its name suggests.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;department_id&lt;/span&gt; &lt;span class="k"&gt;IN&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;
    &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;departments&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Correlated Subquery:&lt;/strong&gt; This query references one or more columns from the outer(main) query, it depends on the outer query.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;e1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;e1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;salary&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt; &lt;span class="n"&gt;e1&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;salary&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;AVG&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;salary&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt; &lt;span class="n"&gt;e2&lt;/span&gt;
    &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;e1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;department&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;e2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;department&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The query compares each employee to the average salary in their department.&lt;/p&gt;

&lt;h3&gt;
  
  
  Common Table Expression (CTE)
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;What is CTE?&lt;/strong&gt;&lt;br&gt;
A CTE (Common Table expression) is a temporary named result set created using the &lt;strong&gt;With&lt;/strong&gt; clause.&lt;br&gt;
CTE makes query easier to organize and read.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example: same query using a CTE&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;WITH&lt;/span&gt; &lt;span class="n"&gt;avg_salary&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;AVG&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;salary&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;avg_sal&lt;/span&gt;
    &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;salary&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;salary&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;avg_sal&lt;/span&gt;
    &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;avg_salary&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Reasons for using CTEs
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The need for better readability&lt;/li&gt;
&lt;li&gt;Simply complex queries&lt;/li&gt;
&lt;li&gt;The need for organized structure&lt;/li&gt;
&lt;li&gt;If you need to reuse intermediate results&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;CTE with Multiple Steps&lt;/strong&gt;&lt;br&gt;
One advantage of CTEs is chaining logic&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example: Monthly sales analysis&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;WITH&lt;/span&gt; &lt;span class="n"&gt;monthly_sales&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt;
        &lt;span class="n"&gt;DATE_TRUNC&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'month'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sale_date&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="k"&gt;month&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="k"&gt;SUM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;revenue&lt;/span&gt;
    &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;sales&lt;/span&gt;
    &lt;span class="k"&gt;GROUP&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="k"&gt;month&lt;/span&gt;
&lt;span class="p"&gt;),&lt;/span&gt;

&lt;span class="n"&gt;ranked_sales&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
           &lt;span class="n"&gt;RANK&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;revenue&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;sales_rank&lt;/span&gt;
    &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;monthly_sales&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;ranked_sales&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will calculate monthly revenue, rank months by revenue and return final results.&lt;/p&gt;

&lt;h3&gt;
  
  
  SQL Learning Roadmap for a Beginner
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;SQL Fundamentals&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JOINs&lt;/li&gt;
&lt;li&gt;Group BY&lt;/li&gt;
&lt;li&gt;Window Functions&lt;/li&gt;
&lt;li&gt;SQL Functions&lt;/li&gt;
&lt;li&gt;Subqueries&lt;/li&gt;
&lt;li&gt;CTEs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These will be core concepts needed for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Preparing for SQL technical interview&lt;/li&gt;
&lt;li&gt;Writing quality SQL scripts&lt;/li&gt;
&lt;li&gt;Dashboard preparation for tools like Ms Power BI&lt;/li&gt;
&lt;li&gt;Data analysis&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Since now as a data scientist, data manipulation and analysis is easier now that I have learnt and understood &lt;strong&gt;SQL Functions&lt;/strong&gt;, &lt;strong&gt;Window Function&lt;/strong&gt; and also &lt;strong&gt;Joins.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Also the use of &lt;strong&gt;CTEs&lt;/strong&gt; and &lt;strong&gt;Subquery&lt;/strong&gt; makes SQL query to be easier to read and organization.&lt;br&gt;
&lt;strong&gt;Note:&lt;/strong&gt; If a subquery starts to become difficult to read, convert it into a &lt;strong&gt;CTE&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>database</category>
      <category>sql</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Understanding SQL Fundamentals: DDL, DML, and Data Manipulation.</title>
      <dc:creator>Joseous Ng'ash</dc:creator>
      <pubDate>Mon, 13 Apr 2026 11:27:48 +0000</pubDate>
      <link>https://dev.to/josengash/understanding-sql-fundamentals-ddl-dml-and-data-manipulation-5b04</link>
      <guid>https://dev.to/josengash/understanding-sql-fundamentals-ddl-dml-and-data-manipulation-5b04</guid>
      <description>&lt;h2&gt;
  
  
  What is SQL(Structured Query Language):
&lt;/h2&gt;

&lt;p&gt;Structured Query Language (SQL) is a powerful tool used to manage and manipulate data in relational databases.&lt;br&gt;&lt;br&gt;
SQL commands are categorized into different groups, two of the most important being &lt;strong&gt;DDL&lt;/strong&gt; and &lt;strong&gt;DML&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  What is DDL (Data Definition Language)
&lt;/h2&gt;

&lt;p&gt;This refers to commands used to define and manage the structure of a database. These commands include creating, modifying, or deleting database objects such as tables.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples of DDL Commands:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;CREATE&lt;/code&gt; – used to create new tables and databases
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ALTER&lt;/code&gt; – used to modify existing database structures
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;DROP&lt;/code&gt; – used to delete tables or databases
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  What is DML (Data Manipulation Language)
&lt;/h2&gt;

&lt;p&gt;This refers to commands that deal with managing data within those structures. It allows users to insert, update, retrieve, and delete records.&lt;br&gt;
&lt;strong&gt;Examples of DML Commands:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;INSERT&lt;/code&gt; – adds new records to a table
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;UPDATE&lt;/code&gt; – modifies existing data
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;DELETE&lt;/code&gt; – removes records from a table
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;SELECT&lt;/code&gt; – retrieves data
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  How I Used CREATE, INSERT, UPDATE, and DELETE
&lt;/h2&gt;

&lt;p&gt;In the assignment, I applied several SQL commands to interact with the database.&lt;/p&gt;
&lt;h3&gt;
  
  
  CREATE
&lt;/h3&gt;

&lt;p&gt;I used the &lt;code&gt;CREATE&lt;/code&gt; statement to define tables such as &lt;strong&gt;students&lt;/strong&gt;, &lt;strong&gt;subjects&lt;/strong&gt;, and &lt;strong&gt;exam_results&lt;/strong&gt;. This involved specifying column names, data types, and constraints like primary keys.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;exam_results&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;result_id&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt; &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;student_id&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;subject_id&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;marks&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;exam_date&lt;/span&gt; &lt;span class="nb"&gt;DATE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;grade&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  INSERT
&lt;/h3&gt;

&lt;p&gt;I used the &lt;code&gt;INSERT&lt;/code&gt; command to add records into the tables. For example, I inserted student details such as names, city, class, gender, and date of birth into the &lt;strong&gt;students&lt;/strong&gt; table.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;insert&lt;/span&gt; &lt;span class="k"&gt;into&lt;/span&gt; &lt;span class="n"&gt;students&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;student_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;first_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;last_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;gender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;date_of_birth&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;city&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;values&lt;/span&gt; 
&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Amina'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Wanjiku'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'F'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'2008-03-12'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Form 3'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Nairobi'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Brian'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Ochieng'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'M'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'2007-07-25'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Form 4'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Mombasa'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Cynthia'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Mutua'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'F'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'2008-11-05'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Form 3'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Kisumu'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'David'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Kamau'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'M'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'2007-02-18'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Form 4'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Nairobi'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Esther'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Akinyi'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'F'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'2009-06-30'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Form 2'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Nakuru'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Felix'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Otieno'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'M'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'2009-09-14'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Form 2'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Eldoret'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Grace'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Mwangi'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'F'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'2008-01-22'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Form 3'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Nairobi'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Hassan'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Abdi'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'M'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'2007-04-09'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Form 4'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Mombasa'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Ivy'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Chebet'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'F'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'2009-12-01'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Form 2'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Nakuru'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'James'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Kariuki'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'M'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'2008-08-17'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Form 3'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Nairobi'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  UPDATE
&lt;/h3&gt;

&lt;p&gt;I used &lt;code&gt;UPDATE&lt;/code&gt; to modify existing records. For example, updating &lt;code&gt;student_id = 5&lt;/code&gt; city from &lt;em&gt;Nakuru&lt;/em&gt; to &lt;em&gt;Nairobi&lt;/em&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;UPDATE&lt;/span&gt; &lt;span class="n"&gt;students&lt;/span&gt;
&lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;city&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'Nairobi'&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;student_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  DELETE
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;DELETE&lt;/code&gt; statement was used to remove &lt;code&gt;result_id = 9&lt;/code&gt;, which was cancelled, ensuring data accuracy and consistency.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;DELETE&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;exam_results&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;result_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These commands helped simulate real-world database operations, where data is constantly being created, updated, and maintained.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using WHERE to Filter Data
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;WHERE&lt;/code&gt; clause is used to filter records based on specific conditions. It ensures that queries return only relevant data instead of the entire dataset.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some Commonly Used Operators Include:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;=&lt;/code&gt; (equals): used to match exact values
Example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;DELETE&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;exam_results&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;result_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
sql&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;&amp;gt;&lt;/code&gt; (greater than): used for numeric comparisons
Example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;exam_results&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;marks&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;70&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;BETWEEN&lt;/code&gt;: used to filter values within a range
Example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;exam_results&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;exam_date&lt;/span&gt; &lt;span class="k"&gt;BETWEEN&lt;/span&gt; &lt;span class="s1"&gt;'2024-03-15'&lt;/span&gt; &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="s1"&gt;'2024-03-18'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;IN&lt;/code&gt;: used to match multiple values
Example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;students&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;city&lt;/span&gt; &lt;span class="k"&gt;IN&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Nairobi'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Mombasa'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Kisumu'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;LIKE&lt;/code&gt;: used for pattern matching
Example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;students&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;first_name&lt;/span&gt; &lt;span class="k"&gt;LIKE&lt;/span&gt; &lt;span class="s1"&gt;'A%'&lt;/span&gt; &lt;span class="k"&gt;OR&lt;/span&gt; &lt;span class="n"&gt;first_name&lt;/span&gt; &lt;span class="k"&gt;LIKE&lt;/span&gt; &lt;span class="s1"&gt;'E%'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using the &lt;code&gt;WHERE&lt;/code&gt; clause makes queries more efficient and meaningful by narrowing down results.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using CASE WHEN to Transform Data
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;CASE WHEN&lt;/code&gt; statement is used to apply conditional logic within SQL queries. It allows transformation of data into more meaningful categories.&lt;/p&gt;

&lt;p&gt;For example, I used &lt;code&gt;CASE WHEN&lt;/code&gt; to categorize students' grades:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Question:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Write a query using &lt;code&gt;CASE WHEN&lt;/code&gt; to label each exam result with a grade description:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;'Distinction' if marks &amp;gt;= 80
&lt;/li&gt;
&lt;li&gt;'Merit' if marks &amp;gt;= 60
&lt;/li&gt;
&lt;li&gt;'Pass' if marks &amp;gt;= 40
&lt;/li&gt;
&lt;li&gt;'Fail' if marks below 40
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="k"&gt;CASE&lt;/span&gt;
    &lt;span class="k"&gt;WHEN&lt;/span&gt; &lt;span class="n"&gt;marks&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;80&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt; &lt;span class="s1"&gt;'Distinction'&lt;/span&gt;
    &lt;span class="k"&gt;WHEN&lt;/span&gt; &lt;span class="n"&gt;marks&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt; &lt;span class="s1"&gt;'Merit'&lt;/span&gt;
    &lt;span class="k"&gt;WHEN&lt;/span&gt; &lt;span class="n"&gt;marks&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt; &lt;span class="s1"&gt;'Pass'&lt;/span&gt;
    &lt;span class="k"&gt;ELSE&lt;/span&gt; &lt;span class="s1"&gt;'Fail'&lt;/span&gt;
&lt;span class="k"&gt;END&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;performance&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;exam_results&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This approach helps in creating readable insights from raw data, making it easier to analyze and present findings.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reflection
&lt;/h2&gt;

&lt;p&gt;Learning SQL has been both challenging and rewarding.&lt;/p&gt;

&lt;p&gt;One of the main challenges was understanding how different SQL commands interact, especially when updating or filtering data. Small syntax errors, such as missing quotes or incorrect data types, often led to errors.&lt;/p&gt;

&lt;p&gt;However, I found it very interesting how SQL allows you to manipulate and transform data efficiently. The &lt;code&gt;CASE WHEN&lt;/code&gt; clause, in particular, stood out as a powerful tool for turning raw data into meaningful insights. Additionally, learning how to filter data using different operators improved my ability to write more precise and clear queries.&lt;/p&gt;

&lt;p&gt;In the end, this experience strengthened my understanding of database operations and improved my confidence in using SQL for data analysis.&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>data</category>
      <category>analytics</category>
    </item>
    <item>
      <title>A comprehensive guide to Publishing And Embedding Power BI Reports on Website with iFrames.</title>
      <dc:creator>Joseous Ng'ash</dc:creator>
      <pubDate>Mon, 06 Apr 2026 17:11:50 +0000</pubDate>
      <link>https://dev.to/josengash/a-comprehensive-guide-to-publishing-and-embedding-power-bi-reports-on-website-with-iframes-1c0</link>
      <guid>https://dev.to/josengash/a-comprehensive-guide-to-publishing-and-embedding-power-bi-reports-on-website-with-iframes-1c0</guid>
      <description>&lt;h2&gt;
  
  
  What exactly is &lt;strong&gt;Microsoft Power BI?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In simple and understandable terms, it refers to business analytic tool by &lt;em&gt;Microsoft&lt;/em&gt; that helps you visualize data, create reports and share insights.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key components&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Power BI Desktop&lt;/strong&gt; – Build reports on your computer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Power BI Mobile&lt;/strong&gt; – View reports on phones/tablets.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Power BI Service&lt;/strong&gt; – Cloud platform for sharing and collaboration.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why Use Power BI?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It provides real time analytics&lt;/li&gt;
&lt;li&gt;It is  easy to share and embed&lt;/li&gt;
&lt;li&gt;It can connect to multiple data sources&lt;/li&gt;
&lt;li&gt;Drag and Drop dashboards&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Power BI Publishing
&lt;/h2&gt;

&lt;p&gt;Power BI publishing means moving your report from Power BI Desktop to Power BI Service(cloud) so others on the same team can access it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Power BI Report Publishing Overview&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.openai.com%2Fstatic-rsc-4%2FJv8eTf3h7t8fVBOx6rYsSiGBPaym_AtRKmHvD9g3yxQjoRb7yxhIM5R-IDUyL_EP6a7bvgBNucgIZ-tH7fwBgprwbdW5nHpbbmO0dhlIJHhg7FN9GMJl4UeOmUOlIDLVabxchmoFWG7OyQ_tbDfpSLr_14wMglIlWPsa6JQ3Z_ArZtZ6LMnN5Uisv3FiY9du%3Fpurpose%3Dfullsize" 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%2Fimages.openai.com%2Fstatic-rsc-4%2FJv8eTf3h7t8fVBOx6rYsSiGBPaym_AtRKmHvD9g3yxQjoRb7yxhIM5R-IDUyL_EP6a7bvgBNucgIZ-tH7fwBgprwbdW5nHpbbmO0dhlIJHhg7FN9GMJl4UeOmUOlIDLVabxchmoFWG7OyQ_tbDfpSLr_14wMglIlWPsa6JQ3Z_ArZtZ6LMnN5Uisv3FiY9du%3Fpurpose%3Dfullsize" alt="Publishing Overview" width="808" height="327"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Highlight Of Steps Involved In Power BI Report Publishing&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Create report in Power BI Desktop&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Save your report&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Click publish on Power BI desktop&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Sign in to publish&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Choose workspace&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Upload to Power BI Service&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Access via browser&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Detailed Power BI Publishing steps
&lt;/h2&gt;
&lt;h3&gt;
  
  
  STEP ONE
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Create Report In Power BI Desktop&lt;/strong&gt;&lt;br&gt;
To create Power BI reports, you have to import data, clean and transform the data then build visuals.&lt;br&gt;
&lt;strong&gt;Importing Data;&lt;/strong&gt; Data can be imported from different sources, eg excel as flat file or excel workbook, different database, SQL server.&lt;br&gt;
One way to import data, open Power BI desktop and it will open to home page where you have different options to select from to get data. &lt;br&gt;
&lt;strong&gt;Home Panel with different data sources&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;Another way to import data to create Power BI reports, click on &lt;em&gt;Get Data&lt;/em&gt; on the far left on navigation panel/home panel and click on your preferred data source or depending on where the data you are working with is saved.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Get Data Option to import data to power BI desktop&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;After selecting your preferred data source, click connect located on the bottom right of &lt;em&gt;Get Data&lt;/em&gt; navigation panel and wait for the data to be connected from source then click the connected table to select and preview the data.&lt;br&gt;
In this demo I used &lt;em&gt;an Excel Workbook&lt;/em&gt; as my data source.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What to expect after connecting to your preferred data source, my table is called Sheet1 containing detailed imported data&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Data Cleaning And Transformation(Power Query)&lt;/strong&gt;&lt;br&gt;
Raw data is often messy -- &lt;em&gt;Missing Values&lt;/em&gt;, &lt;em&gt;Inconsistent format&lt;/em&gt;, &lt;em&gt;Duplicates&lt;/em&gt;. This process of data cleaning and transforming ensures the report is accurate and reliable. In simple terms data cleaning and transforming in Microsoft power BI is the process of preparing raw data so it becomes accurate, consistent, and ready for analysis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Cleaning Involves&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Removing Duplicates:&lt;/em&gt; This ensures each record is unique and avoid double counting during analysis.
To start data cleaning, on the navigator on the bottom right click on &lt;em&gt;Transform&lt;/em&gt; option which will take you direct to &lt;strong&gt;Power Query&lt;/strong&gt;
&lt;strong&gt;What is Power Query:&lt;/strong&gt; It is a tool used to connect, clean, transform, and load data into Power BI for analysis.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Transform Option On Navigator&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Power Query Interface&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.openai.com%2Fstatic-rsc-4%2FHEK37ihJxHKGRIZtvjcfvQvTbGqH3zMdi2eRQtSy0ur_m-7kfjARuJguiQQzVTe3ofVvuuS3YCWZI-cSalCv1V2or3xL7kjGhAaRVjS9Bb__Q3sBW9KYuc1N8o0vtfXwSMzcWElUaJS8RBr4-X3ByCBtILB_S2ytvVsc0_jFEBCL6FqsXDXnhQbh2EyPRVn0%3Fpurpose%3Dfullsize" 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%2Fimages.openai.com%2Fstatic-rsc-4%2FHEK37ihJxHKGRIZtvjcfvQvTbGqH3zMdi2eRQtSy0ur_m-7kfjARuJguiQQzVTe3ofVvuuS3YCWZI-cSalCv1V2or3xL7kjGhAaRVjS9Bb__Q3sBW9KYuc1N8o0vtfXwSMzcWElUaJS8RBr4-X3ByCBtILB_S2ytvVsc0_jFEBCL6FqsXDXnhQbh2EyPRVn0%3Fpurpose%3Dfullsize" alt="Power Query Interface" width="800" height="413"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Main sections in Power Query&lt;/strong&gt;&lt;br&gt;
1️⃣ &lt;strong&gt;Ribbon(Top Menu):&lt;/strong&gt; It gives access to all transformation tools and commands, key tabs includes;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Home&lt;/strong&gt; → load data, close and apply&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transform&lt;/strong&gt; → Change data types, pivot/unpivot&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;View&lt;/strong&gt; → Toggle panels (like formula bar) &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add Column&lt;/strong&gt; → Create calculated columns&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;2️⃣ &lt;strong&gt;Queries Pane (Left Side):&lt;/strong&gt; it contains a list of all tables which help in navigating between different datasets and organize queries(rename, group or duplicates)&lt;/p&gt;

&lt;p&gt;3️⃣ &lt;strong&gt;Data Preview (Center Table View):&lt;/strong&gt; it serve the purpose of viewing and interacting with your dataset and applying transformation directly on columns.&lt;/p&gt;

&lt;p&gt;4️⃣ &lt;strong&gt;Applied Steps Pane (Right Side):&lt;/strong&gt; it shows all applied steps during data cleaning and transformation like removed columns, filter row or change type.&lt;/p&gt;

&lt;p&gt;5️⃣ &lt;strong&gt;Query Settings Panel (Right Side – Top):&lt;/strong&gt; it is located on top of applied steps, which is used to rename query and add description.&lt;/p&gt;

&lt;p&gt;6️⃣ &lt;strong&gt;Formula Bar:&lt;/strong&gt; it is used to display formulas and uses &lt;em&gt;M Language&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;7️⃣ &lt;strong&gt;Column Headers:&lt;/strong&gt; this is the top row of every column which offers quick transformation through dropdown menus.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Handling Missing Data:&lt;/em&gt; This helps in replacing missing values with &lt;em&gt;Nulls&lt;/em&gt;, &lt;em&gt;Not Provided&lt;/em&gt;, &lt;em&gt;Missing&lt;/em&gt;, &lt;em&gt;N/A&lt;/em&gt; or remove incomplete rows.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Fixing Data Types:&lt;/em&gt; Convert columns into correct formats eg number to text or text to date.&lt;br&gt;
Select on the column you want to change data type and right click then select &lt;em&gt;Change type and select to the type you want to change your data into(decimal, data, text, number amongst others)&lt;/em&gt; as part of data cleaning.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Renaming Columns:&lt;/em&gt; make a column make sense or meanifull.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Data Transformation&lt;/strong&gt;&lt;br&gt;
This involves reshaping data for analysis and visualization. The process involves different tasks which includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data filtering&lt;/li&gt;
&lt;li&gt;Creating new columns&lt;/li&gt;
&lt;li&gt;Grouping and aggregating&lt;/li&gt;
&lt;li&gt;Pivoting and unpivoting&lt;/li&gt;
&lt;li&gt;Splitting  and merging columns&lt;/li&gt;
&lt;li&gt;Data sorting&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After the data is imported, cleaned and transformed. The data is ready to be used to &lt;em&gt;Build Visual&lt;/em&gt;.&lt;br&gt;
Reports visuals are prepared in Power BI. To make sure the cleaned data is loaded to Power BI, in the Power Query to save changes, click on &lt;em&gt;Home Tab and then click Close and Apply button to save data and load to Power BI directly&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Close and Apply Button In Power Query Editor&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;After Power Query is closed and changes saved, the data is loaded to Power BI to build visual reports.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Report View In Power BI Home Page&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;It displays table contain our data, panel where visuals appear, filter panel, visualization panel with different charts, a ribbon for different commands and functionality.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Building Visuals In Power BI&lt;/strong&gt;&lt;br&gt;
 After closing Power Query and the cleaned and transformed data is loaded to Power BI, the next step is to use &lt;strong&gt;DAX (Data Analysis Expressions)&lt;/strong&gt; to create necessary measure to help in data analysis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Is DAX (Data Analysis Expressions):&lt;/strong&gt; &lt;em&gt;is a formula language used in Power BI and Analysis Services to perform data calculations and analysis.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Example Of DAX&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Profit margin = DIVIDE(SUM(Electronics_sales[Profit]), SUM(Electronics_sales[SalesAmount])) * 100&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuzfaew4vjb88pwbu4f1l.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%2Fuzfaew4vjb88pwbu4f1l.png" alt="DAX example" width="800" height="398"&gt;&lt;/a&gt;&lt;br&gt;
 After we have done the necessary calculations, the next step is choosing the right charts to represent the analysis visually.&lt;br&gt;
&lt;strong&gt;Some of the available charts in Power BI include;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bar Charts&lt;/li&gt;
&lt;li&gt;Column charts&lt;/li&gt;
&lt;li&gt;Pie charts&lt;/li&gt;
&lt;li&gt;Line charts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Charts panel in Power BI&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;After creating required KPIs and visualizing the report, the next step is publishing to Power BI service.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Complete Power BI Report Looks like demonstrated below.&lt;/strong&gt;&lt;/p&gt;

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

&lt;h3&gt;
  
  
  STEP TWO
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Saving Power BI Report(&lt;em&gt;.pbix format&lt;/em&gt;)&lt;br&gt;
After you have completed the Power BI Report, the next step is saving the report in the appropriate format.&lt;br&gt;
Always save your Power BI report with extension **.pbix format&lt;/strong&gt;.&lt;br&gt;
&lt;strong&gt;Power BI file save in local machine&lt;/strong&gt;&lt;/p&gt;

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

&lt;h3&gt;
  
  
  STEP THREE
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Click Publish&lt;/strong&gt;&lt;br&gt;
In Power BI desktop home tab &lt;strong&gt;Click Publish&lt;/strong&gt; on the top right of the application.&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%2Fqjag74d49zl6fn4p3mon.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%2Fqjag74d49zl6fn4p3mon.png" alt="Publish button" width="800" height="96"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  STEP FOUR
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Sign In&lt;/strong&gt;&lt;br&gt;
After clicking publish button, you will be prompted to &lt;strong&gt;Sign In.&lt;/strong&gt; Use your Microsoft Account to sign in or school email for students and organization account for the organization you are working for for collaborations.&lt;br&gt;
&lt;strong&gt;Sign In Window from Power BI Desktop&lt;/strong&gt;&lt;/p&gt;

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

&lt;h3&gt;
  
  
  STEP FIVE
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Choose Workspace&lt;/strong&gt;&lt;br&gt;
After you have provided the Sign In credentials, next you choose the workspace already created from Power BI Service.&lt;br&gt;
&lt;strong&gt;Window to choose your workspace from&lt;/strong&gt;&lt;/p&gt;

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

&lt;h3&gt;
  
  
  STEP SIX
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Upload to Power BI Service&lt;/strong&gt;&lt;br&gt;
After choosing workspace, click select to upload to Power BI Srvice.&lt;br&gt;
&lt;strong&gt;Select Option&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7cs2mqzvpylp2boaxhos.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%2F7cs2mqzvpylp2boaxhos.png" alt="select option" width="800" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🌐 Embedding Power BI Reports on the Web (iFrame)
&lt;/h2&gt;

&lt;p&gt;After publishing the Power BI report from Desktop, this are the step involved in Embedding report on the web&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Go to Power BI service and sign in with your account information.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Go to Workspace where you published power bi file and open your report.&lt;/strong&gt;
&lt;strong&gt;Published Power BI report on Power BI service&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Click: File → Embed report → Website or Portal&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Confirm and generate embed code&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Copy the generated iFrame code to code editor like Vs code&lt;/strong&gt;
&lt;strong&gt;Copied code in VS code&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0miwfmh1ivq1xh4a1e80.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%2F0miwfmh1ivq1xh4a1e80.png" alt="copied code" width="800" height="222"&gt;&lt;/a&gt;&lt;br&gt;
Save the embedding code to a folder in your PC and open the &lt;strong&gt;index.html&lt;/strong&gt; using your preferred browser and share the link to your team or organization to access the Power BI report.&lt;/p&gt;

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

&lt;p&gt;Creating visuals in Power BI desktop is just the beginning which equips you with data understanding skills and data analysis to derive business insights. After the report is complete, it is only accessible to you and any other person using your computer because it is only available into local machine. To make sure all involved parties get to see the final report for decision making, you have to go an extra mile into publishing it to Power BI service and share the link to the web to relevant parties. For any individual who aspire to be data analyst, it is important to understand the process of publishing the report and embedding into a website.&lt;/p&gt;

</description>
      <category>analytics</category>
      <category>microsoft</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Power BI Data Modeling.</title>
      <dc:creator>Joseous Ng'ash</dc:creator>
      <pubDate>Tue, 31 Mar 2026 08:02:15 +0000</pubDate>
      <link>https://dev.to/josengash/power-bi-data-modeling-j9h</link>
      <guid>https://dev.to/josengash/power-bi-data-modeling-j9h</guid>
      <description>&lt;h2&gt;
  
  
  What is Data Modeling in Power BI
&lt;/h2&gt;

&lt;p&gt;In simple and understandable terms, &lt;strong&gt;Data Modeling&lt;/strong&gt; is simply a way to organize, connect and structure your data in a way it can be easily analyzed and visualized.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Raw data = Messy datasets&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Data modeling = organize and arrange the dataset into meaningful structure&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Data Modeling in Power BI:&lt;/strong&gt; Creating relationships between tables and structuring data into a format that enables accurate analysis and reporting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Modeling Involves&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creating relationship&lt;/li&gt;
&lt;li&gt;Defining structure(Schema)&lt;/li&gt;
&lt;li&gt;Organizing Data into tables&lt;/li&gt;
&lt;li&gt;Setting rules(Cardinality &amp;amp; Filters)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Data modeling is important because;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We can derive accurate analysis&lt;/li&gt;
&lt;li&gt;We can get better insights&lt;/li&gt;
&lt;li&gt;Can create clear and accurate dashboards&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Power BI uses some of components to help in data modeling&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Main Components of Data Modeling in Power BI.
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Joins In Power BI&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;Joins are used when combining tables into one (This is usually done in Power Query Editor).&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Types Of Joins In Power BI
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Inner Join:&lt;/strong&gt; It only returns matching rows in both tables and it is used when you only want related data. How Inner join looks like. &lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.openai.com%2Fstatic-rsc-4%2F4M9gzthvb9GlGPrPBKNudOTjhZ1czwxoPT4-1WRvkoWCC6XpTTjAtm2mroFIcmMiUDEUjM__6jSaKulPfp2HrlkxWni18ho5FmAovwZD0vVxznUh3Ij-AbREIAVL3OvriuOzm4_iLAosMayTXhtM6MNgbHzAT5LtwCo4gPaAGwGsxLrcMesTIjdYG8FEUYoM%3Fpurpose%3Dfullsize" 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%2Fimages.openai.com%2Fstatic-rsc-4%2F4M9gzthvb9GlGPrPBKNudOTjhZ1czwxoPT4-1WRvkoWCC6XpTTjAtm2mroFIcmMiUDEUjM__6jSaKulPfp2HrlkxWni18ho5FmAovwZD0vVxznUh3Ij-AbREIAVL3OvriuOzm4_iLAosMayTXhtM6MNgbHzAT5LtwCo4gPaAGwGsxLrcMesTIjdYG8FEUYoM%3Fpurpose%3Dfullsize" alt="inner outer join" width="1024" height="768"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Left Outer Join:&lt;/strong&gt; This is the most commonly used join. It returns all rows from the left table plus matching rows from the right.&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.openai.com%2Fstatic-rsc-4%2FFLyiDZJBjFZqbztPToiSG58jwX09XXAvfPorvSn8rahSQiasdobwcr2qlWdLNVrfS5-U43uBQuZ7zsYLyMlYToP63dIWPRzeEKkAh5u4QFg-v4qA-mJdx70pQqmN3pV6Je3iWJgjfhJOuT7v_X-CvujPV-PhTxwgz7mx4Z31w_aQgARM-_i1bTuBmSwUqZRC%3Fpurpose%3Dfullsize" 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%2Fimages.openai.com%2Fstatic-rsc-4%2FFLyiDZJBjFZqbztPToiSG58jwX09XXAvfPorvSn8rahSQiasdobwcr2qlWdLNVrfS5-U43uBQuZ7zsYLyMlYToP63dIWPRzeEKkAh5u4QFg-v4qA-mJdx70pQqmN3pV6Je3iWJgjfhJOuT7v_X-CvujPV-PhTxwgz7mx4Z31w_aQgARM-_i1bTuBmSwUqZRC%3Fpurpose%3Dfullsize" alt="left outer join" width="1202" height="680"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Right Outer Join:&lt;/strong&gt; This join act opposite of the &lt;em&gt;Left Outer Join.&lt;/em&gt; It returns all rows from the right table plus matching rows from the left table. &lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.openai.com%2Fstatic-rsc-4%2FTBhCr8CBcIkicxf1YkgK4lSvWQydzYaqcGCAmJSxmURMSzso009WEVWitE6iXB9Kv0eLxIkHOc9UX4bCVHQwbWmN7YcjZJSUx55H_pVcgMm0_-bkZzY2ZanPLjqImLTlVMwmbp4Xv9F7yUfxZKcUkguBOplUv1vmitwiIXAYc-3PTdkzJD4Wwm8SABINdIuy%3Fpurpose%3Dfullsize" 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%2Fimages.openai.com%2Fstatic-rsc-4%2FTBhCr8CBcIkicxf1YkgK4lSvWQydzYaqcGCAmJSxmURMSzso009WEVWitE6iXB9Kv0eLxIkHOc9UX4bCVHQwbWmN7YcjZJSUx55H_pVcgMm0_-bkZzY2ZanPLjqImLTlVMwmbp4Xv9F7yUfxZKcUkguBOplUv1vmitwiIXAYc-3PTdkzJD4Wwm8SABINdIuy%3Fpurpose%3Dfullsize" alt="right outer join" width="1202" height="680"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Full Outer Join:&lt;/strong&gt; This type of join in power bi, returns all the rows from both table, matched or unmatched. &lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.openai.com%2Fstatic-rsc-4%2FGVXNSBoHtp1elEkuwT1lTKXeFpXqO39fFg4bVWVAds9kU6sMbGOFdl3_Fyr0_uQMqeHIHCgvREHM-v05wbZYCVKnWhqpIr6TCqCmlqtLsPWtX_K2WkPUYT2VTj9QdNJBixgMxeYd5ru4zEWTR3URT-k5CYg8GTZYx6e7mHNVeCjO0t07_EXGMipykTQaYX3D%3Fpurpose%3Dfullsize" 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%2Fimages.openai.com%2Fstatic-rsc-4%2FGVXNSBoHtp1elEkuwT1lTKXeFpXqO39fFg4bVWVAds9kU6sMbGOFdl3_Fyr0_uQMqeHIHCgvREHM-v05wbZYCVKnWhqpIr6TCqCmlqtLsPWtX_K2WkPUYT2VTj9QdNJBixgMxeYd5ru4zEWTR3URT-k5CYg8GTZYx6e7mHNVeCjO0t07_EXGMipykTQaYX3D%3Fpurpose%3Dfullsize" alt="full outer join" width="497" height="366"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Anti Join(Left/Right):&lt;/strong&gt; This type of joins are used to return the unmatched rows, usually help in finding missing data.&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.openai.com%2Fstatic-rsc-4%2Fwzs3qTuAdJe3Qu7KUictoRjVkYWYTHxcs9DgrnBZMdbcDHSmkOvUSxut9pxxwFEPN0e5Q7KT2YbtKNRy2NGQQ70sk1i01ZkCS9_h5yqYYpv9XaRf_pfYwD15nTzGzDdtqRcz4FJFhPjhZW7lMNs-10Qn7Y8IkLjngpGix14aSXPtv9kTpzD5gael-Ef0IReW%3Fpurpose%3Dfullsize" 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%2Fimages.openai.com%2Fstatic-rsc-4%2Fwzs3qTuAdJe3Qu7KUictoRjVkYWYTHxcs9DgrnBZMdbcDHSmkOvUSxut9pxxwFEPN0e5Q7KT2YbtKNRy2NGQQ70sk1i01ZkCS9_h5yqYYpv9XaRf_pfYwD15nTzGzDdtqRcz4FJFhPjhZW7lMNs-10Qn7Y8IkLjngpGix14aSXPtv9kTpzD5gael-Ef0IReW%3Fpurpose%3Dfullsize" alt="anti join" width="770" height="335"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Relationships In Power BI&lt;/strong&gt;&lt;br&gt;
In Relationship tables are connected without merging them. Instead of combining data physically, Power BI links tables logically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Concept&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Primary Key&lt;/em&gt; → Unique column (e.g., ProductID in Products)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Foreign Key&lt;/em&gt; → Repeated column (e.g., ProductID in Sales)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cardinality:&lt;/strong&gt; defines how table relate, example;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;One-to-many(1:&lt;/em&gt;):* commonly used relationship, meaning one product many sales. 
&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%2F3ll9rjiy3w5zt7um9dqh.png" alt="One-to-many(1:*)" width="800" height="580"&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Many-to-one(&lt;/em&gt;:1):* it is the same as one-to-many but reversed. &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv408e2jqb2y0izu2ipa7.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%2Fv408e2jqb2y0izu2ipa7.png" alt="Many-to-one" width="800" height="538"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;One-to-one(1:1):&lt;/em&gt; this relationship is rarely used during data modeling.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq310i0hntd9va49mehec.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%2Fq310i0hntd9va49mehec.png" alt="One-to-one(1:1)" width="800" height="565"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Many-to-many(:):&lt;/em&gt; this type of relationship create ambiguity and should be used carefully.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgnj6b2d13c50omafrqsb.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%2Fgnj6b2d13c50omafrqsb.png" alt="Many-to-many(:)" width="800" height="573"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cross Filter Direction&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Single direction:&lt;/em&gt; the filter flow from one direction and its the recommended filter.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffbd8kl90fxjxy945yocd.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%2Ffbd8kl90fxjxy945yocd.png" alt="Single direction" width="800" height="538"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Both Direction:&lt;/em&gt; the filter flows both ways though it can cause confusion if misused. &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%2Fi42bo4de2za50vg8mtdn.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%2Fi42bo4de2za50vg8mtdn.png" alt="Both Direction" width="800" height="565"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Schemas (Data Modeling Structures)&lt;/strong&gt;&lt;br&gt;
Schemas define how your tables are organized.&lt;br&gt;
&lt;strong&gt;Star Schema (best practice)&lt;/strong&gt;&lt;br&gt;
This is the recommended approach in Power BI. &lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.openai.com%2Fstatic-rsc-4%2Fs2VGXfKxDOECyfo87ZfMi_mSdPT2qo5gW5ocvaZIEI5vSB5q5iDmI4yH_C140M5iHWnKOJaOLCViECdKc1Vg7AUkRUnAzW4Ue2PlzNYLnhtJPGLu7GWQTyck8URtod1V3WPj8YoMRafjxeowECVtASi5B_kQJzLjcdubnUpjZRf719umGoT9Qj2SjP1pQQQ1%3Fpurpose%3Dfullsize" 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%2Fimages.openai.com%2Fstatic-rsc-4%2Fs2VGXfKxDOECyfo87ZfMi_mSdPT2qo5gW5ocvaZIEI5vSB5q5iDmI4yH_C140M5iHWnKOJaOLCViECdKc1Vg7AUkRUnAzW4Ue2PlzNYLnhtJPGLu7GWQTyck8URtod1V3WPj8YoMRafjxeowECVtASi5B_kQJzLjcdubnUpjZRf719umGoT9Qj2SjP1pQQQ1%3Fpurpose%3Dfullsize" alt="Schemas (Data Modeling Structures)" width="1120" height="631"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Structure&lt;/em&gt;&lt;br&gt;
&lt;strong&gt;Fact Table:&lt;/strong&gt; contains measurable data eg sales, revenue, quantity.&lt;br&gt;
&lt;strong&gt;Dimension Tables&lt;/strong&gt; Eg customers, dates, products&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Benefits of star schema includes;&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is easy to understand&lt;/li&gt;
&lt;li&gt;Better performance in Power BI&lt;/li&gt;
&lt;li&gt;It is easy and fast&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Snowflake Schema&lt;/strong&gt;&lt;br&gt;
This is a more complex version of star schema&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Structure&lt;/em&gt;&lt;br&gt;
In this type of schema, dimension tables are split into &lt;strong&gt;Sub-Tables&lt;/strong&gt; though it is slow in performance and harder to manage.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.openai.com%2Fstatic-rsc-4%2F6Q46gSYLpn1Qnov_y5-SPYUCJ6n8sG6VuUm3TJY-3ZOkIkT7ViAgxH2AMrsqY8w1BDHRuPZ3rcD9noZyYOZGJj8ogzds3UXbKqMdQxbZV8ykSmqPZvPH49EV7xTpTHFVi6sCIcbE5lemHf9veDVHEuxxGtTbioWea6l_Q2oz-t62DSMFnYlOq16yOfOEWAq5%3Fpurpose%3Dfullsize" 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%2Fimages.openai.com%2Fstatic-rsc-4%2F6Q46gSYLpn1Qnov_y5-SPYUCJ6n8sG6VuUm3TJY-3ZOkIkT7ViAgxH2AMrsqY8w1BDHRuPZ3rcD9noZyYOZGJj8ogzds3UXbKqMdQxbZV8ykSmqPZvPH49EV7xTpTHFVi6sCIcbE5lemHf9veDVHEuxxGtTbioWea6l_Q2oz-t62DSMFnYlOq16yOfOEWAq5%3Fpurpose%3Dfullsize" alt="Snowflake Schema" width="949" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Flat Table (Single Table)&lt;/strong&gt;&lt;br&gt;
This type, the data is in one table and has poor performance, hard to manage and also data redundancy.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.openai.com%2Fstatic-rsc-4%2FMNAwrth0tVLsQv1ep-acF4YVtN0U2JP49324v2ghTEa5LwLmuqWlw0L2f9BmbEdfTVYiJGhzUZvEKymv3Q7sgQFHuflPqX22YXdqEzLstQ_35DSp6_CuXcUJVqqPn1ACXfm31pcsgL-49LtIybX7T35pUuf2uWGROWBm5NY3KRJj25oOnkTZYOIuhhE7jy-n%3Fpurpose%3Dfullsize" 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%2Fimages.openai.com%2Fstatic-rsc-4%2FMNAwrth0tVLsQv1ep-acF4YVtN0U2JP49324v2ghTEa5LwLmuqWlw0L2f9BmbEdfTVYiJGhzUZvEKymv3Q7sgQFHuflPqX22YXdqEzLstQ_35DSp6_CuXcUJVqqPn1ACXfm31pcsgL-49LtIybX7T35pUuf2uWGROWBm5NY3KRJj25oOnkTZYOIuhhE7jy-n%3Fpurpose%3Dfullsize" alt="Flat Table" width="640" height="326"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;Data modeling in Power BI is the process of organizing data into structured tables and creating relationships between them to enable accurate analysis and reporting. It involves arranging data in an efficient format, such as a star schema, to improve performance and ensure that filters and calculations work correctly. Overall, good data modeling helps transform raw data into meaningful insights for better decision-making.&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>dataanalytics</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Excel Real world Applications</title>
      <dc:creator>Joseous Ng'ash</dc:creator>
      <pubDate>Fri, 27 Mar 2026 11:44:09 +0000</pubDate>
      <link>https://dev.to/josengash/excel-real-world-applications-4oni</link>
      <guid>https://dev.to/josengash/excel-real-world-applications-4oni</guid>
      <description>&lt;h2&gt;
  
  
  HOW EXCEL IS USED IN REAL WORLD DATA ANALYSIS
&lt;/h2&gt;

&lt;p&gt;What really is Excel, in simple terms it is just an application from Microsoft to help ordinary people to keep their records either groceries records, building materials records, names of people traveling, basically anything involving records keeping for future references.&lt;br&gt;
But for professionals like Data Analytics it is a software used to organize, analyze and visualize data. It is like a digital notebook comprising of columns and rows where you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;create charts&lt;/li&gt;
&lt;li&gt;perform calculations&lt;/li&gt;
&lt;li&gt;store data of different data type eg; text, dates, numbers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Excel worksheet is made of collection of cells.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you can do with Excel
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Data analysis &lt;/li&gt;
&lt;li&gt;Data Visualization&lt;/li&gt;
&lt;li&gt;Automation&lt;/li&gt;
&lt;li&gt;Data Organization&lt;/li&gt;
&lt;li&gt;Perform Calculations&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How Excel is Used in Real-world:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Track monthly expenses either by an individual or in an industrial set up.&lt;/li&gt;
&lt;li&gt;Widely used in finance, engineering, business and data analysis.&lt;/li&gt;
&lt;li&gt;Used to clean and prepare data before its used in other tools like SQL and Python.&lt;/li&gt;
&lt;li&gt;It is an essential skill for careers like accountant, data engineer and data analyst.&lt;/li&gt;
&lt;li&gt;Analyzing products performance and help in decision making in a company.&lt;/li&gt;
&lt;li&gt;Create reports to derive clear insights.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Key Features found in Microsoft Excel
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Charts And Graphs&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Charts and graphs are used for data visualization which help in creating dashboard reports, some examples of charts and graphs includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bar Charts&lt;/li&gt;
&lt;li&gt;Line Graphs&lt;/li&gt;
&lt;li&gt;Pie Charts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example of a Pie and Bar Chart&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.pexels.com%2Fphotos%2F669612%2Fpexels-photo-669612.jpeg" 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%2Fimages.pexels.com%2Fphotos%2F669612%2Fpexels-photo-669612.jpeg" alt="An Example of Pie and Bar Chart used in excel data analysis" width="800" height="530"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.pexels.com%2Fphotos%2F5466250%2Fpexels-photo-5466250.jpeg" 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%2Fimages.pexels.com%2Fphotos%2F5466250%2Fpexels-photo-5466250.jpeg" alt="An Example of Bar chart used in excel data analysis" width="800" height="1200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An example of dashboard reports created from different charts and graphs&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhz5anjtwiwvuugitxmuv.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%2Fhz5anjtwiwvuugitxmuv.png" alt="Excel dashboard report" width="800" height="443"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sorting And Filtering&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It is a feature used to Analyze large datasets quickly, you can either sort data from largest to smallest, smallest to largest or filter specific data.&lt;br&gt;
Filter marks are always located on top of every column but are activated from the tab editing under sort and filter.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Filter Marks on every column to filter specific data&lt;/em&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu3n4olyodxxbegwh7gzl.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%2Fu3n4olyodxxbegwh7gzl.png" alt="Filter marks on every column" width="800" height="195"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pivot Tables&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It is one of the powerful feature used for analysis in Excel&lt;/p&gt;

&lt;p&gt;Example of how pivot table is used in data analysis&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flg14ex7hrunhub1j5hf8.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%2Flg14ex7hrunhub1j5hf8.png" alt="Example of how pivot table looks like" width="800" height="199"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conditional Formatting&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The feature automatically changes the color of cell based on highlight rule either;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;High/Low values&lt;/li&gt;
&lt;li&gt;Duplicates&lt;/li&gt;
&lt;li&gt;Trends
Example of conditional formatting used to highlight top most performing product, using Top/Bottom Rule&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%2F2vd476se0qs5npc9lfvs.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%2F2vd476se0qs5npc9lfvs.png" alt="Conditional formatting example" width="800" height="262"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;The feature helps to keep data clean and consistent.&lt;/p&gt;

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

&lt;p&gt;Helps make the data readable and manageable by;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Storing data in rows and columns&lt;/li&gt;
&lt;li&gt;Format as table&lt;/li&gt;
&lt;li&gt;structured referencing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Formulas And Functions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This feature helps excel to perform calculations using formulas&lt;br&gt;
Formulas and functions are excel built-in features which are activated by typing &lt;strong&gt;equal sign (=)&lt;/strong&gt; followed by specific formula or function example &lt;strong&gt;(VLOOKUP())&lt;/strong&gt;  on any excel cell containing data to be filtered, aggregated or edited.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Basic operators in Excel: &lt;strong&gt;+,-,*,/&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Functions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SUM() adds Values&lt;/li&gt;
&lt;li&gt;AVERAGE() finds mean&lt;/li&gt;
&lt;li&gt;IF() logical decisions&lt;/li&gt;
&lt;li&gt;VLOOKUP()/XLOOKUP() search data&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Import And Export Data&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With this feature will help in importing data from CSV files and Databases, and Export to a different formats&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
Learning Microsoft excel has transformed how I understand and interpret data, before data felt overwhelming, I would look at dataset without knowing how to extract useful insights.&lt;/p&gt;

&lt;p&gt;Features like formulas and functions helped move far from manual calculations and start focusing on what dataset actually represent.&lt;/p&gt;

&lt;p&gt;features like filtering, pivot table and sorting showed me data is not just static, it can be explored from different perspectives to reveal hidden insights.&lt;/p&gt;

&lt;p&gt;Excel has also made me improve on data handling, the importance of missing values, ensuring data validation. Working with any dataset has made me more careful knowing small errors can lead to incorrect conclusions.&lt;/p&gt;

&lt;p&gt;Overall, learning Excel has helped in a way that when I look at the data , I can understand, question and develop analytical reports to the organization for better decision making.&lt;/p&gt;

</description>
      <category>dataanalysis</category>
      <category>datascientist</category>
      <category>dataengineering</category>
      <category>machinelearning</category>
    </item>
  </channel>
</rss>
