Summarize in a custom column

Hi guys, how can I summarize this value as a total of a custom column?
TextColumn::make('available_amount')
  ->summarize(Sum::make())
  ->label('Monto Disponible')
  ->state(function (Model $record) {
      return $record->availableAmount();
  })

I got an error that my table does not find the available_amount column because I know that it's generated.
Was this page helpful?