How to count number of entries based on two parameters

What is the best way to find out how many bookings a team has done on each date

I have two tables

Table Bookings

Date Team
21-6-2021 MM
21-6-2021 MM
21-6-201 Lead

Table Datetable

Date Team MM bookings on date
21-6-2021 2

If I could do SQL I would do something like for Team MM bookings on date:
Count(select Bookings.Team from Bookings, Datetable where Bookings.Date=Datetable,Date and Bookings.Team=‘MM’)

What I do instead is to create a template columns, relation columns and rolloup

Table Bookings

Date Team tpl Team on date
21-6-2021 MM MM21-6-2021
21-6-2021 MM MM21-6-2021
21-6-201 Lead Lead21-6-2021

Table Datetable

Date tpl team on date rel MM bookings Team MM bookings on date
21-6-2021 MM21-6-2021 MM21-6-2021 MM21-6-2021 2

rel MM bookings is relation column with multiple match and the match is tpl Team on date
MM bookings on date is a rollup column where rel MM bookings is counted

But is there a better way?

1 Like

That’s exactly how I would (and do) do it.

1 Like

Thx. It just adds a lot of columns to the tables when you have quite a few teams.

Conditional rollup would be so great (from this post Lookup all users but himself - #3 by Jeff_Hager)

4 Likes

yep, absolutely agreed.