# Generate Missing Data

**URL:** <https://forum.knime.com/t/generate-missing-data/33776>\
**Category:** KNIME Analytics Platform\
**Created:** [June 15, 2021, 12:39pm UTC](https://forum.knime.com/t/generate-missing-data/33776 "2021-06-15T12:39:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sven-abx](https://forum-cdn.knime.com/user_avatar/forum.knime.com/sven-abx/32/16028_2.png) [@sven-abx](https://forum.knime.com/u/sven-abx)\
**Post date:** [June 15, 2021, 12:39pm UTC](https://forum.knime.com/t/generate-missing-data/33776/1 "2021-06-15T12:39:40Z")

</div>

Hello Community,

I have a column with the following values:  
 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/e/b/ebaf555008db1a801d7abef521d7297e9160d7cf.png) which represent the year and week for a stocklevel.  
As you can see, some values are missing, because no data were reported.  
Now I like to generate the “missing” data.  
For example:  
**2015/01 4**  
2015/02 4  
2015/03 4  
**2015/04 5**

Values 2015/02 and /03 are generated and filled the the previouse value.

Is there an easy way to generate this date or do I have to build a loop?

BR,  
Sven

---

<div class="post-metadata">

**Author:** ![HansS](https://forum-cdn.knime.com/user_avatar/forum.knime.com/hanss/32/6979_2.png) [@HansS](https://forum.knime.com/u/HansS)\
**Post date:** [June 15, 2021, 1:12pm UTC](https://forum.knime.com/t/generate-missing-data/33776/2 "2021-06-15T13:12:49Z")

</div>

Hi @sven-abx

I was think of something like this:

- Create a date range with an interval of one week (7d).
- Extract Year and Week.
- Concat them: join(string($Year$),"/", string($Week$))
- Do an outerjoin with your dataset.

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

gr. Hans

---

<div class="post-metadata">

**Author:** ![sven-abx](https://forum-cdn.knime.com/user_avatar/forum.knime.com/sven-abx/32/16028_2.png) [@sven-abx](https://forum.knime.com/u/sven-abx)\
**Post date:** [June 15, 2021, 2:11pm UTC](https://forum.knime.com/t/generate-missing-data/33776/3 "2021-06-15T14:11:57Z")

</div>

Hello @HansS,

worked pretty well!

Thanks! 🙂  
BR,  
Sven

---

<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:** [June 22, 2021, 2:12pm UTC](https://forum.knime.com/t/generate-missing-data/33776/4 "2021-06-22T14:12:28Z")

</div>

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