In Tableau, I am trying to implement the following normalization logic:

https://stats.stackexchange.com/questions/70801/how-to-normalize-data-to-0-1-range

Basically, I want to take all values from a particular measure and scale them to values in the range of [0, 1]. This requires gathering the minimum and the maximum of a measure. What I want is...

(x - min(x)) / (max(x) - min(x))

If you create a calculated field using the above link's method, you get the "Cannot mix aggregate and non-aggregate" error.

This is where I am stuck. Is there a function and/or a trick to get this to work?