Hi @kat7777777 The On Select Property of your button I would do something like setting a contextual variable:
UpdateContext({DueDate:!DueDate})
Then in you gallery Items Property I assume you using a SortByColumns you would need to add the following:
SortByColumns(
YouSPList,
"DueDate",
If(DueDate,SortOrder.Descending,SortOrder.Ascending)
)
This will then give you the ability to switch between the descending and ascending order.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. Remember, you can accept more than one post as a solution. If the content was useful in other ways, please consider giving it Thumbs Up.
Thanks
Andrew