web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Number format to chang...
Power Automate
Answered

Number format to change decimal to percentage

(0) ShareShare
ReportReport
Posted on by 105

Hi

 

I have an excel table that is created from a ms form. The table then has a calculated column thats gives a percentage based on Yes and No Answers.

 

AM1974_0-1709135661320.png

 

When I put this into a word document, the total field is decimal. eg. 100% returns a value of 0.1

 

How do I get it to format as a percentage.

 

This is my flow.

 

AM1974_1-1709135961556.png

 

 

 

Categories:
  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @AM1974 

     

    did you check Total % dynamic content looks like which is an output from list rows in a table action ?

     

    Also are you able to open the docx file after creating via this flow ?

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • AM1974 Profile Picture
    105 on at

    Hi

     

    Yes I can open the doc file after creations.

     

    If for example the Total %  is 50.00% on the excel table, the output for the Total % on the word doc is 0.5

  • Chriddle Profile Picture
    8,729 Super User 2026 Season 2 on at

    The cell value in Excel is the corresponding fraction of 1.

    The fact that Excel shows 50% is only due to the display settings of this cell/column in Excel.

     

    Hence you have to convert this fraction in Power Automate: 

    formatNumber(0.5, 'P')

    Chriddle_0-1709196233775.png

     

  • AM1974 Profile Picture
    105 on at

    How do I do that in my workflow. I just tried adding this to the create file

     

    formatNumber(outputs('Get_a_row')?['body/Total %'],'P')
     
    but it failed.

     

    Unable to process template language expressions in action 'Create_file' inputs at line '0' and column '0': 'The template language function 'formatNumber' expects its first parameter to be an integer or a decimal number. The provided value is of type 'String'. Please see

  • Verified answer
    Chriddle Profile Picture
    8,729 Super User 2026 Season 2 on at

    OK, the Excel connector returns a stringified version of the number 😬

     

    So you need to use float(...) to convert it.

    The if(empty(...) and coalesce(...) expressions make this conversion more robust

    formatNumber(
    	if(
    		empty(outputs('Get_a_row')?['body/Total %']),
    		0,
    		float(
    			coalesce(
    				outputs('Get_a_row')?['body/Total %'],
    				0
    			)
    		)
    	),
    	'P'
    )

     

  • AM1974 Profile Picture
    105 on at

    Thank you so so much. That worked. I appreciate your time in helping me resolve this problem.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 315 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 267

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard