Help

Re: Calculation of Percent-Values

4126 7
cancel
Showing results for 
Search instead for 
Did you mean: 
Der_Copytexter
4 - Data Explorer
4 - Data Explorer

Hello, a very simple question …

How can i do an ordinary percent-calculation as follows (column “Percentage”):

Region +++ Sales +++ Percentage (favored result)
North +++ 40000 +++ 20 %
East +++ 70000 +++ 35 %
South +++ 30000 +++ 15 %
West +++ 60000 ++ + 30 %

++ Sum 200000 ++ Sum 100 %

How is the formula for the column “Percentage”? I tried it with “Sales/SUM(Sales)” in different ways, but the result is always 1.

Shame on me, but I have no idea anymore. Thanks for advice.

18 Replies 18

You need the Total to do the math, and given that it is dynamic, you can’t do this. They only thing that comes to my mind is this:

What other tables or data do you have?

Thomas_Jaccino
6 - Interface Innovator
6 - Interface Innovator

This can be done by creating a sum roll-up field first, and referencing that instead of sum(sales)

Yes, but you need first need to have all the numbers in the same records, that is what I’ve done. I don’t understand you reply.

The reason you are getting 1 as the result of sales/sum(sales) is because the numerator and denominator on that fraction are literally the same value. Sum() does not reference an entire column like =sum(A:A) would sum the A column in Excel. Using sum() in Airtable with a column name used as a variable, that column name will represent only the value of the field corresponding to the column name for the specific record in which the field calculated from that formula is held. Therefore, since sales is referenced within sum() as the only value, sum(sales) is the exact same 1-value array as the sales value that it is dividing. X/X=1 every time.

I believe that is a more complete explanation of why this is failing for you, OP.

Der_Copytexter
4 - Data Explorer
4 - Data Explorer

Thanks for all response! I thought, a “SUM” without relation to another table simply totalize a column - like the “SUM”-Value at the bottom. Seemed obvious. Okay, I was off. It would be too easy … :winking_face:

Special thank to Elias for the (tricky) example, but unfortunately it can’t be applied to my tables.

For the moment I give up. Maybe I will try again later.

I THINK this is the right thread for this question - but if not, apologies and feel free to direct me elsehwere.

i’m WANTING to do a calculation of {Payment Due} x {Discount amt} but continuously get #Error in that column…
have tried changing discount amt to percentage field, number field, text field… and Payment Due is a single select… is that the problem? i need it to limit the options in that field…

would be grateful for any advice, even if the advice is “you can’t do that”… :slightly_smiling_face: then i’ll stop banging my head against it!

You want something like this? https://airtable.com/shr5ITe9SY7lorCEt

The formula is: {Payment Due} - Discount

hi

nope. i thought it was right at first glance, but no, it’s not subtracting a % of the payment due…
it’s subtracting just the integer amount…

Try this example base.

I think you ran into two problems. First, a single select value is returned as a string, which was the source of your #ERROR messages. To use it in a calculation, first wrap it in a VALUE() function.

But even if you had gotten past that hurdle, you likely would have slammed into Airtable’s buggy handling of percentage fields. When used in a formula, one would expect a percentage to have the value of its decimal equivalent – for instance, 10% = 0.1. Instead, an Airtable percentage takes on the integer value of the percent: 10% = 10. So, instead of

VALUE({Payment Due})*Discount

you need

VALUE({Payment Due})*(Discount/100)

Except in this case {Discount} represents a percentage off {Payment Due}, and not a percentage of {Payment Due}. That means the formula you actually want is

VALUE({Payment Due})*(1-(Discount/100))

If I’ve completely misunderstood your intentions, feel free to run it over me again, and I’ll give it another try…

holy smokes… i was nowhere close to finding that answer. Thank you!!
I had, actually tried variation like your first samples as those are logical and mathy…

I don’t think I’d have had the patience to learn that … I tried all my excel formulaic wizardry and finally gave up and just entered the actual discount amount manually (as generally speaking it’s a 10% discount it’s fairly easy to do in my wee head).
But your formula worked brilliantly, so, much appreciation for that!

I want to put in the Trailing Stop for an amount as in stocks and I thought you might be able to help. $15.00 with a trailing stop of 25%. In Excel I out in =The column*0.07. But I can’t figure out how to do this in Airtable. Can you help?

For a trailing stop, from my understanding that is a binary check on whether a stock has moved a given percentage from an original point. For this you would need a comparison between two points such that IF they differ by a given percent or more, it will return a value of true. So the elements are calculating the difference and a check to see if the difference meets a threshold.

IF(ABS((Original-Current)/Original) >= .15, TRUE(), FALSE())

IF the Absolute Value of the Difference divided by the Original is Greater Than Or Equal To the Threshold, return True, otherwise return False. Here I have used 15% as the threshold.

I would include a link to an example but the forum won’t let me for some reason

Thank you so much Thomas. I think I understand but since I am not as fluid in the terminology of a formula. I sill try and send you an attachment of one and then you can maybe give me the correct formula. That would be great :slightly_smiling_face:

trailing stop example.jpg

I want to put a 30% stop on say each stock, and do it automatically for me every time a stock changes price. The formula would be what I Paid ($13.47) and say it goes up to $60 and starts going down when it reaches 30% more than what I paid, so I don’t lose money, I will put a 30% stop on that stock, so I know when to sell. So using $13.47 if it went up to $60, then I would see if I didn’t already at $17.51 theoretically. I think I explained it correctly. Thank you for your time, I appreciate that

Patsy Pankey
photo
Email: digitalbarn@gmail.com
ac5bf5de45d3901a2bc7e20dbb61139ccd00c75d.png

Get your own 21e766744df69aa23c5a4b68b4ab70f9021c57e9.png email signature

it’s end of 2018, and this “feature” of handling percentage fields still exists

I wouldn’t count on it ever changing. They have so many enterprise level clients now that have this suboptimal percentage field behavior baked so deep into extremely complex applications that it would cause way too much upheaval to change its behavior at this point.

Claudine_Lacern
4 - Data Explorer
4 - Data Explorer

Hi, I want to know how will I be able to get the percentage of a field that has answerable by yes or no. So, I want to get the percentage of who answered yes and no on a field.

Formula: cantidad*1 / {total}

Format: Percent (42%)
Precision: 1

Thank's man!!