# Query look up to a specific column

**URL:** <https://community.glideapps.com/t/query-look-up-to-a-specific-column/76203>\
**Category:** Ask for Help\
**Created:** [September 7, 2024, 5:03am UTC](https://community.glideapps.com/t/query-look-up-to-a-specific-column/76203 "2024-09-07T05:03:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan\_San](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dan_san/32/24085_2.png) [@Dan\_San](https://community.glideapps.com/u/Dan_San)\
**Post date:** [September 7, 2024, 5:03am UTC](https://community.glideapps.com/t/query-look-up-to-a-specific-column/76203/1 "2024-09-07T05:03:11Z")

</div>

I have a tarrif sheet, that states the cost of a container between different cities, based on size.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/b/6b148d3a0e30f1fb9467b5a96e90df98830bc96e.png)

When doing a quote, the customer will select 3 variables (FROM, TO, size), how do I look up the correct price column, without having to create 3 rows for each row I have (one for each size).

What I tried:  
I did a “QUERY” then based on FROM and TO, then I did 3 different “lookup” columns for each size.  
I was then going to do an IF-THEN and say if size includes 20 THEN “lookup20” IF…

BUT when I do this, I do not get the option of selctive the “lookup20” column

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [September 7, 2024, 6:14am UTC](https://community.glideapps.com/t/query-look-up-to-a-specific-column/76203/2 "2024-09-07T06:14:52Z")

</div>

When you do a Lookup through a Query, the result is always an array. What you should use instead is 3 Single Value columns.

That said, this whole thing would be much simpler if you normalised your Tarrif table. That is, you should have 3 columns - one each for From, To & Size. And then one row for each combination. There will be more rows in your Tarrif table, but it will be much easier to maintain and work with.

---

<div class="post-metadata">

**Author:** ![Dan\_San](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dan_san/32/24085_2.png) [@Dan\_San](https://community.glideapps.com/u/Dan_San)\
**Post date:** [September 7, 2024, 5:43pm UTC](https://community.glideapps.com/t/query-look-up-to-a-specific-column/76203/3 "2024-09-07T17:43:54Z")

</div>

Hi Darren,

As always greatly appreciate the insights and guidance. I will do a 3 column table.

I was thinking to redoing the table as suggested, so wanted to make sure I was not missing something.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [September 14, 2024, 5:44pm UTC](https://community.glideapps.com/t/query-look-up-to-a-specific-column/76203/4 "2024-09-14T17:44:12Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
