Hi,
I have a flow that creates a HTML table from a sharepoint list then adds it to an email. The flow works fine and all the data is there but the currency colums display such as 30.0000000000000 with no £ sign.
Can anyone advise me how this would be achieved.
Regards,
Chris
I forgot to mention im looking to reduce the number of decimal places to 2
You can initialise a variable and then pass the currency value in that and then use an expression to trim the decimals. Please see the solved thread below for the expression:
https://powerusers.microsoft.com/t5/Building-Flows/decimal-place/td-p/50303
Rounding currency/ decimals is not available as direct action or function in flow currenlty and you can upvote this idea here:
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hi @Barber_Chris ,
I assume that the column CIS is a calculated column, I have figured out the following workaround for your scenario, please check it for a reference.
Input the following code in the value field of CIS field:
concat(string(float(item()?['cis'])),'£')
Best regards,
Mabel
Hi Mabel,
Im getting somewhere following your post thanks.
So I tried as you said with the following expression:-
concat(string(float(item()?['CIS_x0020_on_x0020_Labour'])),'£')
And not its displaying like this...
Hi @Barber_Chris ,
What’s your expected result? Could you show me an example?
Actually, I am getting the same result with you for the CIS column.
However, Flow doesn’t have the same Text function to format a number or a date/time value.
Let me see if I could help figure out it for your scenario.
Best regards,
Mabel
Thanks for ocming back to me so in looking for it to display like this £1000.00
Regards,
Chris
Hi @Barber_Chris ,
Please try with the following code:
if(contains(item()?['cis'],'.00'),concat(string(float(item()?['cis'])),'.00£'),concat(string(float(item()?['cis'])),'£'))
Best regards,
Mabel
Hi @v-yamao-msft ,
Im getting the same outcome. The £ sign is at the end of the number and its not always 2 decimal places.
Hi @Barber_Chris ,
You may need to modify the function likes below:
if(contains(item()?['cis'],'.00'),concat('£',string(float(item()?['cis'])),'.00'),concat('£',string(float(item()?['cis'])))
However, if you want the end of the number always to be 2, you may need to add more conditions in the flow to check if it has two decimals, if not, format it.
Best regards,
Mabel
User | Count |
---|---|
89 | |
37 | |
26 | |
13 | |
12 |
User | Count |
---|---|
128 | |
53 | |
38 | |
26 | |
21 |