Calculate Mode (as opposed to mean or median)

How do I calculated the “Mode” as a calculated field in QS?

I have seen this topic:

However, I do not want to calculate mode “Over” a field. My calculation works with using either “avg()” or “median()”. I want to replace it with the equivalent of “mode()”.

The answer in the question above does not work.

Thanks in advance.

Currently that is the only way to get the mode.

Why does it not work when using over?

I’m not sure, it could be because I want to use it with the filled map visual

I don’t think what you are trying to do is possible.

I can mark this as a feature request.