Summary on custom state

I have an invoices table which shows the Sub Total and the Profit per row. I have a custom column which shows the GP% and Markup% using a state(). I am wanting to have in the summary the overall percentage e.g (profit/Subtotal)*100 of all rows. I cannot for the life of my work out how to go about this one. Any help would be appreciated. Thank you.
5 Replies
Tetracyclic
Tetracyclic3w ago
David | Fortune Validator
this looks like its only allowing. you to query the database? This is a custom state column.
Tetracyclic
Tetracyclic3w ago
I don't believe any of the summarisers have access to the state of each row in their column directly, they all just query the data to display from the database You can see how they're implemented here: https://github.com/filamentphp/filament/tree/3.x/packages/tables/src/Columns/Summarizers
David | Fortune Validator
thank you for the info. Its not the end of the world
Tetracyclic
Tetracyclic3w ago
Presumably you can query the subtotal and profit for the database and calculate the overall percentage that way? Should be a very fast query.