You should be able to right click on each of your measures > Default Properties > Number Format, and set each of them appropriately. If this solves your issues, please mark this answer as correct. If this doesn't solve your issues, please attach a .twbx file so we can better assist you. Thanks!
Here you go! I found out how to do this on the thread below. However, there solution didn't work 100%, I had to use a function on the Sum of Sales calculation called "ROUND" to get the number down to two decimals, and remove an extra comma from their calculation Take a look at the other thread and workbook and let me know if you have questions! If this solution works for you, please mark this answer as correct. Thanks
1 of 2 people found this helpful
As Claire Smith mentions/links to, you have to convert the values to a string to display in the same field. It can be a bit much depending on how many different formats you need.
However, depending on how you're showing the data, you could create separate calculated fields for each measure and put them in the same text mark. Then you can use the default properties option on these to get your end goal. Again, it depends on your end viz.
As you'd expect, just modified your original CASE statement:
CASE [Select Metric]
WHEN "Profit Ratio" THEN [Profit Ratio]
I have about 20 metrics in the parameter, so adding them all the to the text and then duplicating each metric to have an "on/off" is too much. The round function doesn't do anything here and doesn't force the number format at all.
Understood. In order to have them all in one field (and use different units) you'll have to convert the result to a string.
A better solution would be to pivot the data into a vertical structure and, for each metric, add some metadata such as a Calculation Type Flag and Format Flag to use in order to display the data as desired (as opposed to writing a giant CASE statement).
To round a number and convert to a string (correctly), there's a bit of work. I recommend seeing this thread.