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 369
5 REPLIES 5

Steve
Platinum 4
Platinum 4

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.

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