Hi Li! One neat trick that will work here is to split that measure value into two calculations, each of which becomes an empty string if it isn't being used. Then, you just put both of them into your label mark.
Your first calculation will be:
IIF(Parameter = "Raw data", [Raw Data], "")
Your second one will be:
IIF(Parameter = "%", [Raw Data]/[WhateverSum], "")
Set the default number format of the first one as a long number and the second one as a percentage.
Now, drop both of these measures into the Label mark. They'll technically both show up, but since one is an empty string, it'll be hidden. This is also a useful trick for doing conditional formatting.
Note that for the second formula, you'll probably want to use a LOD calculation of some sort for the denominator.
That's pretty cool David I haven't seen that method before. Here is a link that describes having multiple formats for a single measure. I believe the solution in this post doesn't deal with negative numbers but it is possible to modify the solution so it does support negatives.
Many thanks, David. It does the trick! The alignment goes a bit awry though and I am not sure if it has to do with show/no-show of the measures... just happy it works. Ingenious.
You're very welcome!
One thing you can try if there's an alignment issue is to make sure that the two fields are next to each other (and not separated by a line break) in the text editor.