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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Running Total

I have Measure Created for Total Saving and I would like to show the running total of Total Saving 

 

Total Saving in:

Jan 

Jan + Feb

Jan + Feb Mar and so on 

 

I have used the mentioned below 

 

running total measure = CALCULATE(SUM(Table1[Sales]),
                                           FILTER(ALL(Table1),
                                               'Table1'[Date] <= MAX('Table1'[Date])
                                               &&
                                                   YEAR('Table1'[Date]) = YEAR(MAX('Table1'[Date]))))

 

running total.PNG

 
5 REPLIES 5
v-xicai
Community Support
Community Support

Hi  @Anonymous  ,

 

Does that make sense? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.

 

Best regards

Amy

Tahreem24
Super User
Super User

@Anonymous ,

Please try a below measure:

Running total =
CALCULATE(SUM(Sheet1[Sales]),FILTER(ALL(Sheet1),Sheet1[Date] <=MAX(Sheet1[Date]) && MONTH(Sheet1[Date])<=MONTH(MAX(Sheet1[Date]))))
I replicated on my data and got the result.
 
Capture.PNG
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You may change the formula like DAX below.

 

running total measure =
CALCULATE (
    SUM ( Table1[Sales] ),
    FILTER (
        ALLSELECTED ( Table1 ),
        YEAR ( 'Table1'[Date] ) = YEAR ( MAX ( 'Table1'[Date] ) )
            && MONTH ( 'Table1'[Date] ) <= MONTH ( MAX ( 'Table1'[Date] ) )
    )
)

 

Best Regards,

Amy 

 

Community Support Team _ Amy

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

Ashish_Mathur
Super User
Super User

Hi,

Try these measures

Sales = SUM(Table1[Sales])

Sales YTD  = calculate([Sales],datesytd('Date'[Date]))

To your visual, drag the Month Name from the Date Table.  Select a Year in the slicer.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
nandic
Memorable Member
Memorable Member

Hi @Anonymous ,
Did you try using function TotalYTD?

Screenshot below displays 3 columns in list: YearMonth, Sales, Running Total. You can see that each year it reset, starts from beginning of the year until the end of year.
In order to use it, you should mark you date table as date table.

ytd.PNG

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.