I have an issue when the change of month happens during a week (so eg. 30.11. → 01.12.).
Therefore, I need to find a way to get the share of the working days belonging to which month in these weeks. Like in the example date, 3/5 (0.6) belong to November and 2/5 (0.4) belong to December. And I need to get this share for every upcoming month.
Any suggestions on how to do that as I’m pretty new to Knime? Thanks in advance!
Hello @ricobitsch and welcome to the KNIME community
You may find useful ‘Extract Date&Time Fields’ node. You can extract date descriptive fields in columns from input date. For example you can extract Month in number or name format + week of the year.
After that you may need to assign the reporting month based in a logical criteria; like this week owns to the month that ‘last working day (friday)’ belongs.
Based on previous example, you can create a full year range in a separated table with ‘Create Date&Time Range’ node; then filtering Friday days and extracting month and week number, you can JOIN resulting reporting month to your data, based in week number JOIN criteria…
Aiming to extend this solution to upcoming years, you will need to extract ‘Year’ field together for input data and reporting table (extended range) as well. The final JOIN criteria will be double: Week Number + Year
Regarding the links, you can drag them from the browser into your KNIME desktop. Besides, they are KNIME base nodes, so you can search by typing in the Node Repository. Building in KNIME to avoid spreadsheet work is really satisfactory, but I recommend you to complete some of the beginners training resources available.
I know how to insert the links into my KNIME. What I meant by “share” is what I wrote in the beginning of the thread. I need to find a way to give an output of what share of days belong to which month in that specific week with the changing month. Like in the example date, 3/5 (0.6) belong to November and 2/5 (0.4) belong to December. I would really appreciate approaches to do that.
Is this ‘3/5 (0.6)’ a String? Could you explain further?
I interpreted 3 (wed.) / 5 working days…
You caan extract Day of Week with number format as well. The 0.6 is a Math Formula node. Combining together is a String Manipulation node. But I am just guessing right now.
Hello @ricobitsch
Please check this view of the challenge. Despite you didn’t clarify your use case or expected output. I’ve anticipated a possible outcome.
Whatever is related to your shared month proportions in a week, based in number of days; you can find the mechanics in this workflow. As you see it is all about groupings, joiners…