Hi @karlamaddox1,
Thank you for the tag.
(1) Dropdown
The dropdown would list all of the distinct Years present in your table. The Items property of the dropdown would look similar to:
Distinct(
//You might have to change the table name to the correct displayname
projecttracker,
Year('Created On')
)
Please note that Distinct() can only take the first 2000 records into account. Should your table have > 2000 records, you will need a way to prefilter the table (e.g. removing inactive tasks) or provide a manual list of years.
The Default property of that dropdown will be:
//Autoselect current year
Year(Today())
(2) Filtering the galleries
You will have to filter the galleries by adding the filter() function in the Items property in order to only display records created in a certain year. Should your table have less than 2000 records, you can get away with the non-delegable first option. If this is not the case, you should opt for the second option.
//OPTION 1
Filter(
//Change table name if necessary
projecttracker,
Year('Created On') = Dropdown1.Selected.Value
)
//OPTION 2
Filter(
//Change table name if necessary
projecttracker,
'Created On' >= Date(Dropdown1.Selected.Value, 1,1) && 'Created On' <= DateTime(Dropdown1.Selected.Value, 12,31,23,59,59)
)
If this solves your question, would you be so kind as to accept it as a solution.
Thanks!