Filter and Sort in a DataTable

%3CLINGO-SUB%20id%3D%22lingo-sub-1435931%22%20slang%3D%22en-US%22%3EFilter%20and%20Sort%20in%20a%20DataTable%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1435931%22%20slang%3D%22en-US%22%3E%3CP%3EGreetings%2C%20I%20need%20the%20information%20coming%20out%20of%20my%20filter%20to%20be%20ordered%20by%20'Expedient'%20Column.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20current%20filter%20is%20the%20followning%20(This%20works)%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFilter(Expedients%3B%C3%89sCarpeta%3Dtrue%20And%20Not(IsBlank(Expedient))%20And%20((ExpedientFilter.Text%20%3D%20Expedient)%20Or%20(ExpedientFilter.Text%20in%20Assumpte)))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%20I%20want%20to%20add%20a%20%22Sort%22%20Command%20to%20this%20formula%2C%20I%20have%20been%20trying%20the%20next%20with%20kinda%20success%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESort(Filter(Expedients%3B%C3%89sCarpeta%3Dtrue%20And%20Not(IsBlank(Expedient))%20And%20((ExpedientFilter.Text%20%3D%20Expedient)%20Or%20(ExpedientFilter.Text%20in%20Assumpte)))%3B%20Expedient%3CBR%20%2F%3E%3BAscending)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%2C%20the%20issue%20is%20that%20the%20sorting%20is%20being%20made%20in%20a%20really%20weird%20way%2C%20it%20detects%20the%203%20character%20numbers%20are%20being%20lower%20than%20the%202%20digits%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20233px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F196140iDAF04A6AEDD82831%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnd%20not%20only%20that%2C%20but%20at%20the%20end%20of%20the%20table%20we%20can%20see%20a%20few%20little%20numbers%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20495px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F196141i15A0EE88EDC924CA%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20someone%20help%20with%20this%20issue%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1435931%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPowerApps%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Contributor

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
;Ascending)

 

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:

image.png

 

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

 

image.png

 

Can someone help with this issue?

 

 

0 Replies