Calculated field with 2 types of format

image
I want to have integers in the same calculated field, and if the last option is given, I want a percentage to appear at the end when displaying it. The attached image, I know it wouldn’t be right, I’ve tried adding the percentage in a thousand ways but all failed. Is it possible to do it?

Thank you in advance.

Hi @irispv13

Can you try and make all of your return values strings? And then for the last one concat the % onto it?

concat(toString({PDV vs AA (%)}),‘%’)

This will work for tables, but no other visual as they are now a string instead of a measure.

Hi @Max :slight_smile: ,
I have tried it and I get an error. It won’t let me save the calculated field and indeed I want to use this in a table.

What’s you calculated field looking like now?

Did you make sure all of the other return values are strings?

I needed to pass the other values ​​to strings. Fixed! Thank you!

1 Like