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

Cumulative Value not stopping at last refreshed time

Hi Members,

 

I am facing some challenge in my Power BI Report as I have created one Dax to aggregate the running jobs on the bases of time and it should stop at last refreshed time however it is not stopping at that point.

 

Here is the DAX that I have created for the same :

 

Finished Today running total in Rounded Time 2 =
CALCULATE(
[Finished Today],
FILTER(
ALL('Query1'[Rounded Time]),
ISONORAFTER('Query1'[Rounded Time], MAX('Query1'[Rounded Time]), DESC)
)
)

 

This is the visual that I am geeting.

 

Jack_Karim_0-1697013224616.png

Please suggest some steps to resolve the same, It will be really helpful.

 

Thankyou in advance.

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @Anonymous,

Did you mean the refresh time is not a static value and it dynamic change based on the current datetime? If that is the case, you can use the current date value to get the previous date, then use this defined date range to calculation rolling results.

Finished Today running total in Rounded Time 3 =
VAR currDate =
    MAX ( 'Query1'[Rounded Time] )
RETURN
    CALCULATE (
        [Finished Today],
        FILTER (
            ALLSELECTED ( 'Query1' ),
            'Query1'[Rounded Time] >= currDate - 7
                && 'Query1'[Rounded Time] <= currDate
        )
    )

Regards,

Xiaoxin Sheng

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

HI @Anonymous,

I found you are used the ALL function in the expression, they may affect the aggregate function usage and get the last date instead of the current row context. I'd like to suggest you try to use the following measure formulas if helps:

Finished Today running total in Rounded Time 2 =
CALCULATE (
    [Finished Today],
    FILTER (
        ALLSELECTED ( 'Query1' ),
        'Query1'[Rounded Time] <= MAX ( 'Query1'[Rounded Time] )
    ),
    VALUES ( 'Query1'[Rounded Time] )
)

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Thank you Sheng for your time and suggestion.

 

I used the same measure that you suggested, It is not aggregating the value time wise.

Sharing the image below for your refrence.

Rounded 3 column 

Jack_Karim_0-1697168427907.png

This suggested measure I used:

Finished Today running total in Rounded Time 3 =
CALCULATE (
[Finished Today],
FILTER (
ALLSELECTED ( 'Query1' ),
'Query1'[Rounded Time] <= MAX ( 'Query1'[Rounded Time] )
),
VALUES ( 'Query1'[Rounded Time] )
)

 

I am trying to get values adding to my report each time when it get finished and should stop at last refreshed time.

As I am comparing my todays jobs with average of last 7 days jobs that time the sum of my todays jobs is contionously showing till last. 

 

Please suggest I am can any more changes in suggested measure.

Anonymous
Not applicable

HI @Anonymous,

Did you mean the refresh time is not a static value and it dynamic change based on the current datetime? If that is the case, you can use the current date value to get the previous date, then use this defined date range to calculation rolling results.

Finished Today running total in Rounded Time 3 =
VAR currDate =
    MAX ( 'Query1'[Rounded Time] )
RETURN
    CALCULATE (
        [Finished Today],
        FILTER (
            ALLSELECTED ( 'Query1' ),
            'Query1'[Rounded Time] >= currDate - 7
                && 'Query1'[Rounded Time] <= currDate
        )
    )

Regards,

Xiaoxin Sheng

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.