Solutions to "Just KNIME It!" Challenge 10 - Season 2

:boom: New Wednesday, new Just KNIME It! challenge! :boom:

This week, our tenth challenge of this season focuses on Restaurant Yummy :spaghetti: and how well it is doing in terms of sales :moneybag:. It’s an ETL problem and we’re excited to see your creative solutions to it!

Here is the challenge. Let’s use this thread to post our solutions to it, which should be uploaded to your public KNIME Hub spaces with tag JKISeason2-10.

:sos: Need help with tags? To add tag JKISeason2-10 to your workflow, go to the description panel on the right in KNIME Analytics Platform, click the pencil to edit it, and you will see the option for adding tags right there. :slight_smile: Let us know if you have any problems!

3 Likes

Hi @alinebessa thanks for sharing the challenge :slight_smile: I just had a look at the data and wanted to check that its correct that it only contains 1 and a half months of the year?

Thanks :slight_smile:
Heather

2 Likes

Hi Everyone :slight_smile:

My solution this week converts the Date column from String to Date format and uses the -Moving Aggregation- node to calculate the Cumulative Sum for the YTD Sales. For the MTD sales, I have performed the same moving aggregation but this time after having extracted the month, I have cycled through each month using a -Group Loop-:

You can find my solution on the hub here:

Thanks
Heather

3 Likes

Hi there,

here’s my solution, two loops and two moving aggregations:

See you to the next.
Giuseppe

3 Likes

Hello,

here is my solution:

It works even if you upload multiple years, because YTD and MTD calculations are made on two loops.

Have a nice evening,
Raffaello Barri
LinkedIn

3 Likes

Hi all,
Here is my solution.

2 Likes

find my take on the challenge 10 …initially presumed a static number …plotted on line .

5 Likes

Yes, Heather, this is the right dataset! :blush:

2 Likes

Hello everyone, this is my solution.

3 Likes

Greetings, esteemed participants,

As the author of this Challenge, I am delighted to witness a plethora of submissions on the very first day. I extend my heartfelt appreciation for the correctness and quality displayed in all of the solutions. Well done!

In order to stimulate your intellectual prowess even further (if I may indulge), I have managed to solve this Challenge without the use of loop nodes. I kindly invite you all to explore the possibility of solving it through alternative means, avoiding the usage of loop nodes.

I eagerly await to see your solutions…

5 Likes

Hi crazy KNIMErs, How’s that going?
I see you are very active today…

I can’t say much today, I just wanted to make something different although I know it is not the best option.

See you at the next battle!

3 Likes

JKISeason2-10

JKISeason2-10

Please find my solution

4 Likes

Hi everyone,
here is my solution.

3 Likes

Hi @Mpattadkal

Nice to hear that you like our solutions :slight_smile:

I’ve attempted your challenge and I think I’ve done it!

I started off the same way, calculating the YTD sales with the -Moving Aggregation- node. I extracted the month as a number, grouped by the month and took the last YTD value for each month. I guess I could have just done a sum of the sales to achieve the same result.

I then used a second -Moving Aggregation- node to perform a negative lag on the numerical month column, meaning that the month is now associated with the total value from the previous month.

I then joined these total values to the original table and subtracted them from the YTD column to calculate the MTD sales.

I made some extended sales data by expanding the date column in Excel and then generating random numbers in KNIME. I wanted to check the workflow could be applied to more than 2 months in the year :slight_smile:

You can find my workflow in the hub here:

Best wishes
Heather

5 Likes

This is exactly what my solution looks like, amazing job! @HeatherPikairos

3 Likes

Oh that’s great to hear! Thank you :slight_smile:

3 Likes

This is a very nice solution @MoLa_Data but I see a limitation here, you will have to add Moving Aggregation nodes whenever we have a new month in the data, eg: right now you have 2 nodes for Jan, feb and will need to add 10 more moving average nodes once we have data for March-Dec, Can you think of making this solution dynamic (works with any number of months)?

1 Like

Oh yes, I know it’s not the best option, in fact, at the bottom of the workflow, I explain that. My colleagues already shared the best option, and I just wanted to share something different.
Thanks for comments @Mpattadkal I really appreciate your opinion.

2 Likes

Hi all,
Here is my solution. I tried the challenge without loop nodes, but it could be wrong. I managed to make it by using pivoting node.Thanks

4 Likes

A very good solution to successfully implement functionality without using loops. Thank you for sharing, I have also learned.

3 Likes