IN() expression returning all rows

I have the following slice filter expression:

In([HazardID], (HazardSelected[HazardID], [HazardSelected]=“TRUE”))

It works fine, but if in all rows, [HazardSelected] = “FALSE” (ie, no columns contain the value, “TRUE”) the slice returns all table rows. Is this normal behavior?

Your IN() expression is invalid.

Try adding SELECT to your formula.

Thx @Steve @MultiTech_Visions

Adding SELECT did the trick. Not sure why it filtered properly without having a proper select statement.

1 Like

Yeah, falls into a weird technical hole.

The first part of the SELECT() - that’s missing the select - is a formula for a list:

(HazardSelected[HazardID], So that’s valid. :slight_smile:

And the second argument of SELECT() is to determine if the list the SELECT() is providing should be restricted to unique records… so since [HazardSelected]=“TRUE” is a true/false statement… it’s valid. :nerd_face:

If the formula parsing was a little tighter on AppSheet’s end, it might have cought the missing SELECT. (But it’s fine as it is! DON"T change it. (^_^) It’s right in that Goldilocks zone, just enough wiggle room when you need it. :wink: )

1 Like

That’s all very good information to know. Thanks

1 Like