9 Replies Latest reply on Jul 6, 2018 1:48 PM by Richard Garcia

# avg and window_avg

Hi,

what is the difference between avg and window_avg function

• ###### 1. Re: avg and window_avg

AVG - similar to SUM calculates over the entire measure

WINDOW_AVG - is a table calc that averages over the data in the window only, or a subset of that if required.

1 of 1 people found this helpful
• ###### 2. Re: avg and window_avg

can you give example

• ###### 3. Re: avg and window_avg

Scroll down to WINDOW_AVG here :

• ###### 4. Re: avg and window_avg

HI Vibhu,

Main deference between Avg and Window Avg is

Avg calculate like  sum(sales)/Count (lowest granularity )

see the below example , I am taking the report at category level , but it takes @ count of product Name count.

window Avg like      Total Sales/ count of rows

in this case it takes report level avg.

Thanks

Sreenivas

• ###### 5. Re: avg and window_avg

I am trying to calculate past 5 Day Rolling Average from a table in my data source but struggling to work out these details.  There are different channels within subset of data.  My goals is create a summary by Channel past rolling 5 day average.  I tried in the Data Source tab Field Calculation with window_avg and table calculation moving avg but still struggle.

The result should look like for 6/13/2018 :

 By Channel Summary 5 Day Rolling Avg. a b 7.4 4.8

Here is the sample table data:

 Date Channel Count 27-May c 5 28-May c 4 28-May e 40 29-May b 3 30-May a 15 31-May c 9 1-Jun a 5 2-Jun b 6 3-Jun c 8 3-Jun e 8 4-Jun a 9 5-Jun b 6 6-Jun b 5 6-Jun e 20 7-Jun a 2 8-Jun b 3 9-Jun c 7 10-Jun b 4 11-Jun c 5 12-Jun a 6
• ###### 6. Re: avg and window_avg

Can you Create a Separate Thread with some data and expected result?

• ###### 7. Re: avg and window_avg

Hi Deepak,

I created a new email thread and put a table of the data.  I been reading up on these threads trying to work out this calculation

Richh

• ###### 8. Re: avg and window_avg

You have not written what do you need. your requirement is confusing as you dont have 13 june in data. Please check the result .

• ###### 9. Re: avg and window_avg

Hi Deepak,

I posted a separate thread and the result is on second paragraph:

For 6/13/2018 the result should look like:

The result should look like for 6/13/2018 :

 By Channel Summary 5 Day Rolling Avg. a b 7.4 4.8