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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
IC95
New Member

Running Total Measure

Hi, 

 

I hope someone can help me.

IC95_0-1733844006183.png

I have the Total Hours Efficiency Workcentre ( data I have)

 

I then have a measure with the Average Demonstrated Capacity(Last 3 Months)

 
Average Demonstrated Capacity (Last 3 Months) =
VAR LastMonth = EOMONTH(TODAY(), -1)  -- Get the end of last month
VAR ThreeMonthsBack = EOMONTH(LastMonth, -3) + 1  -- Get the start of three months back
VAR FilteredDates =
    DATESBETWEEN(
        DIM_Date[theDate],
        ThreeMonthsBack,
        LastMonth
    )  -- Filter dates from three months back to the end of last month
RETURN
    AVERAGEX(
        FilteredDates,
        [Demonstrated Capacity]  -- Replace with your measure or column
    )

 

 

The Past Dues is another measure which is basically the Total Hours Efficiency - Average Demonstrated Capacity(Last 3 Months)

 

Past Dues =
VAR PreviousOutput =
    [Average Demonstrated Capacity (Last 3 Months)]
VAR CurrentWorkload = [Total Hours Efficiency Workcentre]
RETURN
   IF( [Total Hours Efficiency Workcentre] = BLANK(), 0,  CurrentWorkload - PreviousOutput)
 
 
I have tried doing the cumulative of the past dues to give me the result I want, but it is not working.
Past Dues running total in theDate =
CALCULATE(
    [Past Dues],
    FILTER(
        ALLSELECTED('DIM_Date'[theDate]),
        ISONORAFTER('DIM_Date'[theDate], MAX('DIM_Date'[theDate]), DESC)
    )
)
 
 
 
IColumn G is the result I need, using an equation like the Column H but in PowerBi
IC95_1-1733844390054.png

 

 

Thank you in advance.

 

3 REPLIES 3
Anonymous
Not applicable

Hi @IC95 ,

 

Please try this:

Carry Over PastDues =
SUMX (
    FILTER (
        ALL ( 'DIM_Date' ),
        'DIM_Date'[theDate] <= MAX ( 'DIM_Date'[theDate] )
    ),
    [Past Dues]
)

Posting the question to a relevant forum can greatly increase the probability of getting it resolved.

DAX Commands and Tips - Microsoft Fabric Community

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Omid_Motamedise
Super User
Super User

use this

Past Dues Running Total =
CALCULATE(
[Past Dues],
FILTER(
ALL('DIM_Date'),
'DIM_Date'[theDate] <= MAX('DIM_Date'[theDate])
)
)


If my answer helped solve your issue, please consider marking it as the accepted solution.
dufoq3
Community Champion
Community Champion

You are in PowerQuery section...


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors