Cannot work out how to do a basic DSUM in Calc

I (think I have) named the table below as “test_table”.

The data and headings are pasted into the range A1:E10

I tried a variety of DSUM(), which all return Err:504. I can’t find a simple .ods file which I can download and open that uses DSUM or any other D* functions. I have uploaded the file I have been playing with. I must be making some utterly stupid mistake, but I have no idea what?

What am I doing wrong?
Can someone correct the file I have attached and upload the corrected file?

Name Grade Age Distance Weight
Andy 3.00 9.00 150.00 40.00
Betty 4.00 10.00 1,000.00 42.00
Charles 3.00 10.00 300.00 51.00
Daniel 5.00 11.00 1,200.00 48.00
Eva 2.00 8.00 650.00 33.00
Frank 2.00 7.00 300.00 42.00
Greta 1.00 7.00 200.00 36.00
Harry 3.00 9.00 1,200.00 44.00
Irene 2.00 8.00 1,000.00 42.00
Function Returns
=DSUM(test_table, “Grade”, $B$2:$B$10) Err:504
=DSUM(test_table, $B$1, $B$2:$B$10) Err:504
=DSUM([test_table], $B$1, $B$2:$B$10) Err:507

Basic_D_Functions.ods (17.6 KB)

2 Likes

Are you sure if you need the DSUM function? The SUMIF() in not enough for you?

Can’t test on my mobile, but I guess your database range should include the title, so start at $B$1 to find “Grade”
.
This would fit the error code mentioned in help:
https://wiki.documentfoundation.org/Documentation/Calc_Functions/DSUM

It was more about learning how to use the functions, so the D* were what I wanted to understand.

The answer was to include the column title in the database range.