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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Ozzyabusinni
New Member

Need help to track changes in Future Orders fall down

Hi everyone,

 

I have a Power BI report connected to SQL, and I’m looking to track changes in one of the live tables.

The Order table contains future orders, and I want to monitor the Fall Down percentage.

Is there a way to create a static table  with a daily timestamp to count the number of orders per Customer for the current month for each day? 

 

Appreciate the help!

1 ACCEPTED SOLUTION
ahadkarimi
Solution Specialist
Solution Specialist

Hi @Ozzyabusinni, give this a try, and if you encounter any issues, let me know.


Create a Date Table: Ensure a Date table exists for the current month.

Capture Daily Snapshot: Use a SQL job or Power Automate to insert daily order counts into a new SQL table with a timestamp.

 

Create Static Table in SQL:

 

CREATE TABLE OrderSnapshot (
    SnapshotDate DATE,
    CustomerID INT,
    OrderCount INT
);

 

Insert daily counts:

 

INSERT INTO OrderSnapshot (SnapshotDate, CustomerID, OrderCount)
SELECT GETDATE(), CustomerID, COUNT(OrderID)
FROM Orders
WHERE OrderDate >= DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()), 0)
GROUP BY CustomerID;

 

Calculate Fall Down Percentage in Power BI:

 

FallDownPercentage = 
VAR PreviousDayOrderCount = 
    CALCULATE(SUM(OrderSnapshot[OrderCount]), 
    FILTER(OrderSnapshot, OrderSnapshot[SnapshotDate] = TODAY()-1))

VAR CurrentDayOrderCount = 
    SUM(OrderSnapshot[OrderCount])

RETURN 
    IF(PreviousDayOrderCount > 0,
        DIVIDE(CurrentDayOrderCount - PreviousDayOrderCount, PreviousDayOrderCount, 0),
        0
    )

 


 

Did I answer your question?  If so, please mark my post as the solution!✔️
Your Kudos are much appreciated!  Proud to be a Responsive Resident!

View solution in original post

1 REPLY 1
ahadkarimi
Solution Specialist
Solution Specialist

Hi @Ozzyabusinni, give this a try, and if you encounter any issues, let me know.


Create a Date Table: Ensure a Date table exists for the current month.

Capture Daily Snapshot: Use a SQL job or Power Automate to insert daily order counts into a new SQL table with a timestamp.

 

Create Static Table in SQL:

 

CREATE TABLE OrderSnapshot (
    SnapshotDate DATE,
    CustomerID INT,
    OrderCount INT
);

 

Insert daily counts:

 

INSERT INTO OrderSnapshot (SnapshotDate, CustomerID, OrderCount)
SELECT GETDATE(), CustomerID, COUNT(OrderID)
FROM Orders
WHERE OrderDate >= DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()), 0)
GROUP BY CustomerID;

 

Calculate Fall Down Percentage in Power BI:

 

FallDownPercentage = 
VAR PreviousDayOrderCount = 
    CALCULATE(SUM(OrderSnapshot[OrderCount]), 
    FILTER(OrderSnapshot, OrderSnapshot[SnapshotDate] = TODAY()-1))

VAR CurrentDayOrderCount = 
    SUM(OrderSnapshot[OrderCount])

RETURN 
    IF(PreviousDayOrderCount > 0,
        DIVIDE(CurrentDayOrderCount - PreviousDayOrderCount, PreviousDayOrderCount, 0),
        0
    )

 


 

Did I answer your question?  If so, please mark my post as the solution!✔️
Your Kudos are much appreciated!  Proud to be a Responsive Resident!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.