<?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: Nancy Mikia</title>
    <description>The latest articles on DEV Community by Nancy Mikia (@nancymikia).</description>
    <link>https://dev.to/nancymikia</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%2F3843042%2F7224af51-dade-46c2-9d76-d4b90a11bcd4.png</url>
      <title>DEV Community: Nancy Mikia</title>
      <link>https://dev.to/nancymikia</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nancymikia"/>
    <language>en</language>
    <item>
      <title>SQL Subquery and CTEs( Common Table Expressions)</title>
      <dc:creator>Nancy Mikia</dc:creator>
      <pubDate>Tue, 21 Apr 2026 00:06:55 +0000</pubDate>
      <link>https://dev.to/nancymikia/sql-subquery-and-ctes-common-table-expressions-45ei</link>
      <guid>https://dev.to/nancymikia/sql-subquery-and-ctes-common-table-expressions-45ei</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is a subquery?&lt;/strong&gt;&lt;br&gt;
Subquery is a query nested inside another query statement. It allows the query to be modular which would otherwise require multiple queries to achieve the same result. It runs first and the result is used as input by another query.&lt;br&gt;
&lt;strong&gt;When to use it?&lt;/strong&gt;&lt;br&gt;
It is an essential tool when used in the following scenarios:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Filtering row data using the results from another query&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Applying aggregation functions such as SUM or AVG dynamically&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Simplify queries by breaking them into smaller, readable and maintainable queries instead of using joins or complex external code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Compare data between tables to fetch specific insights&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Types of subqueries&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Scalar subquery&lt;/strong&gt;&lt;br&gt;
It returns a single value,such as one row and column. It is commonly used with comparison operators such as &amp;gt;,&amp;lt;, =&lt;br&gt;
&lt;strong&gt;Use case:&lt;/strong&gt; Find books that cause more than average&lt;/p&gt;

&lt;p&gt;&lt;code&gt;SELECT title,price&lt;br&gt;
FROM books&lt;br&gt;
WHERE price &amp;gt; (SELECT AVG(price) FROM books);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multi-row subquery&lt;/strong&gt;&lt;br&gt;
It returns more than one value, i.e. multiple rows as result. It is often used with operators such as ANY, ALL or IN.&lt;br&gt;
&lt;strong&gt;Use case:&lt;/strong&gt; Books ordered by Customer John&lt;/p&gt;

&lt;p&gt;&lt;code&gt;SELECT title, author&lt;br&gt;
FROM books&lt;br&gt;
WHERE book_id IN (&lt;br&gt;
    SELECT book_id&lt;br&gt;
    FROM orders&lt;br&gt;
    WHERE customer_id IN (&lt;br&gt;
        SELECT customer_id&lt;br&gt;
        FROM customers&lt;br&gt;
        WHERE first_name = 'John'&lt;br&gt;
    ));&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Correlated subquery&lt;/strong&gt;&lt;br&gt;
It is dependent on the outer query for its values, i.e. it references columns from the outer query. It is executed once for each row of the outer query making it slower for larger datasets.&lt;br&gt;
&lt;strong&gt;Use case:&lt;/strong&gt; Customer who placed atleast 1 order of books&lt;/p&gt;

&lt;p&gt;&lt;code&gt;SELECT first_name, last_name&lt;br&gt;
FROM customers c&lt;br&gt;
WHERE EXISTS (&lt;br&gt;
    SELECT 1 &lt;br&gt;
    FROM orders o&lt;br&gt;
    WHERE o.customer_id = c.customer_id&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Table subquery( derived tables)&lt;/strong&gt;&lt;br&gt;
It returns a complete table. It is commonly used in the from clause.&lt;br&gt;
&lt;strong&gt;Use case:&lt;/strong&gt; Top 3 most expensive books&lt;/p&gt;

&lt;p&gt;&lt;code&gt;SELECT title,author,price&lt;br&gt;
FROM (&lt;br&gt;
    SELECT title,author,price,&lt;br&gt;
    RANK() OVER (ORDER BY price DESC) AS price_rank&lt;br&gt;
    FROM books&lt;br&gt;
) AS ranked_books&lt;br&gt;
WHERE price_rank &amp;lt;= 3;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What are Common Table Expressions(CTEs)&lt;/strong&gt;&lt;br&gt;
CTEs are temporary, named results in SQL that can be referenced in a single statement. It is allowed to simplify complex queries making them reusable, readable and maintainable, and helps work with hierarchical data using recursions. It is distinctly created using the WITH clause.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Types and Use Cases of CTEs&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Non-Recursive CTEs&lt;/strong&gt;&lt;br&gt;
These are used once within a single query to simplify logic. Ideal for breaking down complex joins, aggregations, or temporary calculations.&lt;br&gt;
&lt;strong&gt;Use case:&lt;/strong&gt; Find the list of customers and their total orders&lt;/p&gt;

&lt;p&gt;&lt;code&gt;WITH customer_order_count AS (&lt;br&gt;
    SELECT &lt;br&gt;
        customer_id, &lt;br&gt;
        COUNT(order_id) AS total_orders&lt;br&gt;
    FROM orders&lt;br&gt;
    GROUP BY customer_id)&lt;br&gt;
SELECT &lt;br&gt;
    c.first_name, &lt;br&gt;
    c.last_name, &lt;br&gt;
    co.total_orders&lt;br&gt;
FROM customers c&lt;br&gt;
JOIN customer_order_count co &lt;br&gt;
ON c.customer_id = co.customer_id;&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Recursive CTEs&lt;/strong&gt;&lt;br&gt;
Used when working with hierarchical data (e.g., organization charts, folder structures, family trees). A recursive CTE repeatedly references itself until a termination condition is met.&lt;br&gt;
&lt;strong&gt;Use case:&lt;/strong&gt; Generates a sequence of dates starting from the earliest order date upto 5 days ahead&lt;/p&gt;

&lt;p&gt;&lt;code&gt;-- Recursive CTE: Generate sequential dates&lt;br&gt;
WITH RECURSIVE date_sequence AS (&lt;br&gt;
    -- Anchor member: start from the earliest order date&lt;br&gt;
    SELECT MIN(order_date) AS order_date&lt;br&gt;
    FROM orders&lt;br&gt;
    UNION ALL&lt;br&gt;
    -- Recursive member: add 1 day until 5 days ahead&lt;br&gt;
    SELECT order_date + INTERVAL '1 day'&lt;br&gt;
    FROM date_sequence&lt;br&gt;
    WHERE order_date &amp;lt; (SELECT MIN(order_date) + INTERVAL '5 days' FROM orders)&lt;br&gt;
)&lt;br&gt;
SELECT order_date&lt;br&gt;
FROM date_sequence;&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Common Use Cases:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Breaking complex queries into readable, logical parts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Creating temporary result sets reused within a query.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Traversing hierarchical or self-referential data structures.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Simplifying code compared to nested subqueries or procedural loops.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Comparison between subqueries and CTEs&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%2F63mirirbsrujkq86e9mf.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%2F63mirirbsrujkq86e9mf.png" alt="Difference between subquery and CTE" width="800" height="130"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
Subqueries and CTEs are essential tools for writing efficient and maintainable SQL code. Subqueries shine in simple filtering and dynamic aggregation, while CTEs offer superior readability and flexibility for complex, multi-step, or recursive logic. Choosing between them depends on the problem: use subqueries for straightforward tasks, but prefer CTEs when your query requires clarity, modularity, or repeated logic. Together, they form the foundation for clean, powerful, and scalable SQL development.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>database</category>
      <category>sql</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Publishing a Power BI Report and Embedding It into a Website</title>
      <dc:creator>Nancy Mikia</dc:creator>
      <pubDate>Mon, 06 Apr 2026 02:29:47 +0000</pubDate>
      <link>https://dev.to/nancymikia/publishing-a-power-bi-report-and-embedding-it-into-a-website-1ioe</link>
      <guid>https://dev.to/nancymikia/publishing-a-power-bi-report-and-embedding-it-into-a-website-1ioe</guid>
      <description>&lt;p&gt;Power BI is a powerful data visualization and reporting platform widely used by businesses and professionals to transform raw data into meaningful insights. In today’s data-driven world, organizations rely heavily on tools like Power BI to analyze trends, monitor performance, and support decision-making processes. Its intuitive interface, combined with advanced analytical capabilities, makes it a preferred choice for both technical and non-technical users.&lt;/p&gt;

&lt;p&gt;At its core, Power BI enables users to connect to various data sources, clean and transform data, and create interactive dashboards and reports. Beyond visualization, it also plays a crucial role in defining relationships between datasets and applying schemas to ensure accurate and reliable analysis. Once a report is developed, it can be published to the Power BI service and embedded into websites or portals, allowing broader access to insights.&lt;/p&gt;

&lt;p&gt;Embedding reports is particularly valuable for organizations that want to share data with stakeholders in a seamless and interactive way. Instead of relying on static reports, users can engage with live dashboards directly within websites, enhancing accessibility and usability. To successfully embed a Power BI report, there are four essential stages:&lt;/p&gt;

&lt;p&gt;Creating a workspace&lt;br&gt;
Uploading and publishing the report&lt;br&gt;
Generating the embed code&lt;br&gt;
Embedding the report on a website&lt;/p&gt;

&lt;p&gt;Each of these stages plays a critical role in ensuring that the report is properly structured, accessible, and secure.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Creating a Workspace&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
A workspace in Power BI serves as a collaborative environment where users can create, manage, and share reports and dashboards. It acts as a container that organizes content and controls access permissions.&lt;/p&gt;

&lt;p&gt;Typically, a workspace can be personal or shared. A personal workspace is primarily for individual use, allowing users to build and manage their own reports. Shared workspaces, on the other hand, enable collaboration among team members, making it easier to distribute insights across an organization.&lt;/p&gt;

&lt;p&gt;It is important to note that Power BI Desktop does not provide the interface for creating workspaces. To create one, users must access the Power BI service through a web browser by navigating to the Power BI website.&lt;/p&gt;

&lt;p&gt;Steps to Create a Workspace:&lt;br&gt;
Open the Power BI service in your browser.&lt;br&gt;
Navigate to the Workspaces section.&lt;br&gt;
Select New Workspace.&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%2Fi3gj8w8l76n12k0c3366.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%2Fi3gj8w8l76n12k0c3366.png" alt="Creating New workspace" width="800" height="522"&gt;&lt;/a&gt;&lt;br&gt;
Provide a name and description for the workspace.&lt;br&gt;
Assign appropriate permissions to users (Admin, Member, Contributor, or Viewer).&lt;br&gt;
Save the workspace.&lt;/p&gt;

&lt;p&gt;Once created, the workspace becomes the central location for storing and managing reports. If you already have access to an existing workspace, this step can be skipped, as reports can be directly uploaded there.&lt;/p&gt;

&lt;p&gt;Workspaces are essential because they help maintain organization, ensure proper access control, and support collaboration among users. Without a workspace, managing reports at scale would be inefficient and prone to errors.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Uploading and Publishing a Report&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
After creating a report in Power BI Desktop, the next step is to publish it to the Power BI service. Publishing makes the report accessible online and enables sharing, collaboration, and embedding.&lt;/p&gt;

&lt;p&gt;Steps to Publish a Report:&lt;br&gt;
In Power BI Desktop, go to File &amp;gt; Publish &amp;gt; Publish to Power BI.&lt;br&gt;
Select the destination workspace where you want the report to be stored.&lt;br&gt;
Click the Select button.&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%2Faasznh7pnor2yd1g2vrb.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%2Faasznh7pnor2yd1g2vrb.png" alt="Publishing a report" width="800" height="696"&gt;&lt;/a&gt;&lt;br&gt;
Wait for the publishing process to complete successfully.&lt;br&gt;
Verify that the report and its dataset are available in the Power BI service.&lt;/p&gt;

&lt;p&gt;Publishing is a crucial step because it transitions the report from a local environment to a cloud-based platform. This allows users to access the report from anywhere, collaborate with others, and integrate it into other applications.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Generating the Embed Code&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
Once the report is published, the next step is to generate an embed code. This code allows the report to be displayed outside the Power BI environment, such as on websites or internal portals.&lt;/p&gt;

&lt;p&gt;Embedding provides flexibility in how reports are shared. Organizations can choose between public access or restricted access, depending on their needs.&lt;/p&gt;

&lt;p&gt;Steps to Generate an Embed Code:&lt;br&gt;
Locate the report you want to share in the Power BI service.&lt;br&gt;
Click on File &amp;gt; Publish to web.&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%2Ftjspq9u61aierg2iuimu.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%2Ftjspq9u61aierg2iuimu.png" alt="Get an embedded code" width="800" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Confirm the action to generate an embed code.&lt;br&gt;
Copy the generated URL and iframe HTML code.&lt;br&gt;
To manage existing embed codes, go to Settings &amp;gt; Manage embed codes.&lt;br&gt;
Use the Get code option to retrieve previously created embed codes.&lt;/p&gt;

&lt;p&gt;The embed code typically comes in the form of an iframe, which can be inserted directly into a website’s HTML. This allows users to view and interact with the report without leaving the website.&lt;/p&gt;

&lt;p&gt;However, it is important to understand the implications of using the “Publish to web” option. Reports shared this way are publicly accessible, meaning anyone with the link can view them. This method is suitable for non-sensitive data but should not be used for confidential information.&lt;br&gt;
Additionally, when a report is published, its underlying dataset is also uploaded. This dataset can be refreshed periodically, ensuring that the report always reflects the most up-to-date information. Organizations often configure scheduled refreshes to automate this process.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Embedding the Report on a Website&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
The final step is embedding the report into a website or portal. This is where Power BI truly shines, as it transforms static web pages into dynamic, data-driven platforms.&lt;/p&gt;

&lt;p&gt;There are two primary methods for embedding reports:&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;1. Secure Embedding (Recommended for Organizations)&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
This method ensures that only authorized users can access the report.&lt;/p&gt;

&lt;p&gt;Steps:&lt;br&gt;
Open the report in the Power BI service.&lt;br&gt;
Select File &amp;gt; Embed report &amp;gt; Website or portal.&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%2Fn6rc06pq1tprl01lb1l0.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%2Fn6rc06pq1tprl01lb1l0.png" alt="Secure Embedding" width="758" height="523"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copy the provided link or iframe code.&lt;br&gt;
Paste the code into your website’s HTML editor.&lt;/p&gt;

&lt;p&gt;With secure embedding, users must have the appropriate permissions and licenses to view the report. This ensures that sensitive data remains protected while still being accessible to authorized stakeholders.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;2. Publish to Web (Public Access)&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
This method makes the report available to anyone on the internet.&lt;/p&gt;

&lt;p&gt;Steps:&lt;br&gt;
Select File &amp;gt; Embed report &amp;gt; Publish to web.&lt;br&gt;
Review the warning message carefully.&lt;br&gt;
Click Create embed code.&lt;br&gt;
Copy the link or iframe code and paste it into your website.&lt;/p&gt;

&lt;p&gt;While this method is easy to implement, it should only be used for publicly shareable data, as there are no access restrictions.&lt;/p&gt;

&lt;p&gt;**Key Insights&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Accessibility and Usability**
Embedding Power BI reports significantly improves accessibility. Instead of requiring users to log into Power BI, reports can be accessed directly from websites or portals. This is especially useful for organizations that want to share insights with clients, partners, or the public.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;*&lt;em&gt;2. Real-Time Data Interaction&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
Unlike static reports, embedded Power BI dashboards are interactive. Users can filter data, drill down into details, and explore insights in real time. This enhances user engagement and enables more informed decision-making.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;3. Security Considerations&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
Security is a critical factor when embedding reports. Organizations must carefully choose between secure embedding and public sharing. Sensitive data should always be protected באמצעות role-based access control and proper authentication mechanisms.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;4. Integration Capabilities&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
Power BI integrates seamlessly with various platforms, including websites, applications, and enterprise systems. This makes it a versatile tool for embedding analytics into existing workflows.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Challenges and Best Practices&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
While embedding Power BI reports offers numerous benefits, there are some challenges to consider:&lt;/p&gt;

&lt;p&gt;Data Security Risks: Public embedding can expose sensitive information if not handled properly.&lt;br&gt;
Performance Issues: Large datasets or complex reports may affect loading times.&lt;br&gt;
Licensing Requirements: Secure embedding often requires Power BI Pro or Premium licenses.&lt;br&gt;
Best Practices:&lt;br&gt;
Always evaluate the sensitivity of your data before choosing an embedding method.&lt;br&gt;
Optimize reports for performance by reducing unnecessary visuals and data complexity.&lt;br&gt;
Use role-based access control to restrict access to authorized users.&lt;br&gt;
Regularly review and manage embed codes to maintain security.&lt;br&gt;
Conclusion&lt;/p&gt;

&lt;p&gt;Power BI is a powerful and versatile tool that goes beyond simple data visualization. By enabling users to create, publish, and embed interactive reports, it bridges the gap between data analysis and accessibility. The process of embedding reports—starting from workspace creation to final integration into websites—empowers organizations to share insights effectively and efficiently.&lt;/p&gt;

&lt;p&gt;Embedding transforms traditional web pages into dynamic platforms where users can interact with live data. This not only enhances user experience but also supports better decision-making by providing real-time insights.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Key Takeaway&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
Embedding Power BI reports using iframes and secure links allows organizations to deliver interactive, data-driven experiences directly within websites and portals. By following the structured process of creating a workspace, publishing reports, generating embed codes, and embedding them, businesses can unlock the full potential of their data and make insights more accessible than ever before.&lt;/p&gt;

</description>
      <category>analytics</category>
      <category>microsoft</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Understanding Data Modeling in Power BI: Joins, Relationships, and Schemas Explained</title>
      <dc:creator>Nancy Mikia</dc:creator>
      <pubDate>Sun, 29 Mar 2026 18:50:27 +0000</pubDate>
      <link>https://dev.to/nancymikia/understanding-data-modeling-in-power-bi-joins-relationships-and-schemas-explained-3aak</link>
      <guid>https://dev.to/nancymikia/understanding-data-modeling-in-power-bi-joins-relationships-and-schemas-explained-3aak</guid>
      <description>&lt;p&gt;Data Modeling is the process of analyzing and defining different data type   that is collected or produced. It also shows relationship between those data in visual form as data is captured, stored ans used in different ways as per the owner/business. Without a well-structured data model, dashboard in power BI can produce misleading insights,Poor performance and confusion. &lt;/p&gt;

&lt;p&gt;In this article we will cover SQL joins, Relationship in Power BI,Schemas and common modeling issues. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SQL Joins Type&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Joins combines data from multiple tables based on related column. In Power BI it happens before data is loaded into the model. &lt;br&gt;
&lt;strong&gt;Inner Join&lt;/strong&gt;- Returns  to rows where there is matching values in both tables. It can be used to match employees to departments or authors to books. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Left Join&lt;/strong&gt;-Returns all rows from left table and matched rows  from the right. It can be used to list all departments and their employees&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Right Join&lt;/strong&gt;- Returns all rows from the right table and matched rows from the left. It will show all departments including those without employees.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Full Outer Join&lt;/strong&gt;- Returns all rows when there is a match in either table. It Links employees to their department including the unmatched employees.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Left Anti Join&lt;/strong&gt;- Returns rows from the left table that have no match to the right. Can be used to know employees who have not attempted to attend mandatory training. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Right Anti Join&lt;/strong&gt;- Returns rows from the right table that have no match in the left. It can be used to determine employees recently employeed and have not been enrolled to the enjoy benefits.&lt;/p&gt;

&lt;p&gt;We create the above on Power BI: &lt;em&gt;Home&amp;gt;Transform data&amp;gt;Power query editor. Use Merge queries to select join type.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Power BI relationship&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Relationships are created in the model view to connect tables after they are loaded. They inform us on how tables relate, allowing for filtering without merging data. It's created by going to &lt;em&gt;Model view&amp;gt;Manage relationship&lt;/em&gt;&lt;br&gt;
The following are some of the key concept in relationship:&lt;/p&gt;

&lt;p&gt;Cardinality-Defines the uniqueness of values in columns used in relationship.&lt;br&gt;
&lt;strong&gt;One to One(1:M)&lt;/strong&gt;- Each row in table A related to one row in table B&lt;br&gt;
&lt;strong&gt;One to many (1:M)&lt;/strong&gt;- Each row in table A relate to multiple row in table B&lt;br&gt;
&lt;strong&gt;Many to many (M:M)&lt;/strong&gt;- Multipe row in table A relates to multiple row in table B&lt;/p&gt;

&lt;p&gt;Cross-filter direction&lt;br&gt;
&lt;strong&gt;Single&lt;/strong&gt;- Filters flow in one direction&lt;br&gt;
&lt;strong&gt;Both&lt;/strong&gt;- Filters flow both ways&lt;/p&gt;

&lt;p&gt;The difference between Joins and Relationship is that Join combines data at power query level whereas relationship defines connection between tables in the model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fact Vs Dimension tables&lt;/strong&gt;&lt;br&gt;
Fact tables answers the question what. It's use for measurable quantitative data e.g Sales whereas dimension table asnwers the question who, where and when. It's used to give descriptive attributes like customer product and date. They contain the unique key. &lt;/p&gt;

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

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Star Schema&lt;/strong&gt;&lt;br&gt;
It's a central fact tables connected to multiple dimension tables and is used for faster queries and simpler relationships in Power BI. It also improves performance. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Snowflake Schema&lt;/strong&gt;&lt;br&gt;
This is an extension of a star schema where dimension tables are normalized into multiple related sub-tables. It's used for managing complex hierarchical data and improving the data integrity of the same.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Flat table (DLAT)&lt;/strong&gt;&lt;br&gt;
It's a single wide table containing all facts and dimensions without relationships to other tables. It's used in small datasets and for quicker analysis. &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Role-playing dimension&lt;/strong&gt;&lt;br&gt;
This allow a single dimension table to be used in multiple roles. In a bakery store, a date can be used to show order date, delivery date and return date.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common Modeling issue&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Creating many to many relationships can lead to ambiquity&lt;/li&gt;
&lt;li&gt;Measure on role-play dimension requires duplicate data tables&lt;/li&gt;
&lt;li&gt;Circular references between tables can cause errors and make the model unusable&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Mastering data modeling in Power BI requires understanding SQL joins, relationships, schemas, and best practices. By carefully structuring fact and dimension tables, choosing the right schema, and managing relationships, you can build efficient, scalable, and insightful Power BI models.&lt;/p&gt;

</description>
      <category>assignment</category>
    </item>
    <item>
      <title>How Excel is Used in Real World Data</title>
      <dc:creator>Nancy Mikia</dc:creator>
      <pubDate>Wed, 25 Mar 2026 12:29:26 +0000</pubDate>
      <link>https://dev.to/nancymikia/how-excel-is-used-in-real-world-data-1ca0</link>
      <guid>https://dev.to/nancymikia/how-excel-is-used-in-real-world-data-1ca0</guid>
      <description>&lt;p&gt;When I was first employed, I often heard excel was a game changer. I didn't know what that means. At that time I didn't understand spreadsheet application could make work easier. It soon became clear that this was a tool I needed to learn.&lt;br&gt;
During the first Excel class, I realised Microsoft excel is a spreadsheet application that allows users to store, organize and manipulate data in rows and column. It was used to analyze and interpret data information that is essential for a business or organization.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Excel matters&lt;/strong&gt; &lt;br&gt;
Excel application extends beyond classroom. Business needs excel to monitor sales, analyze customer's behavior and project future revenue. A teacher needs excel to track their student's performance. A healthcare professional needs to keep record of their patient and analyze treatment outcome. A financer needs to track their expenses, plan for their savings and make informed financial decisions.&lt;br&gt;
What stood out in all this, is that the data being fed on an excel help the user in making useful insights based on facts rather than assumptions. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My beginner struggles&lt;/strong&gt;&lt;br&gt;
As a beginner, interpreting raw data was overwhelming. I remember staring at a datasetof over 100 products and wondering where to start.The endless rows felt intimidating and I struggled to see how meaningful insights could emerge from such complexity. &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%2Fkp6avo56g4h33u2crjla.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%2Fkp6avo56g4h33u2crjla.png" alt="Raw data" width="800" height="470"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This came with a big revelation of the following formulars to help me understand how to go about it. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Features and Formulas that helped&lt;/strong&gt;&lt;br&gt;
Sorting and Filtering- These tools allowed me to identify blank cells and replaced them with N/A so my analysis wouldn't misinterpret missing values &lt;br&gt;
Freeze pane- Instead of memorizing column titles while scrolling through hundredth row, I used freeze panes to keep headers visible at all time.  &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%2F5757qkawlwqapkswas4l.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%2F5757qkawlwqapkswas4l.png" alt="Freeze pane applied" width="800" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With my sample dataset containing discounts, prices, and ratings,the following formulas made analysis much easier: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Average: =AVERAGE(RANGE) helped me calculate the average price, rating and discount.&lt;/li&gt;
&lt;li&gt;Sum: =(SUM(Range) game me totals,such as the number of products in the file. &lt;/li&gt;
&lt;li&gt;IF: =IF(logical_test, value_if_true, value_if_false) flagged products with high discountsor ratings,making comparison clearer&lt;/li&gt;
&lt;li&gt;Text function(LEFT,RIGHT): These helped clean up messy data by extracting or combining text values. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Beyond formulas, Pivot tables became invaluablefor summarizing and grouping data efficiently. Visual tools like bar charts and pie charts made pattern easier to understand at a glance.&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%2Fwmnb0tmdyskejwhq53t8.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%2Fwmnb0tmdyskejwhq53t8.png" alt="Pivot table and pie chart" width="663" height="642"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reflection&lt;/strong&gt;&lt;br&gt;
Learning Excel has reshaped the way I interpret data. When felt like endless data now feels like an exciting puzzle to solve. This journey has showed me how data such as personal budgeting can reveal my patterns in how I spend money and in everyday life.&lt;br&gt;
 I've been able to see trends, ask better questions and make decision based on evidence other than guesswork. It has given me confidence in handling data professionally and personally, and it has depeened my appreciation for the power of data in shaping the modern world. &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>data</category>
      <category>microsoft</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
