Events
Power BI DataViz World Championships
Feb 14, 4 PM - Mar 31, 4 PM
With 4 chances to enter, you could win a conference package and make it to the LIVE Grand Finale in Las Vegas
Learn moreThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
This article provides guidance on creating and using different data types in Microsoft Dataverse formula columns, such as decimal, whole number, floating point, and choice columns. It outlines steps starting with selecting fx Formula as the data type and entering a numeric value-returning formula in the formula bar.
Sign in to Power Apps at https://make.powerapps.com.
Select Tables, and then select the table where you want to add a formula column. If the item isn’t in the side panel pane, select …More and then select the item you want.
Select the Columns area, select New column, and then select the data type and enter the Power Fx formula. Depending on the formula you enter, you can create any of the following:
Create a formula column that returns a decimal number.
Create a formula column that returns a whole number.
Create a formula column that returns float.
1 + 2 + Float(1)
as it uses a float type operand - Float(1)
.Sum(1, 2, Float(1))
is of decimal type and Sum(Float(1), 1, 2)
is of float type.Float
, Sqrt
, Ln
, Power
, Exp
functions and the ^
operator return a float value.To create a choice formula column, either global choice or local choice of a simple choice column can be used as result.
Create a global choice. This example creates a global choice called Task Priority.
Create a formula column that returns a choice using a global choice.
Create a simple choice column. This example creates a Task Priority simple choice column for the account table.
Create a formula column that returns choice using a local choice of a simple choice column.
Local choices of related table's simple choice column can't be used as a result type in formula columns.
Options from the same option set should be used for all result arguments in choice formula columns.
A choice used by a formula column can't be updated.
Options of a choice can't be passed as an argument to string functions. Value function can be used to return the numeric value of an option.
Formula column's dependent local choice column or global choice can't be deleted.
For using a related table local choices (optionset) column's options in the formula column definition, first use choice and then use options of that local choice.
For example, a choice column named Color on the Contact table.
The choice column has options Red, Yellow, and Green.
For a formula column on the account table using the Color choice column, the formula appears like this:
Recommended - If(ParentAccount.Color == 'Color (Accounts)'.Red, 1, 2)
Not Recommended - If( 'Color (Accounts)'.Red == ParentAccount.Color, 1, 2)
Using the right type of number
Events
Power BI DataViz World Championships
Feb 14, 4 PM - Mar 31, 4 PM
With 4 chances to enter, you could win a conference package and make it to the LIVE Grand Finale in Las Vegas
Learn moreTraining
Module
Use Dataverse choice columns with formulas - Training
Explore how you can use Power Fx formulas to work with Microsoft Dataverse choice and choices columns. These column data types present the user with a fixed list of values defined by the maker.
Certification
Microsoft Certified: Power Platform Fundamentals - Certifications
Demonstrate the business value and product capabilities of Microsoft Power Platform, such as Power Apps, data connections with Dataverse, and Power Automate.