Forum Discussion
Selecting a specific year using the FILTER function
I am trying to use the filter function to get all the records from a table for a specific year. I have a table that has a date column
The filter I am trying to use is =FILTER(Venues14,Venues14[Date=K5,"Is not found"). Cell K5 is a dropdown list that has 2026, 2027 and 2028 in it.
I am trying to use the dropdown list to extract all the entries in the table using a date I select. It gives me all the dates instead of just the one.
4 Replies
- JimCarrCopper Contributor
Thank you I don't know what I was doing wrong but it's fixed now
Thanks again Jim
- SergeiBaklanDiamond Contributor
If to remove (Venues14[Date]<>"") formula also works assuming we could have blank cells in Date column.
- m_tarlerBronze Contributor
Hi. The formula you give is not correct, I'm assuming you just missed the closing bracket after Date so it should have been:
=FILTER(Venues14,Venues14[Date]=K5,"Is not found")
I do not understand why that would return "all the dates instead of just the one". But assuming the [Date] column is a Date and note a Year then the formula should look something more like:
=FILTER(Venues14,YEAR(Venues14[Date])=K5,"Is not found")