Last_value sorting by date value

when using "last_value" to display certain data, there is an option based on which date field the last_value is sorted but this option is gone when using "last_value" in a formula. Or at least I did not see any. In case there is maybe you can show where?

In default where the sorting by date is available but not with formulas:

This is how I see in Formula mode


In Formula description it is stated that view's default date will be used which in my case is not what I want to achieve

That's correct.
I've opened a feature request here you can track about it: [Lens] Provide a way for Lens formula to declare the sorting field for last_value · Issue #216193 · elastic/kibana · GitHub