Hi folks!
I’m playing around with posting a summary of data from a table into a Slack message.
Let’s say I have a table like this:
| foo | 1 |
| foo | 2 |
| bar | 5 |
| baz | 2 |
| foo | 1 |
What I’d like to do is post a summary of that table to a Slack message such that I’d have a message like:
Summary:
- Foo = 4
- Bar = 5
- Baz = 2
That is, the sum of the second column, per grouping of the first column.
This is how I display the data on one of my pages, using a normal table, grouped by the first column, collapsed with a Sum summarization at the bottom of the second column.
I think I have a handle on how to set the Format() template to output the information that I want, but I can’t seem to figure out what I’m missing to have it loop over the groups and put out a bullet per group.
Is there an example of this somewhere, or maybe I’m approaching this wrong?
Thanks in advance!