@Ishtiaq_zamil
Are you really trying to sort the gallery or filter the gallery? You have a dropdown with different years in it - that would usually imply that you want to filter the list.
If Filtering is what you need, then you can simply set your Gallery Items formula to be:
Filter(<yourExistingItemsFormulaHere>,
contDate = yourDropdown.Selected.Value
)
I am not sure how the dropdown would play into the sorting, but if it is just sorting you want, then the following should give you that sorting:
Sort(<yourExistingItemsFormulaHere>,
contDate
)
If you have multiple levels of sorting needed, then you can use the SortByColumns function for that.
SortByColumns(<yourExistingItemsFormulaHere>,
"Title", Ascending,
"contDate", Ascending
)
However, in looking at what you have for the final outcome, you really need some level of grouping based on your list data.
I hope this is helpful for you.