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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
frithjof_v
Community Champion
Community Champion

Test: Disable automatic updates of Direct Lake Semantic Model

Just sharing this step-by-step test I did to show the effect of disabling automatic refresh in Direct Lake semantic model.

 

1. Create star schema in Warehouse, and insert dummy data.

 

-- Drop existing tables if needed (optional)
DROP TABLE IF EXISTS SalesFact;
DROP TABLE IF EXISTS ProductDimension;
DROP TABLE IF EXISTS CustomerDimension;
DROP TABLE IF EXISTS StoreDimension;
DROP TABLE IF EXISTS TimeDimension;

-- Create Dimension Tables with CreatedAt column
CREATE TABLE ProductDimension (
    ProductID INT,
    ProductName VARCHAR(100),
    Category VARCHAR(50),
    Price DECIMAL(10, 2),
    LastUpdate DATETIME2(6)
);

CREATE TABLE CustomerDimension (
    CustomerID INT,
    CustomerName VARCHAR(100),
    Email VARCHAR(100),
    City VARCHAR(50),
    LastUpdate DATETIME2(6)
);

CREATE TABLE StoreDimension (
    StoreID INT,
    StoreName VARCHAR(100),
    Location VARCHAR(100),
    LastUpdate DATETIME2(6)
);

CREATE TABLE TimeDimension (
    TimeID INT,
    Date DATE,
    Year INT,
    Month VARCHAR(20),
    Quarter VARCHAR(20),
    LastUpdate DATETIME2(6)
);

-- Create Fact Table with CreatedAt column
CREATE TABLE SalesFact (
    SaleID INT,
    ProductID INT,
    CustomerID INT,
    StoreID INT,
    TimeID INT,
    SalesAmount DECIMAL(10, 2),
    Quantity INT,
    LastUpdate DATETIME2(6)
);

-- Populate Dimension Tables with Dummy Data
INSERT INTO ProductDimension (ProductID, ProductName, Category, Price, LastUpdate)
VALUES 
    (1, 'Laptop', 'Electronics', 1200.00, GETDATE()),
    (2, 'Phone', 'Electronics', 800.00, GETDATE()),
    (3, 'Tablet', 'Electronics', 600.00, GETDATE());

INSERT INTO CustomerDimension (CustomerID, CustomerName, Email, City, LastUpdate)
VALUES 
    (1, 'Alice Smith', 'alice@example.com', 'New York', GETDATE()),
    (2, 'Bob Johnson', 'bob@example.com', 'Los Angeles', GETDATE()),
    (3, 'Charlie Davis', 'charlie@example.com', 'Chicago', GETDATE());

INSERT INTO StoreDimension (StoreID, StoreName, Location, LastUpdate)
VALUES 
    (1, 'Tech Store NY', 'New York', GETDATE()),
    (2, 'Tech Store LA', 'Los Angeles', GETDATE()),
    (3, 'Tech Store CH', 'Chicago', GETDATE());

INSERT INTO TimeDimension (TimeID, Date, Year, Month, Quarter, LastUpdate)
VALUES 
    (1, '2024-01-01', 2024, 'January', 'Q1', GETDATE()),
    (2, '2024-02-01', 2024, 'February', 'Q1', GETDATE()),
    (3, '2024-03-01', 2024, 'March', 'Q1', GETDATE());

-- Populate Fact Table with Dummy Data
INSERT INTO SalesFact (SaleID, ProductID, CustomerID, StoreID, TimeID, SalesAmount, Quantity, LastUpdate)
VALUES 
    (1, 1, 1, 1, 1, 1200.00, 1, GETDATE()),
    (2, 2, 2, 2, 2, 1600.00, 2, GETDATE()),
    (3, 3, 3, 3, 3, 1800.00, 3, GETDATE());

 

 

 

2. Configure a custom direct lake semantic model

frithjof_v_0-1732354912813.png

 

3. Include a DAX measure in the semantic model. This DAX measure displays the current time when rendering the report:

 

__Time Now = NOW()

 

 

 

4. Create Power BI report

frithjof_v_1-1732355022725.png

 

 

5. Disable automatic updates in the semantic model's settings

frithjof_v_2-1732355093709.png

 

 

6. TRUNCATE and INSERT new data in the ProductDimension table

 

-- Truncate the ProductDimension table
TRUNCATE TABLE ProductDimension;

-- Insert new data into ProductDimension table
INSERT INTO ProductDimension (ProductID, ProductName, Category, Price, LastUpdate)
VALUES 
    (1, 'Gaming Laptop', 'Electronics', 1500.00, GETDATE()),
    (2, 'Smartphone', 'Electronics', 950.00, GETDATE()),
    (3, 'E-Reader', 'Electronics', 250.00, GETDATE()),
    (4, 'Smartwatch', 'Electronics', 400.00, GETDATE()),
    (5, 'Wireless Earbuds', 'Accessories', 150.00, GETDATE());

 

 

 

7. Verify data has been updated in ProductDimension table in the Warehouse

frithjof_v_3-1732355209370.png

 

8. Verify that Power BI report is still pointing to the previous version (previous state) of the Delta Table. We can see that the report is not displaying the new ProductDimension data, but the previous version - as expected.

 

frithjof_v_0-1732361958750.png

Click the Refresh visuals button in the report, to make sure you re-render the report visuals. 

 

 

frithjof_v_4-1732355313840.png

 

 

9. Manually refresh the direct lake semantic model, so that it will be reframed to point to the most recent version of the Delta Table.

frithjof_v_5-1732355578860.png

(There is a 1-hour offset between UTC time and CET time, that's the reason why the time looks 1 hour different in the Refresh history and the other images).

 

10. Verify that the Power BI report now shows the current version of the Delta Table, after refreshing (reframing) the direct lake semantic model - as expected.

frithjof_v_6-1732355730737.png

 

Summary

The results are as expected, ref. the docs:

Direct Lake overview - Microsoft Fabric | Microsoft Learn

1 ACCEPTED SOLUTION

Thanks, I asked for access now 🙂

View solution in original post

5 REPLIES 5
v-shex-msft
Community Support
Community Support

Hi @frithjof_v ,

Thanks for your sharing.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
lbendlin
Super User
Super User

This should be a blog entry? The content is too valuable to be washed away in the forum.

Thanks!

AndyDDC
Most Valuable Professional
Most Valuable Professional

Are you able to post blogs (or ask for access) in the new community blogs section?

Fabric community blogs - Microsoft Fabric Community

Thanks, I asked for access now 🙂

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Solution Authors
Top Kudoed Authors