# Problem with Kibana scripted fields in visualizations?

**URL:** <https://discuss.elastic.co/t/problem-with-kibana-scripted-fields-in-visualizations/224507>\
**Category:** Kibana\
**Created:** [March 21, 2020, 4:29am UTC](https://discuss.elastic.co/t/problem-with-kibana-scripted-fields-in-visualizations/224507 "2020-03-21T04:29:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Agrikk](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@Agrikk](https://discuss.elastic.co/u/Agrikk)\
**Post date:** [March 21, 2020, 4:29am UTC](https://discuss.elastic.co/t/problem-with-kibana-scripted-fields-in-visualizations/224507/1 "2020-03-21T04:29:57Z")

</div>

To start: I know that using scripted fields in visualizations with large data sets can cause performance issues. I'll tackle that after I figure this out.

Now with that out of the way:

I have a data set that includes an integer epoch time field with ranges from roughly -300000 to 1300000 (representing ranges from 1960 to 2015 or so).

I have created a scripted field `doc['time'].value` but painless and moment.js expect time in milliseconds since the epoch and my data is in seconds.

Is there a way to multiply "time" by a thousand on the fly to make my data reflect the true date/time?

---

<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:** [March 23, 2020, 1:19pm UTC](https://discuss.elastic.co/t/problem-with-kibana-scripted-fields-in-visualizations/224507/2 "2020-03-23T13:19:39Z")

</div>

Hey @Agrikk  
What about multiplying by 1000 the value in the scripted field?

---

<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:** [April 20, 2020, 1:20pm UTC](https://discuss.elastic.co/t/problem-with-kibana-scripted-fields-in-visualizations/224507/3 "2020-04-20T13:20:05Z")

</div>

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