It looked like it's exactly what I was looking for - but unfortunately it didn't do the job :\
Also didn't work...
You can create an additional CASE statement and place it on label, something like this:
CASE [Select a Measure]
WHEN 'Sales' then '$' + str(round(lookup(sum([Sales]),0),2))
when 'Profit' then '$' + str(round(lookup(sum([Profit]),0),2))
when 'Discount' then str(round(lookup(avg([Discount])*100,0),2)) + '%'
That's a great idea! but it fixes only half of the problem.
now I have % for the CR, but the Views/Installs are large numbers, and now they show "20000" instead of "20,000" with the numbers format :\
Is there a way to set a number format?
You can duplicate your Calculated Field as below
Calculated Field: "MeasureSwitchCalculation-Label",
CASE [Measure Switch]
WHEN "Views" THEN -SUM([Views])
WHEN "Downloads" THEN -SUM([Downloads])
WHEN "Installs" THEN -SUM([Installs])
WHEN "CR%" THEN [Conversion Rate]
Right click the new calculated Field "MeasureSwitchCalculation-Label" -->Default Properties -->Number Formatting -->Custom-->format..... #.00%;#,##.0
Attached a sample workbook.
If this is what you are looking for..let me know for any clarifications.
Book1.twbx 1.2 MB
Unfortunately, it didn't work...
It shows all the numbers as percents....
But I couldn't open the workbook you've uploaded, maybe I did something wrong...
if possible please share your workbook..