How can I work with multiple categories in an Insights formula?

Hello all,

My data looks like the following:

  • each row is a record with a unique ID
  • each record has a Boolean variable of Attendance (yes or no)
  • each record has a Category variable of Office (e.g., HR, Manufacturing, Dev)

What I want to do is compare attendance percentages between different Offices. An example of this formula would be:
{ID count, where Office=HR and Attendance = Yes divided by ID count, where Office=HR}
compared to
{ID count, where Office=Dev and Attendance = Yes divided by ID count, where Office=Dev}

What this allows me to do is say “HR people are 3x as likely to attend compared to Dev people“. This is fairly simple in a spreadsheet formula, but I’m having a hard time getting counts based on multiple filters in an Insights formula (i.e. both Office and Attendance). The formulas only seem to give me access to a single grouping variable.

Let me know if this needs further clarification, and thank you in advance for your help!

Hi @SophK and welcome to the Quick Community!
It depends a bit on what type of computation you’d like to create in your insight but I would suggest handling all or part of the formula within a calculated field. Then you can utilize that calculated field in your insight.

If you’re trying to create a specific computation, let me know which one and we can discuss further on what may be needed to accomplish!

Hi @Brett , thank you for your suggestion! I was trying to avoid using calculated fields, since in my head having the same calculated value for every row in the db seemed inefficient. But I set it up using a calculated field and it works now. Thanks!

1 Like

Glad to hear it worked!