Data types Operators Statements
Converts a text string that represents a number to a number. The text to be converted. Scalar A single decimal value. The converted number in decimal data type.
-- 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" ) )
}
Last update: Jul 18, 2022 » Contribute » Show contributors Contributors: Alberto Ferrari, Marco Russo Microsoft documentation: https://docs.microsoft.com/en-us/dax/value-function-dax
DirectQuery
» Show verified builds Before 2017-01-01
This function performs a Context Transition if called in a Row Context. Click to read more. This expression is executed in a Row Context. Click to read more. The use of this function is not recommended. See Remarks and Related functions for alternatives. The use of this parameter is not recommended. This function is deprecated. Jump to the Alternatives section to see the function to use. A volatile function may return a different result every time you call it, even if you provide the same arguments. Click to read more. This parameter is deprecated and its use is not recommended. Limitations are placed on DAX expressions allowed in measures and calculated columns.
Want to improve the content of VALUE? Did you find any issue?
I’m creating a calculated column in a Power BI report. The calculated column concatenates integer and text columns. I tried using the below query to accomplish this, but it resulted in a syntax error. CalculatedColumn = Number.ToText(table1.[RegionID]) & " " & table1.[RegionName]I tried some other conversion methods also, which were not successful. Could someone please guide me on how one could achieve the above objective in Power BI? 1
Hi, I’m converting some imported data from xls. In xls, FieldName(“PEPM Revenue”) is formatted as a currency. But in BI, it is a text field. What syntax should I use to convert this into number format? Thank you for your help.
Welcome to the forum! How did you bring in your data into Power BI? Power BI brought in the data that way, but you can edit it in the Query Editor. Here is an example of the different options you have( All I did was left click on the ABC in the highlighted column): Thanks
Some other simple options as well You can simply choose number or currency from the Modeling tab in the Data Type section to convert your data, or you can use the VALUE function. Thanks Number.FromText(text as nullable text, optional culture as nullable text) as nullable number Returns a number value from the given text value, text.
Example 1Get the number value of "4". Usage Number.FromText("4")Output 4 Example 2Get the number value of "5.0e-10". Usage Number.FromText("5.0e-10")Output 5E-10 |