# Arranging x axis by value of y axis for a formula field

**URL:** <https://discuss.elastic.co/t/arranging-x-axis-by-value-of-y-axis-for-a-formula-field/305973>\
**Category:** Kibana\
**Created:** [May 30, 2022, 4:41pm UTC](https://discuss.elastic.co/t/arranging-x-axis-by-value-of-y-axis-for-a-formula-field/305973 "2022-05-30T16:41:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![behappy\_alwayz0401](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/behappy_alwayz0401/32/105988_2.png) [@behappy\_alwayz0401](https://discuss.elastic.co/u/behappy_alwayz0401)\
**Post date:** [May 30, 2022, 4:41pm UTC](https://discuss.elastic.co/t/arranging-x-axis-by-value-of-y-axis-for-a-formula-field/305973/1 "2022-05-30T16:41:03Z")

</div>

I'm creating a tree map lens visualization. I have a field "account name" under "group by" and have a formula (absolute value) on a number field "Delta value" under "size by". When I try to rearrange the order of the "group by" it only gives me an alphabetical choice and not by the "size by" field. Any idea how this can be done? thanks

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [June 1, 2022, 8:20am UTC](https://discuss.elastic.co/t/arranging-x-axis-by-value-of-y-axis-for-a-formula-field/305973/2 "2022-06-01T08:20:28Z")

</div>

Hi @behappy_alwayz0401 ,

it is currently not possible to rank top values by a formula, as the latter will be computed only at client side level and the server would not know how to retrieve the value to rank by.

On the other hand you can track this issue about client side sorting which will mitigate the problem in the future: [[Lens] Allow client-side sorting of dimensions and legends at datasource level for all chart types · Issue #86184 · elastic/kibana · GitHub](https://github.com/elastic/kibana/issues/86184)

---

<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:** [June 29, 2022, 8:20am UTC](https://discuss.elastic.co/t/arranging-x-axis-by-value-of-y-axis-for-a-formula-field/305973/3 "2022-06-29T08:20:30Z")

</div>

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