Sumatoria de un campo dentro de una list

Hola a todos.
Tengo una app en la que uso una base de datos tinydb.
Manejo un Tag y 3 "campos", dentro de una lista, uno de los cuales es un importe monetario.
Lo que necesito es la sumatoria de los importes de todos los "registros".
Ya lo intente y no me funciona.
Alguien ha hecho algo similar?
Cualquier ayuda es bienvenida.

Gracias.

Get the TagList to return all the tags
For each tag get the monetary value and add it it a separate list
Use the reducing method of the specialised list block to return a total (example here)

You could also break the TinyDB into 3 Namespaces (1 per TinyDB instance), for tag/field1, tag/field2, tag/field3), so you would only have to sum the values in the 3rd Namespace.

Thank you Timai2 and ABG. I solved it using something like the 2nd proposal. Now it's working. The case is closed.

Sincerely, Rafael.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.