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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
RG010
Frequent Visitor

Dynamic Measure

Hello All,

I am trying to create a measure in DAX which will give me a progression of backlog by day, week, month and year. Please refer to sample data which mimics my production data. I have 4 columns - Order number, order value, requested date and actual delivery date. An order is considered backlogged if its actual delivery date is not before or equal to requested date. For eg, if the requested date was Aug 12 and Actual del date was Sept 12 or blank (meaning not yet delivered)- The order value will not be counted as backlog until Aug 12. However, it should start to appear as backlog starting Aug 13 until its actual del date. If the requested del date is greater than today, it will not be counted as backlog. 

 

I am looking to get an output as a table with 2 columns - Column 1 will be dates from Jan 1 to Dec 31 (or until today's date) and Column 2 will be Backlog amount for each day depending on the logic described above. 

 

 

Order #Order USDReq Del DateActual Del Date
99110050010/28/202210/30/2022
99110110009/21/20229/30/2022
9911022008/21/20229/15/2022
9911033005/12/20227/12/2022
99110480010/12/202211/5/2022
9911055307/5/20227/4/2022
9911065204/12/20224/16/2022
9911075105/11/20227/11/2022
99110850010/5/202210/4/2022
99110949010/5/202211/5/2022
9911104801/2/20222/21/2022
99111147012/20/2022 
9911124604/10/20224/22/2022
99111345011/4/202211/2/2022
9911144409/2/20229/27/2022
9911154301/21/20226/20/2022
9911164203/7/20227/7/2022
99111741011/5/2022 
99111840012/3/2022 
9911193909/12/202210/22/2022
9911203808/23/20229/21/2022
2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

Jihwan_Kim_1-1667280214418.png

 

 

Jihwan_Kim_0-1667280171410.png

 

 

Backlog amount(USD) measure: = 
CALCULATE (
    SUM ( Data[Order USD] ),
    FILTER (
        Data,
        Data[Req Del Date] < MAX ( 'Calendar'[Date] )
            && OR (
                Data[Actual Del Date] > MIN ( 'Calendar'[Date] ),
                Data[Actual Del Date] = BLANK ()
            )
    )
)

 

Backlog ordercount measure: = 
CALCULATE (
    COUNTROWS( Data ),
    FILTER (
        Data,
        Data[Req Del Date] < MAX ( 'Calendar'[Date] )
            && OR (
                Data[Actual Del Date] > MIN ( 'Calendar'[Date] ),
                Data[Actual Del Date] = BLANK ()
            )
    )
)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Thanks @Jihwan_Kim . This solution works best if both requested date and actual dates are in the same table. However, my actual data is structured in 3 different tables - first table has Order number and Value, sencond has order number and Requested date and Third has order number and Actual date. All theree and connected using order number field. In this scenario the filter does not seem to work. Any suggestions to overcome this? Also, is it possible to do this without involving an external calendar table?

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors