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
m_iago
New Member

How can I sum the max value per ID and group it by month?

Hello,

 

I have a data similar to the following:

m_iago_0-1695654605831.png


I need to find, using DAX, the GWperMonth. For that, I take the Max Value per ShipID from the column [GWperID] and sum the values from each month.

 

For that case, the Max Value for AB1 is 76, ABC2 is 70 and so on.

 

I've tried the following, without success:

GWperMonth = CALCULATE(SUMX(SUMARIZE("TableName", [ShipID], "MaxGW", MAX([GWperID])), "MaxGW"), ALLEXCEPT("TableName", [YearMonth]))

 

What am I doing wrong?

1 REPLY 1
some_bih
Super User
Super User

Hi @m_iago your example set " AB1 is 76, ABC2 is 70", you need to get column for this group as there are other group starting with AB*.

It is not clear to do you want first max per group (which is unclear how to get as other group start with AB*) and sum it or you just need sum per group





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

Proud to be a Super User!






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.