Forum Discussion
NewtoROB
7 months agoNew Member
Switch issues
I am new Power BI so the answer may be obvious. I have two indivdual mesures which work (one shows the average of the data, the other shows the median). however am having issues when using a switch. ...
- 7 months ago
Thanks for all the response, the solution was a ghost space. the 'Calculation Method' table actually had a leading space (e.g., " Median"). Now it's working
cengizhanarslan
Super User
7 months agoPlease try the measure below:
Avg/Med Wait List =
VAR _method = SELECTEDVALUE ( 'Calculation Method'[Calc Method], "Average" )
RETURN
SWITCH (
_method,
"Average", [Average Wait List],
"Median", [Median Wait List],
[Average Wait List]
)