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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Dayna
Helper V
Helper V

Sum of Last Value Rows

Hello,

 

I have a measure that is calculating the sum of annual volume by the last stage in the process:

Annual Volume (Latest) = 
CALCULATE(sum(Products[AnnualVolume]), FILTER(Processes, Processes[Ordering] = MAX(Processes[Ordering])))

 

I'm getting the last record based on the index column on the 'processes' table for the order in which the processes go through.

 

This is working fine, so example data looks like this:

Dayna_0-1665150500655.png

 

Now, I want the grand total of the processes, so for the above I'd expect a value of 120898123. I'm then going to group this by customer, item, etc etc etc.

 

Can someone help how I achieve this? I expect another measure, if you could advise it would really be appreciated.

 

Many thanks,

Dayna

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@Dayna,

 

Try this measure:

 

Annual Volume Total (Latest) =
SUMX ( VALUES ( Processes[Name] ), [Annual Volume (Latest)] )

 

The column in VALUES should be the column in your visual. If you need to add multiple columns to your visual, use SUMMARIZE (instead of VALUES) to create unique combinations of the columns in your visual.

 

I recommend using a column filter instead of a table filter in your original measure. In many cases they return the same result, but it's safer to filter only what you need:

 

Annual Volume (Latest) =
CALCULATE (
    SUM ( Products[AnnualVolume] ),
    Processes[Ordering] = MAX ( Processes[Ordering] )
)

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
Dayna
Helper V
Helper V

Thank you @DataInsights !

DataInsights
Super User
Super User

@Dayna,

 

Try this measure:

 

Annual Volume Total (Latest) =
SUMX ( VALUES ( Processes[Name] ), [Annual Volume (Latest)] )

 

The column in VALUES should be the column in your visual. If you need to add multiple columns to your visual, use SUMMARIZE (instead of VALUES) to create unique combinations of the columns in your visual.

 

I recommend using a column filter instead of a table filter in your original measure. In many cases they return the same result, but it's safer to filter only what you need:

 

Annual Volume (Latest) =
CALCULATE (
    SUM ( Products[AnnualVolume] ),
    Processes[Ordering] = MAX ( Processes[Ordering] )
)

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.