Add new KPI rows based on calculation of other 2 KPI values

Hi, I have a requirement to compute a KPI “Other COGS” based on the formula:
Other COGS = Gross Profit - Gross Margin.
This KPI calculation is to be grouped by Country, BU, Period and the new set of KPI rows would then need to be appended with existing table of rest of KPI values.
Existing table example:

Country BU Period KPI Value
A A Q1 Revenue 600
A A Q1 Gross Margin 500
A A Q1 Gross Profit 400
A A Q1 FCF 100
A A Q2 Revenue 1600
A A Q2 Gross Margin 1500
A A Q2 Gross Profit 1200
A A Q2 FCF 1100
A B Q4 Revenue 2100
A B Q4 Gross Margin 2000
A B Q4 Gross Profit 1860
A B Q4 FCF 1600

Desired Output:

Country BU Period KPI Value
A A Q1 Revenue 600
A A Q1 Gross Margin 500
A A Q1 Gross Profit 400
A A Q1 FCF 100
A A Q1 Other COGS -100
A A Q2 Revenue 1600
A A Q2 Gross Margin 1500
A A Q2 Gross Profit 1200
A A Q2 FCF 1100
A A Q2 Other COGS -300
A B Q4 Revenue 2100
A B Q4 Gross Margin 2000
A B Q4 Gross Profit 1860
A B Q4 FCF 1600
A B Q4 Other COGS -140

Please advise the best nodes to use for this case. Any help would be much appreciated as a beginner. Thanks !!

hi @bollusathish14
assuming your KPIs are in same order, here is my loop proposal for the solution.
image
KNIME_kpi-MM.knwf (147.6 KB)
rgds

1 Like

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