Create a new line item to be max of old line item

This might be a silly question, but I just got stuck and couldn't think of a solution. I want to create a new line item showing the max of an existed line items. Take the example below, I want to create a new line item called max days, which takes the max of Days. 

Original:

        Days

A        1

B        2 

C        3

D        4

New:

        Days     Max Days

A        1                4

B        2                4

C        3                4

D        4                4

 

 

 

Best Answer

  • Hi Jsong,

     

    You can try the following.

    Note the summary method of 'Value'.

     

    Thanks,

    LipChean

     

    Screen Shot 2019-03-13 at 2.40.30 PM.pngScreen Shot 2019-03-13 at 2.40.38 PM.png

Answers

  • Thank you so much!

  • @LipChean_Soh ,

     

    This solution works nicely.

     

    Lets say in case I cannot have a summary as MAX, I could create another line item and set the summary to MAX.

     

    Is there any alternate solution to it, I tried to use the aggregation function MAX using the TOP level of the list. Its not working.

     

     

     

    Thanks

    Arun

  • Hi Arun,

     

    In X[Max:Y], Y refers to the lists of which you want to first segregate your 'X', before finding the largest 'X' to be assigned to different members of Y.

     

    I'm interested to find out why you cannot use 'Summary = Max' with Value. 

     

    Having said that, i created something below that utilizes a list with a single member, but i highly discourage creating single member list since it's normally the first step towards creating some super customized solution that isn't scalable or maintanable.

     

    Thanks,

    LipChean

    Screen Shot 2019-03-14 at 2.02.01 PM.pngScreen Shot 2019-03-14 at 2.02.08 PM.pngScreen Shot 2019-03-14 at 2.05.37 PM.png

  • @LipChean_Soh 

    Thanks. Yes, I agree that we should not have a single member list.

    Thats why I was trying to use top level, I was not sure why the aggregation function is not working at the top level.

     

    Thanks

    Arun