Expression ot filter rows in a slice

I have a formula that works as long as the State column in a table(where the filter is being applied) has a single value. I have a use case where I do not wish to apply this filter if the State has no value i.e. a blank State should return all rows in the table without applying the filter. A second use case is if I have State with  say 2 values. How would the expression be written then? Thanks.

 

[STATE] = ANY(
SELECT(Member[State],
[Email] = USEREMAIL()
)
)

0 3 69
3 REPLIES 3

Would you please explain to us which State column can be blank or list (2). Now you have the same State column twice in your sample and it changes the situation how to write the formula.

There is a transaction table with state col in it. I want to filter rows from this table based on a member table that has email and state col. e.g. Member A is assigned to CA and Member B to NV and Member C has nothing assigned to him (meaning he can view all states). Depending on who logs in, they can see transactions for the assigned state only except Member C  who can see all transactions. Hope this clears it

If the member can have multiple states, then this should work..

IF(
ISNOTBLANK(LOOKUP(USEREMAIL(),Members,Email,State)),
IN([State],LOOKUP(USEREMAIL(),Members,Email,State)),
TRUE
)

Top Labels in this Space