Q: I read your Q&A regarding sorting text fields that have fields that contain numbers and letters. I have fields where most contain only currency and other fields are only letters. (i.e. $1,590,000 or "Asset Sale"). How would I sort them so the currency fields are at the top of the report showing HIGHEST sales first, and the Asset Sales appear at the end of the report?
A: Assuming the field type is TEXT, your values should automatically sort so that the currency values are at the top of the list, but they'll be in ASCENDING (low to high) order. Those are the rules of an Alphanumeric sort.
To do what you want, you'll have to play a query shell game. In a nutshell (no pun intended), you could create a CALCULATED QUERY FIELD called SortField.
The SortField could be the value of your numeric/currency value subtracted from some outrageously large number (something bigger than any of your data values):
You'll have to use the IIF and IsNumeric functions so that you're not trying to subtract a text value, which will give you an error:
Now you'll have a column of numbers and text, but the numbers will be in reverse order, because when you subtract from a bigger number, you get the difference. So if my original list is:
When I run the query, I get:
Now if you SORT by this SortField in your query, you will get:
Notice that the first column is sorted exactly as you wanted.