In one of our previous blog, we explored how to add and subtract dates using Date Time functions in Power Automate. This blog will demonstrate how to achieve the same functionality using the Formula Column in Power Apps.
With this approach, there is no need to create a Power Automate flow to handle date calculations. Instead, you can easily implement this requirement using the Formula Column in the Dataverse.
What is the Formula Column?
Let’s get into basics-
A Formula Column in Dataverse allows you to perform real-time calculations and data transformations using Power Fx formulas. It eliminates the need for Power Automate flows by enabling dynamic data computation directly within the Dataverse table.
Thus, when a new Customer (Account) is added to the CRM the next time and the user wants the next follow-up date calculated for the Account, it can be done without designing any Power Automate flow, simply using the Formula Column in the Dataverse.
If you’re interested in exploring the Formula Column and want to get more familiar, please check out our blog: “Adding the Power Fx Formula Column into Dataverse”. This feature includes built-in formula suggestions, allowing users to generate formulas effortlessly by describing their requirements. Even non-coders can easily implement this control.
How to create the Formula Column?
Please follow the below steps to create a Formula column-
Add a Formula-type field to the Account entity.
- Go to Power Apps > Solutions > Edit Default Solution.
- Go to the Account table’s column list and click ‘New Column’. In the New Column window, choose ‘Formula’ as the data type from the dropdown. This will display a section where you can enter your formula.
For this example, we used the following formula:
DateAdd(‘Created On’, 7, TimeUnit.Days)
This formula adds 7 days to the ‘Created On’ date and updates the new Date in
In the screenshot below, you can see the newly created Follow Up Date column. The value is automatically updated based on the formula. Since this is a Formula Column, the field is locked, making the value non-editable.
Conclusion
Unlock the power of seamless data calculations with the Formula Column in Dataverse! Say goodbye to the complexities of setting up Power Automate flows, this feature allows you to automate tasks like date additions or subtractions directly within your tables in just a few simple steps. Enjoy the benefits of real-time data updates and time-saving efficiency, all while enhancing your Power Apps solutions. Start harnessing the Formula Column today and take your business processes to the next level!