calculate total and avrange per channel