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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
LLkenneyri
New Member

Sum the values of only the max value based on a category

Hello - I am in powerbi desktop, working with a set of data where I need to sum the values of SKU by selecting the max across a few categories - export and account. 

Example

account | export | sku
x | 123 | 1000

x | 124 | 1000
x | 125 | 1000
x | 126 | 1500

y | 459 | 1000

y | 458 | 1000
y | 457 | 1000
y | 456 | 2000

I am looking for a result of 3500 from above (sum of the max of account and export)
How can I do this?

2 ACCEPTED SOLUTIONS
Ahmedx
Super User
Super User

Ashish_Mathur
Super User
Super User

Hi,

Write these measures

Measure = max(Data[sku])
Measure 2 = SUMX(VALUES(Data[account]),[Measure])

Hope this helps.

Ashish_Mathur_0-1715989125622.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Write these measures

Measure = max(Data[sku])
Measure 2 = SUMX(VALUES(Data[account]),[Measure])

Hope this helps.

Ashish_Mathur_0-1715989125622.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ahmedx
Super User
Super User

pls try this

Screenshot_1.png

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors