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.  Aggregated Averages

    Employee
    Posted 01-08-2013 07:18

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

    Originally posted by: Wizardous

    Hi,

    I have some problem with using avg(). I need to get an average of a column by groups of other column. But it seems like avg is not a group function to use in LAE. I've attached a brg about this issue(avg1 is not equal to avg2). Can you please correct me if i am mistaken.

    Thank you

    Kind regards

    Ozgun

    Aggregated_average.brg


  • 2.  RE: Aggregated Averages

    Employee
    Posted 01-09-2013 02:27

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

    Originally posted by: aop

    Hi!

    I think you are correct and you need to use your avg1 approach.


  • 3.  RE: Aggregated Averages

    Employee
    Posted 01-09-2013 22:12

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

    Originally posted by: rboccuzzi

    Yes, that it correct, you want to implent as avg1. The function avg takes the average of all the parameters passed into it; if you pass a single argument, it will always return that. What you are looking for would be groupAvg, which isn't currently implemented.

    To help avoid this confusion, in future versions of the LAE, we are introducing new names, groupSum and groupCount, and will encourage their use over the current sum and count; hopefully this will help clarify that distinction.

    Cheers
    Rich


  • 4.  RE: Aggregated Averages

    Employee
    Posted 01-10-2013 06:09

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

    Originally posted by: Wizardous

    Thank you for this information Rich and aop.

    Regards

    Ozgun