Hi, i’m currently trying to make a dropdown menu specifically for months only
SELECT
avg(Monthly_Calls), district, “Crops”, “Months”, “Date”
FROM(
SELECT date_part(‘month’, t.created_on::date) as “Months”,
COUNT(*) AS Monthly_Calls,
t.created_on::date as “Date”,
district_name as district,
date_part(‘year’, t.created_on::date) as “Years”,
t.crop as “Crops”
FROM t
where true
[[and {{Crops}}]]
[[and date_part(‘month’, t.created_on::date) = {{Months}}]]
GROUP BY district_name, date_part(‘month’, t.created_on::date), date_part(‘year’, t.created_on::date), crop, created_on
)calls
where “Years” between 2012 and 2018
GROUP BY district, “Months”, “Crops”, “Date”, “Years”
i’ve only managed to take the Months in number value and i can return it and display it in the region map, but i wanted to make the months to become a drop down list just like the Crops menu consisting of value from 1-12 (Months are not available in database, database only have created_on which is a date , i.e 2018-09-12) I’m using PostgreSQL database inside the metabase
Any help would be nice thank you!