Sorting Gallery by Date in Acending order

%3CLINGO-SUB%20id%3D%22lingo-sub-202828%22%20slang%3D%22en-US%22%3ESorting%20Gallery%20by%20Date%20in%20Acending%20order%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-202828%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20gallery%20in%20my%20PowerApp%20that%20filters%20the%20results%20by%20%22DateTimeChangeMade%22%20from%20two%20date%20pickers.%20I%20also%20want%26nbsp%3Bto%20sort%20the%20results%20in%20Ascending%20order%2C%20but%20I%20can%20not%20seem%20to%20find%20the%20proper%20syntax%20for%20this.%20Below%20is%20my%20Filter%26nbsp%3Bthat%20I%20need%20to%20wrap%20the%20sort%20command%20around%2C%20but%20once%20I%20add%20the%20SortByColumn%20around%20it%2C%20the%20items%20stop%20returning.%20What%20am%20I%20missing%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFilter('Request%20Production%20Change'%2CDateTimeChangeMade%26gt%3B%3DDatePicker1.SelectedDate%26amp%3B%26amp%3BDateTimeChangeMade%26lt%3B%3DDatePicker2.SelectedDate)%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESortByColumns(Filter('Request%20Production%20Change'%2CDateTimeChangeMade%26gt%3B%3DDatePicker1.SelectedDate%26amp%3B%26amp%3BDateTimeChangeMade%26lt%3B%3DDatePicker2.SelectedDate)%2C%20%22DateTimeChangeMade%22%2C%20If(SortDescending1%2C%20Descending%2C%20Descending))%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-202828%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPowerApps%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-360727%22%20slang%3D%22en-US%22%3ERe%3A%20Sorting%20Gallery%20by%20Date%20in%20Acending%20order%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-360727%22%20slang%3D%22en-US%22%3ETry%20using%20Sort%20instead%20of%20SortByColumn.%3C%2FLINGO-BODY%3E
New Contributor

I have a gallery in my PowerApp that filters the results by "DateTimeChangeMade" from two date pickers. I also want to sort the results in Ascending order, but I can not seem to find the proper syntax for this. Below is my Filter that I need to wrap the sort command around, but once I add the SortByColumn around it, the items stop returning. What am I missing?

 

Filter('Request Production Change',DateTimeChangeMade>=DatePicker1.SelectedDate&&DateTimeChangeMade<=DatePicker2.SelectedDate) 

 

SortByColumns(Filter('Request Production Change',DateTimeChangeMade>=DatePicker1.SelectedDate&&DateTimeChangeMade<=DatePicker2.SelectedDate), "DateTimeChangeMade", If(SortDescending1, Descending, Descending))

1 Reply
Try using Sort instead of SortByColumn.