Skip to content

Commit 2c9094d

Browse files
authored
Update formula-column-data-types.md
1 parent 672e32d commit 2c9094d

File tree

1 file changed

+25
-22
lines changed

1 file changed

+25
-22
lines changed

powerapps-docs/maker/data-platform/formula-column-data-types.md

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Create a formula column that returns a decimal number.
4141
:::image type="content" source="media/formula-columns-decimal-fd.png" alt-text="Screenshot of a create a new formula column pane for use with a decimal number using 'Price Per Unit' * 150.":::
4242
1. Expand **Advanced options**, select **Decimal** as the **Formula data type**, and then set the required number of decimal places.
4343
:::image type="content" source="media/formula-columns-decimal-adv-options.png" alt-text="Screenshot of a decimal formula column definition.":::
44-
1. Select **Save**.
44+
1. Select **Save**. By default, **Formula data type** is set to Decimal and a Decimal formula field gets created.
4545

4646
## Create a whole number formula column
4747

@@ -61,52 +61,55 @@ Create a formula column that returns float.
6161

6262
1. Select **Data type** as ***fx* Formula**.
6363
1. Enter a formula that returns a floating point number in the **Formula** bar.
64-
This example creates a formula column called *TestFloat*.
64+
This example creates a formula column called *Number of Units*. *Total Price* and *Price Per Unit* columns are of decimal data type.
6565
:::image type="content" source="media/formula-columns-float-fd.png" alt-text="Screenshot of a creating float formula column using Float(123) as the formula.":::
6666
1. Expand **Advanced options**, and set the required number of decimal places.
6767
1. Select **Save**.
6868

6969
### Guidelines for creating floating point number formula columns
7070

71-
- Floating point numbers store an extremely close approximation of a value. Floats are typically used for storing scientific numeric values.
7271
- If an operand involved in an arithmetic operation is of float type, then the result of the formula is of float type. For example:
7372
- ```1 + 2 + Float(1)``` as it uses a float type operand - ```Float(1)```.
7473
- A numeric function returns a float value when the first parameter provided to the function is of float type. Otherwise, the function returns a decimal value. For example:
7574
- ```Sum(1, 2, Float(1))``` is of decimal type and ```Sum(Float(1), 1, 2)``` is of float type.
7675
- ```Float```, ```Sqrt```, ```Ln```, ```Power```, ```Exp``` functions and the ```^``` operator return a float value.
77-
- Float formula columns support a maximum precision of 5.
7876

7977
## Create a choice formula column
8078

81-
To create a choice formula column, either global choice or local choice of a simple choice column can be used as a result in ```If``` or ```Switch``` functions.
79+
To create a choice formula column, either global choice or local choice of a simple choice column can be used as result.
8280

8381
### Using global choice
82+
Create a global choice. This example creates a global choice called *Task Priority*.
8483

85-
1. Create a [global choice](custom-picklists.md). This example creates a global choice with a **Display name** that's *Color*.
86-
1. Add the following **Choices**:
87-
- **Label**: *Red* **Value**: '*858,170,0000*'
88-
- **Label**: *Pink* **Value**: *858,170,001*
89-
- **Label**: *Yellow* **Value**: 858,170,002
90-
- **Label**: *Blue* **Value**: *858,170,003*
9184
:::image type="content" source="media/global-choice-def.png" alt-text="Screenshot of a global choice.":::
92-
1. Create a formula column using the global choice. This example creates a formula column *Color Column* using the global choice *Color* created from the previous step.
85+
86+
Create a formula column that returns choice using a global choice.
87+
88+
1. Select **Data type** as ***fx* Formula**.
89+
1. Enter a formula that returns a choice value in the **Formula** bar.
90+
This example creates a formula column *Priority* using global choice *Task Priority*.
9391
:::image type="content" source="media/formula-columns-global-choice-fd.png" alt-text="Screenshot of a creating global choice formula column.":::
94-
1. Select **Save**. Notice that the column created is of data type **Choice fx**.
92+
1. Select **Save**.
9593

9694
### Using local choice from a simple choice column
97-
98-
1. Create a simple choice column. This example creates a *Simple Color* choice column on the *Account* table.
95+
1. Create a simple choice column. This example creates a *Task Priority* simple choice column on *Account* entity.
96+
9997
:::image type="content" source="media/local-choice-def.png" alt-text="Screenshot of a creating a simple choice column.":::
100-
2. Create formula column on the same entity as simple choice column using simple choice column's local choice in the formula. This example creates a formula column *Color Column 2* on *Account* entity using local choice column created from the previous step.
98+
99+
Create a formula column that returns choice using a local choice of a simple choice column.
100+
101+
1. Select **Data type** as ***fx* Formula**.
102+
1. Enter a formula that returns a choice value in the **Formula** bar.
103+
This example creates a formula column *Priority* on *Account* entity using local choice of a choice column *Task Priority* on *Account* entity.
101104
:::image type="content" source="media/formula-columns-local-choice-fd.png" alt-text="Screenshot of a creating local choice formula column.":::
105+
1. Select **Save**.
102106

103107
### Guidelines for working with choices in formula columns
104-
105-
- Local choices of a related table's simple choice column can't be used as result type in formula columns.
106-
- Options from the same choice column should be used for all result arguments in choice formula columns.
107-
- A choice used by a formula column can't be updated.
108-
- Options of a choice can't be passed as an argument to string functions. Value function can be used to return numeric a value of an option.
109-
- A formula column's dependent local choice column or global choice can't be deleted.
108+
1. Local choices of related entity's simple choice column cannot be used as result type in formula columns.
109+
2. Options from same option set should be used for all result arguments in choice formula columns.
110+
3. A choice used by a formula column cannot be updated.
111+
4. Options of a choice cannot be passed as an argument to string functions. Value function can be used to return numeric value of an option.
112+
5. Formula column's dependent local choice column or global choice cannot be deleted.
110113

111114
## See also
112115

0 commit comments

Comments
 (0)