Forum Discussion
hcdecon
8 years agoRegular Visitor
SWITCH function to use images in Slicer
Hello. I am trying to use the SWITCH function to replace text for images in a Slicer but for some reason it's not working. The image URLs are fine, I think it may be because the table has active...
hcdecon
8 years agoRegular Visitor
Hi Anonymous thanks for the response.
Sorry I'm quite new to this, how do I add the 'other' value to show if none of the above conditions are satisfied? I couldn't find the answer online.
Anonymous
8 years agoNot applicable
Switch Statements are normally written like this:
SWITCH( "Compare to me", "Are you 6?", "This is the answer", "Are you 7?", "That is the answer", "Are you more than 7?", "Answer this way", "Instead answer like this" )
Or sometimes in a format more like this
SWITCH( TRUE, 6 = 'Table'[Field], "This is the answer", 7 = 'Table'[Field], "That is the answer", 'Table'[Field] > 7, "Answer this way", "Instead answer like this" )
Hopefully this illustrates it better for you