Summarising groups

Hi everyone, Can't reach to work summaries in Groups. Here is my code
->columns([
Tables\Columns\TextColumn::make('question.name'),
Tables\Columns\TextColumn::make('vote')
->numeric()
->summarize([
Average::make(),
Range::make(),
])
])
->defaultGroup('question.name')
//->groupsOnly()
->columns([
Tables\Columns\TextColumn::make('question.name'),
Tables\Columns\TextColumn::make('vote')
->numeric()
->summarize([
Average::make(),
Range::make(),
])
])
->defaultGroup('question.name')
//->groupsOnly()
I get only overall Summary, not each Group Summary. What's wrong? Thanks
No description
3 Replies
Arshavir
ArshavirOP5mo ago
Official Documentation says - "You can use summaries with groups to display a summary of the records inside a group. This works automatically if you choose to add a summariser to a column in a grouped table."
Arshavir
ArshavirOP5mo ago
I don't understand why, but count return 0
No description
Arshavir
ArshavirOP6d ago
can't figured out yet, any suggestion? changed
->defaultGroup('question.name')
->defaultGroup('question.name')
to
->defaultGroup('question.id')
->defaultGroup('question.id')
and problem solved but now it shows id not name on table group header Overall problem solved
Want results from more Discord servers?
Add your server