Monthly value into a repeated daily value

I have monthly data which goes out for 120 months.
Month 1: 5000
Month 2: 4000
Month 3: 3000
.
.
Month 120: 50

Trying to turn this into a constant repeating value which then after repeating for 30 or 31 days in a month, it then goes to the next value in the row.

I can get the start date of the project in the database which would define a set start date to be more accurate. But it’s getting that value to repeat for a single month then go to the next value.

How would I get this to work?

@mr2mike

Not sure whether I understand the challenge correct.

You have the mentioned list with entries per month and you want to fill a very long list of days with the given month’s value? This list shall start at a given month (e.g. January
So that you have a result list like

01 Jan 2023: 5000
02 Jan 2023: 5000
03 Jan 2023: 5000

01 Feb 2023: 4000
02 Feb 2023: 4000

01 Mar 2023: 3000

If this is what you would like to get this approach might bear a solution:

To get this you first create the date frame using the Create Date&Time Range node https://nodepit.com/node/org.knime.time.node.create.createdatetime.CreateDateTimeNodeFactory?numWorkflows=999999
with the defined start and the duration.

After that apply an auxilliary date in that table which contains the first of each month.

Now you can join both your input table and the the calculated timeline based on the month value and append the value.

1 Like

Thanks. That worked. Create Date and Time node. Then Extract Date and Time Node and then I had to Column Combiner node to get the single column into a date string that I had for the other data. Then joiner node.

1 Like

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