# Tag Info

3

Just divide by 100. 35 * 75 / 100 = 26.25 So use a formula of Field_B__c * Percent__c / 100

3

Your formula is correct, but you don't need the explicit ROUND() call. Just set your field to have the return type Percent, with two decimal places, and use your existing core formula: (365 - (CloseDate - DATE(YEAR(CloseDate), 1, 1))) / 365 If you load an Opportunity with a Close Date of 2019-09-01 (September 1, the 244th day of 2019), you'll see 33.42% of ...

2

The Spring'18 Release Notes reveal, that this will be fixed for lightning:input in the upcomming release: lightning:input formatter—The percent-fixed formatter is new for type="number". It displays your input value as is, for example, entering 10 results in 10%. Additionally, the percentage value is now rounded off to the last decimal point when ...

1

The latter should work. When you divide an Integer by an Integer you get an Integer back which has the same value as Decimal.round(RoundingMode.DOWN). system.assertEquals(0, 100/200); However, when you divide decimals, you should get an exact value. system.assertEquals(.5, 100.00/200.00);

1

I realize you say you're not dividing by zero, but just to be sure, let's check for blank values first, then we'll optimize: IF( ISPICKVAL(Range__c,""), null, MIN(1,Modified_Usage__c/VALUE(SUBSTITUTE(TEXT(Range__c),",","")))) Here, we see if range is empty, and if so, return a blank value, otherwise we take the lesser of 1 or Modified Usage divided by ...

1

Salesforce saves the value as a fractional decimal (value/100), but this only helps you in formulas. If you want to use the value in Apex, Lightning, Visualforce, etc, you need to divide the percent field by 100.

1

How to access Opportunity2.Probability object? Is it a typo? No, they're variable names. It doesn't help that they named the first variable Opportunity, which is likely the source of your confusion. They're talking about a flow with two variables. I created a record from 'execute anonymous window' with percentage field set as 40 and I see it as 40 in ...

Only top voted, non community-wiki answers of a minimum length are eligible