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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Get SUM of Maximum values by customer

Hi All,

 

I have an excel file with 3 columns: "Month", "Name" and "Quantity" as you can see below.

KLED_0-1637243470703.png

 

I've created a first measure to have the max value for each customer by month:

 

Max by customer = CALCULATE(MAX(Feuil1[Quantity]))

 

 

 Below is the result for the month "11":

KLED_1-1637243627636.png

 

That's great, but when I went a level up and displayed the values by month, I got the result below:

KLED_2-1637243720063.png

 

For the month 11 I got the maximun value 250.00 but what I need is to the the SUM of each max value for each customer, which will be : 250.00 + 172.40 + 120.80 + 110.20 + 78.10 + 25.60 = 757.10

 

How I can fix fix it ? and modify my measure to get the SUM of the maxinum values for each month ?

 

Below is how I diplay my data:

KLED_3-1637243954882.png

 

Thanks in advance 🙂

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@Anonymous 

Give this a try.

Sum Max = SUMX ( VALUES ( YourTable[Name] ), [Max by customer] )

You will have to change the measure to match your table name.

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@jdbuchanan71 many thanks 🙂

jdbuchanan71
Super User
Super User

@Anonymous 

Give this a try.

Sum Max = SUMX ( VALUES ( YourTable[Name] ), [Max by customer] )

You will have to change the measure to match your table name.

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.