How to create a formula to give me a percentage

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
I have a field: Company

It's a list with text values, ie CompanyA, CompanyB, CompanyC

I have another field called: Value

Each record could have a different company and different value. I want to calculate the total from each value field for each company, then figure out the percentage of CompanyA+CompanyB's percentage against the total... Does that make sense?

CompanyA+CompanyB's Value field divided by all the Value fields to come up with a percentage...
Photo of Adam

Adam

  • 140 Points 100 badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 64,860 Points 50k badge 2x thumb
One choice is to make a report of Type summary and group by Company.  You can show summarize the value field normally and then also summarize the value field "as a percent of the column".

The alternative is to make a dummy table called company totals with Record ID = 1 (ie create 1 record).  Then on the company table have a formula field that calculates to 1.


Then make a relationship and make a Summary field to  and total up all the Values.  Then look up the total value back down to the company records.  Then you can do your calculation.
Photo of Adam

Adam

  • 140 Points 100 badge 2x thumb
So not something a formula could do with two fields in the same table? I was just hoping it would be easier...
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 64,860 Points 50k badge 2x thumb
You will need to make that dummy relationship to actually get a calculated field on your record.  its not that big a deal, just a dummy table with a single record, and hide it from everyone seeing it.