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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
IC95
New Member

Running Total Not Working

Hi, 

 

I hope someone can help me.

IC95_0-1733846897631.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-1733846897871.png

 

 

 

Thank you in advance.

 

3 REPLIES 3
vivek31
Resolver II
Resolver II

HI @IC95 ,

 

you can try this measure to create running total

running total = CALCULATE(SUM(Sales[SalesAmount]),
                          FILTER(ALL('Calendar'),
                          'Calendar'[DateKey] <= MAX('Calendar'[DateKey])))

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.

Anonymous
Not applicable

Hi @IC95 ,

 

You can try the following expression. 

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


If this doesn't help.  Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

 

 

Best Regards,

Clara Gong

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.

Greg_Deckler
Community Champion
Community Champion

@IC95 Try: https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Better-Running-Total/m-p/2755666#M8...



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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