I found out that when you want to return results from a filter and one of the conditions involves a column with a “Checkbox” type, you have to use the condition in an IF()
statement. Additionally, you cannot simply chain the column and search for records where the value is true. Take this simple table:
Formula 1 CORRECT
If I want to answer the question listed on the screenshot: “Are Zack and Mr. Belding both male AND main characters?”, I originally thought this formula would work:
=if([Saved By The Bell].filter([Male or Female]="Male").[Main Character?]=true,"Yes","No not main characters")
However, the IF()
evaluates to FALSE
because the table returns an array of TRUE
values (i.e. [TRUE, TRUE]
. Even though both Zack and Mr. Belding are set to TRUE
with their checkboxes checked, the array of TRUE
values does not equal TRUE
.
Formula 2 INCORRECT
Instead, if I use the CONTAINS()
formula to check for a FALSE
value, I can reverse the IF()
statement values to correctly account for multiple records with their checkboxes checked (i.e. an array of TRUE
values):
=if(contains(false,[Saved By The Bell].filter([Male or Female]="Male").[Main Character?]),"No not main characters","Yes")