@kingy61422
Sorting dates, times, numbers, etc. that are all in Text will not yield correct results.
For example, 1, 2, 3, 100, 0100, 200 if all in text would sort to the following:
"0100", "1", "100", "2", "200", "3"
Not what you expect!! Same for dates.
So, you will need to change your formula to the following:
UnGroup(
Table({Items: Table({Result:"All"})},
{Items: ForAll(
Sort(
ForAll(Distinct(ExpenseMaster, 'Date'),
DateValue(Result)
),
Value, Descending
),
{Result: Text(Value, ShortDate)}
)
}
),
"Items"
)
In the above, we need to convert the date text to a real date for the sort, then convert it back to text so that you can use the All (which is text). This is important to understand because you would NOT have been able to just convert the text to a date and sorted all in that formula because the datatype would "collide". In the first Table, Result is Text, then in the second Table it would have been Date...that would not have worked.
So, in the above formula, that is why I am showing to convert from text to date, sort, then convert from date to text.