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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
cspande
Frequent Visitor

Historical and Current Cumulative Open Work Order Value

I'm looking to write a measure to sum work order values based on when they were open in any given day while also providing the current total open work order value. The work order table has a create_date and a closed_date. My date table and work order table are in a relationship via create_date. 

I believe I am correctly calculating the historical open work order value with the following measure:

VAR CurrentMonthStart = MIN('Date'[Date])
VAR CurrentMonthEnd = MAX('Date'[Date])
VAR HistoricalWIP = 
    CALCULATE(
        SUM(APPEND_WORK_ORDER[TOTAL_ACTUAL_COST]),
        APPEND_WORK_ORDER[CREATE_DATE] <= CurrentMonthEnd &&
        (ISBLANK(APPEND_WORK_ORDER[TRENDING_DATE]) || APPEND_WORK_ORDER[TRENDING_DATE] >= CurrentMonthStart))
RETURN
HisotricalWIP

I've been struggling with how to represent the cumulative current open work order value on todays date.


Historical Values:
image.png

 

Current Open Work Order Value:

image.png

 

Ideally, the Jan 2025 monthly value would equal the scorecard above. Is this possible? Each day will have new open work orders as we continuous release work to the production facilities.

 

Thanks,
Craig

1 ACCEPTED SOLUTION

I'm getting slightly diffferent results

 

lbendlin_0-1738626963058.png

 

View solution in original post

7 REPLIES 7
cspande
Frequent Visitor

Here is sample data of work order values by create date and close date:

create_dateclose_datetotal_actual_cost 
1/8/20241/29/202423 
1/14/20242/17/202443 
1/20/20243/7/202442 
1/26/20243/26/20247 
2/1/20244/14/202483 
2/7/20242/10/202413 
2/13/20245/22/202465 
2/19/20246/10/202453 
2/25/20246/29/202454 
3/2/20247/18/202456 
3/8/20248/6/202494 
3/14/20248/25/202413 
3/15/2024 70 
4/1/202410/21/20242 
4/7/202411/9/202475 
5/1/20246/17/202472 
5/31/20249/30/20245 
6/18/202412/2/202447 
6/24/202412/23/202459 
7/6/20247/10/202437 
8/5/20241/8/202453 
9/4/202412/2/20242 
9/28/202412/6/202469 
10/4/202412/7/202457 
10/28/202412/11/202480 
11/3/202412/12/202441 
11/9/202412/13/20249 
11/15/2024 58 
11/21/2024 96 
11/27/2024 62 
12/3/2024 74 
12/9/2024 91 
12/15/2024 29 
12/21/2024 49 
12/27/2024 51 
1/15/2025 56 
1/27/2025 58 
2/1/20252/3/202561 

 

Here is my expected result:

DateOpen Value

Month-Year

1/31/202492.00Jan-24
2/29/2024304.00Feb-24
3/31/2024488.00Mar-24
4/30/2024482.00Apr-24
5/31/2024494.00May-24
6/30/2024421.00Jun-24
7/31/2024365.00Jul-24
8/31/2024311.00Aug-24
9/30/2024382.00Sept-24
10/31/2024512.00Oct-24
11/30/2024703.00Nov-24
12/31/2024633.00Dec-24
1/31/2025694.00Jan-25
2/3/2025755.00Feb-25

I'm getting slightly diffferent results

 

lbendlin_0-1738626963058.png

 

You are correct in the calculation. My addition was incorrect when I manually entered the data. Thank you!

Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly.

I tried to create a sample pbix file like below, and please check the below picture and the attached pbix file.

 

Jihwan_Kim_1-1737865480596.png

 

 

Jihwan_Kim_0-1737865465695.png

 

Jihwan_Kim_2-1737865602201.png

 

Cost by creat date: = 
SUM(append_work_order[total_actual_cost])

 

Cost: = 
VAR _start =
    MIN ( 'calendar'[Date] )
VAR _end =
    MAX ( 'calendar'[Date] )
VAR _t =
    FILTER (
        ALL ( append_work_order ),
        _end >= append_work_order[create_date]
            && OR (
                _start <= append_work_order[trending_date],
                ISBLANK ( append_work_order[trending_date] )
            )
    )
RETURN
    SUMX ( _t, append_work_order[total_actual_cost] )

 

WINDOW function (DAX) - DAX | Microsoft Learn

 

Cost cumulative: = 
VAR _window =
    WINDOW (
        1,
        ABS,
        0,
        REL,
        ALL ( 'calendar'[Month-Year], 'calendar'[Month-Year sort] ),
        ORDERBY ( 'calendar'[Month-Year sort], ASC )
    )
RETURN
    CALCULATE ( [Cost:], _window )

 

 


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.
Anonymous
Not applicable

Hi @cspande 

Did the solutions @Jihwan_Kim   offered help you solve the problem, if it helps, you can consider to accept it as a solution so that more user can refer to.

 

Best Regards!

Yolo Zhu

This did not work as a solution for me.

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.