© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
1 reply
Tieme

Custom summaries (Sum of other column)

Hi All,
I'm looking at https://filamentphp.com/docs/3.x/tables/summaries#custom-summaries
For a summary of a different column.

I have a table where i show Hours. Only Hours is a attribute in de model and not a column in the tabel. So when i want to Sum the "hours" i get a error 500 that the query is bad.

Now i want to summarize this column only with the real column in the database in this case the column is amount that needs to sum.

With below settings that i got from Custom summaries the summory wont show anythin it doe not pop-up nor does it gives me a error.

'''
TextColumn::make('hours')
->sortable()
->summarize(
Summarizer::make()
->label('First last name')
->using(fn (Builder $query): string => $query->sum('amount'))
),
'''

Does anyone know how to summarize a different column than the original one?

Thanks.
Summaries - Table Builder - Filament
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Custom summaries with value calculated in column
FilamentFFilament / ❓┊help
2y ago
Make additional column in table based from the sum of two other columns?
FilamentFFilament / ❓┊help
3y ago
How to sum extra digit in summaries
FilamentFFilament / ❓┊help
2y ago
Custom query in summaries
FilamentFFilament / ❓┊help
3y ago