# Expanding Values Downwards in a Table

**URL:** <https://forum.knime.com/t/expanding-values-downwards-in-a-table/36856>\
**Category:** KNIME Analytics Platform\
**Tags:** tableau\
**Created:** [October 20, 2021, 4:59pm UTC](https://forum.knime.com/t/expanding-values-downwards-in-a-table/36856 "2021-10-20T16:59:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CCosta](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/c/9dc877/32.png) [@CCosta](https://forum.knime.com/u/CCosta)\
**Post date:** [October 20, 2021, 4:59pm UTC](https://forum.knime.com/t/expanding-values-downwards-in-a-table/36856/1 "2021-10-20T16:59:50Z")

</div>

Hello,

I’m having some problems developing a KNIME flow.

I’m trying to expand values downwards and stop until they find an already filled value.

Example:

![image](https://forum-cdn.knime.com/uploads/default/original/3X/7/e/7e4fa49f6d66e40720b406b389c0de27c26c83a9.png)

The objective is to have the columns expand values to the missing values downwards and stop whenever they find a non-missing values.

The objetive is that the result would be this:

![image](https://forum-cdn.knime.com/uploads/default/original/3X/f/5/f5de7d10b6e86a3cbae68951d4d1313dc1d8db30.png)

I’ve tried the following:

- Extract the Row ID into its own table and removing “Row” so I could have an index column
- Filtering out the empty rows, that way I have the starting index of a value
- Looping with Table Row to Variable in the table where Type is not empty
- Using a Java Snippet with the following code:

```auto

if(tblIndex>=varIndex)
{
out_values = v_Type;
}

```

However, at the end of this loop, only CCC is filled, and I’m at a loss, I’m pretty sure there must be a simpler solution here that I’m not aware of.

![image](https://forum-cdn.knime.com/uploads/default/original/3X/f/4/f44cd6bc5fdd53e4d33e9a8e2e11f353f60fda3c.png)

Does anyone have any idea on what to do?

Thanks.

---

<div class="post-metadata">

**Author:** ![elsamuel](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/e/b4bc9f/32.png) [@elsamuel](https://forum.knime.com/u/elsamuel)\
**Post date:** [October 20, 2021, 5:05pm UTC](https://forum.knime.com/t/expanding-values-downwards-in-a-table/36856/2 "2021-10-20T17:05:27Z")

</div>

Welcome to the forum, @CCosta.

> I’m pretty sure there must be a simpler solution here that I’m not aware of.

It’s a common enough task that there’s a dedicated node for it, and that would be the Missing Value node.

Starting table:  
 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/1/8/18888d1be6a5b642950800f47a2e24be4d11db4b.png)

Missing Value node configuration:

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/e/c/ec6ffa86a27562e47b27bbd1ea82a5b9451b45a5.png)

Result:  
 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/0/8/08c099453278efbf7e43dd8bb831053e83bf0951.png)

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [October 27, 2021, 5:06pm UTC](https://forum.knime.com/t/expanding-values-downwards-in-a-table/36856/3 "2021-10-27T17:06:13Z")

</div>

Closed on October 27, 2021, 5:06pm UTC

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