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

How to calculate total to date per row of a table?

Hi,

 

Please can you help me calculate the total to date per row of a table? My data looks like this:

 

  • Activity ID is the activity that generates cost.
  • Date is the date at which that cost was generated. For Dates that are before the date in Data Date the cost has been realised. For Dates that are after Data Date the cost is a forecast.
  • Actual value is the cost for that activity which occured at the date in Date
  • Date date is the date the report was generated.

 

I want to know, for each Activity ID, what is the total sum of Actual Value for each instance where Date is before Data Date

 

MishelHoff_1-1700217533071.png

 

I have created the following measure which is not working:

Actuals to Date = CALCULATE(
    SUM('Actuals Data'[Actual Value]),
    FILTER(
        ALL('Actuals Data'), 'Actuals Data'[Date] <= MAX('Actuals Data'[Data Date])))
 
Thank you!

 

 

 

2 REPLIES 2
Anonymous
Not applicable

Hi @Ritaf1983 

 

Thank you so much for responding to me. I think I have solved this particular issued but I really apppreciate you taking the time to respond and for elaborating on how I could make my post more useful. I'm sure I will continue to need help in the future so I will make sure to include the details you suggested when I next post a questions. Many thanks

Ritaf1983
Super User
Super User

Hi @Anonymous 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 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.

Top Solution Authors