Hey everyone, I’m brand new to coda and am blown away by it!!! I’m still familiarizing myself with the table formulas and I was wondering if it’s possible to use the count values in the column summary in a formula?
I’m tracking some job opportunities in a table, and want to tally up the number of engagements and the number of hires, and in the end, write a formula to find the % of the hire rate.
In both engagement/hire columns, I simply have a Yes/No, as seen in the attached screen.
This has to be an easy solution! Thanks in advance for any help/tips.
What you are trying to get is super easy to calculate, the ‘trick’ is to not refer to the ‘count at the botton of the table’ but to re-create that number
For example, if the table is called “table1” you can use ‘table1.count’ and see the total of row
Thanks to coda here starts the interesting part
Let think for a moment that you are curious about % of hiring in different categories, what you have to write is ‘table1.filter(category=thisrow.category).count’ and only the row that satisfy your condition are counted
It’s a simple concept and it gives you a lot of freedom in your calculi, if it’s a little bit hard don’t worry, share a dummy doc here and i can build some demo implementations of this concept
That’s awesome to hear! Welcome to the Coda Community!
To answer your question, are you referring to the Summarize feature in the column options (mentioned in this help article)? If so, you wouldn’t be able to include a formula there.
For custom summarizations, you can create a named formula to display below the table by hitting the “=” sign on a new line. For percentages, I divide the number of Hired = Yes rows by the # of table rows. Here’s a copy of the formula for reference. Hope this helps!
@Renita, So i’ve been playing around with your method, and I cannot for the life of me figure out what is going wrong in my formula. I haven’t nailed down the structure yet, and it’s pretty frustrating (right now I have a very strong love/hate relationship with coda LOL, until I get over the learning curve).
I’ve created a quick easy table to show. I’ve gotten the engagement rate correct, but cannot get the hire rate to calculate 25%. I either get 0 or 100
@Derek_Rungsea You are missing the concept of filter, you have to use the filter in another way.
Now you are using .filter like that
You are saying “from this table project filter me the project table.hired=yes”
Formula editor should give you some type of “what?” but anyway
This is the correct method:
This work like that
Filter from the table project all the row in which “hired=yes” and then count them
The approach of @Renita uses canvas formula that doesn’t work like in the table “thisrow.something” but you have to use “currentvalue.something”
The learning curve in coda is a little hard but don’t worry you will get it
Just try to “decompose” the formula in every piece and try it like that, then you can put it together again!