© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•12mo ago•
9 replies
Emruardo

Grouping month year and group summarize (total amount)

I couldn't figure out what I do wrong.
grouping expenses by month-year works but when I want to show summarize on each month, sum is wrong

Here is my Code
---
Tables\Columns\TextColumn::make('amount')
  ->label('Amount')
  ->money('EUR')
  ->sortable()
  ->summarize(
      Tables\Columns\Summarizers\Sum::make()->label('Total')->money('EUR', divideBy: 100)
  ),
---
->groups([
    Group::make('date')
        ->getTitleFromRecordUsing(
            fn(Expense $record): string => Carbon::parse($record->date)->format('F Y')
        )
        ->orderQueryUsing(
            fn(Builder $query, string $direction) => $query->orderBy('date', $direction)
        )
        ->titlePrefixedWithLabel(false)
        ->collapsible(), 
])
---
Tables\Columns\TextColumn::make('amount')
  ->label('Amount')
  ->money('EUR')
  ->sortable()
  ->summarize(
      Tables\Columns\Summarizers\Sum::make()->label('Total')->money('EUR', divideBy: 100)
  ),
---
->groups([
    Group::make('date')
        ->getTitleFromRecordUsing(
            fn(Expense $record): string => Carbon::parse($record->date)->format('F Y')
        )
        ->orderQueryUsing(
            fn(Builder $query, string $direction) => $query->orderBy('date', $direction)
        )
        ->titlePrefixedWithLabel(false)
        ->collapsible(), 
])
Screenshot_2025-03-02_at_16.18.52.png
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

Month and Year
FilamentFFilament / ❓┊help
3y ago
DatePicker (Month and Year)
FilamentFFilament / ❓┊help
2y ago
Group Records by Name and Month
FilamentFFilament / ❓┊help
3y ago
Group by date and summarize number of pages
FilamentFFilament / ❓┊help
3y ago