Well for anyone who comes across this issue, I cant figure out why it doesnt work on the button action but I clicked on the DataTable and put the sort in there and it worked. I also figured out how to create new columns and base the results in those columns on the actual columns of data (I put this on the items fx for the DataTable)
AddColumns(DailySales,"Total Sales", Text(TotalSales,"[$-en-US]£ #,###"),"Cumulative Sales", Text(CumulativeSales,"[$-en-US]£ #,###"),"Time", Text(HourTime,"[$-en-US]"))
Then I manually unticked the columns to show so that it only showed the new columns.
The problem I have now is that i cannot add the sort command at the end of the AddCoulns command even putting a ; or ;; at the end. I am trying to get it to look like this:
AddColumns(DailySales,"Total Sales", Text(TotalSales,"[$-en-US]£ #,###"),"Cumulative Sales", Text(CumulativeSales,"[$-en-US]£ #,###"),"Time", Text(HourTime,"[$-en-US]")); Sort(DailySales, HourTime , Ascending)