I have a list of columns and I need to create a new series of columns with every permutation of the difference between the listed columns. The number of the columns in the list can vary and the non-iterative example below covers 3 columns (12 to 14).
Current Data Table() << New Column(Head Name( As Namespace( Column( 12 ) ) )||" - "||Head Name( As Namespace( Column( 13 ) ) )||" HSD Threshold Matrix", Numeric, "Continuous", Format("Best", 10), Formula(Col Maximum(If(Contains(:Level, Head Name(As Namespace(Column(13))), 1), As Column(12)), :Group, :Size)));
Current Data Table() << New Column(Head Name( As Namespace( Column( 12 ) ) )||" - "||Head Name( As Namespace( Column( 14 ) ) )||" HSD Threshold Matrix", Numeric, "Continuous", Format("Best", 10), Formula(Col Maximum(If(Contains(:Level, Head Name(As Namespace(Column(14))), 1), As Column(12)), :Group, :Size)));
Current Data Table() << New Column(Head Name( As Namespace( Column( 13 ) ) )||" - "||Head Name( As Namespace( Column( 14 ) ) )||" HSD Threshold Matrix", Numeric, "Continuous", Format("Best", 10), Formula(Col Maximum(If(Contains(:Level, Head Name(As Namespace(Column(14))), 1), As Column(13)), :Group, :Size)));
Slán
SpannerHead