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

Creating cumulative (running) total for active contracts

Hi, I'm relatively new to DAX so any help would be appreciated. 

 

I have a contracts table with MRR, ContractedStartDate and ContractedEndDate. 

I need to create a table that would show a running total MRR of all contracts that are active during any given period of time. I also have a calendar table by which i would filter the date on the report. 

This is my approach:

 

Running total =
CALCULATE(
         SUM(Contracts[MRR]),
         FILTER(ALLSELECTED(Contracts),
          Contracts[ContractedStartDate] <=MAX(Contracts[ContractedStartDate])))
 
i think the last line is where im going wrong. im slightly confused how i should be filtering the date and whether i should be using the calendar table instead?
 
Thanks 
1 ACCEPTED SOLUTION
1 REPLY 1

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.