Sorting by multiple values

Thanks to @Bobby_Ritter help, I was able to came up with a pretty good solution.

I’m converting the number values from base 10 to base 20000, which allows me to store integers up to 1.6e17, or numbers up to 1.6e13 with 0.0001 precision.
Then I’m converting those numbers into unicode symbols from 20000 to 40000 and into a string.
This way the entries can be sorted by the lexicographical order of the strings.

This solution only relies on turning the numbers into a string, which is just a bunch of mathematical operations so it doesn’t require a lot of computing power.
I also did some actual performance testing, and everything works perfectly and very fast.

The final formula looks like this:

List(
  thisRow.[First number],
  thisRow.[Second number]
).FormulaMap(
   Character(Floor(CurrentValue/800000000)+20000)+
   Character(Floor(CurrentValue/40000%20000)+20000)+
   Character(Floor(CurrentValue/2%20000)+20000)+
   Character(Floor(CurrentValue*10000%20000)+20000)
).Join(" ")

And produces following results:
image

3 Likes