How to dynamically change column that is used for a measure based on a filter/parameter

The specific instruction for this use case can be found here