Dropdown list in field filter is wrong

select op.product_id, p.upc, cd.name as category, p.model as name, sum(op.quantity) as qty, round(sum(op.total*(o.membership_discount)/100),4) as membership_discount, round(sum(op.total)) as total, round(sum(op.tax*op.quantity), 4) as tax, round((sum(op.quantity)*max(pwb.weight_base))/1000,3) as weight
oc_order o

left join oc_order_product op on op.order_id = o.order_id
left join oc_product p on p.product_id = op.product_id
left join oc_product_weight_base pwb on pwb.product_id = op.product_id

left join (select pc.product_id, min(pc.category_id) as category_id from oc_product_to_category pc join oc_category c on c.category_id = pc.category_id where c.parent_id = 0 group by pc.product_id) ptc on op.product_id = ptc.product_id left join oc_category_description cd on ptc.category_id = cd.category_id

o.order_status_id in (5,2,3,19)
and o.delivery_date>=date({{start_date}}) and o.delivery_date<=date({{end_date}})
and o.shipping_warehouse_id in (select warehouse_id from oc_warehouse where status=1 and name in ({{warehouse}}))
group by op.product_id;

In the above query, i use filed filer for warehouse names but the problem is i want only list of warehouse in dropdown who have status = 1 i.e true in my table but in dropdown all warehouse name shows.
how can it resolve?

Hi @varnika

The Field Filter values does not come from your query, but when Metabase scans the column, so it will show all results. You can limit the results with Linked Filters on dashboards:

There's a request open for being able to define the query for the dropdown:
https://github.com/metabase/metabase/issues/6820 - upvote by clicking :+1: on the first post