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.  Returns the first 5 rank of Amount in a group by BillingAccount

    Employee
    Posted 03-07-2018 23:02

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

    Originally posted by: kiung

    I want grab the first rank of Amount in a group by BillingAccount by Ascending order like so.

    BillingAccount:string Amount:double
    1501647715 2,355.55
    1501647715 3,451.50
    1501647715 4,500.00
    1501647715 5,014.20
    1501647715 5,124.20
    4447997755 2,166.79
    4447997755 2,466.79
    4447997755 2,766.79
    4447997755 3,066.79
    4447997755 3,366.79
    4819516176 1,200.00
    4819516176 1,314.58
    4819516176 6,647.88
    4819516176 7,414.10
    4819516176 8,414.20

    Below sample data in static node


    node:BRD_Data
    bretype:core::Static Data
    editor:Label=BillingAccount, Amount
    editor:sortkey=5aa0ca661fe17238
    output:@40fe6c55598828e5/=
    prop:StaticData=<<EOX
    BillingAccount:string,Amount:double
    1501647715,5904.99
    1501647715,5904.99
    1501647715,3451.5
    1501647715,5904.99
    1501647715,2355.55
    1501647715,5904.99
    1501647715,4500
    1501647715,5904.99
    1501647715,5124.2
    1501647715,5014.2
    1501647715,7215.39
    1501647715,22117.1
    4819516176,14017.5
    4819516176,14017.5
    4819516176,7414.1
    4819516176,8414.2
    4819516176,14017.5
    4819516176,1314.58
    4819516176,20424.6
    4819516176,1200
    4819516176,20424.6
    4819516176,6647.88
    4819516176,20424.6
    4819516176,20424.6
    4819516176,24166.79
    4447997755,3066.79
    4447997755,2166.79
    4447997755,2466.79
    4447997755,2766.79
    4447997755,3066.79
    4447997755,3366.79
    4447997755,3666.79
    4447997755,3966.79

    EOX
    editor:XY=1120,70
    end:BRD_Data


  • 2.  RE: Returns the first 5 rank of Amount in a group by BillingAccount

    Employee
    Posted 03-12-2018 09:36

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

    Originally posted by: awilliams1024

    You can use the Sort node to get the input data into descending order by group. Then you can select the required number of records from each group using some scripting in a Filter node.
    The data can then be re-sorted to have an ascending amount.

    Rank by Group.brg


  • 3.  RE: Returns the first 5 rank of Amount in a group by BillingAccount

    Employee
    Posted 03-13-2018 17:52

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

    Originally posted by: kiung

    Perfect. Thanks