# Grouping by Column of a Looked-up Row

**URL:** <https://connect.superhuman.com/t/grouping-by-column-of-a-looked-up-row/5928>\
**Category:** Product Feedback\
**Created:** [January 16, 2019, 5:58pm UTC](https://connect.superhuman.com/t/grouping-by-column-of-a-looked-up-row/5928 "2019-01-16T17:58:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_Robbs](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/thomas_robbs/32/5639_2.png) [@Thomas\_Robbs](https://connect.superhuman.com/u/Thomas_Robbs)\
**Post date:** [January 16, 2019, 5:58pm UTC](https://connect.superhuman.com/t/grouping-by-column-of-a-looked-up-row/5928/1 "2019-01-16T17:58:20Z")

</div>

I have a table, T1, that has a column C1 that is formatted to be a lookup from another table, T2. I set the “display column” in T2 to be the column that I want to “choose from” when choosing the value for C1. T2 has a column C2 that I’m interested in as well.

It would be nice if I could put in a grouping on T1 by C2, per the value I’ve selected in C1. E.g. the grouping I’d potentially set would be C1.C2.

Currently I can only select C1, i.e. the primary columns on T1.

The workaround is to create a column, C3, on my table (T1) and set a formula on it to be C1.C2 and then group by C3. This “bloats” T1 with additional columns that I don’t need to replicate.

Is what I’m trying to do reasonable? Does the suggestion make sense? Does anyone else have this same itch?

Thanks!

---

<div class="post-metadata">

**Author:** ![Ben\_Lee](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/ben_lee/32/49867_2.png) [@Ben\_Lee](https://connect.superhuman.com/u/Ben_Lee)\
**Post date:** [January 17, 2019, 2:40pm UTC](https://connect.superhuman.com/t/grouping-by-column-of-a-looked-up-row/5928/2 "2019-01-17T14:40:48Z")

</div>

I think I’m following what you want to do, but correct me if I’m reading this wrong. And a solution is possible in Coda to pull from other columns in another table that is a lookup table.

[https://help.coda.io/formulas/using-lookups](https://help.coda.io/formulas/using-lookups)

**Table 1**  
C1 (_lookup from T2C1_) | C2 (_to show T2C2 value_) | C3

**Table 2**  
C1 (_display_) | C2 | C3

For Table 1 C2 to be what Table 2 C2 equals, you would use a formula…

**Table 1 C2 Formula**  
`[T1C1 Column Name].[T2C2 Column Name]`

---

<div class="post-metadata">

**Author:** ![Thomas\_Robbs](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/thomas_robbs/32/5639_2.png) [@Thomas\_Robbs](https://connect.superhuman.com/u/Thomas_Robbs)\
**Post date:** [January 17, 2019, 3:45pm UTC](https://connect.superhuman.com/t/grouping-by-column-of-a-looked-up-row/5928/3 "2019-01-17T15:45:15Z")

</div>

Thanks @Ben_Lee.

The request I’m making is actually in the Grouping functionality - i.e. where you define sort/grouping on a Table. The dropdown list for what you want to Group on is limited to the columns of the immediate Table, and not by attributes of a column in the immediate Table.

E.g.

**Table 1**  
Column A (looks up from Table 2)  
Column B

**Table 2**  
Column X (display)  
Column Y

I’m only able to group Table 1 by Column A and Column B, but not by ColumnA.ColumnY.

Maybe I’m pushing what should be reasonable for expected behaviour but thought it would be nice if I could do something like that when a “lookup from table” format was in play.

Does that make more sense now?

Thanks again!

---

<div class="post-metadata">

**Author:** ![Ben\_Lee](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/ben_lee/32/49867_2.png) [@Ben\_Lee](https://connect.superhuman.com/u/Ben_Lee)\
**Post date:** [January 17, 2019, 4:42pm UTC](https://connect.superhuman.com/t/grouping-by-column-of-a-looked-up-row/5928/4 "2019-01-17T16:42:43Z")

</div>

Oh, I see.

I think you’ll need the extra column to group by anyway even if it’s just to get the title of the group to show. Grouping by a secondary, even if it works, won’t allow for a label.

This will also make editing easier.

---

<div class="post-metadata">

**Author:** ![Thomas\_Robbs](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/thomas_robbs/32/5639_2.png) [@Thomas\_Robbs](https://connect.superhuman.com/u/Thomas_Robbs)\
**Post date:** [January 17, 2019, 6:05pm UTC](https://connect.superhuman.com/t/grouping-by-column-of-a-looked-up-row/5928/5 "2019-01-17T18:05:43Z")

</div>

Thanks for that @Ben_Lee.

Editing isn’t a big deal in this situation as in Table 1.Column A I’m choosing from a list of thing from Table 2, based on the display column that is set, and that’s sufficient.

However, in some “views” that I create of Table 1, it would be good to group by, say, Column Y on Table 2. I could contrive some examples, but in short, I don’t need to edit the data in that view of Table 1, or if I did, I would only be editing Table 1 and not anything that would impact Table 2.

I suspect I’m stretching things here in an unintended way, and that’s OK, but I just noticed myself having to add a lot of extra columns to a Table for this kind of purpose and that started to feel like undesirable bloat of that table and unnecessary repetition of data that could be accessed otherwise, e.g. as I can in a formula without creating the extra column.
