Formula columns are a powerful feature of Microsoft Dataverse for Teams. With this data type, you can quickly add a calculated column to your table. This is made possible by the Power Fx, a language that enables you to write formulas and expressions that can be used in Dataverse for Teams.
If you still using it, but you have problem with Data columns, go directly here.
Supported data type:
- Decimal Number
- Yes/No (boolean)
+, -, *, /, %, ^, in, exactin, &
Let’s start! Go to edito your Dataverse table, and create create new column:
Select “Formula” Column. In my Example I want to calculate how old employees are. So:
DateDiff('BirthYear ', UTCNow(),TimeUnit.Years)
Problem with Data column
If you get some error, when using Datacolumn , for Example errors about “Time zone conversion”. You should try to edit your Data column and set “Time Zone Adjustment” property to : “Time zone Indipendent“
There are about 54 function available at time I’m writing this article, for Example:
DateDiff, DateAdd , If , UTCNow, Abs ecc…
Keep mind this attention point from MS: “The Text and Value functions only work with whole numbers, where no decimal separator is involved. The decimal separator varies across locales. Since formula columns are evaluated without locale knowledge, there’s no way to properly interpret or generate the decimal separator.”
I hope these information can help you! Here link to official documentations.
Contact me for questions! Have a nice day!