Forum Discussion
Anonymous
4 years agoNot applicable
Measure shows incorrect image
Hello everyone,
I have created a measure which I plotted in the visual Image by Cloudscope. My intention is to show the player when one player is selected, but show the image 'Several players_svg' when two or more players are filtered. Unfortunately, it only returns that image, even though I only select one player. I am not following the logic; why isn't it working and what has to be changed?
The measure is as follows:
Players_svg =
VAR Player =
SWITCH(
TRUE(),
VALUES('Players'[PlayerID]) = 1,
[Messi_svg],
VALUES('Players'[PlayerID]) = 2,
[Lewandowski_svg],
VALUES('Players'[PlayerID]) = 3,
[Ronaldo_svg],
VALUES('Players'[PlayerID]) = 4,
[Haaland_svg],
VALUES('Players'[PlayerID]) = 5,
[Van Dijk_svg]
)
RETURN
IF(NOT(ISFILTERED(Players[PlayerID])), [Several players_svg],
Player)
Try the following :
YourSelection =
VAR Selection =
SELECTEDVALUE ( 'Players'[PlayerID] )
RETURN
SWITCH (
TRUE (),
Selection = 1,[Messi_svg],
Selection = 2,[Lewandowski_svg],
Selection = 3,[Ronaldo_svg],
Selection = 4,[Haaland_svg],
Selection = 5,[Van Dijk_svg],
[Several players_svg]
)
2 Replies
- amirabedhiafiImpactful Individual
Try the following :
YourSelection =
VAR Selection =
SELECTEDVALUE ( 'Players'[PlayerID] )
RETURN
SWITCH (
TRUE (),
Selection = 1,[Messi_svg],
Selection = 2,[Lewandowski_svg],
Selection = 3,[Ronaldo_svg],
Selection = 4,[Haaland_svg],
Selection = 5,[Van Dijk_svg],
[Several players_svg]
)
- AnonymousNot applicable
amirabedhiafi Thank you! Works like a charm 🙂