Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Hambach
Frequent Visitor

Percentage formatting in Power Automate for HTML table in E-Mail

Hi everyone,

 

I have a report from which I want to send a table through a direct mail with special formatting and additional content. 

For this I have set up the following flow in Power Automate:

 

flow1.png

 

flow2.png

 

Now I have 1 problem:

- Even though the value columns (from Actual vs. Plan... ) in the Power BI table are correctly shown as percentages, the html table in the mail shows them as long floating point number. Is there an easy way to format them into a percentage value with just 2 digits after the decimal point?

 

Thank you for your help!

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @Hambach ,

 

css can only control the style of the page. For preserving decimal places, it can only be converted by set in powerbi. Or get the dom object in the js file and try the following formula to convert it. 

in desktop:

vhenrykmstf_0-1660636176034.png

vhenrykmstf_1-1660636291051.png

 

 

in js:

var num =2.446242342;
num = num.toFixed(2); // the output is 2.45


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-henryk-mstf
Community Support
Community Support

Hi @Hambach ,

 

css can only control the style of the page. For preserving decimal places, it can only be converted by set in powerbi. Or get the dom object in the js file and try the following formula to convert it. 

in desktop:

vhenrykmstf_0-1660636176034.png

vhenrykmstf_1-1660636291051.png

 

 

in js:

var num =2.446242342;
num = num.toFixed(2); // the output is 2.45


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors