Perhaps you could try a expression for the "sort-by" option for your calculated dimension? I am not sure how your calculated dimension is defined, however, it may be possible to use part of it to define the expression which sorts your calculated dimension.
In the below example, I made a guess at your calculated dimension and then defined a "Sort-by" expression:

In this example, my expression was:
=if(GetFieldSelections(XAxisSelection)='date',date,<your value expression>))
Here <your value expression>
would be whatever expression you defined in the Expressions tab (e.g. =sum(value)
)
This appears to fulfil what you need, the sort order changes depending on the value selected for XAxisSelection
, either sorting by date or by expression value (extra tip: if you need your sort order to be ascending for date, but descending for your value, you could multiply your value expression by -1
).