Help with sorting - Mixes text and dates or force something to the bottom

Things I have tried

What I’m trying to do

Struggling to sort my dataview. My dataview query puts “TBA” into the table if the field is blank.

Then when sorting that column it’s putting it at the top when I want it at the bottom.

I would like it to sort date order with oldest to newest but put TBA at the bottom.

TABLE WITHOUT ID as "Game", platform as "Platform", choice(release = null, "TBA", choice(release>date(today),release,"Released")) as "Released"
	status = "Not Played"
	release asc

That’s my code and the output is seen in the attached file here

I’m not sure about the format of your date in release field.
But considering you use the recognized iso format (2022-09-08), you can also use the choice() function to define the way you see the null results.
First point: sort doesn’t “see” your choices in columns expressions/filters.
Where you have “TPA” for SORT release ASC it means null/empty.
If by default dataview place the null/empty cases first, then you can use choice()
to define a fictitious date to these cases. Something like:
SORT choice(!release, date(2100-01-01), release) ASC


Yup that worked perfectly. Didn’t even think of that! Thanks

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.