Hello! I am struggling to create an easy database template for importing data from a manual CSV export with some weirdness to it. Then an interface for data visualization that once was done using a platform that linked directly with the app generating the data.
The app generating the data exports two CSV files, one for a list of “interactions” and one for a list of “buttons”, so I started with a table for each with the same fields. Each interaction row contains a lot of data pertaining to the user, so I added a 3rd table of Users in Airtable, and just made those fields in the Interactions table lookup fields to pull from Users. The Interactions can have up to 12 Buttons, and the export has several columns for each button - some of it is unique to the interaction and some applies to every use of that button, so I have put that info in the Button table and the fields in Interactions are now a lookup. The Interactions records also include date and time of the start of the interaction, and duration of interaction
Sounds simple, right? Except I just realized the Interactions export isn’t behaving as I assumed it was. If an interaction included two buttons, the first button utilized is listed as Button 2. So Button 1 is always the LAST button in the interaction, and there could be 1-12 buttons in each interaction. It also turns out that each button is listed only once, even though the real-life situation recorded in the app could have included multiple uses of a single button. There is one field in the Interactions CSV that lists the buttons in the true order (only spaces separate the buttons, and some button names contain spaces so I can’t use spaces in a formula to separate each button), but this also lists only unique button presses rather than all presses of any button in a single interaction.
So now I am sad my formulas and counts are all wrong, and here I thought all I needed help with was the following statistics!
1. If an interaction includes button X, what is the button most likely to follow X?
2. What is the most common combination of 2 buttons? 3 buttons? Etc In a certain order or not
3. I wanted to capture the buttons that get pressed twice in a row, but now I’m at a loss. There is one field with the number of presses, and a separate field with the number of buttons pressed, and this at least tells me one or more buttons in the interaction got multiple presses
For the interface visualizations, I’m wondering if I can get (with filtering for user, which is thankfully simple for interactions but not currently appearing in the Buttons table):
1. Interactions: A line graph with right y-axis just showing average number of presses over time, and left y-axis centered over 0 and showing daily/weekly/monthly deviation in number of interactions (based on whatever x axis we go with).
This is relatively simple except the left y-axis, which I assume requires a formula field somewhere but what/where?
2. Buttons/user: List of just the top 5 buttons use within the past week, with filtering by User
Right now I have a list of all button presses sorted with the ones with the most interactions at the top, and I change the color of the text for buttons with interactions over a certain number, but I have to manually change that threshold right now. Boo.
3. Pivot table with the combos, like if button in row label appears in an interaction, how many of those interactions also contain the buttons across column header?
I put this question under Formulas because to move forward with any of this I need fields in the Interactions table reversing the order of the button presses, and whatever formulas/ roll ups etc. necessary for getting the visualizations I am hoping for. I include the rest of this novel for context I hope is helpful!!


