# Can we read a variable in Kibana

**URL:** <https://discuss.elastic.co/t/can-we-read-a-variable-in-kibana/237271>\
**Category:** Kibana\
**Created:** [June 16, 2020, 10:11am UTC](https://discuss.elastic.co/t/can-we-read-a-variable-in-kibana/237271 "2020-06-16T10:11:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dhandeep\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dhandeep_kumar/32/70615_2.png) [@Dhandeep\_Kumar](https://discuss.elastic.co/u/Dhandeep_Kumar)\
**Post date:** [June 16, 2020, 10:11am UTC](https://discuss.elastic.co/t/can-we-read-a-variable-in-kibana/237271/1 "2020-06-16T10:11:10Z")

</div>

Hi There,

is this possible to read a variable in Kibana and that variable contains some expression  
for eg: vTotalSales = sum(sales)

thanks,  
Dhandeep

---

<div class="post-metadata">

**Author:** ![mattkime](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattkime/32/43522_2.png) [@mattkime](https://discuss.elastic.co/u/mattkime)\
**Post date:** [June 16, 2020, 5:18pm UTC](https://discuss.elastic.co/t/can-we-read-a-variable-in-kibana/237271/2 "2020-06-16T17:18:35Z")

</div>

@Dhandeep_Kumar

Do you wish to display the sum of sales or do you wish to use it in further calculations?

---

<div class="post-metadata">

**Author:** ![Dhandeep\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dhandeep_kumar/32/70615_2.png) [@Dhandeep\_Kumar](https://discuss.elastic.co/u/Dhandeep_Kumar)\
**Post date:** [June 17, 2020, 5:25am UTC](https://discuss.elastic.co/t/can-we-read-a-variable-in-kibana/237271/3 "2020-06-17T05:25:24Z")

</div>

for further calculation mattkime

---

<div class="post-metadata">

**Author:** ![mattkime](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattkime/32/43522_2.png) [@mattkime](https://discuss.elastic.co/u/mattkime)\
**Post date:** [June 17, 2020, 3:27pm UTC](https://discuss.elastic.co/t/can-we-read-a-variable-in-kibana/237271/4 "2020-06-17T15:27:28Z")

</div>

Can you explain the larger problem you're trying to solve?

---

<div class="post-metadata">

**Author:** ![Dhandeep\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dhandeep_kumar/32/70615_2.png) [@Dhandeep\_Kumar](https://discuss.elastic.co/u/Dhandeep_Kumar)\
**Post date:** [June 18, 2020, 9:00am UTC](https://discuss.elastic.co/t/can-we-read-a-variable-in-kibana/237271/5 "2020-06-18T09:00:50Z")

</div>

hi mattkime,  
I want to create a variable that will store some value and I will use that variable in my CSV field and when I load that CSV file into kibana. after that when I will create a table I will use that field.  
for eg: -  
in kibana I want to create this variable as below  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/5/d547f30347d7ae19b902ffc6ea9d6f7d904c46d1.png)  
This is my CSV file where I want to read that variable:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/b/0b90d6b0968a8046866582b784f884d9482fcd43.png)

please help me  
Thanks

---

<div class="post-metadata">

**Author:** ![mattkime](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattkime/32/43522_2.png) [@mattkime](https://discuss.elastic.co/u/mattkime)\
**Post date:** [June 18, 2020, 2:49pm UTC](https://discuss.elastic.co/t/can-we-read-a-variable-in-kibana/237271/6 "2020-06-18T14:49:11Z")

</div>

Is each row an elasticsearch document? If so, I'd recommend using a scripted field - [https://www.elastic.co/guide/en/kibana/current/scripted-fields.html](https://www.elastic.co/guide/en/kibana/current/scripted-fields.html)

---

<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:** [July 16, 2020, 2:49pm UTC](https://discuss.elastic.co/t/can-we-read-a-variable-in-kibana/237271/7 "2020-07-16T14:49:23Z")

</div>

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