# Problem with my Field Filters

I have the following query:

``````SELECT
one.b ,
one.c,
two.d,
two.e,
two.f
FROM
(SELECT
a,
b,
c
FROM tablea
LEFT JOIN tableb
ON tableb.pkey= tablea.pkey
WHERE tablea.variable_in_commun= {{variable_in_commun}}) AS one
FULL JOIN
(SELECT
a,
d,
e,
f
FROM tablec
LEFT JOIN tabled
ON tabled.key= tablec.key
WHERE tablec.variable_in_commun= {{variable_in_commun}}
) AS two
on one.a= two.a
``````

My problem is: I want variable_in_commun to have the same value in queries one and two. Can I do this? as soon as I did, I would need two filters for the query to work. variable_in_commun must be given a date range (eg 30 days).

Hi @Helena
Since Field Filters references the table, then it would require separate variables for something like that:
https://www.metabase.com/learn/building-analytics/sql-templates/field-filters.html
You would have to use two simple Date filters instead:
https://www.metabase.com/learn/building-analytics/sql-templates/sql-variables.html

1 Like
{"ft_lang_label":"__label__en","ft_lang_prob":0.7476236,"math_prob":0.54051256,"size":605,"snap":"2022-40-2023-06","text_gpt3_token_len":186,"char_repetition_ratio":0.19467553,"word_repetition_ratio":0.0,"special_character_ratio":0.2644628,"punctuation_ratio":0.2086331,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9678242,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-10-04T07:04:03Z\",\"WARC-Record-ID\":\"<urn:uuid:8de719bb-90d5-4b2c-bfe1-051a474506d5>\",\"Content-Length\":\"16987\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:65bfeb37-eddc-44d8-938d-02f4221e4704>\",\"WARC-Concurrent-To\":\"<urn:uuid:484f8dfb-5dc6-421a-bbd1-1bc18ee67a37>\",\"WARC-IP-Address\":\"107.21.153.229\",\"WARC-Target-URI\":\"https://discourse.metabase.com/t/problem-with-my-field-filters/15233\",\"WARC-Payload-Digest\":\"sha1:Q2B44SBOPGAPFUPUPJ3BK3WCMFYMW3GX\",\"WARC-Block-Digest\":\"sha1:27VZBKC6PQGTXVWJZZX4PDABFQZPLNVO\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-40/CC-MAIN-2022-40_segments_1664030337480.10_warc_CC-MAIN-20221004054641-20221004084641-00211.warc.gz\"}"}