You are currently viewing How to use PowerApps value function?
Value function in PowerApps

How to use PowerApps value function?

  • Post author:
  • Post category:Power Apps
  • Reading time:7 mins read

In this post, We will learn what is value function in PowerApps, and how to convert text to number using PowerApps Value function .

PowerApps value function

  • The Power apps Value function returns a number value from a string of text that contains number characters.
  • You can use Power apps Value function when you need to perform calculations on numbers entered as text by a user.
  • By default the text is interpreted in the current user’s language . You can use the same language tags that the Language function returns to specify the language to use with a language tag.

Value function syntax

Value( String [, LanguageTag ] )

Where String is String to convert to a numeric value.
and LanguageTag – Optional. The language tag in which to parse the string. If not specified, the language of the current user is used.

You need to remember the following points while working with the Value functions in PowerApps:

  1. The string may be prefixed with the currency symbol for the current language. The currency symbol is ignored. Currency symbols for other languages are not ignored.
  2. The string may be include a percent sign (%) at the end, indicating that it is a percentage. The number will be divided by 100 before being returned. Percentages and currency symbols cannot be mixed.
  3. The string may be in scientific notation, with 12 x 103 expressed as “12e3”.

PowerApps Value function Examples

Example1:

Value( "113.512" )	

The result here will be 113.512 as the default language of the user is “en-US”

Example2:

Value( "113.512" ,"es-ES")	

The result here will be 113512 as the language is “es-ES”, so a period is a thousands separator in Spain.

Example3

Value( "113,512" ,"es-ES")	

In Spain a comma is the decimal separator, so the result will be 113.512

Example 4:

Value( "113,512" )	

The default language of “en-US” will be used, which uses a comma as a thousands separator, so the result will be 113521

Example 5:

Value( “98.19%” )

the value is a percentage so the value represents a percentage symbol at the end of the string, so it is a percentage and the result will be .9819

Example 6:

Value( “$ 90.15” )

The currency symbol for the current language is ignored so the result will be 90.15 and we have take in consideration the current value that is en-US the default one . as in some language like Spain the “.” is for thousand separator so the result will differ.

Use the Value function to convert the text input to number, the formula will be

Value(yourtextinput.Text)

You can use the result of the PowerApps value function for your calculation or you can use the result of PowerApps value function as variable.

set(var1,Value(yourstring))

In conclusion the PowerApps value function used to convert string to number.

See Also
Join us
Need Help
  • Have a related question? Please ask it at deBUG.to Community.

Heba Kamal

Microsoft MVP, MCT, Technical Speaker, Blogger, and Microsoft 365 and Power Platform Consultant.