Nested Loop - Table Creator - Forecasting in KNIME

Dear Experts,
I am new on KNIME world and also on Predictive Models. :smiling_face:

I have a model with a good results (Gradient Boosted Tree) and now I want to create a Table, using Table Creator to use it for the predict results from the Predictor node.

sample data.xlsx (272.0 KB)

The final table will show the number of vouchers by Status (Ok or Not ok), by Type (Boutique, etc) from 1 to 53 weeks. It seems that I could apply loop inside loops to generate the table structure (all the combinations), but I am failing on that.

I read the article Loop in Knime to try different loop nodes, but no success :frowning:
Hope someone can help. Thank you!!!

1 Like

Hi @rbinoki and welcome to the forum.

If your main concern is just recreating the pivot table shown in Excel, you can do that with a single node:

ForumPivotExample.knwf (77.6 KB)

This doesn’t include the column and row subtotals, but is otherwise the same. Is this close to what you’re looking for?

Hi Scott, first, thank you for your inputs!
Not really what I want to achieve. I understand that I could create the table from the excel (as you explained). The goal is automatically generate the table structure /content with all combinations of voucher types and voucher status by week. For example below.

POS: Ok - weeks from 1 - 53
POS: Non-OK - weeks from 1 - 53
eVoucher: Ok - weeks from 1 - 53
eVoucher: Non-OK - weeks from 1 - 53
Boutiques: Ok - weeks from 1 -53
Boutiques: Non-OK - weeks from 1 -53
Boutiques BIS: Ok - weeks from 1 -53
Boutiques BIS: Non-OK - weeks from 1 -53
Internet: Ok - weeks from 1 -53
Internet: Non-OK - weeks from 1 -53
Phone: Ok - weeks from 1 -53
Phone: Non-OK - weeks from 1 -53
TMA: Ok - weeks from 1 -53
TMA: Non-OK - weeks from 1 -53
Trade in Boutique:Ok - weeks from 1 -53
Trade in Boutique:Non-OK - weeks from 1 -53

I search in the internet and it seems that with loops inside loops (Nested) I could achieve it. I am generating for 1 column by week… (see the picture), but my goal is to have one more column “Voucher Type” on this flow. Note sure if I am clear ;(

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