In flow, I am using actions below:
- Get items
- Select action using data from above action
Inside select, I am using custom headers and mapping it to dynamic values coming from SP as shown below.
Amount as an example is a number field and for some reason I am having issues with rounding decimal value.
I am using an expression that I found from flow community as below:
if(equals(mod(item()?['Amount'],1),0), concat(item()?['Amount'],'.00'), concat(first(split(string(item()?['Amount']),'.')),'.', substring(concat(last(split(string(item()?['Amount']),'.')),'0'),0,2)))
expression above works and makes sure that only two decimals are returned but its still not returning accurate results. For example 9.778 gets resolved as 9.77 which in theory should be 9.78, similarly 40.325 gets resolved as 40.32 instead of 40.33.
Can someone please help me with the correct formula so that I can use, I am really stuck since two days for this and have not been able to get it to work, please help.