# Canvas average values getting error

**URL:** https://discuss.elastic.co/t/canvas-average-values-getting-error/344660
**Category:** Kibana
**Tags:** canvas, visualisation
**Created:** [October 9, 2023, 1:24pm UTC](https://discuss.elastic.co/t/canvas-average-values-getting-error/344660 "2023-10-09T13:24:11Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![fay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fay/32/122632_2.png) [@fay](https://discuss.elastic.co/u/fay)
#### Post date: [October 9, 2023, 1:24pm UTC](https://discuss.elastic.co/t/canvas-average-values-getting-error/344660/1 "2023-10-09T13:24:11Z")

</div>

Hi , I'm using canvas and I have a field sensordata.value.numeric which is a field with many numbers I want to take the average in this field and show it as a % in Gauge visualization but I got an error while doing that cause the number is bigger than 100 , this is the error I got "invalid value '2.542.025' value must be between 0-100

any help?

---

<div class="post-metadata">

### Author: ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)
#### Post date: [October 24, 2023, 4:32pm UTC](https://discuss.elastic.co/t/canvas-average-values-getting-error/344660/2 "2023-10-24T16:32:19Z")

</div>

You need to convert that absolute average into a percentage. Check for the eCommerce Canvas example in the "Sample Dataset" available from the Home page to "Try sample data" and then "Other sample datasets"

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/e/6e9de57c2b784bd1165c09610f04c123e9cc47d8.png)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/b/4b2cf143803f70b12005b788c5860fd20206115a.png)

Then on the eCommerce canvas check how any of the percentage examples work

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/b/eba0a5823b4a08d96a16eb268ac69fa55863e537.png)

---

<div class="post-metadata">

### Author: ![fay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fay/32/122632_2.png) [@fay](https://discuss.elastic.co/u/fay)
#### Post date: [October 25, 2023, 7:20am UTC](https://discuss.elastic.co/t/canvas-average-values-getting-error/344660/3 "2023-10-25T07:20:59Z")

</div>

Hi jsanz  
Thank you for your reply  
I have another issue if you can help with it please

> [@Can't show distinct value in canvas](https://discuss.elastic.co/t/cant-show-distinct-value-in-canvas/345552):
>
> Hi, I want to write a sql query to show distinct value in Markdown I got the value as a table but its duplicate so I want to show the distinct value only! I try to write SELECT DISTINCT "Field\_name" from "index\_name" but I got an error that elastic doesn't support SELECT DISTINCT yet! also tried SELECT last\_value (DISTINCT "Field\_name" ) from "index\_name" I got an error ( cannot use distinct on non sql function last\_value any help please ?

---

<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: [November 22, 2023, 7:21am UTC](https://discuss.elastic.co/t/canvas-average-values-getting-error/344660/4 "2023-11-22T07:21:36Z")

</div>

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