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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rjausma
Helper I
Helper I

How to get a running total of Monthly numbers produced in a Matrix

 

Hi All,

I've run into an issue trying to get a running total of Savings/Projected Savings based on the renewal dates of a contract. 

If figured out how to display the monthly savings (over 4 years) in a Maxtrix using:

"Forecasted Monthly Savings = CALCULATE(
    DIVIDE('Maintenance Contracts'[Determine Savings Actual/Projected],12,0),
    DATESINPERIOD('Date Lookup'[Date],Max('Date Lookup'[Date]),-4,YEAR)
    )"
Matrix Image.png
 
 
 
 
 
 
 
 
 
 
What I need is to get a running total of the Monthly values displayed in the Matrix. 
 
Thanks in advanced
 
1 ACCEPTED SOLUTION
rjausma
Helper I
Helper I

Found the answer after several searches on StackOverFlow.com

CALCULATE(
    SUMX(VALUES('Date Lookup'[Month]),[Forecasted Monthly Savings]),
    FILTER(ALL('Date Lookup'),
    'Date Lookup'[Date] <= MAX('Date Lookup'[Date])
    &&
    'Date Lookup'[Year] = MAX('Date Lookup'[Year])
    )
)
 
This added up the monthly values

View solution in original post

2 REPLIES 2
rjausma
Helper I
Helper I

Found the answer after several searches on StackOverFlow.com

CALCULATE(
    SUMX(VALUES('Date Lookup'[Month]),[Forecasted Monthly Savings]),
    FILTER(ALL('Date Lookup'),
    'Date Lookup'[Date] <= MAX('Date Lookup'[Date])
    &&
    'Date Lookup'[Year] = MAX('Date Lookup'[Year])
    )
)
 
This added up the monthly values
v-chuncz-msft
Community Support
Community Support

@rjausma 

 

You may research the code generated by Quick measure Running total.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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