Average line in a table

To build a line indicating an average value across a table at first might seems like impossible to build in Webi however with help of an alerter it’s an easy development.
Here is a data set from the eFashion database. Let’s create an extra column with a variable calculating an average of revenue.

[@Avg] = Average ([Sales revenue]) In Block


Then let’s compare that average to Sales revenue and put 1 where an avg value is placed. This can be done with the following formula:

=[Sales revenue]<=[@Avg] AND Previous([Sales revenue])>[@Avg]

Let’s save it in a variable called [@Avg flag]


Now we replace that column with this formula

=If ([Avg flag];”AVG =”+[@Avg];””)

and create an alerter. The only custom formatting in it will be an upper border that would show up as a black thick line.


Then we apply that alerter on all columns…


…And change some table formatting to make the last column white.  Here is the final result.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s