SUM in another table

Hello Everyone,

I’m calculating the total time i have for each calendar and i want to be able to bring the SUM in another table, and i need a little help with it.

This is the calendar with the total activity time for each calendar

image

What i’m trying to do

I tried different formulas but i have a problem selecting the specific calendar name (look, in “Calendar.Calendar”) , so I’m not really able to filter properly

Thanks to whoever help!

Hi @Giuseppe_Boinega

Does this not work ? ( I assume your main gmail table is called ‘Today’

In your All times “Work” Column : Today.Filter(CalendarColumn.ToText()="Work").ActivityTime.Sum() ? (+eventually other filters that you may need ?)

I’m using the Google Calendar Pack, and difficulty is to select the calendar name.

if i try to type “Column” i don’t see the option, and the column i’m interested in is called “Calendar”

image

The answer for who may be interested

2 Likes

@Giuseppe_Boinega and @Quentin_Morel , you actually don’t need ToText() in the Filter() :blush:

Calendars from the GCal pack have a “Summary” property which seems to be the name of the calendar (as a text value) so you would just need to add a column in the table Today with a formula gathering the summary property from the Calendar (in this case, this should be as simple as thisRow.Calendar.Summary)

And then, instead of trying to use directly the Calendar column in the Filter(), you can use this brand new column :blush:
(Coda will suggest values from the Calendar Summary column for you to choose from and use in your Filter() and of course, you can hide that column if it’s in the way)

Events.Filter([Cal Summary] = "Whatever").Duration.Sum()

2 Likes

Thanks @Pch , I’m not familiar with google calendar pack, so I was sure it was a more elegant way to process :wink:

1 Like

No problem @Quentin_Morel :smiling_face: !

Me neither :sweat_smile: … But I had a similar intuition as yours :wink: and was pretty sure the ToText() could probably be avoid here (as it’s generally the case) so I tried :blush: