I have a numerical column called average_usage and I want to create a calculated field called median absolute deviation. I tried this
median({average_usage} - avg({average_usage}))
But I get this error
Nesting of aggregate functions like PERCENTILECONT and PERCENTILE_CONT(50) WITHIN GROUP (ORDER BY “average_usage” - AVG(“average_usage”)) is not allowed.
How do I go about creating this calculation?