Is there a beast mode I can use to add two columns and then get the average?

Options

Best Answers

  • david_cunningham
    Answer ✓
    Options

    @kim_barragan0126

    If it’s always just the 2 columns, and you will have nulls. You could do

    (col1+col2)/2
    

    David Cunningham

    ** Was this post helpful? Click Agree 😀, Like 👍️, or Awesome ❤️ below **
    ** Did this solve your problem? Accept it as a solution! ✔️**

  • Sean_Tully
    Sean_Tully Contributor
    edited May 14 Answer ✓
    Options

    Maybe something like:

    sum(ifnull(`R-Phone Interview`, 0) + ifnull(`R-Virtual Interview`, 0))/(count(`R-Phone Interview`) + count(R-Virtual Interview))

  • ArborRose
    ArborRose Coach
    Answer ✓
    Options

    As mentioned, it's just (col1+col2)/2. Use coalesce(col1,0) if you have nulls. They will become zero.

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **

Answers

  • david_cunningham
    Answer ✓
    Options

    @kim_barragan0126

    If it’s always just the 2 columns, and you will have nulls. You could do

    (col1+col2)/2
    

    David Cunningham

    ** Was this post helpful? Click Agree 😀, Like 👍️, or Awesome ❤️ below **
    ** Did this solve your problem? Accept it as a solution! ✔️**

  • Sean_Tully
    Sean_Tully Contributor
    edited May 14 Answer ✓
    Options

    Maybe something like:

    sum(ifnull(`R-Phone Interview`, 0) + ifnull(`R-Virtual Interview`, 0))/(count(`R-Phone Interview`) + count(R-Virtual Interview))

  • ArborRose
    ArborRose Coach
    Answer ✓
    Options

    As mentioned, it's just (col1+col2)/2. Use coalesce(col1,0) if you have nulls. They will become zero.

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **

  • kim_barragan0126
    Options

    Thank you all!