<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged analyst</title>
<link>https://coderlegion.com/tag/analyst</link>
<description>Powered by Question2Answer</description>
<item>
<title>Titanic Survival Analysis — What the Data Reveals About Who Lived and Who Died</title>
<link>https://coderlegion.com/20274/titanic-survival-analysis-what-the-data-reveals-about-who-lived-and-who-died</link>
<description>&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hqzp0tdw22sq8zabxogb.png&quot; alt=&quot;Image description&quot;&gt;&lt;/p&gt;
&lt;p&gt;The Titanic disaster of 1912 is one of the most studied events in history. Over 1,500 people lost their lives when the ship sank in the North Atlantic. But when you look at the passenger data, a clear pattern emerges — survival was not random. Your chances of surviving depended heavily on who you were and where you sat on the ship.&lt;/p&gt;
&lt;p&gt;In this project, I analyzed the Titanic passenger dataset to answer one central question: What factors determined whether a passenger survived?&lt;/p&gt;
&lt;p&gt;This is my second data analysis project. My first project was an HR Employee Attrition Analysis — if you haven't read that one yet, check it out. For this project, I followed the same structured 5-phase approach and pushed myself to go deeper with the visualizations.&lt;/p&gt;
&lt;p&gt;Full notebook on GitHub: github.com/sandipsubedi0/titanic-survival-analysis&lt;/p&gt;
&lt;p&gt;Dataset Overview&lt;br&gt;
Source: Kaggle — Titanic: Machine Learning from Disaster&lt;/p&gt;
&lt;p&gt;Rows: 891 passengers&lt;/p&gt;
&lt;p&gt;Columns: 12 features including Age, Sex, Pclass, Fare, Cabin, Embarked, and Survived&lt;/p&gt;
&lt;p&gt;Tools used: Python, Pandas, NumPy, Matplotlib, Seaborn&lt;/p&gt;
&lt;p&gt;Phase 1 — Setup and Data Loading&lt;br&gt;
I started by importing the necessary libraries and loading the dataset using a relative file path. A simple but important habit — never use a hardcoded local path like C:\Users... in a shared notebook, because it will break on every other computer.&lt;/p&gt;
&lt;p&gt;import pandas as pd&lt;br&gt;
import numpy as np&lt;br&gt;
import matplotlib.pyplot as plt&lt;br&gt;
import seaborn as sns&lt;br&gt;
%matplotlib inline&lt;br&gt;
sns.set_style(&quot;whitegrid&quot;)&lt;/p&gt;
&lt;p&gt;data = pd.read_csv(&quot;Titanic-Dataset.csv&quot;)&lt;br&gt;
data.head()&lt;/p&gt;
&lt;p&gt;First look at the data: 891 rows, 12 columns. The dataset includes passenger demographics, ticket details, cabin information, and whether they survived.&lt;/p&gt;
&lt;p&gt;Phase 2 — Data Exploration (Before Cleaning)&lt;br&gt;
Before touching anything, I explored the raw data to understand what I was working with.&lt;/p&gt;
&lt;p&gt;Missing values:&lt;/p&gt;
&lt;p&gt;Column	Missing Count	Missing %&lt;br&gt;
Cabin	687	77.1%&lt;br&gt;
Age	177	19.9%&lt;br&gt;
Embarked	2	0.2%&lt;br&gt;
The missing values heatmap made this visually clear — Cabin had a massive gap running through the entire column.&lt;/p&gt;
&lt;p&gt;I also ran data.describe() to check the numerical columns. A few things stood out immediately:&lt;/p&gt;
&lt;p&gt;Age ranged from 0.42 to 80 years — the youngest passenger was less than 1 year old&lt;/p&gt;
&lt;p&gt;Fare had a huge range — minimum 0, maximum 512 — signaling strong economic inequality among passengers&lt;/p&gt;
&lt;p&gt;Only 38% of passengers survived (Survived mean = 0.38)&lt;/p&gt;
&lt;p&gt;For value_counts(), I only checked meaningful categorical columns: Survived, Pclass, Sex, and Embarked. Columns like PassengerId, Name, and Ticket are unique identifiers — running analysis on them produces no useful insight.&lt;/p&gt;
&lt;p&gt;Phase 3 — Data Cleaning&lt;br&gt;
I made a working copy of the original data before applying any changes — always keep the raw data intact as a reference.&lt;/p&gt;
&lt;p&gt;df = data.copy()&lt;/p&gt;
&lt;p&gt;Three cleaning decisions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Age — filled with median Age had 177 missing values (19.9%). I filled with the median, not the mean. Why? Age has outliers (very young children, elderly passengers) that pull the mean away from the typical passenger. The median is more robust.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;df[&quot;Age&quot;].fillna(df[&quot;Age&quot;].median(), inplace=True)&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Cabin — dropped entirely 77.1% of values were missing. That's too high to fill reliably — any filling method would be guesswork on that scale. Dropping it was the right call.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;df.drop(columns=[&quot;Cabin&quot;], inplace=True)&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Embarked — filled with mode Only 2 values missing. With such a small gap, filling with the most common value (mode) is perfectly safe.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;df[&quot;Embarked&quot;].fillna(df[&quot;Embarked&quot;].mode()[0], inplace=True)&lt;/p&gt;
&lt;p&gt;Verification: After cleaning, df.isnull().sum() showed zero missing values across all columns. The after-cleaning heatmap confirmed this — completely blank, exactly what we want to see.&lt;/p&gt;
&lt;p&gt;Phase 4 — Exploratory Data Analysis and Visualizations&lt;br&gt;
This is where the real story begins. I built 7 charts, each designed to answer a specific question.&lt;/p&gt;
&lt;p&gt;Chart 1 — Overall Survival Count&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zqive1hfx50w7ypwcze2.png&quot; alt=&quot;Image description&quot;&gt;&lt;/p&gt;
&lt;p&gt;The first question: how many people actually survived?&lt;/p&gt;
&lt;p&gt;Out of 891 passengers, 342 survived (38.4%) and 549 did not (61.6%). More than 6 in 10 people on the Titanic did not make it. That sets the baseline for everything that follows.&lt;/p&gt;
&lt;p&gt;Chart 2 — Survival Rate by Gender&lt;br&gt;
This is where the data gets striking.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p7t4at0ph0o7tfqijuze.png&quot; alt=&quot;Image description&quot;&gt;&lt;/p&gt;
&lt;p&gt;Female survival rate: ~74%&lt;/p&gt;
&lt;p&gt;Male survival rate: ~19%&lt;/p&gt;
&lt;p&gt;Women were nearly 4x more likely to survive than men. This is the clearest pattern in the entire dataset. The &quot;women and children first&quot; evacuation protocol was not just a phrase — the data confirms it was actually followed.&lt;/p&gt;
&lt;p&gt;I used a bar chart here (not a pie chart). Survival rates are separate values for two groups — they don't add to 100% of anything, so a pie chart would be misleading.&lt;/p&gt;
&lt;p&gt;Chart 3 — Survival Rate by Passenger Class&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wmfjpyvn6rn61xh3csg2.png&quot; alt=&quot;Image description&quot;&gt;&lt;/p&gt;
&lt;p&gt;Passenger class tells us where on the ship you were located — and how close you were to the lifeboats.&lt;/p&gt;
&lt;p&gt;1st Class: ~63% survival rate&lt;/p&gt;
&lt;p&gt;2nd Class: ~47% survival rate&lt;/p&gt;
&lt;p&gt;3rd Class: ~24% survival rate&lt;/p&gt;
&lt;p&gt;The survival gap between 1st and 3rd class is enormous. Third-class passengers were housed in the lower decks — further from the lifeboats and with less time to reach the top deck. Economic status directly influenced survival chances.&lt;/p&gt;
&lt;p&gt;Chart 4 — Age Distribution of All Passengers&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mjfgqw3bkotzqq1fovao.png&quot; alt=&quot;Image description&quot;&gt;&lt;/p&gt;
&lt;p&gt;A histogram of all passenger ages shows a right-skewed distribution. Most passengers were between 20 and 40 years old. There were relatively few children and elderly passengers compared to working-age adults.&lt;/p&gt;
&lt;p&gt;The youngest passenger recorded was under 1 year old. The oldest was 80.&lt;/p&gt;
&lt;p&gt;Chart 5 — Age by Survival (Overlapping Histogram)&lt;br&gt;
This is one of the most informative charts in the project. By plotting two histograms on the same axes — one for survivors, one for non-survivors — with alpha=0.6 on both so they're visible through each other, the overlap pattern becomes clear.&lt;/p&gt;
&lt;p&gt;plt.hist(df[df[&quot;Survived&quot;]==1][&quot;Age&quot;], alpha=0.6, label=&quot;Survived&quot;, bins=20)&lt;br&gt;
plt.hist(df[df[&quot;Survived&quot;]==0][&quot;Age&quot;], alpha=0.6, label=&quot;Did not survive&quot;, bins=20)&lt;br&gt;
plt.legend()&lt;/p&gt;
&lt;p&gt;Young children (under ~10) show a higher proportion of survivors relative to non-survivors — consistent with &quot;children first.&quot; For adults aged 20–40, non-survivors heavily outnumber survivors, reflecting the large number of 3rd-class male passengers in that age group.&lt;/p&gt;
&lt;p&gt;Chart 6 — Fare Distribution&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ddcx0dsmw1m8jpj5dj77.png&quot; alt=&quot;Image description&quot;&gt;&lt;/p&gt;
&lt;p&gt;The fare histogram reveals extreme economic inequality on board. The distribution is heavily right-skewed — the vast majority of passengers paid low fares (under £50), while a small number paid extremely high amounts (up to 512).&lt;/p&gt;
&lt;p&gt;This roughly maps to passenger class: 3rd-class passengers paid low fares, 1st-class passengers paid high fares. And as we saw in Chart 3, class directly correlated with survival.&lt;/p&gt;
&lt;p&gt;Chart 7 — Gender × Class Survival Heatmap&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8pwlawpm6u71c4osf148.png&quot; alt=&quot;Image description&quot;&gt;&lt;/p&gt;
&lt;p&gt;This is the most powerful chart in the project. Instead of looking at gender and class separately, I combined them into a single heatmap using a pivot table.&lt;/p&gt;
&lt;p&gt;pivot = df.pivot_table(values=&quot;Survived&quot;, index=&quot;Sex&quot;, columns=&quot;Pclass&quot;, aggfunc=&quot;mean&quot;)&lt;br&gt;
sns.heatmap(pivot, annot=True, fmt=&quot;.2f&quot;, cmap=&quot;Blues&quot;)&lt;/p&gt;
&lt;p&gt;The results:&lt;/p&gt;
&lt;p&gt;1st Class	2nd Class	3rd Class&lt;br&gt;
Female	~0.97	~0.92	~0.50&lt;br&gt;
Male	~0.37	~0.16	~0.14&lt;br&gt;
1st-class females had a ~97% survival rate. They were almost certain to survive. 3rd-class males had a ~14% survival rate. They had almost no chance.&lt;/p&gt;
&lt;p&gt;The difference between those two groups is 83 percentage points — from the same disaster, on the same ship, at the same time.&lt;/p&gt;
&lt;p&gt;Phase 5 — Key Findings and Conclusion&lt;br&gt;
Key Findings&lt;br&gt;
Only 38% of passengers survived — the majority of people on board did not make it.&lt;/p&gt;
&lt;p&gt;Gender was the strongest single factor — female passengers survived at ~74% vs ~19% for males, confirming the &quot;women and children first&quot; evacuation protocol was followed.&lt;/p&gt;
&lt;p&gt;Passenger class determined access to lifeboats — 1st class survived at ~63%, 3rd class at only ~24%. Where you sat on the ship directly affected your survival.&lt;/p&gt;
&lt;p&gt;The combined effect was extreme — 1st-class females had a ~97% survival rate while 3rd-class males had only ~14%. The gap between best and worst case is 83 percentage points.&lt;/p&gt;
&lt;p&gt;Children showed higher survival rates — the overlapping age histogram showed young children were more likely to survive relative to adults.&lt;/p&gt;
&lt;p&gt;Fare inequality mirrored class inequality — most passengers paid very little, a few paid enormous amounts, and higher fare strongly correlated with higher survival.&lt;/p&gt;
&lt;p&gt;Conclusion&lt;br&gt;
The Titanic data tells a clear story: survival was not random. Gender and passenger class were the two dominant factors, and when combined, they produced an extreme range of outcomes. A 1st-class female passenger had near-certain survival. A 3rd-class male passenger had almost no chance.&lt;/p&gt;
&lt;p&gt;The &quot;women and children first&quot; protocol was real — the data proves it. But access to the upper decks, proximity to lifeboats, and crew assistance were all filtered through socioeconomic status. Wealthier passengers had structural advantages that translated directly into survival.&lt;/p&gt;
&lt;p&gt;This project taught me how to move from raw data to real insight — not just running code, but understanding what the numbers actually mean about human lives.&lt;/p&gt;
&lt;p&gt;What's Next&lt;br&gt;
This is Project 2 of my data analyst portfolio. I'm continuing to build projects that cover real-world datasets and develop my skills in Python, Pandas, and visualization.&lt;/p&gt;
&lt;p&gt;Connect with me:&lt;/p&gt;
&lt;p&gt; GitHub: github.com/sandipsubedi0&lt;/p&gt;
&lt;p&gt; LinkedIn: linkedin.com/in/sandip-subedi-5694b136a&lt;/p&gt;
&lt;p&gt; Instagram: @sandipsubedi0&lt;/p&gt;
&lt;p&gt;Thanks for reading. If you found this useful, share it with someone learning data analysis.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/20274/titanic-survival-analysis-what-the-data-reveals-about-who-lived-and-who-died</guid>
<pubDate>Thu, 11 Jun 2026 10:01:09 +0000</pubDate>
</item>
<item>
<title>How to Publish and Share a Power BI Report Online</title>
<link>https://coderlegion.com/17805/how-to-publish-and-share-a-power-bi-report-online</link>
<description>&lt;p&gt;As we continue to explore Data Science and Analytics, this weeks deliverable was to work on an electronics sales dashboard in PowerBI and publish it online. This is a common request in data analytics so in this article we will walk through the full process of publishing a Power BI report to the web, from clicking &quot;Publish&quot; in Desktop to getting a shareable link that anyone can open in a browser. &lt;/p&gt;
&lt;h3 id=&quot;the-project-in-brief&quot;&gt;The Project in Brief&lt;/h3&gt;
&lt;p&gt;Before jumping into publishing, here is a quick overview of what the report contains so you have context for the screenshots:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Dataset:&lt;/strong&gt; 100 electronics retail transactions across 10 products, 9 cities (USA and Canada), and 3 sales representatives.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Data preparation:&lt;/strong&gt; The raw Excel data was loaded into Power Query where it was cleaned, validated, and normalized. Canadian Dollar transactions were converted to USD at a rate of 0.74. A star schema was built with six dimension tables (Products, Customers, Cities, SalesReps, PaymentMethod, DateTable) linked to a central fact table.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;DAX measures:&lt;/strong&gt; Total Revenue, Total Profit, Total Orders, Average Profit Margin, Average Shipping Cost, and a calculated Date Table using the &lt;code&gt;CALENDAR()&lt;/code&gt; function.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Dashboard pages:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Page 1 - Executive Dashboard:&lt;/strong&gt; KPI cards, sales by product, revenue by category, sales rep distribution, payment method breakdown, and interactive slicers.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e589dmv8uv0mdr4ha78e.png&quot; alt=&quot;Dashboard page&quot;&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Page 2 - Product Analysis:&lt;/strong&gt; Revenue and profit comparison by product, geographic maps, profit margin rankings.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j5o34iss775nefitd6gf.png&quot; alt=&quot;Product Analysis&quot;&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Page 3 - Sales Reps and Customers:&lt;/strong&gt; Customer rankings, sales rep performance combo chart, customer age distribution.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8wlrz5yb8al94oi697nb.png&quot; alt=&quot;Customers and Sales&quot;&gt;&lt;/p&gt;
&lt;p&gt;With the report complete in Power BI Desktop, the next step is getting it online.&lt;/p&gt;
&lt;h3 id=&quot;step-1-publish-from-power-bi-desktop&quot;&gt;Step 1: Publish from Power BI Desktop&lt;/h3&gt;
&lt;p&gt;Open your &lt;code&gt;.pbix&lt;/code&gt; file in Power BI Desktop. In the top ribbon, go to &lt;strong&gt;Home&lt;/strong&gt; and click the &lt;strong&gt;Publish&lt;/strong&gt; button on the right side of the toolbar.&lt;/p&gt;
&lt;p&gt;If you are not signed in, Power BI will prompt you to sign in with your Microsoft account. Use the account associated with your Power BI Service subscription.&lt;/p&gt;
&lt;p&gt;Once signed in, a dialog box appears asking you to select a destination workspace. &lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b4hu1vs9dmf66rg97wob.png&quot; alt=&quot;Publish a Report&quot;&gt;&lt;/p&gt;
&lt;p&gt;You will see a list of available workspaces. If you have not created any custom workspaces, you will only see &lt;strong&gt;My workspace&lt;/strong&gt;, which is the default personal workspace that comes with every Power BI account.&lt;/p&gt;
&lt;p&gt;Select the workspace you want and click &lt;strong&gt;Select&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Power BI Desktop will upload the report. This usually takes a few seconds depending on the file size. When it finishes, you get a success confirmation.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pyq3un8aijpuf6jhjwjq.png&quot; alt=&quot;Publishing Sucessful&quot;&gt;&lt;/p&gt;
&lt;p&gt;Click the &lt;strong&gt;&quot;Open in Power BI&quot;&lt;/strong&gt; link to jump directly to your report in the browser, or click &lt;strong&gt;Got it&lt;/strong&gt; to stay in Desktop.&lt;/p&gt;
&lt;h3 id=&quot;step-2-verify-in-power-bi-service&quot;&gt;Step 2: Verify in Power BI Service&lt;/h3&gt;
&lt;p&gt;Head over to &lt;a rel=&quot;nofollow&quot; href=&quot;https://app.powerbi.com&quot;&gt;app.powerbi.com&lt;/a&gt; and navigate to the workspace where you published. You should see your report listed there.&lt;/p&gt;
&lt;p&gt;Open the report and spend a few minutes checking everything:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Do all visuals render correctly?&lt;/li&gt;
&lt;li&gt;Do the slicers filter across all charts as expected?&lt;/li&gt;
&lt;li&gt;Do navigation buttons (if you added any) work?&lt;/li&gt;
&lt;li&gt;Are the KPI numbers matching what you see in Desktop?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/stdrnp4if6r671ipeqrv.png&quot; alt=&quot;Published Report&quot;&gt;&lt;/p&gt;
&lt;p&gt;In the screenshot above, you can see the report is live in the Power BI Service. The left sidebar shows the Pages panel listing all four pages (Dashboard, Products, Sales Reps and Custom...). The report is fully interactive - slicers, tooltips, and filtering all work just like they do in Desktop.&lt;/p&gt;
&lt;p&gt;Notice the toolbar at the top: &lt;strong&gt;File&lt;/strong&gt;, &lt;strong&gt;Export&lt;/strong&gt;, &lt;strong&gt;Share&lt;/strong&gt;, &lt;strong&gt;Explore&lt;/strong&gt;, &lt;strong&gt;Set alert&lt;/strong&gt;, &lt;strong&gt;Monitor&lt;/strong&gt;, and &lt;strong&gt;Edit&lt;/strong&gt;. These are the options available to you as the report owner. The ones we care about for sharing are &lt;strong&gt;File&lt;/strong&gt;, &lt;strong&gt;Export&lt;/strong&gt;, and &lt;strong&gt;Share&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 id=&quot;step-3-share-the-report&quot;&gt;Step 3: Share the Report&lt;/h3&gt;
&lt;p&gt;This is where it gets interesting, and also where you might run into some friction depending on your account type. There are several ways to share a Power BI report, each with different access requirements.&lt;/p&gt;
&lt;h4 id=&quot;publish-to-web-public-embed-&quot;&gt;Publish to Web (Public Embed)&lt;/h4&gt;
&lt;p&gt;This is the simplest option for making your report accessible to anyone without requiring them to have a Power BI account.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Path:&lt;/strong&gt; File &amp;gt; Embed report &amp;gt; Publish to web (public)&lt;/p&gt;
&lt;p&gt;This generates two things:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;direct URL&lt;/strong&gt; that opens the report in any browser&lt;/li&gt;
&lt;li&gt;An &lt;strong&gt;iframe embed code&lt;/strong&gt; that you can paste into a website, blog, or portfolio page&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The direct link looks something like:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;https://app.powerbi.com/view?r=eyJrIjoi...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The iframe code looks like:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;lt;iframe
  title=&quot;Electronics Sales Dashboard&quot;
  width=&quot;1140&quot;
  height=&quot;541.25&quot;
  src=&quot;https://app.powerbi.com/view?r=eyJrIjoi...&quot;
  frameborder=&quot;0&quot;
  allowFullScreen=&quot;true&quot;&amp;gt;
