How to Temporarily remove a value from Map when a user chose that value in metabase

I want to display a map where if the user choose a state from the dropdown menu, the value chosen will be removed from the map and the rest will still be displayed (Temporary un-view it)

Below is my code

[SELECT “Total Calls”, “State Name”
select count(*) as “Total Calls”,
t.state_name as “State Name”
from t
where (
created_on::date between ‘22-02-2019’ and ‘01-03-2019’
group by t.state_name
group by “Total Calls”, “State Name”]

i’m using PostgreSQL for this query and metabase as a source for visualisation of the data.

Below attached are the map displayed for this query

Desired output is to temporary remove this value from this state, when the user choose this state, and display the rest of the value that are not chosen

Hi @NeedHelp
You need to do a sub-query, where you get the states from the filter, and then tell it not to include those in your main query. And since you’re using a Field Filter, it would look something like this. So replace [[and{{State}}]] with:
[[AND "state_name" NOT IN (SELECT "state_name" FROM "table" WHERE {{State}})]]

Hi its only loading the map but won’t show any value, and it sometimes took around 2h to run the query

@NeedHelp Okay, just clear up any confusion. It has nothing to do with maps. This is just a regular sub-query. So just do the test with a table output.
If it takes two hours, then you need to optimize your query to your data. Check your database query with explain or analyze.
This has nothing to do with Metabase. Just make your query directly on your database without any filters (just test with static data).