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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to remove comma fr...
Power Automate
Unanswered

How to remove comma from an integer

(1) ShareShare
ReportReport
Posted on by 65

I have a question: Is it possible to remove comma from a number value and convert that decimal number to whole number in power automate platform. For example: I want to convert 1,27.89 to 128. Here I want to remove comma after 1,2XX and covert the decimal number 127.89 to 128. Please note that the value should remain as integer only and not string.

Categories:
I have the same question (0)
  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @svivek Pls use format number action. First make it proper float number by removing comma. use replace().

    Hardesh15_0-1657690914114.png

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

  • svivek Profile Picture
    65 on at

    Hi Hardesh,

    Actually I am getting an integer value (it is variable integer it can be 1,000 or 12,78.9 etc.) from a PDF extractor.

    I am using this variable integer in a format number function. And in the format row I have added "#######" as suggested by you as solution. However I am getting an error. Pls help (refer below screenshot for details)

    svivek_0-1657691636387.png

     

    svivek_1-1657691698762.png

    Unable to process template language expressions for action 'Format_number' 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

  • Shuvam-rpa Profile Picture
    891 Super User 2024 Season 1 on at

    @svivek do as suggested by @Hardesh15 but before that try to convert the value in integer using the int() expression

    Shuvamrpa_0-1657692455227.png

    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!

  • Verified answer
    Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @svivek It means you are passing string value rather than float. Convert your number into float type.

    1. Use compose and replace all comma using replace() function in capacity.

    2. Initialize one float variable and pass compose output with float().

    3. Then pass float variable into number format.

    I can suggest this in one step but that you may not understand.-

    Hardesh15_0-1657693269204.png

     

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

  • svivek Profile Picture
    65 on at

    Hi @Hardesh15 ,

     

    I tried using float type as suggested above. However it is showing "Invalid expression"

     

    As per your suggestion I have used float by placing "variable as highlighted in red font below. Here the red font variable is coming from PDF extractor. Also I would like to highlight that this variable can have comma anywhere in number and I understand this float expression should be able to remove comma placed at any digit of a number :

    Synatx as suggested : float(replace('variable',',','))

     

    Synatx actually used in power automate:

    float(replace('outputs('PDF_Extractor')?['body/responsev2/predictionOutput/labels/Capacity554fecb051bb0b706c621d503cf5f5d6/value']',',','))

     

    Pls advice.

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @svivek Your expression is wrong.

    Replace('Your Output', 'part of your output you want to replace', 'replacement value')

    Part of your output you want to replace : in your case it is comma

    Replacement value: nothing means quotes without space ''

    Your expression:

    Float(Replace(outputs('PDF_Extractor')?['body/responsev2/predictionOutput/labels/Capacity554fecb051bb0b706c621d503cf5f5d6/value'],',',''))

     

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

  • svivek Profile Picture
    65 on at

    Hi @Hardesh15 

     

    Still it is showing expression is invalid. I have provided a detailed screenshot for clarity what I am exactly typing in expression editor which is leading to invalid expression. Not sure where am I going wrong.

    float(repalce('outputs('Pump_Datasheet_Value_Extractor')?'body/responsev2/predictionOutput/labels/Flowrate/value']',',',''))

    svivek_0-1657863789933.png

     

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @svivek  Do one thing use one compose and pass your pump data value in it. Then try it. Also sometime you have opened tab for long time it cached previous session. So refresh your tab and then try.

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

  • svivek Profile Picture
    65 on at

    @Hardesh15  tried closing tabs and started a fresh session.

    Additionally created compose and passed on the string value to format number function as :

    float(replace('outputs('Compose')',','''))

    Still it shows expression in valid.

    Is there any other option?

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @svivek Pls share screen with expression.

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard