Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

#SQL, #PowerQuery, or #MicrosoftFabric

I just published a hands-on walkthrough of solving a real SQL reporting challenge using Microsoft Fabric. 

Read the full article on Medium

In this post, I cover:

  • Designing a star schema with Sales, Product, and Date tables

  • Writing SQL joins for clean reporting

  • Replicating the same logic visually using Power Query in a Dataflow

  • Loading the final result into a Fabric Warehouse for scalable reporting

-- Create the Sales table
CREATE TABLE Sales (
    DateKey INT,
    ProductKey INT,
    SalesAmount INT
);

-- Insert sample records into Sales
INSERT INTO Sales (DateKey, ProductKey, SalesAmount)
VALUES
(20231201, 101, 500),
(20231201, 102, 300),
(20231202, 101, 400);

-- Create the Product table
CREATE TABLE Product (
    ProductKey INT,
    ProductName VARCHAR(100)
);

-- Insert into Product
INSERT INTO Product (ProductKey, ProductName)
VALUES
(101, 'Phone'),
(102, 'Laptop');

-- Create the Date table
CREATE TABLE Date (
    DateKey INT,
    Day INT,
    Month INT,
    Year INT
);

-- Insert into Date
INSERT INTO Date (DateKey, Day, Month, Year)
VALUES
(20231201, 1, 12, 2023),
(20231202, 2, 12, 2023);



Power Query Solution — No-Code Approach in Fabric

Here’s how I replicated the same logic visually using Power Query in a Dataflow:

🪜 Steps

  1. Upload source Excel or CSV files to OneLake
  2. Open Power Query Editor inside Fabric
  3. Clean each table:
  • Rename columns
  • Adjust data types

4. Merge Sales → Product on ProductKey 

Olufemi7_0-1755068918644.png

 

Olufemi7_1-1755069252422.png

 

Olufemi7_2-1755069864292.png

Olufemi7_3-1755069936468.png

 

#MicrosoftFabric #SQL #PowerQuery #Dataflows #Warehouse #StarSchema #ReportingTips



Status: New