Sum by key doesnt work for on device storage?

for some reason it shows 0 as a result

but if you check every item separately, it sums to 20

1 Like

Hi, sounds like a type mismatch issue, can you check in the schema/debugger if Total_amount is saved as text for some reason? If so, this could be a workaround:

SUM(MAP(data.Lender_data1, NUMBER(item.Total_amount))) → transform the data with MAP first to [30, 40, 60] format and sum that.