Percentage format, eMail body, TEXT Function

Anaplanners,

Running into a rather simple issue, wanted to use the anaplan mail to function with the body picking up few data from the module, for example: - 

Marks obtained by each student is stored in line item called 'STUD1.1 Student Details'.Marks
Marks Obtained = 70% 

Now my mail body formula would be "Marks Obtained = " & TEXT('STUD1.1 Student Details'.Marks)

However, the result returns 

Marks Obtained = 0.7

Is there a way i can display the same in percentage format. Directly referring without using TEXT function returns error, since Text & Number cannot be concatenated.

Thanks for the help

Tagged:

Best Answer

Answers

  • Hi @Sachinsourav02,

    Not so easily, but with just a little transformation you can achieve the result that you want, like:
    "Marks Obtained = " & RIGHT("0" & TEXT(ROUND('STUD1.1 Student Details'.Marks * 100,0,NEAREST,EXACT)),2) & "%"
    Explanation:
    1. You can firstly multiply number *100, to have a whole number, so in your case 70.
    2. Then you use TEXT function on it to get a string, and you can concatenate it with "%", so you arrive to "70%"
    3. Depending on if you want "5%" to be displayed as "5%" or "05%", you can also do things like RIGHT("0" & TEXT(Num)),2).
    4. You probably also need to apply ROUND() function (and test it!) for cases like "not whole percentages" or "rounding inaccuracies".

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In