I'm using CONTAINS to filter a REF column. Th...

I’m using CONTAINS to filter a REF column. The REF is a Job. The column it checks is the Days. This works except I have Day 1 and Day 10 that can be in the column. So when it checks for Day 1 it allows Day 10.

Is there any fix for this? I could put a comma after the number, Day 1, but if Day 1 is the only day that’ll be missed then.

Hope that makes sense. I know I haven’t put much info. Thanks

0 7 940
7 REPLIES 7

Why are you using Contains() to filter the Ref column? Can’t you use

= instead?

Nope, unfortunately not. It’s an Enumlist that goes into a cell. I did originally have the days as seperate columns, but this seems better (in some ways) Including that I need to reference the same column to check which day (I think). I’m getting a bit confused so may be doing things weirdly.

Only just started using Valid_if to filter REF columns, which is really useful. I previously had a seperate sheet in my google doc for every day, so had to do every change 10 times.

I see, so you want to see if a value is in a list? How abou using IN(“Day1”, [ListColumn])

I want to be able to choose a value from a list if another column contains the correct Day. =SELECT(Venues[Venue],CONTAINS([Days],[Day Number Spreadsheet]))

That’s the expression I’m using.

I don’t know the IN expression. Would that be a good way to do it? Wouldn’t that still see Day 10 as Day 1? or does IN find an exact match for a word with no spaces?

SELECT(Venues[Venue], IN([Day Number Spreadsheet], [Days]))

That’s the syntax. Is Day Number Spreadsheet a column in the Venues table?

Or if you are entering data in one table and looking to get values from another table, you should use something like this

SELECT(Venues[Venue], IN([_THISROW].[Day Number Spreadsheet], [Days]))

Thanks. That works and I think I kind of understand it. I will when I use it a few times, which I think I’ll need to.

Thanks again. This helps a lot. Just anted to put on here, in case anyone reads this to use it, the column it’s checking, in my case [Days], need to be Enumlist (probably Enum as well)

Top Labels in this Space