Loading

How to Calculate Moving Average Including Missing Values

Udgivelsesdato: Apr 13, 2024
Opgave

The moving average is calculated ignoring the missing values. Is there a way to calculate the moving average including missing values?

e.g.) If some data is missing as shown below, If you set the moving average for the previous 3 days, the calculated result on Jan 4 is 150 ( = (100+200+150) / 3) while the assumed result is 112.5 ( = (100+200+150+0) / 4).

User-added imageUser-added image

Trin
Below is an example of calculating moving average for previous 3 days including missing values.
User-added image

1. Add a continuous date field to Columns.
2. Create a calculated field and name it Moving Average including missing values.
WINDOW_AVG(ZN(SUM([Measure Field])), -4, 0)
3. Add Moving Average including missing values field to Rows.
Yderligere ressourcer
Quick Table Calculations
Vidensartikelnummer

001458577

Vedhæftede filer

sample.twbx

43 KB

 
Indlæser
Salesforce Help | Article