Summary table question. Seems like it should be easy, but I'm not getting it

Hey all. I’m coming from excel so this is all new to me. I am stuck on building the widget with a summary table I want. I’ve read Summary tables - Grist Help Center several times, and just not sure what to fix.

I am using the lightweight CRM template (awesome!) and I want a summary table that does this:
DATE count Email Phone Text To-Do
02-28-2023 14 3 5 4 2

“Email”, “Phone”, “Text” and “To-Do” are drop down options in the column called “Type” on the Table called Interactions.

I had no trouble making the summary table widget with the first two columns ([Interactions by date]) but I don’t understand the syntax to count just the sum of items that are “Email” etc.

I see in the example that you can do:

SUM($group.AnnualPay)

but that isn’t quite analogous to what I want. I tried:

SUM($group.Type="Email")

But that gives me an error. The short take is I want to be able to see-- if I fill out my lightweight CRM perfectly each day-- what my call, email, text counts were where each day is shown on the rows.

Thanks for any help!

I see three ways of doing that, each one with its drawbacks:

  • a summary table grouped by Date and Type: the drawback is that you’ll get several lines for each date, but if you add a new Type, it will be automatically taken in account;
  • a summary table grouped by Date, with one column for each Type: the drawback is that you have to manually define a new column when adding a new Type;
  • a “Pivot Table” custom widget: the drawback is that it’s a bit less integrated, and tends to take some space.

This document illustrates each solution.

1 Like

The 2nd way is perfect! Thank you so much… and I learned a lot from this, appreciate it.