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 / Format "1000.55" into ...
Power Automate
Unanswered

Format "1000.55" into "$1,000.55" in Power Automate Desktop

(2) ShareShare
ReportReport
Posted on by 79

Hi 
anyone know how to change 1000.55 into $1,000.55 in Power Automate Desktop?
i have uses action text to number but the end result still shows 1000.55

my variable say is SPNo = 1000.55 which is a text

i uses convert text to number with new variable as intSPNo
when i display it as $%intSPNo%

it shows $1000.55

i need the thousand separator to be shown

Pls help

Thanks

  • Sayan Profile Picture
    818 Moderator on at

    Hey @Zy_Sin 

     

    You can use the following approach to convert 1000.55 to $1,000.55

     

    Copy and Paste the Code in your workflow : 

     

    SET Number TO 1000.55
    SET formattedNumber TO 0
    @@copilotGeneratedAction: 'False'
    Scripting.RunPowershellScript.RunPowershellScript Script: $'''$number = %Number%
    $formattedNumber = \"{0:N2}\" -f $number
    return $formattedNumber
    ''' ScriptOutput=> PowershellOutput
    SET NewVar TO $'''$%PowershellOutput%'''

     

    Main Work Flow : 

    Sayan_0-1720602935914.png

    Output :

    Sayan_1-1720602946468.png

     

    PowerShell Script:

    Sayan_2-1720602976455.png

     

    Sayan_3-1720603002641.png

     

    PowerShell Code : 

     $number = %Number%
    $formattedNumber = "{0:N2}" -f $number
    return $formattedNumber

     

    ------------------------------------------------------------------------------------------------------------------------------

    If my suggestion helped you, please give it a Thumbs up 👍 and Mark it as a Solution 🤖 so that it can benefit others in the community.
    Sayan Patra
    RPA Developer

     

  • VishnuReddy1997 Profile Picture
    2,666 Super User 2026 Season 1 on at

    Hi @Zy_Sin ,

     

    Please find the solution.There are 2 methods you can achieve this.

     

    Method 1: The simplest way is to not to convert Text to number.

    VishnuReddy1997_0-1720603335081.png

     

    Code:

     

    SET intSPNo TO $'''1,000.50'''
    SET Currency TO $'''$%intSPNo%'''
    Display.ShowMessageDialog.ShowMessage Message: Currency Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed14

     

    Method 2: Using some script.

     

    VishnuReddy1997_0-1720604159516.png

     

    Code:

    SET intSPNo TO $'''1,000.50'''
    Text.ToNumber Text: intSPNo Number=> intSPNo
    @@copilotGeneratedAction: 'True'
    Scripting.RunVBScript.RunVBScript VBScriptCode: $'''Function FormatCurrency(value)
     \' Format the value as currency with dollar sign and commas
     Dim formattedValue
     formattedValue = FormatNumber(value, 2)
     formattedValue = \"$\" & formattedValue
     FormatCurrency = formattedValue
    End Function
    
    \' Example usage
    Dim value
    value = %intSPNo%
    
    Dim result
    result = FormatCurrency(value)
    WScript.Echo result''' ScriptOutput=> Convert ScriptError=> ScriptError6

     

     

     

    (Note:- if you got your solution you can mark as solution and gives kudos)


    Thanks & Regards

    Vishnu Reddy

  • Riyaz_riz11 Profile Picture
    4,219 Super User 2026 Season 2 on at

    HI  @Zy_Sin 

    Refer this:

    Ahammad_Riyaz_2-1720607516270.png

     

     

    SET inputVariable TO 1000.55
    Text.ToNumber Text: inputVariable Number=> inputVariable
    @@copilotGeneratedAction: 'True'
    Scripting.RunVBScript.RunVBScript VBScriptCode: $'''Function FormatCurrency(value)
     Dim formattedValue
     formattedValue = FormatNumber(value, 2)
     formattedValue = \"$\" & formattedValue
     FormatCurrency = formattedValue
    End Function
    Dim value
    value = %inputVariable%
    Dim result
    result = FormatCurrency(value)
    WScript.Echo result''' ScriptOutput=> strConvertedAmount
    

     

     

    Copy and paste the code in PAD.

     

     

    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    Regards,
    Riyaz

      


     

     

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
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 349 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard