Did you know that calculated fields require 3 number fields?

Related products: None

Two things in this post... the first is that I couldn't figure out why I couldn't create a calculated field on an MDA object. Turns out you need to have 3 number fields for that option to show up. Now... here's my question... why isn't it 2? Isn't A-B a valid calculation? ;-)





2nd (and more important) point is that dates should be calculable as well. In this case, I'm actually trying to determine the difference between 2 dates (in days) which would (in Excel) be as easy as Date1 - Date2. Seems like a great addition to the calculated field options!
Hi Jeffrey,





Answer to your first question as to why you have to create three number type field to see calculated field as a option:





In MDA we assume calculated field as a different field that does calculation on two or more than two number/percentage datatype.Lets start creating a MDA object. Suppose you created a MDA object "MDA Custom object 1" and added a  number field "Number 1" and another number field "Number 2". While creating "Number 2 " you will not get an option of calculated field.


So to create a calculated field that does an operation on "Number 1" and "Number 2" ,you have to create a field something like "Calculated field 1" and you will be able to see calculated field option in Field creation screen. 





The simple logic behind this to keep Calculation on field separate from rest of fields.





For your 2nd Question if you can provide some example,it would be helpful to answer.
For the first one... uh... yah... I may have counted incorrectly. I only had one number field in the table and added the 2nd. Makes total sense when you can correctly count to 3.





For the 2nd... I have a due date and a close date. How may days are between them? In Excel (my baseline for everything!) that would be "CloseDate - DueDate". For 1/9/18 close for a 1/1/18 due that would return 8.
Hi Jeffrey,





Currently Calculation on date fields is not there.We will take this as suggestion and accordingly incorporate this.





Thank you,


Neeraj
Hi Jeffrey,





With Date and string formula fields added in our last release, this restriction has been removed.





Thank you for your feedback





Preethi




@jeffrey_coleman Please refer this articel for more information.





Let us know if you still need any help.





Thanks for posting!