# Error while filtering and multiplication of numbers from the list

**URL:** <https://forum.dynamobim.com/t/error-while-filtering-and-multiplication-of-numbers-from-the-list/74080>\
**Category:** Revit\
**Tags:** revit, dynamo\
**Created:** [March 8, 2022, 8:55am UTC](https://forum.dynamobim.com/t/error-while-filtering-and-multiplication-of-numbers-from-the-list/74080 "2022-03-08T08:55:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![seba11](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@seba11](https://forum.dynamobim.com/u/seba11)\
**Post date:** [March 8, 2022, 8:55am UTC](https://forum.dynamobim.com/t/error-while-filtering-and-multiplication-of-numbers-from-the-list/74080/1 "2022-03-08T08:55:27Z")

</div>

![Problem](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/0/d0eea5f5c66699cb7b2e9d1e5f299d8327f1fa88.jpeg)

Hi, I have two problems. I wanted to filter out items that are empty but after filtering it only shows me the first item in the list.  
How can I multiply a number from a given list?  
For example:  
5 ​​\* 3  
1 \* 2  
and  
2 \* 7

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [March 8, 2022, 9:06am UTC](https://forum.dynamobim.com/t/error-while-filtering-and-multiplication-of-numbers-from-the-list/74080/2 "2022-03-08T09:06:11Z")

</div>

Hello @ @seba11 …Could something here help?

 ![1Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/4/54f225d051b2c8bd651961460f7095aa960ff1be.png)

---

<div class="post-metadata">

**Author:** ![SeanP](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/seanp/32/42560_2.png) [@SeanP](https://forum.dynamobim.com/u/SeanP)\
**Post date:** [March 8, 2022, 2:05pm UTC](https://forum.dynamobim.com/t/error-while-filtering-and-multiplication-of-numbers-from-the-list/74080/3 "2022-03-08T14:05:24Z")

</div>

Change the List Lacing and you should get the remaining items.

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [March 8, 2022, 2:13pm UTC](https://forum.dynamobim.com/t/error-while-filtering-and-multiplication-of-numbers-from-the-list/74080/4 "2022-03-08T14:13:23Z")

</div>

There are a few things going on with your filtering.

1. An empty or blank space is not the same as 0.
2. ‘0’ is a string not a number.
3. `x=='0'` is a condition. With no value assigned to `x`, the value is `null`, making the condition `null=='0'`. This of course returns `false`.
4. You’re now providing one `false` boolean as the mask to filter items, which is masking only the first item in your list.
5. You need to check each item against the condition and provide a list of booleans matching the list of filtered items.

What you have:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/a/9aeb4fd2463991f75c66f04f561b28cd365876b1.png)

What you want:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/9/99151835d44b04e653aed6d5e7b4686a9435cdc1.png)

From there you can multiply the filtered values by whatever you want.

---

<div class="post-metadata">

**Author:** ![seba11](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@seba11](https://forum.dynamobim.com/u/seba11)\
**Post date:** [March 10, 2022, 8:18am UTC](https://forum.dynamobim.com/t/error-while-filtering-and-multiplication-of-numbers-from-the-list/74080/5 "2022-03-10T08:18:29Z")

</div>

![doesn't work](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/5/95c42563b31dda801f54a431e48a914d80c935ff.jpeg)  
Could you explain why it doesn’t work?

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [March 10, 2022, 2:16pm UTC](https://forum.dynamobim.com/t/error-while-filtering-and-multiplication-of-numbers-from-the-list/74080/6 "2022-03-10T14:16:19Z")

</div>

As explained above, a blank or empty value is not the same as 0. You’ll get a null value when attempting any mathematical operation on it.

You would have to convert those empties to 0s first.
