Field Filter Not Working

Hey there,

I’m working with Metabase Field Filters to create a dropdown of names that a dashboard user can pick from in order to return results. This is my query so far:

SELECT count(*) AS "count"
FROM "public"."mv_fundraiser_report"
WHERE ("public"."mv_fundraiser_report"."ngo_name" = {{NonProfit}}
AND "public"."mv_fundraiser_report"."start_date" BETWEEN [[{{StartDate}}]] AND [[{{EndDate}}]]
AND "public"."mv_fundraiser_report"."full_name" IS NOT NULL
AND "public"."mv_fundraiser_report"."thank_you_delivered" = 'true')

When I replace {{NonProfit}} with a string of characters I return results, but when I replace it with the field filter that is a string of characters it fails throwing this error:

ERROR: operator does not exist: character varying = boolean Hint: No operator matches the given name and argument types. You might need to add explicit type casts. Position: 234

I understand what the error means, but I don’t understand why that would be the case, considering that my field filter is also a string, the same way it would be if I were to surround it in quotes.

Thanks!

Hi @Huntehhh
You cannot use Field Filters like that. You do not define the column, since you have already set it in the sidebar.
https://www.metabase.com/docs/latest/users-guide/13-sql-parameters.html#the-field-filter-variable-type

1 Like

Hey Flamber,

Thanks so much man! I’ve been looking everywhere and of course it’s right in front of my eyes the whole time.