11 Replies Latest reply on May 18, 2016 6:43 AM by david sharbaugh

# Trying to take sum of averages

have a situation where each hospital has an average daily census (number of people in beds). I have 7 hospitals and i would like to show them as one.  So I need to sum the averages

• ###### 1. Re: Trying to take sum of averages

It depends on how you're underlying data is structured and how you're getting your AVG number. Any of these could work, it all depends on your set up, plus your definition of average.

SUM([AvgField])

WINDOW_SUM(AVG([Field]))

WINDOW_AVG(SUM([Field]))

One of these might work, other solutions might work, you need to give more information about the data to get a better answer.

• ###### 2. Re: Trying to take sum of averages

HI David,

can you please create some sample data based on the requirement?

Thanks and Regards,

Ashish Chaudhari

• ###### 3. Re: Trying to take sum of averages

Here is sample data

• ###### 5. Re: Trying to take sum of averages

here is the data

• ###### 6. Re: Trying to take sum of averages

I think the data upload on the forum is temporarily broken

• ###### 7. Re: Trying to take sum of averages

I am going to try to insert an image

• ###### 8. Re: Trying to take sum of averages

Great, option 2 above is the solution then: WINDOW_SUM(AVG([Cases]))

• ###### 9. Re: Trying to take sum of averages

I must be missing something in my example.  So I have a radio button filter that includes each of the 7 hospitals and the “All”   n For each of the hosptials it works fine but when I hit the ALL is when I am not getting the sum of the averages …

• ###### 10. Re: Trying to take sum of averages

Ok, if you don't have Region (or hospital in this case)  in the view the table calculation solution becomes more complicated.

There is a LOD calculation version that should work. Try this formula instead:

{FIXED [Region]:AVG([Cases])}

You can sum that calculated field.

• ###### 11. Re: Trying to take sum of averages

Thanks.  I ended up jhaving to add the month/year fierld into the fixed section but would have never have figured this out without your help!!!

1 of 1 people found this helpful