Filter and Sort in a DataTable


Greetings, I need the information coming out of my filter to be ordered by 'Expedient' Column.


The current filter is the followning (This works):


Filter(Expedients;ÉsCarpeta=true And Not(IsBlank(Expedient)) And ((ExpedientFilter.Text = Expedient) Or (ExpedientFilter.Text in Assumpte)))


Now I want to add a "Sort" Command to this formula, I have been trying the next with kinda success:


Sort(Filter(Expedients;ÉsCarpeta=true And Not(IsBlank(Expedient)) And ((ExpedientFilter.Text = Expedient) Or (ExpedientFilter.Text in Assumpte))); Expedient


Now, the issue is that the sorting is being made in a really weird way, it detects the 3 character numbers are being lower than the 2 digits:



And not only that, but at the end of the table we can see a few little numbers:




Can someone help with this issue?



0 Replies