Skip to content
Advertisement

Count Dimension Items that All Have the Same Value in Another Field

I have a table that looks like the following: business_id, employee_id, and status, which is either ‘active’ or ‘inactive’

example table

I want to count the number of businesses where ALL of its employees are “active”. What’s the best way to accomplish this?

Advertisement

Answer

Here is one method:

Or, two levels of aggregation:

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement