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 / Numeric Values in Vari...
Power Automate
Suggested Answer

Numeric Values in Variables

(0) ShareShare
ReportReport
Posted on by
Version: 2.46.163.24194
 
Issue 1:  When I use the "Set variable" feature and type 2, the result in the Desktop flow is '2' and not just 2.  In order to set a variable to be numeric, I have to use "Set Text to number".  I have done it over and over and I get the same result.
 
So, after I do the following:
  • Drag "Set variable' to the Main flow
  • Change the variable name to X
  • Set the value to 0 (Zero)
  • (Note:  There is no dropdown to set the variable type!)
  • Click:  Save
...the result is:
  • Set variable:  Assign to variable X the value '0'
Then I do the following:
  • Drag Convert text to number to the Main flow
  • Set "Text to convert:" =X
  • Change "Variables produced" to Xnum
  • Click:  Save
...the Result is
  • Convert text '=X' to number and store it into Xnum
That is truly a convoluted process.
 
I followed the same process for the variable "Y", also set to Zero.
 
That would be so bad except that when using the "If" Setting as "If '=Xnum=Ynum' then" (what Power Automate displays) results in the error "Incompatible types for comparison. These types can't be compared: Text, Decimal."
 
I love this app but the simplest programming aspects are just too complicated...and I know I am not alone.

I could really use some help.

Respectfully,
JPIII
I have the same question (0)
  • AnthonyAmador Profile Picture
    2,553 Moderator on at
    Hi, 
     
    This is strange. I tested with the same version, and when I enter only the number, it gets categorized as a numeric value.
     
     


    Am I missing something? Could you please share screenshots so I can try to replicate the behavior?
     
    Anthony
  • Suggested answer
    NathanAlvares24 Profile Picture
    1,714 Moderator on at
     
    The reason why '2' is accepted as text is because you enabled Power Fx in your flow.
    It will look like this:
     
    Create a new flow and disable the Power Fx for that flow like given below:
     
    Create the same action again in that flow and it will appear like this:
     
    This is what you want.
     
    I hope this helps.

    Regards,

    Nathan Alvares
    Junior RPA/AI Developer
     
    -------------------------------------------------------------------------------------------------------------------------------------------------------

    If you found this helpful, check out my LinkedIn and YouTube for more cool stuff:

    🔗 LinkedIn
    📺 YouTube

     
    And if this solved your problem, don't forget to smash that 👍 "Thumbs up" and give a hearty ✅ "Accept my solution." Your future self and others will thank you! 😉✨
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
     
    usually i tried like this 

     
    for numerical variable. But i see for new version, putting % in numbers is not needed as it automatically identifies it as number. But you can try like as i shared in screenshot above.
     
     
    Thanks & Regards,
    Nived N 
    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

     Found my answer helpful? Please consider marking it as the solution!
     Your appreciation keeps me motivated. Thank you!
  • JM-02090915-0 Profile Picture
    4 on at
    I had this same problem, If you have powerfx enabled, using =number i.e. =30. It will define the variable as a number.

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard