Apr 30, 2018 11:32 PM
I’ve tried a bunch of formulas and various table structures and just can’t seem to find a way to get what I need.
So let’s say I’m running a kids soccer league, or an e-sport, or really anything close. In other words I have games:
Across a season I want to be able to say, naturally, how many times the Celtics W/L - that’s easy doing Rollups and such.
The problem I’m having is conditional relations, what I would have used COUNTIF for in Excel.
A perfect example is, what is the W/L record of the Celtics vs the Pacers? I can’t seem to figure that out.
May 06, 2018 05:56 PM
Anyone else who has done work on recreating COUNTIFs? in Airtable? I’ve tried reading through the documentation but not sure if it is possible.
What I’m trying to do, if it’s not clear, is count in a Table how many times a specific “pairing” of values exists in a row. Aka “COUNTIF Celtics W and Pacers L” with the goal that at the end you would have Celtics are 4-3 vs the Pacers.
May 07, 2018 09:43 AM
What are your Fields in the Games table?
May 07, 2018 12:49 PM
Sure.
Match time/date, Winning Team, Losing Team, some other match parameters.
May 08, 2018 09:44 AM
Probably not the solution you’re looking for, but one possibility would be to use the Pivot Table Block:
May 08, 2018 10:45 AM
Go mighty, mighty thrips! (queue charge song played on the kazoo) :trumpet:
http://mrec.ifas.ufl.edu/lso/THRIPS/CHILLIWEB2/ChilliThrips5_101.jpg
May 08, 2018 11:57 AM
I was originally going to name the team after a wasp that parasitizes thrips; it’s also the third-smallest known insect, as this illustration of it next to a Paramecium and an amoeba at the same scale shows.
But then I thought, when going up against the mighty Mantis Shrimp — whose namesake has eyes with twelve to sixteen color receptors (humans have three), can see six different types of polarized light, and throws so fast a punch, the collapse of bubbles left in its wake can cause the surrounding seawater to reach temperatures as high as 8,500° F and emit brief flashes of light — what possible chance could the fearless Fairy Wasps have?
May 08, 2018 12:33 PM
Pivot Table blocks are getting closer to what I need, for sure. They can’t really display the necessary information though.
The default is Count - which would just be the number of games played, not the W/L record. There’s no way to reference the Pivot in a formula in a pivot table, it’s just generic summaries like “Percent Empty”
Also, kudos on the team names. :slightly_smiling_face:
May 08, 2018 01:06 PM
While you’re correct that the pivot table data can’t be referenced in another field, which is a bummer… it is actually showing you total wins vs team x and total losses vs team x, and thus a W/L record in total and a W/L record per team played. It’s just not formatted quite as you’d like it to be, perhaps.
If you look at “Thrips” in the horizontal plane, you see a number of wins against each team they played going across it horizontally:
And then if you look at “Thrips” in the vertical plane, you see a number of losses against each team they played going down it vertically:
Total W/L record - 3/2. Record against Mole Rats - 1/1.
I’m pretty sure that’s what you were asking for, right?
May 08, 2018 02:56 PM
yeah you are right, it’s pulling the data you would want, just in an incredibly hard to digest format.
The database function would just be allowing you to reference a count against a combination of elements, instead of a single element (if “team a” appears in row A and “team b” appears in row b then count). But that’s not available in airtable afaik.