You would need to do this in a derived table, I think. You would need to turn that measure into a dimension by aggregating it and creating a new table where it is actually a dimension.
Here it is in the documentation, or you might find this a more human coverage of the same topic.