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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
fengwufangzhu
Frequent Visitor

Summarize Running Total or YTD

Hi All,

I am stuck for a while on this and also tried to google around.

I have a set of raw revenue data by site and by month. I need to get the cumulative running total and bring it to another table using summarize function (in order to union with other scorecard metrics for some other purpose).

SiteMonthRevenue
AJan 2410
AFeb 2430
BJan 245
BFeb 242

Yes I can calculate cumulative running total using either quick measure or YTD function, it is working fine on original table. However once I summarize and bring to another table, the cumulative is not working and only showing monthly data.

What I need: A new summarised table with cumulative revenue

SiteMonthYTD Revenue
AJan 2410
AFeb 2440
BJan 245
BFeb 247
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,@fengwufangzhu 

Regarding the issue you raised, my solution is as follows:

1.First I have created the following table and the column names and data are the data you have given:

vlinyulumsft_0-1717384362414.png

2. Below are the Calculated Columns I've created for your needs:

YTD Revenue = SUMX(FILTER(ALLSELECTED('Table'),'Table'[Site]=EARLIER('Table'[Site])&&'Table'[Month]<=EARLIER('Table'[Month])),'Table'[Revenue])

3.If you want the visualization objects in the other table to display correctly as well, I hope you can check that the relationship between your two tables meets your requirements, in my example I have created an index column and related the two tables with this.

vlinyulumsft_1-1717384401521.png

vlinyulumsft_2-1717384411069.png

4.Here's my final result, which I hope meets your requirements.

vlinyulumsft_3-1717384428324.png

Can you share sample data and sample output in tabular format if I am misunderstanding? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Please find the attached pbix relevant to the case.

Best Regards,

Leroy Lu

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi,@fengwufangzhu 

Regarding the issue you raised, my solution is as follows:

1.First I have created the following table and the column names and data are the data you have given:

vlinyulumsft_0-1717384362414.png

2. Below are the Calculated Columns I've created for your needs:

YTD Revenue = SUMX(FILTER(ALLSELECTED('Table'),'Table'[Site]=EARLIER('Table'[Site])&&'Table'[Month]<=EARLIER('Table'[Month])),'Table'[Revenue])

3.If you want the visualization objects in the other table to display correctly as well, I hope you can check that the relationship between your two tables meets your requirements, in my example I have created an index column and related the two tables with this.

vlinyulumsft_1-1717384401521.png

vlinyulumsft_2-1717384411069.png

4.Here's my final result, which I hope meets your requirements.

vlinyulumsft_3-1717384428324.png

Can you share sample data and sample output in tabular format if I am misunderstanding? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Please find the attached pbix relevant to the case.

Best Regards,

Leroy Lu

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

Thank you very much. Creating a new column using SUMX and Earlier did the magic. I then use SUMMARIZE that brings cumulative number into new table.

Relationship not required for my context as I need a totally independent new table.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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