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?

0 5 364
5 REPLIES 5

Steve
Participant V

Your IN() expression is invalid.

MultiTech
Participant V

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.

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.

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.

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. )

That’s all very good information to know. Thanks

Top Labels in this Space