VALUE
A
C
- CALCULATE
- CALCULATETABLE
- CALENDAR
- CALENDARAUTO
- CEILING
- CHISQ.DIST
- CHISQ.DIST.RT
- CHISQ.INV
- CHISQ.INV.RT
- CLOSINGBALANCEMONTH
- CLOSINGBALANCEQUARTER
- CLOSINGBALANCEYEAR
- COALESCE
- COLUMNSTATISTICS
- COMBIN
- COMBINA
- COMBINEVALUES
- CONCATENATE
- CONCATENATEX
- CONFIDENCE.NORM
- CONFIDENCE.T
- CONTAINS
- CONTAINSROW
- CONTAINSSTRING
- CONTAINSSTRINGEXACT
- CONVERT
- COS
- COSH
- COT
- COTH
- COUNT
- COUNTA
- COUNTAX
- COUNTBLANK
- COUNTROWS
- COUNTX
- COUPDAYBS
- COUPDAYS
- COUPDAYSNC
- COUPNCD
- COUPNUM
- COUPPCD
- CROSSFILTER
- CROSSJOIN
- CUMIPMT
- CUMPRINC
- CURRENCY
- CURRENTGROUP
- CUSTOMDATA
D
E
I
N
O
P
R
S
- SAMEPERIODLASTYEAR
- SAMPLE
- SEARCH
- SECOND
- SELECTCOLUMNS
- SELECTEDMEASURE
- SELECTEDMEASUREFORMATSTRING
- SELECTEDMEASURENAME
- SELECTEDVALUE
- SIGN
- SIN
- SINH
- SLN
- SQRT
- SQRTPI
- STARTOFMONTH
- STARTOFQUARTER
- STARTOFYEAR
- STDEVX.P
- STDEVX.S
- STDEV.P
- STDEV.S
- SUBSTITUTE
- SUBSTITUTEWITHINDEX
- SUM
- SUMMARIZE
- SUMMARIZECOLUMNS
- SUMX
- SWITCH
- SYD
T
U
Syntax of the VALUE Function
The syntax of the VALUE function in Power BI is as follows:
VALUE(❰text❱)
Here, `❰text❱` refers to the cell or field that needs to be converted into a numerical value.
Examples of Using the VALUE Function
Let's take a look at some examples of how the VALUE function can be used in Power BI.
Example 1: Converting Text to Numerical Values
Suppose we have a table with the following data:
| Item | Price |
|------|-------|
| A | $10 |
| B | $20 |
| C | $30 |
Here, the `Price` column contains text values that represent currency values. To convert these values into numerical values, we can use the following formula:
=VALUE(SUBSTITUTE([Price],”$”,””))
This formula replaces the `$` symbol with an empty space, and then applies the VALUE function to convert the text to a numerical value.
Example 2: Handling Errors
In some cases, the text values may not be in the correct format, which can lead to errors when applying the VALUE function. To handle such errors, we can use the IFERROR function, as shown below:
=IFERROR(VALUE([Text]),0)
This formula first applies the VALUE function to the `Text` field. If an error is encountered, it returns a default value of `0`.
Example 3: Converting Dates to Numerical Values
The VALUE function can also be used to convert dates into numerical values. For example, consider the following data:
| Date | Sales |
|------------|-------|
| 01/01/2021 | $100 |
| 02/01/2021 | $200 |
| 03/01/2021 | $300 |
Here, the `Date` column contains date values in the format `DD/MM/YYYY`. To convert these values into numerical values, we can use the following formula:
=VALUE(TEXT([Date],”YYYYMMDD”))
This formula first uses the TEXT function to convert the date values into a string in the format `YYYYMMDD`, and then applies the VALUE function to convert the string to a numerical value.
The VALUE function in Power BI is a powerful tool that allows users to convert text values into numerical values. It can be particularly useful in situations where data is imported from external sources and the values are not recognized as numbers by default. The syntax of the VALUE function is simple, and it can be used in a variety of scenarios, ranging from converting currency values to numerical values to converting dates to numerical values. With the VALUE function at your disposal, you can easily analyze and report on your data with greater accuracy and precision.