Calc Sorting by Two Keys

In my spreadsheet I’ve got two columns, one formatted date, one formatted number.
If I sort either column using that column as the sort key it sort correctly.
If I sort number followed by a second sort key date it sort correcly.
If I sort date followed by a second sort key number it sorts date Ok but the number column is all over the place

Quoting @Chrish2: "Ok but the number column is all over the place "
Meaning? Did you want to tell that the second key was disregarded? Never saw this. Are you sure you defined the second key correctly? Are you sure, the “numbers” are actually of type Number? What example (“number column” only) did show you the supposed error? Did you consider that a second key can oly sort entries associated with the same value of the first key?

Are the dates real dates (numerically integer) or may they be date-time-values in cells just formatted to show only the date part?

Date cell formatting problem. It was imported from something else and I’d thought I’d formatted all the date cells correctly but some of the date cells wern’t dates. I only checked the top one afer ‘convertion from text’. Sorry for the stupid mistake.

Quoting @Chrish2: “Sorry for the stupid mistake.” Don’t worry. It was a good opportunity to exercise educated guessing. Need that due to age. :wink:
I will now word an answer from the comment to help other users having the issue to find an answered question.

The dates or some of them may not be real dates (numerically integer) but date-time-values in cells just formatted to only show the date part?

(That’s a dangerous “feature” of date-and-time formatting, anyway. Even more dangerous also in calculations is the suppression of the integer part by formatting.)