knowledgecenter-breadcrum

Knowledge Center

25 Jun, 2024

Formula column in Dataverse

Posted on 25 Jun, 2024 by Shekhar Jain, Posted in Power Apps Dataverse Power Platform Dynamics 365

Blogs

What is  Formula Column?

Formula columns support Power Fx, a low-code language that is very flexible. It uses an Excel-like syntax, making it accessible to users with basic Excel knowledge. Power Fx can handle complex operations and logic, and it can also be used to calculate data.

Which Datatypes are supported in Formula Column?

  • Text
  • Decimal Number
  • Choice (Yes/No)
  • DateTine

Which function type are supported in Formula Column?

  • Decimal
  • String
  • Boolean 
  • Optionset
  • DateTime (User Local)
  • DateTime (Date Only)
  • DateTime (TimeZone Independent)
  • Currency
  • Whole Number

Use Case:

Let's say we have a requirement where:

  • If the value in 'Credit Limit' is less than 10,000, we need to set 10% in 'Credit Charges.'
  • If the value in 'Credit Limit' is between 10,000 and 20,000, we need to set 20% in 'Credit Charges.'
  • If the value in 'Credit Limit' is more than 20,000, we need to set 30% in 'Credit Charges.'
  • If 'Credit Limit' is blank, set 0% in 'Credit Charges.'

How to create Power Fx Formula Column in Dataverse?

1. Go to Power Apps (https://make.powerapps.com).

2. Select the table in which you want to create the formula column.

3. Column --> "+ New Column"

4.After selecting 'New Column,' a panel will appear on the right-hand side. We need to select the 'Formula' datatype.

We will write a formula in the Formula box, and the column will be formatted according to the formula we select.(The format cannot be changed after saving the column.)

6. Save and publish your changes.

7. Once it is published successfully, let's test it

7.a. If we set 1000  in "Credit limit"  than it will set 10%  in "Credit Charges".

6.b. If we set 15000 in "Credit Limit" field than it will set 20%  in "Credit Charges".

 

 

Conclusion:

The Power Fx formula offers a richer and more user-friendly experience for column calculations in Microsoft Dataverse. It is advancing to the next level by enabling seamless addition of columns with built-in functions.

 

Comment

This is a Required Field

Loading

Recent Updates

Case Study
03 Jul, 2024

Revolutionizing Build Warranty's Operations with a Scalable and Automated Dynamics 365 Solution

Customer Overview Build Warranty (BW), a leading UK-based provider of warranty solutions for the construction industry, sought a strategic partner…

READ MORE
PluginPackage_Thumbnail
Blogs
01 Jul, 2024

How to Integrate Third-Party Libraries into Dataverse Plugins

Introduction  Integrating third-party libraries into Dataverse plugins used to be difficult and often required unsupported methods like ILMerge. Now, with…

READ MORE
Blogs
27 Jun, 2024

How to configure and use Model Driven app in offline mode

Introduction: In this blog, we will see how to configure the offline capability of a model-driven app. Before starting our…

READ MORE