cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Barber_Chris
Helper III
Helper III

Format Currency in HTML Table

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

 

 

1.JPGflow.JPG

9 REPLIES 9
Barber_Chris
Helper III
Helper III

I forgot to mention im looking to reduce the number of decimal places to 2

Hi @Barber_Chris 

 

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: 

https://powerusers.microsoft.com/t5/Flow-Ideas/Currency-and-decimal-format-in-Microsoft-Flows/idi-p/...

 

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!

v-yamao-msft
Community Support
Community Support

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'])),'£')

1.PNG

 

Best regards,

Mabel  

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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'])),'£')

 

 

1.JPGAnd 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          

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yamao-msft 

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'])),'£'))

1.PNG

 

 

Best regards,

Mabel  

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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. 

 

1.JPG

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   

       

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Top Solution Authors
Users online (3,989)