Icon

Column Combinations

Find the combination of values from a number of data columns that sum to a target value, using only standard nodes (no python or java snippet nodes)

Sample DataFind just the "value" columnsCount thevaluecolumnsDeterminenumber of combinations to test(2^ncols -1)Loop through combinationsHere, the magic happensThis is the "inner loop" for finding the totalfor the current combinationFor each iteration, use a bitmaskof the iteration number todecide columns to includein the total for this iteration.If the total of the columns for this iteration maskequals the target value, keep them, otherwisediscardOutColNameAppend to set ofgenerated columnsKeep only the columngenerated on this iterationAppend the derived valuesto original data setAggregate sets of valuesfor each rowAlso splitresults out intoseparate columnsTidy up the aggregationremove the additional delimiter that is added to the beginningTable Creator Column Filter Extract TableDimension Math Formula(Variable) Counting Loop Start Column Expressions Java Edit Variable Loop End (ColumnAppend) Column Filter Column Appender Column Aggregator Cell Splitter String Manipulation Sample DataFind just the "value" columnsCount thevaluecolumnsDeterminenumber of combinations to test(2^ncols -1)Loop through combinationsHere, the magic happensThis is the "inner loop" for finding the totalfor the current combinationFor each iteration, use a bitmaskof the iteration number todecide columns to includein the total for this iteration.If the total of the columns for this iteration maskequals the target value, keep them, otherwisediscardOutColNameAppend to set ofgenerated columnsKeep only the columngenerated on this iterationAppend the derived valuesto original data setAggregate sets of valuesfor each rowAlso splitresults out intoseparate columnsTidy up the aggregationremove the additional delimiter that is added to the beginningTable Creator Column Filter Extract TableDimension Math Formula(Variable) Counting Loop Start Column Expressions Java Edit Variable Loop End (ColumnAppend) Column Filter Column Appender Column Aggregator Cell Splitter String Manipulation

Nodes

Extensions

Links