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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Callmeadel
New Member

RunningTotal to stop at max Date

Good afternoon,

 

I was just wondering what can of dax formula can I use to show the max date of my line

the orange line is Actual transaction amount and blue line is the Estimated amount problem is I dont want the orange line to keep going the max date should be may. 

 

Thank you!

Callmeadel_0-1653342161550.png

 

2 ACCEPTED SOLUTIONS
daXtreme
Solution Sage
Solution Sage

Here it is how to do what you want.

 

Navigate to this page:

Standard time-related calculations – DAX Patterns

and then to this header:

Controlling the visualization in future dates

 

This shows exactly how to deal with such issues.

View solution in original post

v-zhangti
Community Support
Community Support

Hi, @Callmeadel 

 

You can try the following methods.

Measure:

RunningTotal =
IF (
    MONTH ( SELECTEDVALUE ( 'Table'[Date] ) ) <= MONTH ( TODAY () ),
    CALCULATE (
        SUM ( 'Table'[Actual transaction] ),
        FILTER ( ALL ( 'Table' ), [Date] <= SELECTEDVALUE ( 'Table'[Date] ) )
    ),
    BLANK ()
)

vzhangti_0-1653543605757.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more.

View solution in original post

5 REPLIES 5
v-zhangti
Community Support
Community Support

Hi, @Callmeadel 

 

You can try the following methods.

Measure:

RunningTotal =
IF (
    MONTH ( SELECTEDVALUE ( 'Table'[Date] ) ) <= MONTH ( TODAY () ),
    CALCULATE (
        SUM ( 'Table'[Actual transaction] ),
        FILTER ( ALL ( 'Table' ), [Date] <= SELECTEDVALUE ( 'Table'[Date] ) )
    ),
    BLANK ()
)

vzhangti_0-1653543605757.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more.

Thank you zhangti, I will test your method out

 

This is a method I used and worked great

 
ActivateDates =
var maxActiveDates= MAX('TR-Combined'[Date])
var minactivedates= MIN('TR-Combined'[Date])
return
SWITCH(
true(),
DateCombined[Date]>= minactivedates&&
DateCombined[Date]<=maxActiveDates,1,0)
 
 
Cumulative Transcaction =
SWITCH(
true(),
Max(DateCombined[ActivateDates])=1
CALCULATE(
sum('TR-Combined'[Spent]),
all(DateCombined[Date]),
DateCombined[Date]<=MAX(DateCombined[Date])))
daXtreme
Solution Sage
Solution Sage

Here it is how to do what you want.

 

Navigate to this page:

Standard time-related calculations – DAX Patterns

and then to this header:

Controlling the visualization in future dates

 

This shows exactly how to deal with such issues.

Thank you for the reply, I have created that measure it did say we can't use it on the report so how can it be used to fitler the graph? Do I drag it to filters because it won't let me add it to values.

They wanted me to use it in a column and then use a slicer that makes sense, but my table doesnt have any data after may so everything is returning True which still keeps the line 😞

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.