Split one row into multiple rows by assigned %

Hi all,
i would like to split one row into multiple rows, based on the certain % i assigned in another table. For example, the original table (table 1) has the total and i want to replace the original row (e.g. A with 100) into 2 new rows (A1 with 10 (10010%) while A2 with 90 (10090%).

I had tried different nodes, e.g. row split, but can’t find anything useful. Thanks in advance for the help.

Table 1
Col 1(Name) Col2 (Amt)
A 100
B 200

Table 2
Col 1 (Name) Col 2 (Sub-Product) %
A A1 10%
A A2 90%
B B1 30%
B B2 30%
B B3 40%

Hi @chenchenweitom,
you can do this by

  1. join both tables with joiner node
  2. calculate your final value e.g. with math formula node

BR
Hermann

1 Like

Thanks… it works perfectly

Hi @morpheus ,
i run into another issue where the sum of the rows can’t tie with the original value, how should i do. for example, if my A ($10) needs to split by 33%, 33%, and 34%, so it will then split into 3.3, 3.3 and 3.4. if i round up or down, it won’t be tied to 10 anyway.

ideally, it should be like, 3, 3, and 4. or the last row should be the residual amount.

Thanks in advance.

Hi @chenchenweitom,
there is no general solution for rounding issues and you have to set up a more complex workflow with predefined rules to handle this problem.
On the other hand you have table2 where you have defined the splittings. Why do you don’t enter this in a 2nd column?

e.g.
Sub-Product 33% - 33% - 34% for more precise results
and
Sub-Product2 30% - 30% - 40% for those rounded results.

BR

1 Like

@morpheus
Thank you… i think this is the only way out.

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