Create a Number formula that calculates the volume of a cylinder.
Your company sells cylindrical hyperbaric chambers. You need a formula field that calculates the volume of a cylinder for you, rounded to the nearest whole number, given its radius and height. Use the existing mathematical formula for the volume of a cylinder, V = πr2h, where r is the radius of the cylinder, h is the height, and π is the constant Pi. Note: Although this formula field might best be created on a custom object, for simplicity, we’ll create this formula on the Opportunity object.
Your company sells cylindrical hyperbaric chambers. You need a formula field that calculates the volume of a cylinder for you, rounded to the nearest whole number, given its radius and height. Use the existing mathematical formula for the volume of a cylinder, V = πr2h, where r is the radius of the cylinder, h is the height, and π is the constant Pi. Note: Although this formula field might best be created on a custom object, for simplicity, we’ll create this formula on the Opportunity object.
- Create 2 custom fields of type Number on the Opportunity object: ‘radius’ with a resulting API name of ‘radius__c’ and ‘height’ with a resulting API name of ‘height__c’.
- The formula should be named ‘Cylinder Volume’, with the resulting API name ‘Cylinder_Volume__c‘ and should be created on the Opportunity object.
- The formula should reference the custom fields ‘radius__c‘ and ‘height__c‘.
- The formula should use 3.14159 as an approximation of Pi.
1) Create two custom fields on opportunity object of number type.
2) Create one custom formula field on opportunity object and make the decimal places to zero and enter the below formula.
(3.14159 * (radius__c ^2) * height__c)
We created an opportunity with radius and height values. We expected the 'Cylinder_Volume__c' field to show the correct cylinder volume, but it didn’t. Make sure that your formula uses the correct calculation for the volume of a cylinder, and that radius x radius is enclosed in parentheses.
ReplyDeleteim getting this error,can anyone please help me out.