Ok, maybe this will help:
Paste this into the Set rules for file display in the view, via the Import/Export button:
[Media Type]=[Audio] [=save(0,v_tracks[album artist (auto)][album])1]=1 [=save(math(1+load(v_tracks[album artist (auto)][album])),v_tracks[album artist (auto)][album])1]=1 [=save(0,v_brsum[album artist (auto)][album])1]=1 [=if(compare([bitrate],=,0),save(-1,v_brsum[album artist (auto)][album]),)1]=1 [=if(compare(load(v_brsum[album artist (auto)][album]),>,-1),save(math([bitrate]+load(v_brsum[album artist (auto)][album])),v_brsum[album artist (auto)][album]),)1]=1 ~sort=[Album Artist (auto)],[Album],[Track #],[Media Type],[Disc #],[Name]
Paste this into an expression column either in a pane or file list column depending upon your needs:
if(compare(load(v_brsum[album artist (auto)][album]), >, 0),
formatnumber(
math( load(v_brsum[album artist (auto)][album]) / load(v_tracks[album artist (auto)][album]) ),
2
),
0)
You should now have an expression column that shows average bit rate per-album.
Let's break the first expression down, piece by piece:
[Media Type]=[Audio]
We want audio files only.
[=save(0, v_tracks[album artist (auto)][album])1]=1
This saves the value 0 into a global variable, whose name is the concatenation of "v_tracks" and the value of [album artist (auto)] and [album]. In otherwords, there is one variable created per unique album. The extra [= ]=1 syntax around the outside is required since the custom rule needs to look like an MC search expression of the form [=expr]=1. That extra 1 just inside is the sneaky trick to ensure that the expr portion outputs a 1, since the save() function generates no output. So, save() executes and the ultimate output of the expression is [=1]=1, thus being true for ALL FiLES MC examines. This causes the variable to be set for each album (yes, multiple times, but that's OK).
[=save(math(1+load(v_tracks[album artist (auto)][album])),
v_tracks[album artist (auto)][album])1]=1
This loads the value of the per-album number of tracks global variable, so that math() can add 1 to it, and then saves it back into the per-album number of tracks global variable. The previous search rule already initialized the variable with 0. As MC operates on each track (by determining if the rule would select a track for inclusion), the per-album tracks global variable is incremented.
[=save(0, v_brsum[album artist (auto)][album])1]=1
This initializes the per-album bitrate sum global variable with 0, just like above.
[=if(compare([bitrate],=,0),
save(-1, v_brsum[album artist (auto)][album]),
)1]=1
This tests the tracks bitrate for 0, and saves -1 into the per-album bitrate if the bitrate is 0. The If() does nothing if bitrate is not 0.
[=if(compare(load(v_brsum[album artist (auto)][album]),>,-1),
save(math([bitrate]+load(v_brsum[album artist (auto)][album])),
v_brsum[album artist (auto)][album]),
)1]=1
This compares the per-album bitrate sum against -1; i.e. is it initialized?. If initializesd, then load the current per-album bitrate sum and add it to the track's bitrate, and then re-save that into the per-album bitrate sum. Nothing is done if the per-album bitrate sum is -1.
~sort=[Album Artist (auto)],[Album],[Track #],[Media Type],[Disc #],[Name]
Gratuitous sorting
I think at this point the expression column expression should be pretty clear.