Hi,
sorry but you can't create a select field that filter users based on data from another component/table.
You can only create different Users Lists (menu items) and set filters (Custom SQL WHERE) that check data from another table.
At
http://docs.easy-profile.com/article/sql-custom-where you will see some example.
In your case you can see section "Online Users", you will see a SQL Where that include user_id from Joomla session table, so
For 2016 menu item the SQL Where should be
user_id IN (SELECT DISTINCT userID FROM #__dashboard_membership WHERE endDate = "2016-12-31 00:00:00" AND isPaid = 1)
For 2017 menu item the SQL Where should be
user_id IN (SELECT DISTINCT userID FROM #__dashboard_membership WHERE endDate = "2017-12-31 00:00:00" AND isPaid = 1)
this is only an example but SQL syntax allow you to create dynamic lists like:
- Paid users this year
user_id IN (SELECT DISTINCT userID FROM #__dashboard_membership WHERE YEAR(endDate) = YEAR( CURDATE() ) AND isPaid = 1)
- Paid users last year
user_id IN (SELECT DISTINCT userID FROM #__dashboard_membership WHERE YEAR(endDate) = YEAR( DATE_SUB( CURDATE(), INTERVAL 1 YEAR) ) AND isPaid = 1)
- Paid users 2 years ago
user_id IN (SELECT DISTINCT userID FROM #__dashboard_membership WHERE YEAR(endDate) = YEAR( DATE_SUB( CURDATE(), INTERVAL 2 YEAR) ) AND isPaid = 1)