Forum Discussion
michellepace
Resolver III
6 years agoHow to format result in switch statement?
Hello, In the screenshot below I give my user the abolity to compare months either as an actual value or as a %. The problem is that I do not know how to force a percent format should my user select...
Fowmy
Super User
6 years agomichellepace
Your measure seems fine, can you try it on new table visual. Check your Slicer it it returns a single value as expected.
Diff LM =
SWITCH( TRUE(),
[Selected Metric] = "By Amount", [Diff. to LM],
[Selected Metric] = "By Percent", FORMAT([% Diff to LM], "Percent"),
[Diff. to LM]
)
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon on the right if you like this reply 🙂