Hello @Anonymous ,
Please have a look on the SortByColumns function, this is the function that you need to use here.
You have to use this function for the gallery items.
Say, your Radio button name is Radio1, and your collection or datasource name is Test_db_1 (has two colmns : id and item)
Radio1 has two options : 'ascending' and 'descending'
Please go through the images I have attached here for your reference.
Function Gallery > Items :
If(Radio1.Selected.Value="ascending",
SortByColumns(Test_db_1,"id",Ascending),
If(Radio1.Selected.Value="descending",
SortByColumns(Test_db_1,"id",Descending),
Test_db_1))



Hope this helps!