If statement on sublist values


Still a dynamo newbie and super design script newbie.

I am sure there is a way to do this, but I would not even know where to begin. I appreciate any assistance that could lent my way.

If any value in a sublist does not = 0, find the least value in the sublist, take least value and subtract all entries by least value. End goal will have a 0 entry somewhere in the sublist.

See examples below:

A possible way :wink:

1 Like

@austin.guter This will get you started

1 Like

Hey thanks guys.

End goal, I need to keep the original list as well that had a 0 value originally. End output should have the same number of lists and entire as the input. Sorry this was not clear in the original image.

Is there a way that can be done as well?

Is this your intent?
EDIT=Updated to the correct workflow by @salvatoredragotta for “is 0 on this list?”

1 Like

@austin.guter In your case, you don’t really need to check for the presence of 0 in a sublist

1 Like