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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Eckhardt_david
Frequent Visitor

Calculate cumulative backlog for previous period

Hello,

 

I have to create a report which shows the number of planned + the number of shipped orders.
I have this data available in the dataset, but the problem I am encountering is that the planned orders must consist of (planned orders + not shipped orders previous day).

I assume some form of time intelligence is needed to calculate this, but I can't figure it out. 

My idea is that on each ship date the balance of planned minus shipped over the previous period should be looked at and this "backlog" value should be added to the planned orders.

 

I've taken a small sample of my data for the purpose of this request. It doesn't show here but there's already an cumulative backlog of 104 orders prior to 4/09/2023.

 

sample.PNG

Used tables and fields:

'Outbound_Performance'[Orders_Planned]
'Outbound_Performance'[Orders_Shipped]
'Calendar'[Date]

 

So the desired result would be to calculate the 'Orders_Planned + Backlog column.

 

Ship_DateOrders_PlannedOrders_Planned + BacklogOrders_Shipped
11/09/202358042
8/09/20231813863
7/09/20233017353
6/09/20233716320
5/09/2023331326
4/09/20232512930
pre 4/9/2023 104 

 

Any help with this much appreciated!

1 ACCEPTED SOLUTION
ERD
Super User
Super User

Hi @Eckhardt_david , you can try this measure:

 

Orders_Planned+Backlog =
VAR dt = SELECTEDVALUE ( Outbound_Performance[Ship_Date] )
VAR planned =
    CALCULATE (
        SUM ( Outbound_Performance[Orders_Planned] ),
        Outbound_Performance[Ship_Date] <= dt
    )
VAR shipped =
    CALCULATE (
        SUM ( Outbound_Performance[Orders_Shipped] ),
        Outbound_Performance[Ship_Date] < dt
    )
RETURN
    planned - shipped

 

ERD_1-1694591078239.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

View solution in original post

2 REPLIES 2
ERD
Super User
Super User

Hi @Eckhardt_david , you can try this measure:

 

Orders_Planned+Backlog =
VAR dt = SELECTEDVALUE ( Outbound_Performance[Ship_Date] )
VAR planned =
    CALCULATE (
        SUM ( Outbound_Performance[Orders_Planned] ),
        Outbound_Performance[Ship_Date] <= dt
    )
VAR shipped =
    CALCULATE (
        SUM ( Outbound_Performance[Orders_Shipped] ),
        Outbound_Performance[Ship_Date] < dt
    )
RETURN
    planned - shipped

 

ERD_1-1694591078239.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

worked perfectly, thanks!

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.