# Compare sublist values within a list

**URL:** <https://forum.dynamobim.com/t/compare-sublist-values-within-a-list/55339>\
**Category:** Lists-Logic\
**Tags:** dynamo\
**Created:** [September 21, 2020, 12:55pm UTC](https://forum.dynamobim.com/t/compare-sublist-values-within-a-list/55339 "2020-09-21T12:55:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jarul](https://avatars.discourse-cdn.com/v4/letter/j/ad7895/32.png) [@Jarul](https://forum.dynamobim.com/u/Jarul)\
**Post date:** [September 21, 2020, 12:55pm UTC](https://forum.dynamobim.com/t/compare-sublist-values-within-a-list/55339/1 "2020-09-21T12:55:26Z")

</div>

Ok, so I’ve got a list with sublist.  
And I’m trying to compare the sublist values with each other to see if any values are different.

 ![List](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/a/2a4763295edfc36b01ca417a4a4abb28607fdda9.png)

So the sublists within the red box get compared to one another.  
The sublists in the green box get compared to one another.  
And the sublists in the blue box get compared to one another.

What I’m looking to end up with is a list with true and false statements along these lines:

0 List  
– 0 List  
---- 0 True  
---- 1 True  
---- 2 False  
---- 3 True  
1 List  
– 0 List  
---- 0 True  
---- 1 True  
---- 2 True  
---- 3 True  
2 List  
– 0 List  
---- 0 True  
---- 1 True  
---- 2 False  
---- 3 True

Any suggestions in how to achive this?  
Thx!

---

<div class="post-metadata">

**Author:** ![\_Vijay](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/_vijay/32/91307_2.png) [@\_Vijay](https://forum.dynamobim.com/u/_Vijay)\
**Post date:** [September 21, 2020, 1:21pm UTC](https://forum.dynamobim.com/t/compare-sublist-values-within-a-list/55339/2 "2020-09-21T13:21:28Z")

</div>

Welcome to the community… check this post…

> [@Compare values among sublists](https://forum.dynamobim.com/t/compare-values-among-sublists/55194/7):
>
> [compareSublists.dyn](https://forum.dynamobim.com/uploads/short-url/FdduD3zBcJm0OoTCR3kQKUBZHn.dyn) (15.0 KB)

---

<div class="post-metadata">

**Author:** ![Mark.Ackerley](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mark.ackerley/32/79310_2.png) [@Mark.Ackerley](https://forum.dynamobim.com/u/Mark.Ackerley)\
**Post date:** [September 21, 2020, 2:23pm UTC](https://forum.dynamobim.com/t/compare-sublist-values-within-a-list/55339/3 "2020-09-21T14:23:52Z")

</div>

Heya,

Interesting one!

I think you might need to consider this a bit…

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/3/13ac10c29981ca971c4b6a7778aa790f1dbf6abc.png)  
I’m not sure how you choose which is ‘true’? Unless you have a master list somewhere?

Here’s a quick go at it, it might be a bit wrong, but it hopefully helps with some useful nodes 🙂

Cheers,

Mark

 ![capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/e/ae2e70c115baa8c1162c59912700d1f82d89380e.png)

---

<div class="post-metadata">

**Author:** ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)\
**Post date:** [September 21, 2020, 2:38pm UTC](https://forum.dynamobim.com/t/compare-sublist-values-within-a-list/55339/4 "2020-09-21T14:38:55Z")

</div>

> [@Jarul](#):
>
> And I’m trying to compare the sublist values with each other to see if any values are different.

 ![compareSublists_2020-09-21_08-07-47](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/5/55a4c776974260ef9ec0c679f3bcf162aca942e8.png)  
[compareSublists.dyn](https://forum.dynamobim.com/uploads/short-url/ulmaAkfpIM3yousXzT3WHONG0VV.dyn) (3.9 KB)

```
l1 = a<1><2> == a<1><3>;
l2 = List.Transpose(List.Transpose(l1<1>)<1><2>);
l3 = List.AllTrue (l2<1><2><3>);

```

---

<div class="post-metadata">

**Author:** ![Jarul](https://avatars.discourse-cdn.com/v4/letter/j/ad7895/32.png) [@Jarul](https://forum.dynamobim.com/u/Jarul)\
**Post date:** [September 21, 2020, 2:45pm UTC](https://forum.dynamobim.com/t/compare-sublist-values-within-a-list/55339/5 "2020-09-21T14:45:41Z")

</div>

> [@Vikram\_Subbaiah](#):
>
> ```auto
> l1 = a<1><2> == a<1><3>;
> l2 = List.Transpose(List.Transpose(l1<1>)<1><2>);
> l3 = List.AllTrue (l2<1><2><3>);
> 
> ```

Perfect 🙂  
Mucho Thanks
