I am working on a data analysis problem where I have multiple columns of data which are to be analysed pairwise (basically two experiments with different dosages for each compound).
So the dataset structure looks like this
As the analysis is to be done by users who conducted the experiment, I used Column Selection Widgets in a Component to allow them to pick the two columns of interest, encoding the selected Column Heads in two flow variables.
The decisive step in the analysis is now a rule-based row filter to check for some criteria to be met for the result to be declared relevant, based on comparison of values within the two columns of interest.
Is there a way to use the values stored in the flow variables earlier as column names in the Rule Engine? This would save me to rewrite the rules everytime a new pair of columns is picked. alternatively, is there a way to address column index (in equivalence to row index) to address the respective columns in a more generic fashion?
Any help would be greatly appreciated.
Thanks and regards
You simply need to change data structure to
Sample Number, Sample_High, Sample_low
and use regular row filter on Sample number.
You ca use Unpivot node to change structure.
thank you - that will work obviously and I will pursue this line to get this specific analysis done.
I was also wondering about the possibility in general, to use data stored in flow variables as Column Headers in the Rule Engine.
Thanks again for your quick reply,
Hi there @Jo1607,
you can’t use column names stored in flow variables as column names in Rule Engine nodes but there is a workaround!
one option is to use Column Expressions node. There you can access column with following syntax column(0), column(1)… Or like this column(flow_variable) where flow_variable is your column name. Combined with simple if() clause you can get additional column upon which you then filter your data
another option is to use String Manipulation (Variable) or Variable Expressions node to create complete rule(s) and then use that flow variable in Rule Engine nodes. Check this topic for more.
Hope this helps!
thanks for the clarification of the topic and of course the proposed work around. Will give it a try,
Thx and Rgds
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.