# How to Format a Summary of a Table for posting to Slack

**URL:** <https://connect.superhuman.com/t/how-to-format-a-summary-of-a-table-for-posting-to-slack/22127>\
**Category:** Ask the Community\
**Created:** [March 12, 2021, 9:25pm UTC](https://connect.superhuman.com/t/how-to-format-a-summary-of-a-table-for-posting-to-slack/22127 "2021-03-12T21:25:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_Robbs1](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/thomas_robbs1/32/9234_2.png) [@Thomas\_Robbs1](https://connect.superhuman.com/u/Thomas_Robbs1)\
**Post date:** [March 12, 2021, 9:25pm UTC](https://connect.superhuman.com/t/how-to-format-a-summary-of-a-table-for-posting-to-slack/22127/1 "2021-03-12T21:25:33Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Federico\_Stefanato](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/federico_stefanato/32/10092_2.png) [@Federico\_Stefanato](https://connect.superhuman.com/u/Federico_Stefanato)\
**Post date:** [March 13, 2021, 1:09pm UTC](https://connect.superhuman.com/t/how-to-format-a-summary-of-a-table-for-posting-to-slack/22127/2 "2021-03-13T13:09:06Z")

</div>

Hi @Thomas_Robbs1 ,

Maybe this could help:

```javascript
[My Table].Name.Unique().
  FormulaMap(CurrentValue.WithName(name, 
    Format("{1}: {2}", 
      name, 
      [My Table].Filter(Name=name).Value.Sum()
      )
    )
  ).BulletedList()

```

A simplified version, without `WithName()`, here unnecessary, even though I tend to use it anyway:

```javascript
[My Table].Name.Unique().
  FormulaMap(
    Format("{1}: {2}", 
      CurrentValue, 
      [My Table].Filter(Name=CurrentValue).Value.Sum()
    )
  ).BulletedList()

```

Let me know if you have further questions.  
Cheers!

---

<div class="post-metadata">

**Author:** ![Thomas\_Robbs1](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/thomas_robbs1/32/9234_2.png) [@Thomas\_Robbs1](https://connect.superhuman.com/u/Thomas_Robbs1)\
**Post date:** [March 15, 2021, 3:32pm UTC](https://connect.superhuman.com/t/how-to-format-a-summary-of-a-table-for-posting-to-slack/22127/3 "2021-03-15T15:32:17Z")

</div>

Thank you @Federico_Stefanato ! This is exactly what I needed.