&amp;lt;/iframe&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Anyone with the link can view and interact with the report. No sign-in required.&lt;/p&gt;
&lt;h3 id=&quot;step-4-embed-on-a-website-if-publish-to-web-worked-&quot;&gt;Step 4: Embed on a Website (If Publish to Web Worked)&lt;/h3&gt;
&lt;p&gt;If you got the embed code from &quot;Publish to web&quot;, you can host your report on any website. Here are two common approaches:&lt;/p&gt;
&lt;h4 id=&quot;simple-html-page&quot;&gt;Simple HTML Page&lt;/h4&gt;
&lt;p&gt;Create an &lt;code&gt;index.html&lt;/code&gt; file:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang=&quot;en&quot;&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset=&quot;UTF-8&quot;&amp;gt;
    &amp;lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&amp;gt;
    &amp;lt;title&amp;gt;Electronics Sales Dashboard&amp;lt;/title&amp;gt;
    &amp;lt;style&amp;gt;
        body {
            margin: 0;
            font-family: Arial, sans-serif;
            background: #f5f5f5;
        }
        .header {
            background: #1B2A4A;
            color: white;
            padding: 20px 40px;
        }
        .header h1 {
            margin: 0;
            font-size: 24px;
        }
        .header p {
            margin: 8px 0 0;
            font-size: 14px;
            color: #B5D4F4;
        }
        .container {
            max-width: 1200px;
            margin: 24px auto;
            padding: 0 20px;
        }
        iframe {
            width: 100%;
            height: 600px;
            border: none;
            border-radius: 8px;
        }
    &amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;div class=&quot;header&quot;&amp;gt;
        &amp;lt;h1&amp;gt;Electronics Sales Dashboard&amp;lt;/h1&amp;gt;
        &amp;lt;p&amp;gt;Power BI Report -- January 2026&amp;lt;/p&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;div class=&quot;container&quot;&amp;gt;
        &amp;lt;iframe
          title=&quot;Electronics Sales Dashboard&quot;
          src=&quot;YOUR_EMBED_URL_HERE&quot;
          allowFullScreen=&quot;true&quot;&amp;gt;
        &amp;lt;/iframe&amp;gt;
    &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Replace &lt;code&gt;YOUR_EMBED_URL_HERE&lt;/code&gt; with the actual embed URL from Power BI.&lt;/p&gt;
&lt;h4 id=&quot;host-on-github-pages&quot;&gt;Host on GitHub Pages&lt;/h4&gt;
&lt;p&gt;If your project is already in a GitHub repo, you can host the embed page for free using GitHub Pages:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a subfolder in your repo (e.g., &lt;code&gt;electronics-sales/&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Put the &lt;code&gt;index.html&lt;/code&gt; file inside it.&lt;/li&gt;
&lt;li&gt;Push to GitHub.&lt;/li&gt;
&lt;li&gt;Go to &lt;strong&gt;Settings &amp;gt; Pages&lt;/strong&gt; in your repo.&lt;/li&gt;
&lt;li&gt;Set the source to deploy from your main branch.&lt;/li&gt;
&lt;li&gt;After a minute or two, your page will be live at &lt;code&gt;https://yourusername.github.io/repo-name/electronics-sales/&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If your repo contains multiple projects, each subfolder with its own &lt;code&gt;index.html&lt;/code&gt; becomes a separate page under the same base URL. You only need to enable GitHub Pages once per repo.&lt;/p&gt;
&lt;h3 id=&quot;summary&quot;&gt;Summary&lt;/h3&gt;
&lt;p&gt;The publishing workflow in Power BI goes like this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Build&lt;/strong&gt; the report in Power BI Desktop.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Publish&lt;/strong&gt; to a workspace in the Power BI Service.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Verify&lt;/strong&gt; that everything works in the browser.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Share&lt;/strong&gt; using one of the available methods (Publish to web, direct share, or export).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Embed&lt;/strong&gt; on a website or GitHub Pages if you want a standalone hosted version.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I hope you enjoyed this guide. If you would like to learn more about the PowerBI project, the insights gained and the original data used, check out my GitHub repo that contains the project: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/BrianMunene96/LuxDevHQ_Assignments/blob/main/README_PowerBI_Project.md&quot;&gt;Electronics Sale Dashboard&lt;/a&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/17805/how-to-publish-and-share-a-power-bi-report-online</guid>
<pubDate>Thu, 14 May 2026 10:11:40 +0000</pubDate>
</item>
</channel>
</rss>