Forum Discussion
Metric Switch Formatting Error
- Anonymous5 years ago
I just figured out a way to resolve it after trying every possible way. I was able to create a third metric switch statement that did the subtraction and formatting in the last metric switch used. Simple = Difficult haha
Thank you for all your help and suggestions! Radhika2605 Fowmy
Hi Anonymous If my second option (Is it possible for you to multiply the result of calculation in measures like Cancellation %, Productivity % by 100 and format then using options on the Column Toold Ribbon from the top to say that it is a % instead of using Format function in switch?) doesnt work then we can try to do these things-
1. Actually what I meant was as you mentioned that switch is converting the data type of result to text so you can do following -
Value(Switch()) - Value(Swicth) //in your measure where you are subtracting two switches.
2. If the above doesnt work then can you please try to use value function outside of the Format functions so that as format is returning a text then it will be converted to Number (not entrierly sure if this will work though).
3. to check if switch is converting value to text - I would suggest to do a test. Remove the format functions so that the result of Cancellation, Productivity and all other measures is number (check the data types too before using them in switch) and then try to subtract it. In this way at least we will know if Switch is causing a problem or Format and can then see what can be done.
Thanks
Radhika
hope this clarifies.
I just figured out a way to resolve it after trying every possible way. I was able to create a third metric switch statement that did the subtraction and formatting in the last metric switch used. Simple = Difficult haha
Thank you for all your help and suggestions! Radhika2605 Fowmy