Sum Object for max Week of Month

Hello nice people of the internet :slight_smile:

I’m pretty much stuck with my (I guess) easy calculation and I hope you can help me along.
I have the following table containg the month, week, date and the quantity sum.

Now I want to have the max week of each month and the respective quantity sum (red marks in first img). But I receive the following which makes sense somehow but isn’t quite what I want. It sums the quantity for the whole month, while I just want to have the value for the respective week.

I tried some equations with ForEach and ForAll. I also tried the following:

=Sum([Quantity]) Where ([Yw] = Max([Yw]))

Which didn’t change a thing.

How do I get the quantity sum for the max week for each month?
Thanks in advance :slight_smile:


Flouks (BOB member since 2017-04-18)