# visState Kibana

**URL:** https://discuss.elastic.co/t/visstate-kibana/105311
**Category:** Kibana
**Created:** [October 25, 2017, 11:50pm UTC](https://discuss.elastic.co/t/visstate-kibana/105311 "2017-10-25T23:50:49Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sonic](https://avatars.discourse-cdn.com/v4/letter/s/c37758/32.png) [@sonic](https://discuss.elastic.co/u/sonic)
#### Post date: [October 25, 2017, 11:50pm UTC](https://discuss.elastic.co/t/visstate-kibana/105311/1 "2017-10-25T23:50:49Z")

</div>

Hello everyone!

I have datatable visualization and need multiply sort (two fields), also I need to get 15% of sorted results. Can I do this in visState, using elasticsearch sort, and how?

I tried to sort by the end of the request but It doesn't seem to work

"sort": [  
{  
"amount": {  
"order": "desc"  
},  
"orders": {  
"order": "desc"  
}  
}  
],  
"size": 150 ( for example, don't know how to write %)  
Thx.

---

<div class="post-metadata">

### Author: ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)
#### Post date: [October 27, 2017, 12:01am UTC](https://discuss.elastic.co/t/visstate-kibana/105311/2 "2017-10-27T00:01:58Z")

</div>

Not sure what you mean by 15% of the sorted results.

I don't believe there is a way to multiple columns in the aggregations for sorting. You might be able to accomplish what you're looking for with Scripted Fields.

[https://www.elastic.co/guide/en/kibana/current/scripted-fields.html](https://www.elastic.co/guide/en/kibana/current/scripted-fields.html)

> **[Using Painless in Kibana scripted fields
	  	 | Elastic](https://www.elastic.co/blog/using-painless-kibana-scripted-fields)**
>
> Kibana provides powerful ways to search and visualize data stored in Elasticsearch. For the purpose of visualizations, Kibana looks for fields defined in Elasticsearch mappings and presents them as op...

---

<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 24, 2017, 12:02am UTC](https://discuss.elastic.co/t/visstate-kibana/105311/3 "2017-11-24T00:02:11Z")

</div>

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