# In computed column 'col1 + col2 +col3 + col4', column number 4 does not exist

**URL:** <https://discuss.elastic.co/t/in-computed-column-col1-col2-col3-col4-column-number-4-does-not-exist/210866>\
**Category:** Kibana\
**Created:** [December 6, 2019, 10:24am UTC](https://discuss.elastic.co/t/in-computed-column-col1-col2-col3-col4-column-number-4-does-not-exist/210866 "2019-12-06T10:24:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![swati\_dupare](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/swati_dupare/32/56985_2.png) [@swati\_dupare](https://discuss.elastic.co/u/swati_dupare)\
**Post date:** [December 6, 2019, 10:24am UTC](https://discuss.elastic.co/t/in-computed-column-col1-col2-col3-col4-column-number-4-does-not-exist/210866/1 "2019-12-06T10:24:35Z")

</div>

Hi,  
In Enhanced table -\> Add computed column ,I want to make addition of 4 columns as col1,col2,col3,col4 .  
but my column col4 is dynamic sometimes I get only col1,col2,col3  
Computed column formula - col1 + col2 +col3 + col4  
that time it shows "In computed column 'col1 + col2 +col3 + col4', column number 4 does not exist"

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [December 30, 2019, 9:08am UTC](https://discuss.elastic.co/t/in-computed-column-col1-col2-col3-col4-column-number-4-does-not-exist/210866/2 "2019-12-30T09:08:19Z")

</div>

H @swati_dupare  
Unfortunately we don't provide support for third party plugins. I think the best resource is to open an issue/question here [https://github.com/fbaligand/kibana-enhanced-table/issues](https://github.com/fbaligand/kibana-enhanced-table/issues)

As far as I know, I think you can use a ternary operation to check if the forth column exist or not using the an expression like (I didn't test it, it's more like a pseudo code, I'm not sure how enhanced table handle a non existing column):

```auto
col1 + col2 +col3 + (col4 == null ? 0 : col4)

```

You can also take a look a this link that provides the list of available expressions

> **[silentmatt/expr-eval](https://github.com/silentmatt/expr-eval#expression-syntax)**
>
> Mathematical expression evaluator in JavaScript. Contribute to silentmatt/expr-eval development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![swati\_dupare](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/swati_dupare/32/56985_2.png) [@swati\_dupare](https://discuss.elastic.co/u/swati_dupare)\
**Post date:** [January 7, 2020, 10:43am UTC](https://discuss.elastic.co/t/in-computed-column-col1-col2-col3-col4-column-number-4-does-not-exist/210866/3 "2020-01-07T10:43:32Z")

</div>

Thank You

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 4, 2020, 10:53am UTC](https://discuss.elastic.co/t/in-computed-column-col1-col2-col3-col4-column-number-4-does-not-exist/210866/4 "2020-02-04T10:53:51Z")

</div>

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