Forum Discussion
VeljkoP98
2 years agoFrequent Visitor
Filter metrics presented in different columns
Hello everyone, I have multiple metrics in different columns, Column1=Metric1, Column2=Metric2 and etc. I would like to create some sort of measure called Metric Name which i could use to filter ...
VeljkoP98
2 years agoFrequent Visitor
Thanks for suggestions, however, i am not able to enter [Metric1],[Metric2], etc in the SWITCH function...
saudansari
Helper II
2 years agoYou can also try to Create Measures for Each Metric:
For each metric (Metric1, Metric2, etc.), create a separate measure. Let's call them Measure_Metric1, Measure_Metric2, and so on.
Adjust the SWITCH statement in the SelectedMetric measure to reference the newly created measures:
SelectedMetric =
VAR SelectedMetricName = SELECTEDVALUE('ParameterTable'[MetricName])
RETURN
SWITCH (
SelectedMetricName,
"Metric1", [Measure_Metric1],
"Metric2", [Measure_Metric2],
"Metric3", [Measure_Metric3],
)
Make sure to replace [Measure_Metric1], [Measure_Metric2], [Measure_Metric3], etc., with the actual names of your measures.