# List sort by key by z then by y then by x location

**URL:** <https://forum.dynamobim.com/t/list-sort-by-key-by-z-then-by-y-then-by-x-location/23227>\
**Category:** Lists-Logic\
**Tags:** dynamo, list-filter\
**Created:** [June 29, 2018, 8:14am UTC](https://forum.dynamobim.com/t/list-sort-by-key-by-z-then-by-y-then-by-x-location/23227 "2018-06-29T08:14:01Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![sed07](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@sed07](https://forum.dynamobim.com/u/sed07)\
**Post date:** [June 29, 2018, 8:37am UTC](https://forum.dynamobim.com/t/list-sort-by-key-by-z-then-by-y-then-by-x-location/23227/3 "2018-06-29T08:37:42Z")

</div>

I did search the forum. My node setup was actually partially inspired by this post.

> [@Sort a sublist](https://forum.dynamobim.com/t/sort-a-sublist/4577/5):
>
> This should do the needful… [Hurðanummar-20160618-1.dyn](https://forum.dynamobim.com/uploads/short-url/cLYn0k1QKh2zpOxSNarIBCO5kZR.dyn) (12.9 KB)

In your example they used a sort by function, which I am not able to use since I’m using separate components of location points (x,y, and z), and not the family instance location function itself.

My problem is that when I sort by y, then try to sort the result by x, the y becomes scrambled again.  
Below is the continuation of the above screenshot.

 ![sort%20by%20z%20and%20group%20then%20y%20then%20x2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/1/21bc1918091181aeb434b75caa8c331e974543d9.PNG)

---

_[View the full topic](https://forum.dynamobim.com/t/list-sort-by-key-by-z-then-by-y-then-by-x-location/23227)._
