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

I have seen this topic: https://community.amazonquicksight.com/t/how-can-i-calculate-mode-the-most-common-value-in-quicksight/10749

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.