Summarize a math problem
Hello as you can see i use the getStateUsing i wanted to get the same value in the total_dividend_value and use the summarize to count it all up. But i didn't found a way to do it
Tables\Columns\TextColumn::make('dividend_value')->getStateUsing(fn($record) => $record->stockInfo->last_dividend * $record->quantity)->label('Dividend Waarde'),
Tables\Columns\TextColumn::make('total_dividend_value')
->summarize(Summarizer::make())
2 Replies
I think the normal summarizer works on DB level, so that wont' work. You can have a custom one. Check this thread from yesterday:
https://discord.com/channels/883083792112300104/1161603689258168410/1161635537862529044
Also please read #✅┊rules and format your code
Thank you , and my apologies!