Calculated Field for Last Hour Usage

I have a dataset with SKUs, dates, and usage amounts.
I would like to build a calculated field that can show the total usage amount for a given SKU for the last hour (max date).

|SKU Name | Usage Start Date | Usage Amount|
| sku 1 | 3/5/24 | 10|
| sku 1 | 3/6/24 | 20|
| sku 1 | 3/7/24 | 100|
| sku 2 | 3/5/24 | 5|
| sku 2 | 3/6/24 | 100|
| sku 2 | 3/7/24 | 50|

I tried:

ifelse( {Usage Start Date} = max({Usage Start Date}), sum({Usage Amount}), 0)

but I am running into a mismatched aggregation error.

Given the above dataset, I would expect a result of:
|SKU Name | Last Hour Usage|
| sku 1 | 100|
| sku 2 | 50|

Any help would be greatly appreciated, thank you!

Hi @Jeff1
do you expect something like:
grafik
SKU
BR

Thank you @ErikG
Essentially yes.
I am compiling in a table that just summarizes by the unique SKUs showing just the total amount for the last hour.
Something like:
image

You could filter amount>0 or create a field “isMaxDate” and filter that field.

Could you share how you built the “IsMaxDate” field?
I am running into the same mismatched aggregation error when trying to recreate.

Just updated the Arena dashboard.

Solution Confirmed. Thank you for the help!

@Jeff1 perfect. Could you please solve the topic?