Skip to content

Commit 493a79a

Browse files
authored
Merge pull request #8904 from MicrosoftDocs/matp-3590784
Matp 3590784
2 parents d04f32c + 7c1abf0 commit 493a79a

File tree

6 files changed

+80
-16
lines changed

6 files changed

+80
-16
lines changed

powerapps-docs/maker/data-platform/formula-columns.md

Lines changed: 80 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: sanjeevgoyalmsft
55
reviewer: mattp123
66
ms.topic: how-to
77
ms.custom:
8-
ms.date: 10/25/2023
8+
ms.date: 11/14/2023
99
ms.subservice: teams
1010
ms.author: dikamath
1111
ms.reviewer: matp
@@ -14,33 +14,41 @@ contributors:
1414
- sanjeevgoyalmsft
1515
- JimDaly
1616
---
17-
18-
# Work with formula columns (preview)
19-
20-
[!INCLUDE [cc-beta-prerelease-disclaimer](../../includes/cc-beta-prerelease-disclaimer.md)]
17+
# Work with formula columns
2118

2219
Formula columns are columns that display a calculated value in a Microsoft Dataverse table. Formulas use [Power Fx](/power-platform/power-fx/overview), a powerful but human-friendly programming language. Build a formula in a Dataverse formula column the same way you would build a formula in Microsoft Excel. As you type, Intellisense suggests functions and syntax, and even helps you fix errors.
2320

24-
> [!IMPORTANT]
25-
> - This is a preview feature.
26-
>
27-
> - [!INCLUDE [cc-preview-features-definition](../../includes/cc-preview-features-definition.md)]
28-
2921
## Add a formula column
3022

3123
1. Sign in to Power Apps at [https://make.powerapps.com](https://make.powerapps.com/?utm_source=padocs&utm_medium=linkinadoc&utm_campaign=referralsfromdoc).
3224
1. Select **Tables**, and then select the table where you want to add a formula column. [!INCLUDE [left-navigation-pane](../../includes/left-navigation-pane.md)]
3325
1. Select the **Columns** area, and then select **New column**.
3426
1. Enter the following information:
35-
3627
- A **Display name** for the column.
3728
- Optionally, enter a **Description** of the column.
38-
- In **Data type**, select ***fx* Formula**.
39-
- Enter the formula in the **Formula** box.
29+
1. For **Data type** select ***fx* Formula**.
30+
1. Type the formula or use formula suggestions:
31+
32+
# [Type a formula](#tab/type-or-paste)
33+
34+
Enter the Power Fx formula in the **Formula** box. More information: [Type a formula](#type-a-formula-1)
35+
36+
# [Get formula suggestions (preview)](#tab/natural-language)
37+
38+
[!INCLUDE [cc-beta-prerelease-disclaimer](../../includes/cc-beta-prerelease-disclaimer.md)]
39+
a. Select the up and down arrows, and then select **Get formula suggestions**.<br />
40+
:::image type="content" source="media/formula-suggestions-selector.png" alt-text="Select the formula suggestions selector":::
41+
b. Type your question, such as *what is the Price times Quantity*, in the **Get formula suggestions** box. More information: [Get formula suggestions (preview)](#get-formula-suggestions-preview-1)
42+
43+
---
44+
45+
7. Select additional properties:
4046
- Select **Searchable** if you want this column to be available in views, charts, dashboards and Advanced Find.
4147
- **Advanced options**:
42-
- If the formula entered evaluates to a decimal value, expand **Advanced options** to change the number of points of precision, between 0 and 10. The default value is 2.
43-
5. Select **Save**.
48+
- If the formula evaluates to a decimal value, expand **Advanced options** to change the number of points of precision, between 0 and 10. The default value is 2.
49+
8. Select **Save**.
50+
51+
### Type a formula
4452

4553
The following example creates a formula column called *Total price*. The *Number of units* column is a whole number data type. The *Price* column is a decimal data type.
4654

@@ -54,6 +62,62 @@ The formula that you enter determines the column type. You can't change a column
5462

5563
For example, the formula *price * discount* creates a column type of number. You can change *price * discount* to *price * (discount + 10%)* because that doesn't change the column type. However, you can't change *price * discount* to *Text(price * discount)* because that would require changing the column type to string.
5664

65+
### Get formula suggestions (preview)
66+
67+
[!INCLUDE [cc-beta-prerelease-disclaimer](../../includes/cc-beta-prerelease-disclaimer.md)]
68+
69+
Describe what you want the formula to do and get AI generated results. Formula suggestions accepts your natural language input to interpret and suggest a Power Fx formula using GPT-based AI model.
70+
71+
> [!IMPORTANT]
72+
> This is a preview feature available only in US regions only.
73+
>
74+
> [!INCLUDE [cc-preview-features-definition](../../includes/cc-preview-features-definition.md)]
75+
>
76+
> Currently, formula suggestions that reference a single table are supported. Formula suggestions that reference a column on a related table aren't supported.
77+
78+
#### Example natural language input
79+
80+
Imagine there's a **Customer rating** column that shows their rating by account.
81+
:::image type="content" source="media/customer-rating-column.png" alt-text="Example customer rating column":::
82+
83+
In the **Get formula suggestions** box enter the formula in natural language, such as *If the rating on the rating column is equal or greater than 5 then indicate as Good and if less than 5 indicate as Average and if value is blank or zero then display as Bad*, and then select the arrow button (enter).
84+
85+
Then copy the **Suggested Formula**.
86+
:::image type="content" source="media/suggested-formula.png" alt-text="Suggested formula":::
87+
88+
And paste it into the **Type a formula** box. Select **Save**.
89+
:::image type="content" source="media/paste-formula.png" alt-text="Paste formula into Type a formula box.":::
90+
91+
Here's how the formula appears when pasted.
92+
93+
```powerappsfl
94+
Switch(
95+
ThisRecord.'Customer Rating',
96+
Blank(), "Bad",
97+
0, "Bad",
98+
1, "Average",
99+
2, "Average",
100+
3, "Average",
101+
4, "Average",
102+
5, "Good",
103+
6, "Good",
104+
7, "Good",
105+
8, "Good",
106+
9, "Good",
107+
10, "Good"
108+
)
109+
```
110+
111+
Check the computed **Rating Description** formula column, which appears like this.
112+
113+
:::image type="content" source="media/formula-suggestions-results.png" alt-text="Check the results for the formula column":::
114+
115+
#### Responsible AI
116+
117+
For information about responsible AI, go to these resources:
118+
- [FAQ for building apps and tables through conversation](../common/faqs-build-apps-conversation.md)
119+
- [FAQ about using AI responsibly in Power Apps](../common/responsible-ai-overview.md)
120+
57121
## Operators
58122

59123
You can use the following operators in a formula column:
@@ -375,7 +439,7 @@ This section describes guidelines and the known limitations with formula columns
375439

376440
## See also
377441

378-
[Types of columns](types-of-fields.md)
442+
[Types of columns](types-of-fields.md) <br />
379443

380444
[Microsoft Power Fx overview](/power-platform/power-fx/overview)
381445

13.1 KB
Loading
51.4 KB
Loading
99.9 KB
Loading
108 KB
Loading
91.9 KB
Loading

0 commit comments

Comments
 (0)