Value function in Power Apps
Converts a string of text to a number.
The Value function converts a string of text that contains number characters to a number value. Use this function when you need to perform calculations on numbers that were entered as text by a user.
Different languages interpret , and . differently. By default, the text is interpreted in the language of the current user. You can specify the language to use with a language tag, using the same language tags that are returned by the Language function.
Notes on the format of the string:
- 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.
- 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.
- The string may be in scientific notation, with 12 x 103 expressed as "12e3".
If the number is not in a proper format, Value will return blank.
Value( String [, LanguageTag ] )
- String - Required. String to convert to a numeric value.
- LanguageTag - Optional. The language tag in which to parse the string. If not specified, the language of the current user is used.
The user running these formulas is located in the United States and has selected English as their language. The Language function is returning "en-US".
|Value( "123.456" )||The default language of "en-US" will be used, which uses a period as the decimal separator.||123.456|
|Value( "123.456", "es-ES" )||"es-ES" is the language tag for Spanish in Spain. In Spain, a period is a thousands separator.||123456|
|Value( "123,456" )||The default language of "en-US" will be used, which uses a comma as a thousands separator.||123456|
|Value( "123,456", "es-ES" )||"es-ES" is the language tag for Spanish in Spain. In Spain, a comma is the decimal separator.||123.456|
|Value( "12.34%" )||The percentage sign at the end of the string indicates that this is a percentage.||0.1234|
|Value( "$ 12.34" )||The currency symbol for the current language is ignored.||12.34|
|Value( "24e3" )||Scientific notation for 12 x 103.||24000|