Options

Get min row column name

Teja_VaranasiTeja_Varanasi Member Posts: 17 Contributor II
I have a table like this

A B C D
5 2 1 9

I should get C in the results tab. Is there any operator to do this? Can somebody please help.
Tagged:

Best Answer

  • Options
    BalazsBaranyBalazsBarany Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
    Solution Accepted
    Hi! 

    You could transpose your table so that the values are in rows, not columns. Then sort by the number column and Filter Example Range for getting the first (lowest) value. The former attribute name in the second column will be the one associated with the lowest number.

    That's another way to do it. If you have multiple data rows (or expect to have them in the future), it might be better to use Loop Attributes.
    There you would use Aggregate to get the minimum of the current attribute and Generate Macro to compare the current value to the lowest known value and remember the attribute belonging to that. This is a bit more complicated than the first approach.

    Regards,
    Balázs

Answers

Sign In or Register to comment.