VALUE DAX Function (Text)

Converts a text string that represents a number to a number.

Syntax

VALUE ( <Text> )
Parameter Attributes Description
Text

The text to be converted.

Return values

Scalar A single decimal value.

The converted number in decimal data type.

Remarks

The value passed as the text parameter can be in any of the constant, number, date, or time formats recognized by DAX. If text is not in one of these formats, an error is returned.

VALUE is not common because DAX implicitly converts text to numbers as necessary.

Examples

--  VALUE converts a text string that represents a number to a number.
EVALUATE
{
    ( "INT",            123,                     VALUE ( "123"        ) ),
    ( "FLOAT",          123.45678,               VALUE ( "123.45678"  ) ),
    ( "Scientific (1)", 123e3,                   VALUE ( "123e3"      ) ),
    ( "Scientific (2)", 123e-3,                  VALUE ( "123e-3"     ) ),
    ( "Date (1)",       DATE ( 2020, 10, 23 ),   VALUE ( "2020-10-23" ) ),
    ( "Date (2)",       DATE ( 2020, 10, 23 ),   VALUE ( "10/23/2020" ) ),
    ( "Date (3)",       DATE ( 2020, 10, 23 ),   VALUE ( "23/10/2020" ) ),
    ( "Time (1)",       TIME ( 10, 23, 45 ),     VALUE ( "10:23:45"   ) ),
    ( "Time (2)",       TIME ( 18, 05, 00 ),     VALUE ( "18:05:00"   ) ),
    ( "Time (3)",       TIME ( 18, 05, 00 ),     VALUE ( "6:05:00 pm" ) ),
    ( "Time (4)",       TIME ( 18, 05, 00 ),     VALUE ( "6:05pm"     ) )
}
Value1 Value2 Value3
INT 123 123
FLOAT 123.45678 123.45678
Scientific (1) 123000 123000
Scientific (2) 0.123 0.123
Date (1) 44127 44127
Date (2) 44127 44127
Date (3) 44127 44127
Time (1) 0.4331597222222222 0.4331597222222222
Time (2) 0.7534722222222222 0.7534722222222222
Time (3) 0.7534722222222222 0.7534722222222222
Time (4) 0.7534722222222222 0.7534722222222222

Last update: Mar 13, 2024   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo

Microsoft documentation: https://docs.microsoft.com/en-us/dax/value-function-dax

2018-2024 © SQLBI. All rights are reserved. Information coming from Microsoft documentation is property of Microsoft Corp. » Contact us   » Privacy Policy & Cookies

Context Transition

This function performs a Context Transition if called in a Row Context. Click to read more.

Row Context

This expression is executed in a Row Context. Click to read more.

Iterator

Not recommended

The use of this function is not recommended. See Remarks and Related functions for alternatives.

Not recommended

The use of this parameter is not recommended.

Deprecated

This function is deprecated. Jump to the Alternatives section to see the function to use.

Volatile

A volatile function may return a different result every time you call it, even if you provide the same arguments. Click to read more.

Deprecated

This parameter is deprecated and its use is not recommended.

DirectQuery compatibility

Limitations are placed on DAX expressions allowed in measures and calculated columns.
The state below shows the DirectQuery compatibility of the DAX function.

Contribute

Want to improve the content of VALUE? Did you find any issue?
Please, report it us! All submissions will be evaluated for possible updates of the content.


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.