Data table bucket over multiple fields

Hi,

I have league game's linescores stored in an index. For each game, the team could be in either:

for Boston Bruin away games:
linescore.teams.away.team.name: Boston Bruins

or for Boston Bruin home games:
linescore.teams.home.team.name: Boston Bruins

ie for home games they are in latter, away former.

I can't figure out how to create a data table which lists the teams, and has 3 columns: Total Games, Home Games, Away Games. Simple count for each of those fields.

I can get it to show teams and the count of say away games by a count on one of those fields above. But how would I get the table to bucket up counts for when the team could be in either of those two fields?

thanks,
craig

Hi @craigh,
I was able to create a data table along the lines of what you want using a TSVB Table visualization with filter ratios. I don't have your dataset but did it worked using the Flights sample data that comes with Kibana. You'll have to use your imagination here, but what I did is that I used the Carrier as your team name, and delayed and not delayed as your home and away conditions (both delay vs not delayed and home vs away are binary, it's either one or the other).
I imaging you'd use the team's name as the 'Group by field". For the Filter Ratio aggregation, you could either use a combination of "home:true" and "home:false" as the numerators or "home:true" and "away: true".

Here's a screenshot as a reference for you and a link to the Data Table docs

Good luck!

Thanks a lot for the help. I'll give it a shot.

Craig