I am trying to format the data of a calculated field within the flow to send in an email to show 2 decimal places. has anyone acheived this?
I have tried both Text and Round and several iterations of these functions and they come back as invalid templates.
Can anyone shine any light on this?
the value from the column is 1.50000000000 i only want to see 1.5
Hi can you help me format the number to accounting type. It is from submitted MS Form then triggers an approval. I want to format the number in email to accounting type. Thanks
My methodology to round up numbers is as follows:
1. Use the "Format Number" node to convert round up the number to desired decimals and store as text.
2. Convert the rounded number outputted as text in the previous step using float function as storing it in a variable.
Please refer the attached screenshot of the flow.
I actually tested out the "text" function in a calculated column formula then displayed the values in an HTML email and it worked fine. Here's the calculated column formula I used. Added the "text" function before the "Datedif".
=IF(OR(ISBLANK([Requested Date]),ISBLANK(NOW())),"",IF(OR(Status="Filled",Status="Cancelled"),"",TEXT(DATEDIF([Requested Date],NOW(),"D"),"0")))
@rafaelbenicio you should use the "formatNumber()" expression or the "Format Number" action.
Here are links to the standard formats and custom formats.
formatNumber(1.995,'N2') // returns "2.00"
Thanks @degvalentine a lot for sharing this, I was stuck with this issue since 3 days and this helped me out, keep up the good work, cheers!!
p.s: it works great and gives me two decimal points.
Here's the doc for all available number formatting options: https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings
Hi @Anonymous,
Actually, my hideous workaround is no longer needed. They added the "formatNumber" function. Please use that instead. Here's the syntax for common currency formatting (without currency symbol):
formatNumber(variables('myFloat), 'N', 'en-US')
@degvalentine thanks for sharing, I used your expression for limiting decimals to two places and it seems to work well. Noticing a small issue, if the values are 2.2, 4.3 etc then the expression returns 2.2, 4.3 only but instead i want it to show 2.20, 4.30, is it possible? Please help.
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1