LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  outputing 1 or more records based on largest value in a field

    Employee
    Posted 08-15-2014 04:00

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: dhrobertson

    Hi there,

    I'm completely new to Lavastorm other than a bootcamp so this may seem like a stupid question and there may be a very easy way without much logic in which to do this...

    basically from a dataset, I want to return the row with the largest value from a particular column. short of looking manually through the data and finding the largest number, how can I script this to return the row with the largest value?

    an example is below: If I have this data as input, I want to return a single row which holds the largest value in column A2. ie. I want the output to be c8, 10

    A1:string, A2:int
    c1,2
    c3,4
    c4,1
    c5,6
    c6,1
    c7,4
    c8,10
    c9,1

    this is obviously a simple table with static data in it, in my actual case I have used an AGG Ex node to create a list of grouped data with averages for those groupings. I want to find the single row (or I suppose multiple rows) within this data that has the largest avg across the dataset.

    any help would be greatly appreciated!

    thanks


  • 2.  RE: outputing 1 or more records based on largest value in a field

    Employee
    Posted 08-15-2014 06:47

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    The attached graph should do what you're looking for.
    Edit: missing sort added to first solution.
    Attachments:
    Demo1.brg